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

Improve translations #132

Merged
merged 1 commit into from
Nov 21, 2023
Merged

Improve translations #132

merged 1 commit into from
Nov 21, 2023

Conversation

vjik
Copy link
Member

@vjik vjik commented Nov 21, 2023

Q A
Is bugfix? ✔️
New feature?
Breaks BC? ✔️
Fixed issues #123

@vjik vjik added the status:code review The pull request needs review. label Nov 21, 2023
@vjik vjik requested a review from a team November 21, 2023 11:04
Copy link

what-the-diff bot commented Nov 21, 2023

PR Summary

  • Update packages in composer.json
    Removed the yiisoft/aliases package and added yiisoft/translator-message-php.

  • Modify Dependencies in config/di.php
    The yiisoft/aliases dependency was removed. Yiisoft\Translator\Message\Php\MessageSource and Yiisoft\Translator\SimpleMessageFormatter were substituted with Yiisoft\Translator\IdMessageReader and Yiisoft\Translator\IntlMessageFormatter respectively.

  • Changes in config/params.php
    Removed the yiisoft/aliases key and added a new key yiisoft/yii-dataview. Also, the yiisoft/translator was replaced with yiisoft/yii-dataview.

  • Addition and Deletion of Files
    New message files for 'es' and 'ru' languages were added, while the old message files were deleted.

  • Updates in src/BaseListView.php
    A new constant DEFAULT_TRANSLATION_CATEGORY was introduced. Additionally, the TranslatorInterface and UrlGeneratorInterface dependencies were updated while a new property translationCategory and a new method createDefaultTranslator() were introduced.

  • Update Tests
    Multiple test files had the hardcoded string 'dataview.summary' replaced with formatted string 'Page 1 of 1', indicating more user-friendly pagination messages. The 'No data found' messages were also updated to 'No results found.' in some tests.

  • Dependency Update in tests/GridView/TranslatorTest.php
    Aliases dependency injection was removed while renaming the 'translator.categorySource' dependency injection to translation.categorySource.

The benefit of these changes is a more efficient software, user-friendly messaging, and the ability to manage data view settings within the new yiisoft/yii-dataview key.

@vjik vjik merged commit dae6583 into master Nov 21, 2023
18 checks passed
@vjik vjik deleted the translation branch November 21, 2023 12:05
@vjik vjik mentioned this pull request Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants