sq6jnx / sr0wx.py

Automatic hamradio weather station written in python
Apache License 2.0
13 stars 4 forks source link

Extract translations from `pl_google` #29

Open sq6jnx opened 9 years ago

sq6jnx commented 9 years ago

Extract translations from pl_google and:

wprzyb commented 9 years ago

can it be yaml instead of json?

I would separate constant things like pyliczba things, wwo weather descriptions, date, units and stuff... from custom things like callsigns, i don't think we need greetings and farewells in json, so it can be freely translated to another languages without interfering with config. Then samples generator should take what's needed not only from dictionary, but it should be able to take a peek into the config.

@sq6jnx What do you mean by "translations discovery" ?

translate(value) should take variable name (like TEMP_MAX, not "temperatura maksymalna") as an argument with language code as well.

I don't know of good design pattern / template / way of writing software / common practice to write lang files that it can be interpreted with some translation support interfaces (with voting and submiting suggestions et cetera), do you know of any?

wprzyb commented 9 years ago

Maybe l18n?

sq6jnx commented 9 years ago

can it be yaml instead of json?

I don't think so.

In my opinion whole text should be set in some-kind-of-template. Then, given arguments and language one can easily fill template with proper words.

Unfortunately, text to speech engines may have problems with reading some phrases and these should be resolved in another file. In other words, one should look for translation in base language file, but use specific lang-tts file if it has a pecific entry.

What do you mean by "translations discovery" ?

Please read about gettext.

Maybe l18n?

Warm!