Skip to content
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

i18n #156

Merged
merged 30 commits into from
Dec 17, 2019
Merged

i18n #156

merged 30 commits into from
Dec 17, 2019

Conversation

ph1p
Copy link
Member

@ph1p ph1p commented Apr 26, 2019

Hi!

This PR adds i18n functionality and is currently WIP. I'll add auto detection and a language chooser or something else.
I have copied some code from buttercup-desktop and experimented a little (:

I am pleased about your thoughts and suggestions.

[UPDATE]

  • Autodetection

@julianpoemp
Copy link
Member

That's what I was looking for 😁👍

@perry-mitchell
Copy link
Member

Great stuff @ph1p! This'd be super handy.

@ph1p ph1p changed the title WIP: Start i18n WIP: i18n Apr 28, 2019
@ph1p ph1p changed the title WIP: i18n i18n Apr 28, 2019
@ph1p
Copy link
Member Author

ph1p commented Apr 28, 2019

I'm almost done translating all the strings. Some parts are a bit confusing (sheets.js), but it should work (: Currently I have added English and German. Buttercup auto detects the language.

@ph1p ph1p force-pushed the feature/i18n branch 7 times, most recently from 286361f to 5721c3f Compare May 3, 2019 19:01
@perry-mitchell
Copy link
Member

Great @ph1p! Amazing work. Should we give it an in-depth review now? Would you say the WIP is done?

@ph1p
Copy link
Member Author

ph1p commented May 3, 2019

Sure! Feel free to review. I know there's definitely room for improvement, but it's a first version (:

@ph1p
Copy link
Member Author

ph1p commented May 3, 2019

I also tried to fix the build bugs. I made android work, but ios still fails.

Found this config: https://travis-ci.org/ankidroid/Anki-Android/builds/526250449/config

Copy link
Member

@sallar sallar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is lovely! Thank you

source/components/ArchivesPage.js Outdated Show resolved Hide resolved
@perry-mitchell
Copy link
Member

Looks good to me. I can do some testing on this tomorrow. I'll leave it to @sallar to make a review as well.

@perry-mitchell
Copy link
Member

Apologies @ph1p once again for missing this - I'll try to handle the conflicts so you don't need to again. We upgrade react-navigation to get the OTP codes feature working, so I'll skip that in this MR.

@perry-mitchell
Copy link
Member

Hi @ph1p - I've merged your branch with master over at #209 and it seems to work locally. There's now a few missing localisations as we added text in the OTP codes MR. There's also the error messages and some other pieces of text (eg. "OK") which need localising, but that should be quite easy I guess.

I did remove the changes for the react-navigation upgrade as we'd done the same, sorry, and had also removed the redux portion of it (as we were originally planning to do away with it anyway). I'm sorry if you spent any great amount of time on this.

Now the final part: What would you like to do? Should we take it from here and finish it off, or would you prefer to take the merge-commit into your branch and finalise it yourself? We're entirely happy either way.. just sorry that we left it sit for so long.

Thanks for the help and patience :)

@ph1p
Copy link
Member Author

ph1p commented Dec 2, 2019

Hi @ph1p - I've merged your branch with master over at #209 and it seems to work locally. There's now a few missing localisations as we added text in the OTP codes MR. There's also the error messages and some other pieces of text (eg. "OK") which need localising, but that should be quite easy I guess.

I did remove the changes for the react-navigation upgrade as we'd done the same, sorry, and had also removed the redux portion of it (as we were originally planning to do away with it anyway). I'm sorry if you spent any great amount of time on this.

Now the final part: What would you like to do? Should we take it from here and finish it off, or would you prefer to take the merge-commit into your branch and finalise it yourself? We're entirely happy either way.. just sorry that we left it sit for so long.

Thanks for the help and patience :)

Hi @perry-mitchell,
That was a long way, until now :D

I did remove the changes for the react-navigation upgrade as we'd done the same, sorry, and had also removed the redux portion of it (as we were originally planning to do away with it anyway). I'm sorry if you spent any great amount of time on this.

That's all right. It's your project and I see a PR more as a proposal and discussion basis to get the best out of it. And if just everything is merged without meaning, nobody is helped (:

Now the final part: What would you like to do? Should we take it from here and finish it off, or would you prefer to take the merge-commit into your branch and finalise it yourself? We're entirely happy either way.. just sorry that we left it sit for so long.

I can do it gladly. I want to help you and finish it in the next days ;)
Should I create a new PR and we close this one or should I override this?

[EDIT]:
nevermind, I force pushed it to this one.

@ph1p ph1p changed the title i18n + react-navigation update i18n Dec 2, 2019
This commit only updates some dependencies. No major updates.
Fix duplicated entries and remove some entries
Add back button translation.
Translate Tabbar.
@ph1p ph1p force-pushed the feature/i18n branch 2 times, most recently from 5cd29d8 to cbbc094 Compare December 2, 2019 21:49
@ph1p
Copy link
Member Author

ph1p commented Dec 3, 2019

@perry-mitchell I think I'm done.
Let me know if something is missing or if I have to adjust the structure of the locale files.

Copy link
Member

@sallar sallar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work @ph1p as always. I just have one question, then I can approve and merge

package.json Outdated Show resolved Hide resolved
scripts/testIOS.sh Outdated Show resolved Hide resolved
Copy link
Member

@perry-mitchell perry-mitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of changes! Otherwise this looks epic.. :D

source/components/GroupsPage.js Outdated Show resolved Hide resolved
source/components/GroupsPage.js Outdated Show resolved Hide resolved
@perry-mitchell perry-mitchell changed the base branch from master to i18n_finalisation December 17, 2019 10:41
@perry-mitchell
Copy link
Member

Thanks @ph1p - Taking this forward to another branch so we can merge it with our rn upgrade and get it out! Great work on this!

@perry-mitchell perry-mitchell merged commit 470a136 into buttercup:i18n_finalisation Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants