File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,18 +94,9 @@ private function parseFiles($files)
9494 // replace whitespace up to first occurrence of a quote-mark (including)
9595 $ translation [1 ] = preg_replace ('/^\s*[ \'"`]/U ' , '' , $ translation [1 ]);
9696
97- if (array_key_exists ($ translation [0 ], $ allMatches ) && $ allMatches [$ translation [0 ]] !== $ translation [1 ]) {
98-
99- $ this ->error ('Duplicitní klíč překladu s rozdílnou hodnotou: ' );
100- $ this ->error ("Soubor: $ file " );
101-
102- $ this ->line ($ translation [0 ].' = ' .$ translation [1 ]);
103- $ this ->line ($ translation [0 ].' = ' .$ allMatches [$ translation [0 ]]);
104-
105- return 1 ;
106- } else {
107- // 'mb_convert_encoding()' prevents 'Malformed UTF-8 characters, possibly incorrectly encoded' error
108- $ allMatches [$ translation [0 ]] = mb_convert_encoding ($ translation [1 ], 'UTF-8 ' , 'UTF-8 ' );
97+ if (! array_key_exists ($ translation [0 ], $ allMatches )) {
98+ // 'mb_convert_encoding()' prevents 'Malformed UTF-8 characters, possibly incorrectly encoded' error
99+ $ allMatches [$ translation [0 ]] = mb_convert_encoding ($ translation [1 ], 'UTF-8 ' , 'UTF-8 ' );
109100 }
110101 }
111102 }
You can’t perform that action at this time.
0 commit comments