..:: PCSX2 Forums ::..

Full Version: Calling all Translators! PCSX2 GUI is ready for translation!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Translate to "fast boot your game". That's what it does Tongue2
@josephg what is your locale on linux (just type locale on a term).
(01-20-2011, 11:16 PM)gregory Wrote: [ -> ]@josephg what is your locale on linux (just type locale on a term).

Gregory, looks like my PCSX2 recognize Portuguese (Brazilian) as system language, but can't find the .mo files inside Langs/pt_BR. It works fine in Windows. How about you, in linux?

Code:
$ locale
LANG=pt_BR.UTF-8
LC_CTYPE="pt_BR.UTF-8"
LC_NUMERIC="pt_BR.UTF-8"
LC_TIME="pt_BR.UTF-8"
LC_COLLATE="pt_BR.UTF-8"
LC_MONETARY="pt_BR.UTF-8"
LC_MESSAGES="pt_BR.UTF-8"
LC_PAPER="pt_BR.UTF-8"
LC_NAME="pt_BR.UTF-8"
LC_ADDRESS="pt_BR.UTF-8"
LC_TELEPHONE="pt_BR.UTF-8"
LC_MEASUREMENT="pt_BR.UTF-8"
LC_IDENTIFICATION="pt_BR.UTF-8"
LC_ALL=
There are potentially 2 issues:
1/ The directory location: $CDW:/usr/local/share/locale:/usr/share/locale
Maybe silly, but try "cd langs && ../pcsx2"

2/ The language name for english I have both en and en.UTF-8 but not en_US.

Here a magic command Wink strace pcsx2 --forcewiz|&tee | grep -i -o "\".*pcsx2_Main.mo\""
Copy the output in a file and do a sort -u, I do not know why it can be piped.

Here mine, $CWD is /home/gregory/pcsx2
Code:
"/home/gregory/pcsx2/en/LC_MESSAGES/pcsx2_Main.mo"
"/home/gregory/pcsx2/en/pcsx2_Main.mo"
"/home/gregory/pcsx2/en.UTF-8/LC_MESSAGES/pcsx2_Main.mo"
"/home/gregory/pcsx2/en.UTF-8/pcsx2_Main.mo"
"/home/gregory/pcsx2/pcsx2_Main.mo"
"/usr/local/share/locale/en/LC_MESSAGES/pcsx2_Main.mo"
"/usr/local/share/locale/en.UTF-8/LC_MESSAGES/pcsx2_Main.mo"
"/usr/share/locale/en/LC_MESSAGES/pcsx2_Main.mo"
"/usr/share/locale/en/pcsx2_Main.mo"
"/usr/share/locale/en.UTF-8/LC_MESSAGES/pcsx2_Main.mo"
"/usr/share/locale/en.UTF-8/pcsx2_Main.mo"
"/usr/share/locale/pcsx2_Main.mo"
(01-21-2011, 12:05 AM)gregory Wrote: [ -> ]There are potentially 2 issues:
1/ The directory location: $CDW:/usr/local/share/locale:/usr/share/locale
Maybe silly, but try "cd langs && ../pcsx2"

Running this command plus "--forcewiz", it finds the pt_BR language, knows that my system use it as default, but it still complains that the translation files were not found and give me an interface in english - but I can select and apply pt_BR and it works.

ps.: For this test, I removed the translation files from /opt/pcsx2, having them set in /opt/pcsx2/Langs/pt_BR folder.

(01-21-2011, 12:05 AM)gregory Wrote: [ -> ]2/ The language name for english I have both en and en.UTF-8 but not en_US.

Here a magic command Wink strace pcsx2 --forcewiz|&tee | grep -i -o "\".*pcsx2_Main.mo\""
Copy the output in a file and do a sort -u, I do not know why it can be piped.

Sorry, this command returned nothing for me. I thought I typed it wrong or something and ran "strace pcsx2 --forcewiz |&tee logfile.txt". Searched in this file with parameters like "pcsx2_" or "Main.mo"... nothing.
(12-07-2010, 08:13 AM)pcsx2fan Wrote: [ -> ]
(12-07-2010, 04:29 AM)Whistler Wrote: [ -> ]just a note: translating pcsx2_Iconized.pot and pcsx2_Tertiary.pot is a little "tiresome" compared to "usual" gnu gettext translations... also in this way if some strings are changed (especially eg. format change) in future it would not be very easy to find out with msgmerge in the "usual" way.

and it's an error if msgid does not end with \n while msgstr does (or vice versa).

That error can be ignored, it does store \n at the end of translation, you can find it if open the PO file with Notepad.

