From 4b3d8bb24657aacddcb703bcd05036d220bd22cc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jun 2010 00:36:54 +0000 Subject: [PATCH] Do not write key if translation error. --- dev/translation/langAutoParser.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dev/translation/langAutoParser.class.php b/dev/translation/langAutoParser.class.php index 563aa129946..a003c6fe682 100644 --- a/dev/translation/langAutoParser.class.php +++ b/dev/translation/langAutoParser.class.php @@ -125,7 +125,7 @@ FILE_SKIP_EMPTY_LINES); // If translated return //print "destKey=".$destKey."\n"; if ( trim($destKey) == trim($key) ) - { // Found already existing translation + { // Found already existing translation (key already exits in dest file) return 0; } } @@ -136,6 +136,8 @@ FILE_SKIP_EMPTY_LINES); if ($key == 'CHARSET') $val=$this->outputpagecode; + if (empty(trim($val))) return 0; + $this->translatedFiles[$file][] = $key . '=' . $val ; return 1; }