-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add internationalisation framework #205
Conversation
@manuelcanepa There was a couple of issues which popped up but it's pretty much there:
If you run |
Thanks for the corrections, im having troubles to start this project, so i make changes without running. Today i will try to start the environment to check every change that i makes. |
Ok, feel free to share any errors you're getting and we can see if we can work it out together. |
* master: (24 commits) refactor: sort imports in desktop-client alphabetically chore: remove unused imports from desktop-client adm-zip to 0.5.6 style: prettify .eslintrc.js build: make eslint-plugin-prettier a dependency of desktop-client ci: lint desktop-client in CI style: fix or silence linting errors in desktop-client chore: update remaining test scripts github fix indentation in issue template github: update issue template fix: correct some re-exports which were breaking things fix: stop trying to transform node_modules fix: stop the web tests from running in node environment fix: add ts-jest presets which are equivalent to the old `transform` properties fix: add esModuleInterop so that the default imports issue goes away fix: stop typechecking javascript files chore: allow mobile package to pass with no tests build: replace babel-jest with ts-jest Update bug-report.yml Addition: Issue template ...
@TomAFrench I dont have write access, thats why i can't contribute directly to this PR and open #219. BTW: I notice that
And you indent json with 4 spaces, i propose you to add:
|
Whoops, sorry looks like my vscode wasn't respecting
Thanks, yeah making separate PRs into this branch is the way to go. I'll try to review and merge promptly. |
* #199 Adding translation to schedules list * #199 Complete translation on EditSchedule Form * #199 Translation for status badge * #199 Minor changes, suggested by @j-f1 Co-authored-by: Tom French <[email protected]>
* master: fix: use correct comment style build: remove patch-package dependency from loot-design Conditionally set MSYS build: update yarn.lock build: use workspace ranges for monorepo dependencies changes needed to build on windows
I think that this will be a headache to translate: https://github.com/actualbudget/actual/blob/i18n/packages/loot-core/src/shared/schedules.js |
Working on that @manuelcanepa! |
* master: Sort import in alphabetical order (#238) Separate external, monorepo and internal imports (#237) Allow `enter` to create new transaction when focused on `cleared` column (#234) Enforce linting in loot-design (#233) style: run linter (#232) refactor: create index.js for aql directory (#68) Revert "build: update yarn.lock" (#230) Fix handling of -0 in budget summary (#229) Update bug-report.yml (#228)
I see that the "es" language is fixed on config. @TomAFrench What do you think about this: https://github.com/i18next/i18next-browser-languageDetector? |
* #199 Adding translation to rule editor and transaction table * Feature: Translation to discover schedule table Fix: Some translation improvements * fix: Fix minor after check * Feature: More translation to account Fix: Add *_old.json files to ignore * Update packages/desktop-client/src/components/accounts/Account.js Co-authored-by: Tom French <[email protected]> * fix: Workaround for know caveats * lint: fix import order * fix: t is not a function when empty transactions list * Feature: Translate account filters * Feature: Translation on transactions table * Feature: Translate budget and the rest of bootstrap * Update packages/desktop-client/src/locales/es-ES.json Co-authored-by: Jed Fox <[email protected]> * fix: Using the new key for unknow error * refactor: push useTranslation up above function definition, etc * refactor: push useTranslation up above function definition * refactor: set key for Trans component balanceType * refactor: pass i18keys to Trans components explicitly Co-authored-by: Tom French <[email protected]> Co-authored-by: Jed Fox <[email protected]>
I haven't put much thought into the language selection so far. We should definitely add a dropdown to the settings page but not sure if we need this package vs storing it in local storage ourselves. |
* monthUtils.{format → nonLocalizedFormat} * Implement localization for schedule descriptions * Remove outdated comment * Add general.ordinal in Spanish Co-Authored-By: Manuel Eduardo Cánepa Cihuelo <[email protected]> * yay time zones? * fix: re-add missing keys * fix: fix broken i18n imports/initialisation * style: linting * fix: re-add english ordinal keys * fix: add remaining english ordinal keys * fix: correct dates in schedules.js * refactor: store translations keys for loot-core in loot-core * fix: add ns to i18n.t calls directly so parser can find them * feat: add spanish translation from manuelcanepa * fix: add comments to help i18n-parser to find contexts * fix: add "many" context to spanish translations Co-authored-by: Manuel Eduardo Cánepa Cihuelo <[email protected]> Co-authored-by: Tom French <[email protected]>
Co-authored-by: Manuel Eduardo Cánepa Cihuelo <[email protected]>
"i18next": "^21.9.1", | ||
"i18next-parser": "^6.5.0", |
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.
Why is on devDependencies?
This reverts commit adbaf27.
What do we need to make this happend? |
Closing this one off as abandoned. But linking to this PR from an issue so if someone decides to pick this up again can refer back to this PR. |
I'd like to continue working on this, could you please reopen the i18n branch @MatissJanis? Also, for readability purposes we could directly add fallback translations, e.g., the string "Accounts" becomes t('general.accounts', "Accounts") in stead of t('general.accounts'). |
I like it, how this works with interpolation? |
This should work: e.g., |
@vfaculteit did you start working on this ? |
Great, glad to see the work is in progress ! Are there any blockers I could help with ? |
Hello guys, brazilian here, can help translating to pt-BR |
@MatissJanis will this PR be reopened? |
I can help too
|
There's been some interest in adding translations for languages other than english here: https://github.com/actualbudget/actual/discussions/199
I can't really work on this myself personally due time + language knowledge constraints but I'm leaving this PR open so that anyone can contribute translations to be merged into this PR and once we have more coverage then we can work on getting it merged into master (we'll need to add the ability to set the language in the UI, etc.).
For the time being you can choose which language to display by setting the
lng
flag insrc/locales/index.js
. We currently have very barebones i18n files which only handle a couple of strings on the bootstrapping page.These files need to be filled out and new ones created for any languages we want to support. To use these these translations, all the components in the app need to be updated in a similar fashion to the
Bootstrap
component (please use that component as a guide).