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

[pt] Created Portuguese (Portugal) Errors Translation #436

Merged
merged 4 commits into from
Feb 14, 2024

Conversation

Nerexbcd
Copy link
Contributor

@Nerexbcd Nerexbcd commented Feb 14, 2024

Description
Created the Errors Translation, due to the need of it in a project currently working on.

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

@kenjis
Copy link
Member

kenjis commented Feb 14, 2024

Thank you for sending PR!

Can you update missing items?

There were 2 failures:

1) Translations\Tests\PortugueseTranslationTest::testAllConfiguredLanguageFilesAreTranslated with data set "pt" ('pt')
Failed asserting that language files "Cookie.php", "Fabricator.php", "Language.php", "Publisher.php", "Security.php", "Test.php" in the main repository are translated in "pt" locale.
Failed asserting that an array is empty.

/home/runner/work/translations/translations/tests/Language/AbstractTranslationTestCase.php:111
phpvfscomposer:///home/runner/work/translations/translations/vendor/phpunit/phpunit/phpunit:106

2) Translations\Tests\PortugueseTranslationTest::testAllConfiguredLanguageKeysAreIncluded with data set "pt" ('pt')
Failed asserting that the language keys "CLI.altCommandPlural", "CLI.altCommandSingular", "CLI.generator.cancelOperation", "CLI.generator.className.cell", "CLI.generator.className.command", "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.validation", "CLI.generator.commandType", "CLI.generator.databaseGroup", "CLI.generator.fileCreate", "CLI.generator.fileError", "CLI.generator.fileExist", "CLI.generator.fileOverwrite", "CLI.generator.parentClass", "CLI.generator.returnType", "CLI.generator.tableName", "CLI.generator.usingCINamespace", "CLI.generator.viewName.cell", "CLI.namespaceNotDefined", "Cast.baseCastMissing", "Cast.invalidCastMethod", "Cast.invalidTimestamp", "Core.enabledZlibOutputCompression", "Core.invalidDirectory", "Core.invalidPhpVersion", "Database.emptyPrimaryKey", "Database.methodNotAvailable", "Files.expectedDirectory", "Files.expectedFile", "Format.invalidFormatter", "Format.invalidMime", "HTTP.cannotSetBinary", "HTTP.cannotSetCache", "HTTP.cannotSetFilepath", "HTTP.cannotSetStatusCode", "HTTP.invalidJSON", "HTTP.invalidSameSiteSetting", "HTTP.localeNotSupported", "HTTP.notFoundDownloadSource", "HTTP.unsupportedJSONFormat", "Images.fileNotSupported", "Images.webpNotSupported", "Log.invalidMessageType", "Migrations.batch", "Migrations.group", "Migrations.migrated", "Migrations.nameSeeder", "Migrations.namespace", "Migrations.refreshConfirm", "Migrations.rollBackConfirm", "Router.invalidControllerName", "Router.invalidDynamicController", "Session.invalidSameSiteSetting", "Time.invalidFormat", "Validation.alpha_numeric_punct", "Validation.equals", "Validation.is_not_unique", "Validation.not_equals", "Validation.not_in_list", "Validation.string", "Validation.valid_json", "View.invalidDecoratorClass" in the main repository are included for translation in "pt" locale.
Failed asserting that an array is empty.

/home/runner/work/translations/translations/tests/Language/AbstractTranslationTestCase.php:169
phpvfscomposer:///home/runner/work/translations/translations/vendor/phpunit/phpunit/phpunit:106

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

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

https://github.com/codeigniter4/translations/actions/runs/7894981080/job/21546605364?pr=436

@kenjis kenjis changed the title Created Portuguese (Portugal) Errors Translation [pt] Created Portuguese (Portugal) Errors Translation Feb 14, 2024
@kenjis
Copy link
Member

kenjis commented Feb 14, 2024

Note: Most of the original Translations are in Brazilian Portuguese
@kenjis
Copy link
Member

kenjis commented Feb 14, 2024

Thank you for translations!

Can you fix the coding style? See https://github.com/codeigniter4/translations/actions/runs/7895661649/job/21548402313?pr=436
If you can use CLI, the following command will fix them:

$ bin/test pt

@kenjis
Copy link
Member

kenjis commented Feb 14, 2024

There are still a few missing items.

There were 2 failures:

1) Translations\Tests\PortugueseTranslationTest::testAllConfiguredLanguageKeysAreIncluded with data set "pt" ('pt')
Failed asserting that the language keys "HTTP.invalidJSON", "HTTP.unsupportedJSONFormat" in the main repository are included for translation in "pt" locale.
Failed asserting that an array is empty.

/home/runner/work/translations/translations/tests/Language/AbstractTranslationTestCase.php:169
phpvfscomposer:///home/runner/work/translations/translations/vendor/phpunit/phpunit/phpunit:106

2) Translations\Tests\PortugueseTranslationTest::testAllIncludedLanguageKeysAreTranslated with data set "pt" ('pt')
Failed asserting that the translated language keys "Migrations.batch", "Migrations.namespace" in "pt" 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:259
phpvfscomposer:///home/runner/work/translations/translations/vendor/phpunit/phpunit/phpunit:106

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

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

https://github.com/codeigniter4/translations/actions/runs/7895661648/job/21548419728?pr=436

@Nerexbcd
Copy link
Contributor Author

There are still a few missing items.

There were 2 failures:

1) Translations\Tests\PortugueseTranslationTest::testAllConfiguredLanguageKeysAreIncluded with data set "pt" ('pt')
Failed asserting that the language keys "HTTP.invalidJSON", "HTTP.unsupportedJSONFormat" in the main repository are included for translation in "pt" locale.
Failed asserting that an array is empty.

/home/runner/work/translations/translations/tests/Language/AbstractTranslationTestCase.php:169
phpvfscomposer:///home/runner/work/translations/translations/vendor/phpunit/phpunit/phpunit:106

2) Translations\Tests\PortugueseTranslationTest::testAllIncludedLanguageKeysAreTranslated with data set "pt" ('pt')
Failed asserting that the translated language keys "Migrations.batch", "Migrations.namespace" in "pt" 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:259
phpvfscomposer:///home/runner/work/translations/translations/vendor/phpunit/phpunit/phpunit:106

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

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

https://github.com/codeigniter4/translations/actions/runs/7895661648/job/21548419728?pr=436

Those language keys are not on the original English language pack nor are marked on the translation status web page.

@kenjis
Copy link
Member

kenjis commented Feb 14, 2024

If a translation is exactly the same as the English value, please add in $excludedLocaleKeyTranslations in your lang test case.
See https://github.com/codeigniter4/translations/blob/develop/tests/Language/FrenchTranslationTest.php for reference.

@kenjis
Copy link
Member

kenjis commented Feb 14, 2024

Those language keys are not on the original English language pack nor are marked on the translation status web page.

See https://github.com/codeigniter4/CodeIgniter4/blob/7d50bd33056cd54aef7f1905c1304947409ef078/system/Language/en/HTTP.php#L22-L23

Added 2 missing language keys
Fixed Code Style
Added 2 equal language keys to the excludedLocaleKeyTranslations on the unit test
Note: Most of the original Translations are in Brazilian Portuguese
Copy link
Member

@kenjis kenjis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! LGTM!

@paulbalandan paulbalandan merged commit 2903b57 into codeigniter4:develop Feb 14, 2024
11 checks passed
@Nerexbcd Nerexbcd deleted the Update-language-pt branch February 14, 2024 19:45
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