-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Migrate angular to v9 #4930
Migrate angular to v9 #4930
Conversation
be05d2f
to
0eca3a1
Compare
0eca3a1
to
0990df6
Compare
0990df6
to
3ec9833
Compare
/lgtm |
There seems to be an issue with prod build. /hold |
659032b
to
6397825
Compare
/lgtm |
Locales except Chinese seem good. Since |
I could not find the way to use |
@shu-mutou The new angular only supports new locale codes that are based on BCP47 regulations. Browsers should adapt them eventually. I was actually using language switcher plugin to test if they work and it is also using new locale codes. For backward compatibility, we could add a map to our backend that will try to resolve i.e. |
6397825
to
ad31ae8
Compare
0a7dcd7
to
8c8524e
Compare
I have fixed locale code mapping to also support old locales for now. I have also found a bug with default language package in Go and fixed locale matching logic. It is now ready for tests. Once angular releases patch version for the mentioned issue, we can bump it and restore support for missing languages. |
/hold cancel |
I will test it later. |
/lgtm |
8c8524e
to
d086e20
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: floreks, maciaszczykm The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I just noticed this PR, I think it's confusing to change the file directory like this. Can we simplify |
I'm tackling it at #4969. Please check it. |
This is their structure. The ones in parentheses are If we want to distinguish by the smallest unit, we can keep the lowest directory. Which is reserved Or we can keep the middle level. |
I'm considering to keep 'zh-Hans', 'zh-Hant' and 'zh-Hant-HK' in #4969, not to duplicate large translation files. Could you review it? |
@shu-mutou |
Fixes #4893
ace-editor
component instead of custom implementation.ng2-ace-editor
dependency and reused vanilla implementation.I18n pipeline update
Angular 9 introduced a couple of changes to the localization framework.
Locale codes
New locale codes have to be used as described in: https://angular.io/guide/i18n#setting-up-the-locale-of-your-app
Example changes:
zh-cn
->zh-Hans
zh-tw
->zh-Hant
To be able to properly use
zh-Hant-HK
(codes with 3 parts) we have to wait for the issue angular/angular-cli#17032 to be fixed. I have already renamed directories, removed symlinks as new i18n pipeline do not seem to like them. I have had to also slightly modify the locale handler in the backend.Frontend build
We do not need to build the frontend for every locale separately now. Localization configuration is defined in
angular.json
file and when--localize
flag is passed tong
, localized frontend will be built.@shu-mutou @zehuaiWANG please check if I have properly assigned new locale codes to languages.