-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Internationalize plan #42
Comments
Yes! I'd love to help with the Spanish translation! |
I'd love to help with portuguese and french (bilingual here) |
Yes maybe? I would very much like to translate Quirk, but I one fear. Let’s say we translate it to Korean. Then I want to add a new feature that requires text. Can we fall back to English in the meantime before it gets translated? Is that alright? If so, then yeah. Let’s make translation the next big feature 🙌 |
Polish speaker who would love to contribute to translation here! 🙌 |
Would love to have a Chinese localized version of the app, as well. Happy to contribute |
Actually, it looks like there are some localized strings already? https://github.com/Flaque/quirk/search?q=auto_thought&unscoped_q=auto_thought |
@briankung As of a couple minutes ago yes! We're gonna move the whole thing into an |
Awesome! You move fast. Also consider having files for different regions
with the same language as well, can't hurt to do `en-US.json`. Chinese at
least has a lot of regional differences, even using different character
sets. Thanks and happy to jump on this when I get a chance, too!
…On Sat, Apr 6, 2019, 6:12 PM Evan Conrad ***@***.***> wrote:
@briankung <https://github.com/briankung> As of a couple minutes ago yes!
We're gonna move the whole thing into an en.json and then folks can
copy/paste that file into a region file like fr.json. Translation is
happening, gonna try and get it mostly working by end of the day!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACtGx9yG9WO6DXjuixC-V9vYpgFKXKAsks5veSnmgaJpZM4cgJl5>
.
|
Will do! |
Just bumped into this app, and it looks amazing! ❤️ I would be super happy to help contribute to a Finnish translation. |
AHH HURRAY! Okay folks! The first bit of internationalization is READY! How to contribute a new languageCreate a JSON fileCopy the For example, if I wanted to translate to Finnish like @Walther, I would do:
Note that the convention typically uses the english name for the language, so no Fill out the JSON fileGo through as much as you can and translate into your language. If you can't translate everything, that's okay, it will fall back to English. Open up
|
(Head's up we're still actively migrating more of the text over to the english json, so just fyi stuff might change a bit, but we'll try to keep what's in place in place) |
Note that I originally suggested EDIT - actually kind of looks like we need the hyphenated version, if I'm looking at |
^ Ah good catch. 👏 I wasn't sure what that was called. |
Also, this might be helpful for anyone embarking on a translation (mirror): |
THAT'S AMAZING! |
@Flaque are there any similar plans for getquirk.app? That page could also use translations |
@scaramagus that site needs some other work first, (partially just to be in a state where I can open source it) but ya I'd be down. It's just another react thing, should be the same concept. Thank you so much!! |
While translating, I noticed that there's still a couple of places without internationalization:
There's already a couple of translation PR's accepted. When these now-missing items will be added to the In what ways can we ensure the translations stay up to date? Is it possible to e.g. have some "test coverage" -like warnings / notifications for missing translation keys or such? |
@Walther so it will default to english if the users language is missing values. I think if you submit a pr it might be a good idea just to google translate to these languages. Then maybe if someone who is fluent catches an issue with it they can bring it up? Thats the only solution I can think of, do you have other ideas making sure translations are up to date? |
I think @Walther's suggestion isn't unreasonable - just parse the |
I think you're all right! @Walther I love the idea of test coverage for translations. VS Code does something similar. We could just do a little node module; that would let us both With that, we could do what @briankung is saying:
And we could surface that to the user, but also default to english like @devinroche said so we're not just showing nothing. I'd definitely be down to show some sort of warning or note in the app that the version their using isn't fully translated, but my main concern is where to put it so it doesn't disrupt someone. A primary goal of Quirk is you shouldn't ever block a user who's about to enter a thought; since they're often in a rush and already in a stressful situation. Or were you folks talking about doing it in a PR? That would be the easiest I think. |
I'd love to write such a test in a PR, but I can't seem to figure out how to run the two EDIT - this helped a lot, since Still can't run the tests, though, I'm getting an error on the Localization import: |
Yeah I think there’s an issue with expo and ts. I’ll look into this tonight! Hopefully get it fixed too. @briankung i fixed it on my local machine after installing this @types/expo-localization. I ran into another issue though. |
I got through to the tests, but they're not requiring the spec library correctly. This is the diff I used to get there: diff --git a/package.json b/package.json
index 63e3327..750193d 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,7 @@
},
"dependencies": {
"@expo/vector-icons": "^8.0.0",
+ "@types/expo-localization": "^1.0.1",
"@types/react-navigation": "^3.0.1",
"expo": "^31.0.6",
"i18n-js": "^3.2.1",
diff --git a/tsconfig.json b/tsconfig.json
index ae96cbf..92e5a72 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -13,7 +13,8 @@
"noUnusedLocals": true,
"sourceMap": false, // Something else (Babel?) is creating the necessary source maps.
"strict": false, // since we're converting from a js project
- "target": "es2017"
+ "target": "es2017",
+ "typeRoots": [ "./node_modules/expo-localization/"]
},
"exclude": ["node_modules"]
}
diff --git a/yarn.lock b/yarn.lock
index 399a276..e67ad1c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -595,6 +595,11 @@
react-native-safe-area-view "^0.11.0"
react-native-screens "^1.0.0 || ^1.0.0-alpha"
+"@types/expo-localization@^1.0.1":
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/@types/expo-localization/-/expo-localization-1.0.1.tgz#899c16c3f82924c286ca99f5722a6ffa4e74e84f"
+ integrity sha512-GIIFqzpI+Uu0BmKJtKGj6OwuJxSxREcpmDu1GYhbLpbZRvMdluYEmth1Q1vaIygGk1+YI8mP+G69y8VO54MSig==
+
"@types/expo@^31.0.5":
version "31.0.5"
resolved "https://registry.yarnpkg.com/@types/expo/-/expo-31.0.5.tgz#54aa6ca7c97cf17fa83caedc8d0ef6ba2521003d" Basically I added |
Ex: EDIT - adding
@devinroche I'm going to have to turn in for the night here, but good luck! |
Investigating. Git bisect says its this commit when the tests started failing: 6173108 Plan for tonight:
Definitely my fault, sorry bout that 😅 |
This is definitely happening because of the |
Unsure if related, but even Expo itself skips the Localization module during testing: expo/expo@a3ee8cb#diff-e535def31fd598e267642218073cd353 |
Cool, shipping this to beta on iOS for the moment so I can play with it. If you're not in the program already, have an invite link! |
An interesting development in localization: https://hacks.mozilla.org/2019/04/fluent-1-0-a-localization-system-for-natural-sounding-translations/ |
@briankung Woah. We should use that. It's got react bindings: https://github.com/projectfluent/fluent.js/tree/master/fluent-react |
If you're serious, I can start work on converting our current translations to Fluent. It does look a little bit awkward in practice - I've copied one of their hello world examples to view in one page here: https://gist.github.com/briankung/3f38b5dffb71e745dc93ebd7cd9ecca6 |
@briankung --> I am, I think this solves a lot of the formatting and other weird issues we've run into. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi,
I’m a Korean programmer and had CBT before. I think it should be great if you support other languages.
I translated ‘groovy programming language’ into korean and contributed translation of ‘django girls’.
Do you have plan for internalization?
The text was updated successfully, but these errors were encountered: