codeigniter4 / translations

System message translations for CodeIgniter4
https://codeigniter4.github.io/translations/
MIT License
201 stars 206 forks source link

[nl] complete all translations for Dutch language #467

Closed christianberkman closed 2 weeks ago

christianberkman commented 3 months ago

Description Added all missing files and keys for the nl translation. Disclaimer: test would not run on my local machine so counting on the workflow to tell me if I have missed a key.

I did not translate some programming terms or other technical words as the Dutch language often keeps those technical terms in English anyway. This will increase readability.

Checklist:

paulbalandan commented 3 months ago

Hi, @christianberkman Thanks for the PR!

Please fix the following to proceed:

1) Translations\Tests\DutchTranslationTest::testAllConfiguredLanguageFilesAreTranslated with data set "nl" ('nl')
Failed asserting that language file "Test.php" in the main repository is translated in "nl" locale.
Failed asserting that an array is empty.

/home/runner/work/translations/translations/tests/Language/AbstractTranslationTestCase.php:112

2) Translations\Tests\DutchTranslationTest::testAllTranslatedLanguageFilesAreConfigured with data set "nl" ('nl')
Failed asserting that translated language file "Test.Php" in "nl" locale is configured in the main repository.
Failed asserting that an array is empty.

/home/runner/work/translations/translations/tests/Language/AbstractTranslationTestCase.php:140

3) Translations\Tests\DutchTranslationTest::testAllIncludedLanguageKeysAreTranslated with data set "nl" ('nl')
Failed asserting that the translated language key "Cookie.invalidHostPrefix" in "nl" locale differs from the original keys in the main repository.
Failed asserting that an array is empty.

/home/runner/work/translations/translations/tests/Language/AbstractTranslationTestCase.php:256

The first 2 failures can be fixed by changing the file extension in Test.Php to .php instead of .Php (notice the capital P). It seems for Cookie.php you missed translating the invalidHostPrefix key. Also, run composer cs-fix to fix code style issues.

kenjis commented 2 months ago

Please fix the following errors:

There were 4 failures:

1) Translations\Tests\DutchTranslationTest::testAllConfiguredLanguageKeysAreIncluded with data set "nl" ('nl')
Failed asserting that the language keys "Core.enabledZlibOutputCompression", "Files.expectedDirectory", "Files.expectedFile", "Images.webpNotSupported", "Router.invalidControllerName", "Router.invalidDynamicController", "Session.invalidSameSiteSetting", "Validation.field_exists", "Validation.not_in_list", "Validation.string", "Validation.valid_json" in the main repository are included for translation in "nl" locale.
Failed asserting that an array is empty.

/home/runner/work/translations/translations/tests/Language/AbstractTranslationTestCase.php:168

2) Translations\Tests\DutchTranslationTest::testAllIncludedLanguageKeysAreConfigured with data set "nl" ('nl')
Failed asserting that the translated language key "Core.enabledZlibOutputCompregssion" in "nl" locale is configured in the main repository.
Failed asserting that an array is empty.

/home/runner/work/translations/translations/tests/Language/AbstractTranslationTestCase.php:204

3) Translations\Tests\DutchTranslationTest::testAllIncludedLanguageKeysAreTranslated with data set "nl" ('nl')
Failed asserting that the translated language keys "CLI.generator.className.config", "CLI.generator.className.controller", "CLI.generator.className.default", "CLI.generator.className.entity", "CLI.generator.className.filter", "CLI.generator.className.migration", "CLI.generator.className.model", "CLI.generator.className.seeder", "CLI.generator.className.test", "CLI.generator.className.validation", "CLI.generator.parentClass", "CLI.generator.returnType", "CLI.generator.viewName.cell", "Cast.invalidTimestamp", "Email.exitStatus", "Migrations.batch", "Migrations.namespace" in "nl" locale differ from the original keys in the main repository.
Failed asserting that an array is empty.

/home/runner/work/translations/translations/tests/Language/AbstractTranslationTestCase.php:256

4) Translations\Tests\DutchTranslationTest::testAllConfiguredLanguageKeysAreInOrder with data set "nl" ('nl')
Failed asserting that the translated language keys in "nl" locale are ordered correctly.
--- Original
+++ Translated

Migrations.php:
-'migrated' => 'Migrations complete.';
+'migInvalidVersion' => 'Ongeldige versienummer opgegeven';

Core.php:
-'enabledZlibOutputCompression' => 'Your zlib.output_compression ini directive is turned on. This will not work well with output buffers.';
+'enabledZlibOutputCompregssion' => 'De instelling zlib.output_compression ini directive is ingeschakeld. Dit werkt niet goed met buffers.';

Cast.php:
-'jsonErrorCtrlChar' => 'Unexpected control character found.';
+'jsonErrorDepth' => 'Maximale stack diepte overschreden';
Failed asserting that an array is empty.

/home/runner/work/translations/translations/tests/Language/AbstractTranslationTestCase.php:298

FAILURES!
Tests: 7, Assertions: 7, Failures: 4.
All tested locales have failed!

Passed locales (0 of 1): --
Failed locales (1 of 1): nl

https://github.com/codeigniter4/translations/actions/runs/10515234070/job/29144702088?pr=467

kenjis commented 2 months ago

If you don't translate intentionally, set excludedLocaleKeyTranslations: https://github.com/codeigniter4/translations/blob/78af662a0a304b7f628c088e73ddf61f18783880/tests/Language/JapaneseTranslationTest.php#L21-L28

paulbalandan commented 2 months ago

Hi @christianberkman , will you be able to complete this PR? Thanks

christianberkman commented 2 months ago

Hi, yes I will. I have not spent any time coding lately. I did not miss translating intentionally, I will fix the missing keys. It could be that some keys are exactly the same in Dutch and English (even if translated). Should I exclude those as well? (e.g. if there were a key 'computer' it would translate to 'computer'.)

kenjis commented 2 months ago

@christianberkman Yes. You must set all keys that do not differ from the English value even if translated in $this->excludedLocaleKeyTranslations in your language test file.