Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nl] complete all translations for Dutch language #467

Closed

Conversation

christianberkman
Copy link
Contributor

@christianberkman christianberkman commented Aug 13, 2024

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:

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

@christianberkman christianberkman changed the title Update nl [nl] add missing files and some keys Aug 13, 2024
@paulbalandan
Copy link
Member

paulbalandan commented Aug 13, 2024

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.

@christianberkman christianberkman changed the title [nl] add missing files and some keys [nl] complete all translations for Dutch language Aug 22, 2024
@kenjis
Copy link
Member

kenjis commented Aug 27, 2024

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
Copy link
Member

kenjis commented Aug 27, 2024

If you don't translate intentionally, set excludedLocaleKeyTranslations:

// The keys of this locale that do not differ from the english value even if translated.
$this->excludedLocaleKeyTranslations = [
'Number.thousand',
'Number.million',
'Number.billion',
'Number.trillion',
'Number.quadrillion',
];

@paulbalandan
Copy link
Member

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

@christianberkman
Copy link
Contributor Author

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
Copy link
Member

kenjis commented Sep 10, 2024

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

@christianberkman christianberkman closed this by deleting the head repository Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants