-
Notifications
You must be signed in to change notification settings - Fork 850
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 support for translations in GDevelop 5 🌎 #919
Conversation
432b599
to
9cf2fbb
Compare
Is it already possible to add translations for the new features in GD5 that were not available in GD4? |
Not quite, extracting translations and uploading them to Crowdin is part of what is achieved in this Pull Request. Strings to translate in the editor will have to be put between a Extensions are ok because from the start I introduced the "t" function. The editor will need more work because I need to go through every string and mark them as translatable. |
9b4b9a4
to
058b350
Compare
Made a script that added translation markers to most strings of the editor :) Still have quite a bunch to go manually through, made another script to list them. Will merge this when Flow is fixed in js-lingui. As there are a lot of changes, better merge this as soon as possible. |
Might actually host a built version of js-lingui so that we can go ahead and merge this asap, and start having translations, while I finish to add missing translation markers. |
c9643c2
to
2547a8b
Compare
… libGD.js) * Upgrade to Flow 0.92 and make fixes for it * Convert all extensions to use _("...") instead of t("...") for translations, to be able to be parsed by gettext * Handle translation in JS extensions * Move Providers out of MainFrame * Remove i18next * Adapt ExtractTranslations script to handle js files (for extensions)
48037cb
to
4323000
Compare
This Pull Request is becoming really super large and is going to need more and more work if we merge other Pull Requests. I'll merge it now, and will work on improving the remaining points in the description (missing translations markers, relaunch the app or reload translations when a new language is chosen). @blurymind @Bouh @Wend1go @Lizard-13 or anyone that might have some Pull Request or using GD development version.
Don't forget |
Or relaunch GD?Things that will need to have translations markers added - this can be done progressively after this PR is merged:
t("...")
(that I updated to_("...")
)_("...")
)<Trans>
(orwithI18n
+this.props.i18n._(...)
like done in MainFrame.js)const t = str => str; //TODO
unsafe-eval
.