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
Locale App & Handling #105
Comments
How many countries Bangle.js has been ordered from? Can you please name them? |
So far...
|
thanks, I guess not all of them can be handle with a single font.
|
Lets talk about the content that should be available as a locale set. Suggest to use short names instead of long names
Anything else you see to have in that set to start? n=>n.toString().replace(lc.ts,lc.dp) |
|
How should this app be designed?
|
I just sorted by number of backers, and I think working back would be a good start:
I think Japan/Israel are unlikely to be sensible right now. At some point it might be possible to supply bitmaps for text, but I think that's going too far atm.
Maybe we should have:
This sounds like an amazing idea (rather than trying to upload every possible translation to the watch). As you say, I reckon we just put everything (code and data) in one file called So in terms of API:
|
looks like FontDylex7x13 can handle the selected locales. |
let’s add temperature (°C, °F) too.
|
Good plan re:temperature - in terms of fonts, I wonder if we can't extend the 6x8 font to handle the extended ASCII chars? Ideally we would use something built-in. |
Hope that fits into firmware |
Ok, first draft:
Does that seem reasonable? If you save it to a file called 'locale' then you can do:
So assuming the API looks ok, I can add that to Bangle.js firmware, then we can start using it in apps and maybe producing that |
I guess we could maybe modify |
Edit: It could work like the splash screen, if it exist use it, else use the default. I will continue to work on the locales set and generating a locale. |
Ok, great! The newest firmware builds now have the |
this is the locale set that could be used with app local: Edit: fixed some errors
|
this seem's to be the easiest way to create locale.js
Missing function for time and date because not sure about timePattern and datePattern
|
I'd maybe just add code to which outputs the actual JS rather than including the whole formatter...
something like that? So all that code would then live in the HTML bit of the app and what was stored on Bangle.js would be a templated string? |
Yes, it's all in the .htlm app file, only local and functions are saved on the device. Ok, decided to use Unix date format otherwise replacement can destroy function names.
|
What about calling function currency? Should this include decimal point replacement?
|
Hmm - I guess it probably should, yes... |
Are you already writing the locale HTML file for BangleApps? Because if you're not and you have some code already done for making the locale JS file, if you sent it over/post it up I'd be more than happy to integrate something with BangleApps for you. |
Great, just running all locales to check for typos and then I will post locales and code generator. |
Thanks for creating that local HTML file.
|
This is a unique feature and Espruino is the first! |
Just pushed! It's not live on banglejs.com/apps yet, but you should be able to try it with: https://espruino.github.io/BangleApps/ Just gave it a quick try and it seems to work pretty well, so I guess now we just need to modify the apps to use it :/ |
Thanks for all your work on this - it looks awesome! Just a note on this: we should tweak Not had a chance to test yet but:
would probably do it. In fact come to think of it, |
Thanks, so let's do some further testing including a clock. Some questions came up on my site:
|
This one in particular is easy - I've now built en_GB But something more general as you suggest would be really cool, and I guess now
Hmm. I extended both fonts to use char code 128 for euro, but there's nothing in there for vector. It doesn't help with accented chars like
|
New Bangle.js firmwares now auto-translate menu/prompt/etc |
That's perfect.
I think a 6x8 ISO10646-1 loading from flash will do, if possible as overload to the existing one. |
The thing is because we're using it for menus as well, we'd basically have to use the font for everything, and somehow override the built-in font for the menus and stuff like that. Assuming we could find a 6x8 font in ISO10646-1, I think I should just build it in and replace the original (it'd use another 850 bytes maybe). |
If this space is available we should go for it. From my side we can close this issue and continue with that font in a new issue |
This one looks nice: http://uzebox.org/wiki/images/f/f4/6x8font.gif |
I'm on it. Damn, that one does look good - not sure if it's the same character set though? No euro at char position 128... |
Well that took a while... I think the result is pretty cool though: espruino/Espruino@9c17b44 I'm not 100% sure it's the right charset, but it definitely has euro and we can tweak it now. I also think I prefer the look. |
23 of 57 locales are available, updated 2020-04-08 + tr_TR |
As discussed here: http://forum.espruino.com/conversations/290058/#15120253
Add an app and code to handle output of time/distance/etc in a locale-sensitive way
The text was updated successfully, but these errors were encountered: