diff options
author | David Farning <dfarning@gmail.com> | 2009-03-21 05:54:57 (GMT) |
---|---|---|
committer | David Farning <dfarning@gmail.com> | 2009-03-21 05:54:57 (GMT) |
commit | b6607b36b4fe5be82297abaea88e120de7c1ce44 (patch) | |
tree | a44f7ca03ac5524024c98343c7ef517038d4f870 /site/app/tests/languageConfig.test.php | |
parent | 1fb3c4ae563e9ede7cdc6cdb6b4292773703c14d (diff) | |
parent | 32c281e71ab055ed2ad44b44e5863cf9779a621d (diff) |
merge with snvdevel
Diffstat (limited to 'site/app/tests/languageConfig.test.php')
-rw-r--r-- | site/app/tests/languageConfig.test.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/site/app/tests/languageConfig.test.php b/site/app/tests/languageConfig.test.php index a9d87c1..56fe679 100644 --- a/site/app/tests/languageConfig.test.php +++ b/site/app/tests/languageConfig.test.php @@ -100,6 +100,22 @@ class LanguageConfigTest extends WebTestHelper { } /** + * Our msgids should conform to the AMO L10n standards. Details at + * https://wiki.mozilla.org/Update:Remora_Localization#L10n_standards + * + * We'll only check en-US here, but the others are built off en-US so it should be a good indicator. + */ + function testLangFileIsValid() { + $_language_file = "{$this->language_config->text_domain}/en_US/LC_MESSAGES/messages.po"; + + $_language_file_contents = file_get_contents($_language_file); + + // If this test fails there is a string with spaces in it which is most likely an English string or + // sentence. This should be fixed before merging en-US -> all locales + $this->assertEqual(preg_match('/^msgid\ ".*?\ .*?"$/m', $_language_file_contents), 0); + } + + /** * Checks and makes sure index pages will load with all valid languages */ function testLocalizedPagesLoad() |