-
Notifications
You must be signed in to change notification settings - Fork 67
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
Integrate localized strings into web and desktop app #2730
Conversation
skapur12
commented
May 9, 2023
•
edited
Loading
edited
- Add localization support to web package
- Add a 'Merge Translations' node script to merge the shared libraries with web and desktop-specific translations and place them in web and desktop folders, respectively. It runs on every build
- Switch Electron app to use new localized strings
- Rename StandardLocalizer to BrowserLocalizer, and add error handling to BrowserLocalizer to fetch the appropriate file based on the locale in the user's browser
- Add global build-translations command to package.json
- Update README with instructions on setting up localization environment on dev box
d12b0e8
to
0a964cd
Compare
Codecov Report
@@ Coverage Diff @@
## main #2730 +/- ##
=======================================
Coverage 66.41% 66.42%
=======================================
Files 1200 1201 +1
Lines 33430 33463 +33
Branches 6153 6161 +8
=======================================
+ Hits 22202 22227 +25
- Misses 11092 11101 +9
+ Partials 136 135 -1
Continue to review full report in Codecov by Sentry.
|
ce5b397
to
dbdd483
Compare
b916476
to
e292e0d
Compare
30b4245
to
fbb8786
Compare
packages/common/src/ui-common/localization/browser-localizer.ts
Outdated
Show resolved
Hide resolved
packages/react/src/ui-react/account/__tests__/create-account-action.spec.tsx
Outdated
Show resolved
Hide resolved
8044495
to
c40c07b
Compare
9ebe7ca
to
23cfc1e
Compare
23cfc1e
to
c8823c8
Compare
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.
The changes look good to me. I'm just going to block this until we've got a portal PR ready since it contains breaking changes.
265821e
to
cc8f35d
Compare
* Added fake localizer * Switch desktop app to use new translations * Add script to combine translated files by language * Add global build-translations command * Update comments and docs accordingly with changes * Run merge-translations script on Azure DevOps path * Add localization for Batch Explorer web version * Generate translations for Create Account buttons * Add basic i18n support for web package * Rename StandardLocalizer to BrowserLocalizer * Add merge translations script for web and desktop * Remove powershell merge translations script * Add localization support for desktop app * Copy translations to web too and not just desktop * Add translations for playground buttons * Gitignore generated localization files * Update localization docs with setup instructions * Add package translations to mergeTranslations * Optimize package file creation and fix unit test * Update Electron app localization unit tests * Address all feedback on PR * Fix desktop localizer, translation function, tests * Fix Prettier issue with account yml file * Update client translations unit test accordingly * Add http-localizer unit test and minor fixes * Remove CustomGlobal and simplify navigator object * Add getLocale function to each localizer --------- Co-authored-by: David Watrous <509299+dpwatrous@users.noreply.github.com>