diff --git a/modules/system/lang/lv/lang.php b/modules/system/lang/lv/lang.php index 0f1e6b35c..74b6306af 100644 --- a/modules/system/lang/lv/lang.php +++ b/modules/system/lang/lv/lang.php @@ -154,7 +154,7 @@ return [ 'mailgun_secret_comment' => 'Ievadiet savu Mailgun API kodu.', 'mandrill' => 'Mandrill', 'mandrill_secret' => 'Mandrill Secret', - 'mandrill_secret_comment' => 'Ievadiet savu Mandrill API kodu.' + 'mandrill_secret_comment' => 'Ievadiet savu Mandrill API kodu.', 'drivers_hint_header' => 'Dziņi nav instalēti', 'drivers_hint_content' => 'Šai pasta metodei nepieciešams spraudnis ":plugin" instalējiet to pirms pasta sūtīšanas.' ], diff --git a/tests/unit/system/classes/TranslatorTest.php b/tests/unit/system/classes/TranslatorTest.php index c877106a8..494bd49f5 100644 --- a/tests/unit/system/classes/TranslatorTest.php +++ b/tests/unit/system/classes/TranslatorTest.php @@ -20,4 +20,27 @@ class TranslatorTest extends TestCase $this->assertCount(1, $messages); $this->assertEquals('The name must be at least 5 characters.', $messages->all()[0]); } + + public function testValidCoreLanguageFiles() + { + $translator = $this->app['translator']; + $locales = $translator->get('system::lang.locale'); + $this->assertNotEmpty($locales); + + $locales = array_keys($locales); + $modules = ['system', 'backend', 'cms']; + $files = ['lang.php', 'validation.php', 'client.php']; + + foreach ($modules as $module) { + foreach ($locales as $locale) { + foreach ($files as $file) { + $srcPath = base_path() . '/modules/'.$module.'/lang/'.$locale.'/'.$file; + if (!file_exists($srcPath)) continue; + $messages = require $srcPath; + $this->assertNotEmpty($messages); + $this->assertNotCount(0, $messages); + } + } + } + } } \ No newline at end of file