translations icon indicating copy to clipboard operation
translations copied to clipboard

[nl] complete all translations for Dutch language

Open christianberkman opened this issue 1 year ago • 6 comments

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:

  • [x] Securely signed commits
  • [ ] Component(s) with PHPDoc blocks, only if necessary or adds value
  • [ ] Unit testing, with >80% coverage
  • [ ] User guide updated
  • [x] Conforms to style guide

christianberkman avatar Aug 13 '24 06:08 christianberkman

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.

paulbalandan avatar Aug 13 '24 07:08 paulbalandan

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 avatar Aug 27 '24 23:08 kenjis

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

kenjis avatar Aug 27 '24 23:08 kenjis

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

paulbalandan avatar Sep 10 '24 11:09 paulbalandan

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'.)

christianberkman avatar Sep 10 '24 11:09 christianberkman

@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.

kenjis avatar Sep 10 '24 12:09 kenjis