Skip to content

Conversation

@virdb
Copy link
Contributor

@virdb virdb commented Nov 18, 2022

Added Italian translation.

Supersedes #529

Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

Che bello!

Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

Please fix the duplicate keys (see Rector results): throttled, successLogout.

@virdb
Copy link
Contributor Author

virdb commented Nov 18, 2022

Thanks @MGatner fixed

@datamweb datamweb added lang Languages file tests needed Pull requests that need tests labels Nov 18, 2022
@datamweb
Copy link
Collaborator

@virdb, thanks,
What he explained earlier, we need to test.

For this you need to create a file in path tests/Language/ItalianTranslationTest.php with the following content:

<?php

declare(strict_types=1);

namespace Tests\Language;

/**
 * @internal
 */
final class ItalianTranslationTest extends AbstractTranslationTestCase
{
}

Then add the following option in file tests/Language/AbstractTranslationTestCase.php:

-        //        ItalianTranslationTest::class            => 'it',
+       ItalianTranslationTest::class            => 'it',

Do you need more explanation?

@virdb
Copy link
Contributor Author

virdb commented Nov 18, 2022

Hi @datamweb, sorry I missed the request for this.
A new commit will follow.

BR

@datamweb
Copy link
Collaborator

Well, we have a few errors.
You have not translated Auth.login, Auth.password, Auth.register, Auth.username items, please translate them.
More details see

@virdb
Copy link
Contributor Author

virdb commented Nov 18, 2022

Hi,

I added the translations for those strings, but usually are used in the English form also in Italian.
For example, the use of "Parola d'ordine" for "Password" is very rare.

@paulbalandan
Copy link
Member

Hi,

I added the translations for those strings, but usually are used in the English form also in Italian. For example, the use of "Parola d'ordine" for "Password" is very rare.

@virdb If that is the case, please edit your ItalianTranslationTest and add the exclusions list as an array:

final class ItalianTranslationTest extends AbstractTranslationTestCase
{
    protected array $excludedLocaleKeyTranslations = [
        // keys here, like Auth.login
    ];
}
`

virdb and others added 2 commits November 18, 2022 15:09
@datamweb datamweb removed the tests needed Pull requests that need tests label Nov 18, 2022
Copy link
Collaborator

@datamweb datamweb 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!

Chi la dura la vince.

@datamweb datamweb closed this Nov 20, 2022
@datamweb datamweb reopened this Nov 20, 2022
@datamweb datamweb requested a review from MGatner November 20, 2022 13:28
@MGatner
Copy link
Member

MGatner commented Nov 20, 2022

PHPStan is still failing:

Error: Property Tests\Language\ItalianTranslationTest::$excludedLocaleKeyTranslations (array<string, string>) does not accept default value of type array<int, string>.

@datamweb
Copy link
Collaborator

All tests passed. And waiting for the review.

@MGatner MGatner merged commit 579e0a2 into codeigniter4:develop Nov 21, 2022
@kenjis kenjis added the enhancement New feature or request label Dec 26, 2022
@kenjis kenjis mentioned this pull request Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lang Languages file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants