Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/site/app/tests/languageConfig.test.php
diff options
context:
space:
mode:
Diffstat (limited to 'site/app/tests/languageConfig.test.php')
-rw-r--r--site/app/tests/languageConfig.test.php16
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()