antipalos / antipalos.github.io

Σελίδες γνώσης
4 stars 5 forks source link

Translation support #2

Open vsubhuman opened 6 years ago

vsubhuman commented 6 years ago

For now - all useful text is in full bullshit mode along with the logic code. This is horrible and impossible to translate without creating a separate page.

Extract all useful text into (instructions, parameter labels, tooltips, etc.) into separate file[s] and add some dynamic linking with a selector, so people could contribute translations and users could chose a language.

gufmar commented 6 years ago

would it be possible to consider the browser language and then use some of most common number formattings? https://en.wikipedia.org/wiki/Decimal_separator#Examples_of_use It would help first-time-users to prevent mistakes if they're staking 10 or 10k ADAs

vsubhuman commented 6 years ago

would it be possible to consider the browser language and then use some of most common number formattings?

Oh yeah, this is actually an important feature. The formatting in the context fields (to the right of input fields) is easy, since there's just a US-locale hardcoded for now, so I can try to extract one from browser. The formatting in the input field themselves is a bit harder, since I couldn't find any native support for a preformatted number fields, so I had to use a side-library that does all the magic. I hope it is configurable enough, so I prolly could extract order- and decimal-separators for the browser's locale and then just make that library use it.

Dang, decimal separators are especially hard, since users need to input those manually, and example wiki shows that for some locales those are "unexpectedly weird" (https://i.imgur.com/mLHw7RZ.png) :)

Anyways, really nice spot, thank you for that! I will create a separate issue and will try to squeeze it into upcoming 0.1.1 (with new layout) or into 0.2