-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Intl] Simplify API #28846
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
[Intl] Simplify API #28846
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, here are some random comments :)
Works for me generally speaking.
Would need some tests+UPGRADE/CHANGELOG entries
src/Symfony/Component/Intl/Data/Provider/LanguageDataProvider.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Intl/ResourceBundle/LanguageBundleInterface.php
Outdated
Show resolved
Hide resolved
i've moved all data bundles, ready for first round of review. The new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @ro0NL :) Thanks a lot!
I'd finish this PR as is (it's pretty much done) and add your further work to separate PRs.
@webmozart thanks for review, it's done :) i was a bit confused by Last but not least for local variables, e.g. Ill fix the remaning deprecations asap. |
@ro0NL Exactly! :) It takes some wrapping your mind around, but once you understand the domain language of CLDR, this naming makes total sense. As for |
status: ready :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this a lot! Thanks Roland.
Thank you @ro0NL. |
This PR was squashed before being merged into the 4.3-dev branch (closes #28846). Discussion ---------- [Intl] Simplify API | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #18368 | License | MIT | Doc PR | symfony/symfony-docs#11221 Simplifies the Intl API. It greatly reduces the no. of boilerplate classes in this component. Very over complicated, much wow :) Solving (IMHO): ```php class LanguageBundle extends LanguageDataProvider implements LanguageBundleInterface ``` Which seems very over complicated just to provide static data. ```php // before Intl::getLanguageBundle()->getLanguageName() // string | null // after Languages::getName() // string Languages::exists() // bool ``` I left out Canonicalization on puropose, that's a new topic to me. - [x] Languages - [x] Locales - [x] Currencies - [x] Regions - [x] Scripts - [ ] Timezones (#28831) - [x] Update constraints - [x] Update form types Thoughts? Commits ------- d6b67d4 [Intl] Simplify API
This PR was merged into the 4.3-dev branch. Discussion ---------- [Intl] Fix LocaleDataGenerator | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #... <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Forgotten in #28846 The `getName()` method for scripts/regions/languages is stilled needed during locale generation. Commits ------- 137ce3f [Intl] Fix LocaleDataGenerator
…zki) This PR was submitted for the 5.0 branch but it was merged into the 4.3 branch instead (closes #12720). Discussion ---------- Changed names of Intl classes in form types docs As per symfony/symfony#28846 we changed Intl classes to be more specific. Looks like some docs left with old naming. Commits ------- f5f64e1 Changed names of Intl classes in form types docs
Simplifies the Intl API. It greatly reduces the no. of boilerplate classes in this component. Very over complicated, much wow :)
Solving (IMHO):
Which seems very over complicated just to provide static data.
I left out Canonicalization on puropose, that's a new topic to me.
Thoughts?