Module: nagvis Branch: master Commit: bc07316b02a17e96a68a1288f7c1b4cc9b2638d5 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=bc07316b02a17e96a68a1288f7c1b4cc9b2638d5
Author: LaMi <[email protected]> Date: Mon Nov 16 19:33:46 2009 +0100 Untranslated strings contain the macros values with the keys to make debugging easier when translation is not working properly --- share/server/core/classes/GlobalLanguage.php | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/share/server/core/classes/GlobalLanguage.php b/share/server/core/classes/GlobalLanguage.php index 7774142..8343587 100644 --- a/share/server/core/classes/GlobalLanguage.php +++ b/share/server/core/classes/GlobalLanguage.php @@ -267,6 +267,19 @@ class GlobalLanguage { $ret = $this->getReplacedString($ret, $replace); } + // When the translated string is equal to the requested id and some macros + // should be replaced it is possible that there is a problem with the + // gettext/translation mechanism. Then append the imploded + if($id === $ret && $replace !== NULL) { + if(!is_array($replace)) { + $ret .= 'Opts: '.$replace; + } else { + // Implode does not return the keys. So simply use json_encode here + // to show the keys to the user + $ret .= 'Opts: '.json_encode($replace); + } + } + return $ret; } ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
