Languages should be human readable #1122

Closed
arielj opened this Issue Apr 5, 2012 · 13 comments

Comments

Projects
None yet
4 participants
Member

arielj commented Apr 5, 2012

I mean... language codes are not nice for users, we should display "Español" instead of "es", or "English" instead of "en".

If the language name is written in the propper language, even better (like "Español" for "es" instead of "Spanish")

It shouldn't be hard, just some dict with code => name references.

Owner

c10ud commented Apr 5, 2012

problem is, there're LOTS of languages

2012/4/5 Ariel Juodziukynas
reply@reply.github.com:

I mean... language codes are not nice for users, we should display "Español" instead of "es", or "English" instead of "en".

If the language name is written in the propper language, even better (like "Español" for "es" instead of "Spanish")

It shouldn't be hard, just some dict with code => name references.


Reply to this email directly or view it on GitHub:
#1122

Member

arielj commented Apr 5, 2012

I know, but it's easy, we only need to associate all language codes from emesene/po folder to each of the languages here https://translations.launchpad.net/emesene/trunk somewhere inside Language.py and use that dict to populate the dropdown menu.

Member

lfottaviano commented Apr 6, 2012

we can read the po file info with translation.info() function

Member

lfottaviano commented Apr 6, 2012

or read that info without gettext

Member

lfottaviano commented Apr 6, 2012

well, not all po files have x-poedit-language value available

Member

arielj commented Apr 6, 2012

I'm doing this with a dict, I'll try to push it today or tomorrow

Member

arielj commented Apr 6, 2012

pushed, @lfottaviano i've refactored the way we instanciate the translation (with a little doc comments), please test it on your cases to

I don't close this because yet, I will update languages to it's original pronunciation (google and wikipedia, here I goooo...)

Member

lfottaviano commented Apr 7, 2012

good to see this, works fine on windows 7 also tested on archlinux. When I can I will test this on windows xp, but shouldn't be problems.

Only one thing is there an special reason why try except statements are back? if you pass as parameter fallback=True on gettext.translation() function you don't need to catch IOError exceptions, neither need to assign self._translation = gettext.NullTranslations()

@arielj arielj added a commit that referenced this issue Apr 7, 2012

@arielj arielj More refactor to language.py
Refs #1122
22e815a
Member

lfottaviano commented Apr 7, 2012

@zipatei, if you can please, test languages module at your machine

Member

lfottaviano commented Apr 7, 2012

@zipatei what is your language code ?

Contributor

zipatei commented Apr 7, 2012

@lfottaviano works perfect. =)
PT-PT (Portuguese of Portugal)...

will be able to translate for example, "Portuguese" to "Português"?

Member

arielj commented Apr 7, 2012

@zipatei, I'm working on that, I'll finish the translations tomorrow

@arielj arielj added a commit that referenced this issue Apr 7, 2012

@arielj arielj Update some language names.
Refs #1122
af1972c
Member

lfottaviano commented Apr 7, 2012

thanks @zipatei :D, yes @arielj is doing what you said

arielj closed this in a43a641 Apr 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment