diff --git a/app/classes/Transvision/AnalyseStrings.php b/app/classes/Transvision/AnalyseStrings.php index a2fa8b8f..830691cb 100644 --- a/app/classes/Transvision/AnalyseStrings.php +++ b/app/classes/Transvision/AnalyseStrings.php @@ -57,7 +57,7 @@ public static function differences($tmx_source, $tmx_target, $repo, $ignored_str // %1$S or %S. %1$0.S and %0.S are valid too 'printf' => '/(%(?:[0-9]+\$){0,1}(?:[0-9].){0,1}([sS]))/', // $BrandShortName, but not "My%1$SFeeds-%2$S.opml" or "{ $brandShortName }" - 'properties' => '/(? '/(? '/(%(?:[0-9]+\$){0,1}([sd]))/', // %1, %2, etc. diff --git a/tests/units/Transvision/AnalyseStrings.php b/tests/units/Transvision/AnalyseStrings.php index 0d34d247..59e3eed4 100644 --- a/tests/units/Transvision/AnalyseStrings.php +++ b/tests/units/Transvision/AnalyseStrings.php @@ -259,6 +259,30 @@ public function differencesDP() [], [], ], + [ + // $brand variables in .properties + ['browser:foobar17' => 'Are you sure you want to quit $BrandFullName Setup?'], + ['browser:foobar17' => 'Da li ste sigurni da želite ugasiti $BrandFullName instalaciju?'], + 'gecko_strings', + [], + [], + ], + [ + // Missing $brand variables in .properties + ['browser:foobar17a' => 'Are you sure you want to quit $BrandFullName Setup?'], + ['browser:foobar17a' => 'Da li ste sigurni da želite ugasiti instalaciju?'], + 'gecko_strings', + [], + ['browser:foobar17a'], + ], + [ + // $brand variables in .properties with added text, not an error + ['browser:foobar17a' => 'Are you sure you want to quit $BrandFullName Setup?'], + ['browser:foobar17a' => 'Wil u definitief die $BrandFullName-opsteller afsluit?'], + 'gecko_strings', + [], + [], + ], [ // Mispelled variable ['iostest:foobar1' => 'Introductory slide %1$@ of %2$@'],