Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Intl] Fix root fallback locale#31411
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| }catch (MissingResourceException$e) { | ||
| $displayFormat =$reader->readEntry($tempDir.'/lang','root', ['localeDisplayPattern']); | ||
| } | ||
| $displayFormat =$reader->readEntry($tempDir.'/lang',$displayLocale, ['localeDisplayPattern']); |
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.
defaulting to root during compile makes things like this more straightforward (the timezone generator in master also benefits)
i've verified it causes no side-effects in 4.2 / master 👍
| { | ||
| // Apply generic notation using square brackets as described per http://cldr.unicode.org/translation/language-names | ||
| $name =str_replace(['(',')'], ['[',']'],$this->languageDataProvider->getName(\Locale::getPrimaryLanguage($locale),$displayLocale)); | ||
| $name =str_replace(['(',')'], ['[',']'],$reader->readEntry($tempDir.'/lang',$displayLocale, ['Languages',\Locale::getPrimaryLanguage($locale)])); |
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.
now usesIntlBundleReader instead ofJsonBundleReader ... total compilation time;
3.4real 1m40.170sPRreal 0m22.073smoreover, this allows to keep the generators decoupled
| echo"Starting resource bundle compilation. This may take a while...\n"; | ||
| $filesystem->remove($workingDirs); |
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.
this is done in each generator already
Uh oh!
There was an error while loading.Please reload this page.
fabpot commentedMay 8, 2019
Thank you@ro0NL. |
This PR was merged into the 3.4 branch.Discussion----------[Intl] Fix root fallback locale| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | yes| New feature? | no| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no| Tests pass? | yes (including intl-data group)| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->| License | MIT| Doc PR | symfony/symfony-docs#... <!-- required for new features -->We should never return "root" as a fallback locale for the "root" locale itself.While at it, i realized the alias meta files are pointless :)4.2)ro0NL@b9fc8b74.3)ro0NL@922a1ebCommits-------11ff24a [Intl] Fix root fallback locale
This PR was merged into the 4.3 branch.Discussion----------[Intl][4.3] Cleanup internal api| Q | A| ------------- | ---| Branch? | 4.3| Bug fix? | yes| New feature? | no| BC breaks? | no <!-- seehttps://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#31411 (comment)Commits-------6eab5d2 [Intl][4.3] Cleanup internal api
Uh oh!
There was an error while loading.Please reload this page.
We should never return "root" as a fallback locale for the "root" locale itself.
While at it, i realized the alias meta files are pointless :)
4.2)ro0NL@b9fc8b7
4.3)ro0NL@922a1eb