It can be ignored when saving PO file in POEDIT, but an error when compiling pcsx2 under Linux(visit here for example: http://code.google.com/p/pcsx2/issues/detail?id=920#c3).

So people should avoid \n at the beginning or at the end of a piece of translation, if encounter one of following two errors when saving PO file in POEDIT:
Code:
`msgid' and `msgstr' entries do not both begin with '\n'
`msgid' and `msgstr' entries do not both end with '\n'
(01-21-2011, 12:05 AM)gregory Wrote: [ -> ]Here a magic command Wink strace pcsx2 --forcewiz|&tee | grep -i -o "\".*pcsx2_Main.mo\""
Copy the output in a file and do a sort -u, I do not know why it can be piped.

Thanks for the command I inspired by it, I run the command below and close pcsx2, then generate output in Terminal. I installed Ubuntu 10.10 in VMware Workstation.

The command I use, replace zh_TW with your language code.
Code:
$ strace ./pcsx2 --forcewiz|&tee | grep -i -o "\".*pcsx2_Main.mo\"" | grep zh_TW | sort -u

My output. I simply choose the simplest 2nd line as path for storing mo files, other paths should work too.
Code:
"/home/pcsx2fan/pcsx2-read-only/bin/zh_TW/LC_MESSAGES/pcsx2_Main.mo"
"/home/pcsx2fan/pcsx2-read-only/bin/zh_TW/pcsx2_Main.mo"
"/home/pcsx2fan/pcsx2-read-only/bin/zh_TW.UTF-8/LC_MESSAGES/pcsx2_Main.mo"
"/home/pcsx2fan/pcsx2-read-only/bin/zh_TW.UTF-8/pcsx2_Main.mo"
"/home/pcsx2fan/pcsx2-read-only/share/locale/zh_TW/LC_MESSAGES/pcsx2_Main.mo"
"/home/pcsx2fan/pcsx2-read-only/share/locale/zh_TW.UTF-8/LC_MESSAGES/pcsx2_Main.mo"
"/usr/share/locale/zh_TW/LC_MESSAGES/pcsx2_Main.mo"
"/usr/share/locale/zh_TW/pcsx2_Main.mo"
"/usr/share/locale/zh_TW.UTF-8/LC_MESSAGES/pcsx2_Main.mo"
"/usr/share/locale/zh_TW.UTF-8/pcsx2_Main.mo"

Tested r4242 compiled with codeblocks. The GUI of FirstTime Wizard displays English by default, fortunately zh_TW can be detected and applied.

My locale must be zh_TW.UFT-8
Code:
$ locale
LANG=zh_TW.UTF-8
LANGUAGE=zh_TW:zh
LC_CTYPE="zh_TW.UTF-8"
LC_NUMERIC="zh_TW.UTF-8"
LC_TIME="zh_TW.UTF-8"
LC_COLLATE="zh_TW.UTF-8"
LC_MONETARY="zh_TW.UTF-8"
LC_MESSAGES="zh_TW.UTF-8"
LC_PAPER="zh_TW.UTF-8"
LC_NAME="zh_TW.UTF-8"
LC_ADDRESS="zh_TW.UTF-8"
LC_TELEPHONE="zh_TW.UTF-8"
LC_MEASUREMENT="zh_TW.UTF-8"
LC_IDENTIFICATION="zh_TW.UTF-8"
LC_ALL=

So Langs should be forced on top of Language code in the path to mo files. For instance:
Code:
/home/pcsx2fan/pcsx2-read-only/bin/Langs/zh_TW/pcsx2_Main.mo
supplement to my above post #87.

You gotta launch pcsx2 --forcewiz from pcsx2's main directory for translation to be detected. For instance, both command will work:
Code:
pcsx2fan@pcsx2fan-virtual-machine:~/pcsx2-read-only/bin$ ./pcsx2 --forcewiz
pcsx2fan@pcsx2fan-virtual-machine:~/pcsx2-read-only/bin$ ~/pcsx2-read-only/bin/pcsx2 --forcewiz

While running pcsx2 --forcewiz from other locations won't work for translation to be detected. e.g.:
Code:
pcsx2fan@pcsx2fan-virtual-machine:~/pcsx2-read-only$ ~/pcsx2-read-only/bin/pcsx2 --forcewiz


(01-21-2011, 12:05 AM)gregory Wrote: [ -> ]There are potentially 2 issues:
1/ The directory location: $CDW:/usr/local/share/locale:/usr/share/locale
Maybe silly, but try "cd langs && ../pcsx2"

Similar way if running pcsx2 --forcewiz from zh_TW folder, there will be numerous redundant language entries shown, since I herein only installed Chinese (Traditional, Taiwan).
Code:
pcsx2fan@pcsx2fan-virtual-machine:~/pcsx2-read-only/bin/zh_TW$ ../pcsx2 --forcewiz
[Image: pcsx2--forcewiz_from_zh_TW_in_Ubuntu_10.10.jpg]
Indeed. I added mo files to one of these paths (/usr/share/locales/LC_MESSAGES/, where I see a lot mo files for other programs) and pcsx2 recognized the translations without complaining of missing files.

I guess I could tell my distro's package script (aka PKGBUILD) to 'cp' or 'ln' the translation files, available in the source code, to this folder or any others, but I suppose that in normal situations it should not be solved by packagers... Is it feasible to define the folder for translations in linux in compilation-time?
(01-22-2011, 04:15 PM)josephg Wrote: [ -> ]I guess I could tell my distro's package script (aka PKGBUILD) to 'cp' or 'ln' the translation files, available in the source code, to this folder or any others, but I suppose that in normal situations it should not be solved by packagers... Is it feasible to define the folder for translations in linux in compilation-time?
Well the normal situation is to install software by package Smile My guess is that /usr/share/locale is the directory defined by the FHS doc.
I add the option L10N_PORTABLE to select the installation directory (-DL10N_PORTABLE=TRUE(bin/Langs)|FALSE(FHS, /usr...) )

For the moment, PCSX2 does not look into Langs but I just commit an update. I suspect my locale to be broken on my system... So feel free to test it.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20