Some questions about localization (Linux)

Archive of historical development discussions
Discussions / Development has moved to GitHub
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
mod16
Experienced
Posts: 78
Joined: Sun Jan 12, 2014 11:10 am

Some questions about localization (Linux)

Post by mod16 »

I want to provide a german translation for the Linux version.
I already registered on the Transifex project page of HandBrake[1], added a new language and started to translate some stuff.

But before I really go into it, I have some questions:
  • As far as I understand all strings with underscores ("_") marking the keyboard shortcut for use with the Alt-key. Can I change them? Or do I need to use the same letters (if possible)? I know that they have to be unique.
  • Will words or phrases that don't need translation or simply aren't translated automatically be replaced by the default?
  • Is it possible to easly test the translation (just for myself) by droping the *.po-file into the my local gtk/po/ folder in the sources and rebuild? Or do I need to tweak something else first?

[1] https://www.transifex.com/projects/p/handbrake/
User avatar
JohnAStebbins
HandBrake Team
Posts: 5723
Joined: Sat Feb 09, 2008 7:21 pm

Re: Some questions about localization (Linux)

Post by JohnAStebbins »

This may sound strange, but this isn't the best place to ask these questions. I know practically nothing about translations. I've been relying on the expertese of the contributers on Transifex. But I'll aswer as best I can.

1. The only downside to changing these strings would be if someone is using a script engine to drive the gui through keyboard shortcuts. I think such a script would be ill advised, and anyone doing this gets what they deserve when the shortcuts change. So go ahaid and change them as you like.
2. Yes
3. I've only tested translations by manually putting the generated mo file in the proper /usr/share/locale directory (which "make install" will do) then running ghb like this (for example)

Code: Select all

LC_MESSAGES="ru_RU.utf8" ghb
I don't know if there are more convenient ways to test.
mod16
Experienced
Posts: 78
Joined: Sun Jan 12, 2014 11:10 am

Re: Some questions about localization (Linux)

Post by mod16 »

JohnAStebbins wrote:3. I've only tested translations by manually putting the generated mo file in the proper /usr/share/locale directory (which "make install" will do) then running ghb like this (for example)

Code: Select all

LC_MESSAGES="ru_RU.utf8" ghb
I don't know if there are more convenient ways to test.
Thank you for your reply!

I tried that, but somehow it didn't worked.

What I did:

1.) Downloaded the po file from Transifex and put it into gtk/po/ (as de.po), also edited LINGUAS and added "de".

2.) Compiled the sources with ./configure --launch

3.) After that completes, I get a de.gmo file in build/gtk/po

4.) I copied that file as ghb.mo into /usr/share/locale/de_DE/LC_MESSAGES and, to be sure, also in /usr/share/locale/de/LC_MESSAGES (as far as I understand gmo and mo files are basically the same or do I need to "convert" them somehow first!?)

5.) Tried to start HB with LC_MESSAGES=de_DE.utf8 ghb - but still no translations visible. Also ru_RU.utf8 didn't worked, but maybe that's just because I haven't that locale enabled.

Did I miss something?

Code: Select all

$ locale -a
C
C.UTF-8
de_AT.utf8
de_BE.utf8
de_CH.utf8
de_DE.utf8
de_LI.utf8
de_LU.utf8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
POSIX
mod16
Experienced
Posts: 78
Joined: Sun Jan 12, 2014 11:10 am

Re: Some questions about localization (Linux)

Post by mod16 »

Never mind! I got it.

I have to run

Code: Select all

LANGUAGE= LC_MESSAGES=de_DE.UTF-8 ghb
Apparently the LANGUAGE env var was overriding all other settings so it needed to be unset before.
Post Reply