-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
App Translations / Internationalisation #1311
Comments
sorry for this newbie question, but how do I "run |
You'd have to install node.js (https://nodejs.org/en/) but once you do that, I believe you get a shell window you can open. You can go to the directory and run |
Hi @gfwilliams, I have a doubt about the key of a translation.
|
I think you need to use At some point it could probably be improved but right now that's how it works: |
Hi @gfwilliams, I came across another special case: if a string contains In
As a workaround for a |
Ahh, thanks - yes, this is due to the slightly hacky lexer that's in EspruinoTools. Should be fixed now. |
Actually it's not fixing this bug - just what you mentioned above :) |
@gfwilliams This should hopfully solve all your issues: |
Thanks - just commented on that PR. Needs a few tweaks before I can merge but it looks like a great way to get started with translations |
When I do that, I get <ref *1> Error: spawnSync C:\myfolder\bjs\bin/../bin/create_apps_json.sh UNKNOWN |
Would adding github/inlang/inlang to this repository help with the translation effort? I could open a PR that adds the config file. Nothing else is required. Contributions open a PR. |
I want to provide a Japanese |
@samuelstroschein I'm not quite sure I understand what that repo really adds? It feels like the current solution with @tonykakuuu I'm afraid there's been nothing else added for Japanese/Chinese fonts. The way we can only render one 8 bit codepage at a time causes quite a bit problem - I think the best approach is that done for the image based rendering... I just made a tool ( I can't read japanese, but the result looks quite promising: If you try the development app loader you should be able to try it out edit: Ideally we'd have a bitmap font so we could render it better to the low-res 1bpp image. This looks promising if someone wanted to have a try at tweaking language_render.js to load it https://unifoundry.com/unifont/ edit 2: I've just done this - it's much better |
Inlang is supposed to become the "localization" layer one can use to reduce the effort of localization from source code-related things to receiving a UI to edit translations in a repository. For bangle specifically:
|
Thanks - I think in this case it's probably not that useful for us. I mean, using the online editor with https://github.com/espruino/BangleApps/edit/master/lang/de_DE.json is hardly a massive hurdle for most people. It doesn't need a fancy UI - at most I guess a few lines of docs on how to add translations are needed. Our issue isn't that translation is hard for anyone, it's just that very few people contribute to the translations... We just need people to spend time on that, rather than us spending even more time on infrastructure that nobody is interested in using. @tonykakuuu as above I've changed the font now so I'd be really interested to see how the japanese translations in the development app loader look to you. |
My 2 cents, I just want to say honestly why I do not translate much:
|
@gfwilliams This is actually brilliant, well done. The translations look mostly correct and I'll go through them in more detail once I have an afternoon. |
@tonykakuuu that's great news! Thanks for checking it out! @nxdefiant Thanks - in Germany in particular it feels like there's a super high English literacy level. And as you say, right now most of Bangle.js users will know some English so I guess it's not so important - but that may change in future. It makes me think that going forward it might make sense to find a way to encourage apps to use icons/images instead of text (especially with a more finger-friendly grid layout), and then those would end up being approachable to everyone without translation |
What would be the benefit? Avoiding "too long text" that breaks the user interface?
Agree, getting contributions is the harder part. We are thinking about ways to lower barriers for translation contributions. Not editing files manually is one of them, but it needs more. For example, automatically showing in the README if translations are missing. A click on that README "field" could directly navigate to the missing translation and thereby lower the barrier to contributing. |
In addition to the translation I attempted to create a jp_JP language (locale) using the |
Yes, I think you'd expect that... Right now the code for working out the day from that string is basically The issue is when you embed that as an image, even if you're splitting it out into 7 different images separated by commas (but it might actually just end up as one big image) the binary image data in the string may well have a character You'd need to rewrite the way the locale module works for Japanese in that case. What you could do that I guess might be more sensible is to create a whole new app for the Japanese locale (without custom.html) that provides a locale module. You could then reference every day of the week separately with |
This is a replacement for #136 - without the discussion about how to implement it...
Historically, we used the
locale
module for translations (http://www.espruino.com/Bangle.js+Locale) but this only provided extremely basic translation (yes/no/etc). While more translations could have been added, these would use up memory and would make apps run slowly.We are now moving towards translating apps automatically in the app loader during the upload process
It works pretty simply:
app.js
file, write any text in English and put/*LANG*/
in front of any text string that should be translatedlang
folder, for instance https://github.com/espruino/BangleApps/blob/master/lang/de_DE.jsonCurrent status:
/*LANG*/
entries in at the moment is Settings - we need more apps with the LANG tag addedbin/language_scan.js
to get an idea. we need more translations! Maybe we want to try doing translations automatically so we have some placeholders?Any help that can be provided is hugely welcome! This has been requested a lot so I've done what I can, but my language of non-english languages is seriously lacking.
The text was updated successfully, but these errors were encountered: