Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VDrift Localization on Transifex
08-08-2014, 09:27 AM
Post: #1
VDrift Localization on Transifex
Yep, we are also available on transifex now, to make the whole translation process a bit more convenient.

In order to view links, you must have to reply to this thread.

PS
The old style translation upload per vdrift forum will remain available of course.
Find all posts by this user
Quote this message in a reply
08-08-2014, 01:19 PM
Post: #2
RE: VDrift Localization on Transifex
Cool, started with it. I got few questions.

Why are screen resolutions there eg. 800 x 600 and numbers like 1 .. 12 (sound sources?) also GL1, etc.
What do such strings mean: Options / Controls / Button / Edit, there are few of them, do I need to repeat all that after /.

What is the procedure here, e.g. I translated some strings, now I would like to check them in game, what's needed ?
And lastly, how to find out where a string from translation is in game.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-08-2014, 02:45 PM (This post was last modified: 08-08-2014 02:57 PM by NaN.)
Post: #3
RE: VDrift Localization on Transifex
(08-08-2014 01:19 PM)CrystalH Wrote: In order to view links, you must have to reply to this thread.Why are screen resolutions there eg. 800 x 600 and numbers like 1 .. 12 (sound sources?) also GL1, etc.

These are the strings the user sees. The displayed values can differ from the ones the game is processing.

Quote:What do such strings mean: Options / Controls / Button / Edit, there are few of them, do I need to repeat all that after /.

Gui page title strings. The gui as such is just a bunch of nested pages. The title reflects the nesting level for the user. You go from Options -> Controls -> Button -> Edit. And yes, you have to repeat them, shouldn't take too much time though I hope.

Quote:What is the procedure here, e.g. I translated some strings, now I would like to check them in game, what's needed ?

You need to create a mo file. I haven't checked yet how this works with transifex.
Poedit can do it on Windows. On Linux you can use gettext utils "msgfmt -c -o vdrift.mo de.po".
The mo file is to be placed in the locale directory. On windows in data/locale/de/LC_MESSAGES/vdrift.mo on Linux in the default usr locale folder (scons install can do this eg).

Quote:And lastly, how to find out where a string from translation is in game.

The vdrift.pot has the paths to the string sources, which might be helpful:
Code:
#: ../skins/simple/menus/StartingGrid:178
#: ../settings/options.config:534
msgid "12"
msgstr ""

For Polish you will want to set(translate) the _CODEPAGE_ to 1250.

PS:
I will be working on the gui a bit over the weekend, will update the pot file.
Find all posts by this user
Quote this message in a reply
08-09-2014, 06:58 AM
Post: #4
RE: VDrift Localization on Transifex
Cool, thanks for setting that up. Have you found the section where you can set Transifex to automatically update from the .pot? This will save you maintainer's work when you change the source strings.

AFAIK there is no way to let Transifex create the .mo files for you, so you will have to download the .po and then follow the procedure NaN described.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-09-2014, 06:21 PM
Post: #5
RE: VDrift Localization on Transifex
Hmm do you see a way on transifex to download the .po file or anything back ?
Either I don't have it or I can't find it.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-09-2014, 07:03 PM (This post was last modified: 08-09-2014 07:03 PM by NaN.)
Post: #6
RE: VDrift Localization on Transifex
(08-09-2014 06:21 PM)CrystalH Wrote: In order to view links, you must have to reply to this thread.Hmm do you see a way on transifex to download the .po file or anything back ?
Either I don't have it or I can't find it.

Yeah, I wish it would be more visible. They are hiding it in a popup menu.

From the project menu, click on the language, then click on the VDrift entry, then click on the vdrift.pot. You should see a popup with download, upload, translation...
Find all posts by this user
Quote this message in a reply
08-10-2014, 05:23 AM (This post was last modified: 08-10-2014 06:08 AM by CrystalH.)
Post: #7
RE: VDrift Localization on Transifex
Right.
Yeah I'm translating and it's going well. I can translate, download .po save it to .mo in PoEdit and check in game. Which is cool.
What is different for me is that it's the translators job to do that. But otoh, is quicker to check in game. Still if you had e.g. 10 languages (updated frequently) I think some trigger (or script) to download all .po files from transifex (is that possible ?), make all .mo and put into game would be faster.

Next stuff, from my (programmer's) point of view: I think some translations are just redundant. Mostly what I already mentioned.
But I really see no point in having all the numbers translated. What for ? Chinese traditional or are there other languages that don't have the digits ? Digits seem to be present on such websites anyway. So single game numbers like 1..12,16,32 etc.

Also resolution. Why is it translated at all ? You don't eg. have 1024 x 600 or other weird ones. In order to view links, you must have to reply to this thread.
It's pointless to add all of them to translations. IMO just in code, read the height and width numbers and format to strings, that's all.

And same goes for 'Options / Controls / Button / Edit' like strings, I'm ok for translating Options, Controls etc. But not for translating every combination of them too. So IMO, just replace all single strings with translations in code and combine with /.
If I e.g. wanted to change 'Controls' translation I now have to update it in 12 strings.
Given all that, I think about 80 or more translations would be not needed.

Lastly, I'm not familiar with it but why is the .mo file needed. Isn't .po sufficient ? I know it's bigger but seems like an unnecessary step to always convert it.
Next, why is codepage needed ? Isn't that some stupidity that came with the Windows disease, ekhm I mean OS. Utf-8 everywhere, IMO the only solution.

Sorry for so much text. I guess it's mostly relevant for new languages.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-10-2014, 05:57 AM (This post was last modified: 08-10-2014 06:15 AM by NaN.)
Post: #8
RE: VDrift Localization on Transifex
(08-10-2014 05:23 AM)CrystalH Wrote: In order to view links, you must have to reply to this thread.Right.
Yeah I'm translating and it's going well. I can translate, download .po save it to .mo in PoEdit and check in game. Which is cool.
What is different for me is that it's the translators job to do that. But otoh, is quicker to check in game. Still if you had e.g. 10 languages (updated frequently) I think some trigger (or script) to download all .po files from transifex (is that possible ?), make all .mo and put into game would be faster.

No idea, I am new to transifex too. There seems to be a tx client app, haven't looked into it yet.

Quote:Next stuff, from my (programmer's) point of view: I think some translations are just redundant. Mostly what I already mentioned.
But I really see no point in having all the numbers translated. What for ? Chinese traditional or are there other languages that don't have the digits ? Digits seem to be present on such websites anyway. So single game numbers like 1..12,16,32 etc.

Also resolution. Why is it translated at all ? You don't eg. have 1024 x 600 or other weird ones. In order to view links, you must have to reply to this thread.
It's pointless to add all of them to translations. IMO just in code, read the height and width numbers and format to strings, that's all.

And same goes for 'Options / Controls / Button / Edit' like strings, I'm ok for translating Options, Controls etc. But not for translating every combination of them too. So IMO, just replace all single strings with translations in code and combine with /.
Given all that, I think about 80 or more translations would be not needed.

Changing this would require a gui rewrite. If you are annoyed by this strings, just leave them out. I can fix them, should be mostly a copy & paste job.

Quote:Lastly, I'm not familiar with it but why is the .mo file needed. Isn't .po sufficient ? I know it's bigger but seems like an unnecessary step to always convert it.

That is how gettext localization works on *nix systems.

Quote:Next, why is codepage needed ? Isn't that some stupidity that came with the Windows disease, ekhm I mean OS. Utf-8 everywhere, IMO the only solution.

This has to do with how text rendering is implemented. I do not plan to rewrite it either... I can set _CODEPAGE_ myself, just leave it out when translating.




One thing I could do is drop the numeric strings from the next vdrift.pot (numbers, resolutions). So feel free to ignore them. Smile
Find all posts by this user
Quote this message in a reply
08-10-2014, 07:27 AM (This post was last modified: 08-10-2014 07:29 AM by CrystalH.)
Post: #9
RE: VDrift Localization on Transifex
Right. OK. I've done to 84%.
Found some broken translations:

Start a race using the selcted car and track. (bad spelling, should be removed)
Start a race using the selected car and track.

Quit VDrift (is it needed twice ?)
Quit VDrift.

Select car's hood camera . (has a space before .)

Btw. I'm just curious (also for SR tranlsations). What's needed when the original english string has a spelling error or otherwise needs to be updated. If it was already translated, does it invalidate them (i.e. after change of original string, all languages have to be translated again) ?

IMO also such strings are really redundant (few of each):
Save changes and return to ... menu.
Forget changes and return to ... menu.
Return to ... menu.
Move the currently focused menu item ...
Change the ... (half of them)
The .. gear control shifts the car into .. gear.
The steer right control causes the car to turn right. (etc.)

I know everything in menu has a hint, but ugh, honestly half of them isn't saying anything, unless a 3yr old kid is playing or so.
Just my 128 cents again.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-11-2014, 04:17 AM (This post was last modified: 08-11-2014 04:18 AM by GunChleoc.)
Post: #10
RE: VDrift Localization on Transifex
(08-10-2014 05:23 AM)CrystalH Wrote: In order to view links, you must have to reply to this thread.Also resolution. Why is it translated at all ? You don't eg. have 1024 x 600 or other weird ones. In order to view links, you must have to reply to this thread.
It's pointless to add all of them to translations. IMO just in code, read the height and width numbers and format to strings, that's all.

We could use boost::format with numbered placeholders in case some RTL languages need to reverse the order: %1$d x %2$d


(08-10-2014 05:23 AM)CrystalH Wrote: In order to view links, you must have to reply to this thread.And same goes for 'Options / Controls / Button / Edit' like strings, I'm ok for translating Options, Controls etc. But not for translating every combination of them too. So IMO, just replace all single strings with translations in code and combine with /.
If I e.g. wanted to change 'Controls' translation I now have to update it in 12 strings.
Given all that, I think about 80 or more translations would be not needed.

We could do something like %1$s / %2$s / %3$s so people can reverse it and also shorten it if they run out of screen space. Translations of 1-word strings can easily be 3x as long as the original string, so for the deeper menus, some languages might run into space problems.


(08-10-2014 05:23 AM)CrystalH Wrote: In order to view links, you must have to reply to this thread.Lastly, I'm not familiar with it but why is the .mo file needed. Isn't .po sufficient ? I know it's bigger but seems like an unnecessary step to always convert it.

.mo is more efficient like .po, so the program will run faster. .mo files only contain the strings that have actually been translatd, and it's a binary format that enables gettext to load the file a lot faster.


(08-10-2014 07:27 AM)CrystalH Wrote: In order to view links, you must have to reply to this thread.Btw. I'm just curious (also for SR tranlsations). What's needed when the original english string has a spelling error or otherwise needs to be updated. If it was already translated, does it invalidate them (i.e. after change of original string, all languages have to be translated again) ?
Sort of. Any change in the source string will mean that it's a new string. If the change is small, gettext will mark the strings as "fuzzy", so translators can go in and check and do small changes themselves if needed. However, Transifex doesn't handle fuzzy strings.

I recommend that you use an offline-tool like Virtaal or Poedit in addition to Transifex - these have translaion memories to go with them and will give you suggestions. So, if they have remembered your old translation, You can load the new file and just click on your previous translation to reinstate it.

I usually use a mix of translation in Transifex' web interface and downloading the file, translating in an offline tool and uploading the file again. If you pick "Download for translation", Transifex will lock the file, so nobody else will work on it. When you upload your changes, the lock is removed. If you pick "Download for use", no lock is set.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-11-2014, 08:07 AM (This post was last modified: 08-11-2014 08:36 AM by NaN.)
Post: #11
RE: VDrift Localization on Transifex
(08-11-2014 04:17 AM)GunChleoc Wrote: In order to view links, you must have to reply to this thread.
(08-10-2014 05:23 AM)CrystalH Wrote: In order to view links, you must have to reply to this thread.Also resolution. Why is it translated at all ? You don't eg. have 1024 x 600 or other weird ones. In order to view links, you must have to reply to this thread.
It's pointless to add all of them to translations. IMO just in code, read the height and width numbers and format to strings, that's all.

We could use boost::format with numbered placeholders in case some RTL languages need to reverse the order: %1$d x %2$d


(08-10-2014 05:23 AM)CrystalH Wrote: In order to view links, you must have to reply to this thread.And same goes for 'Options / Controls / Button / Edit' like strings, I'm ok for translating Options, Controls etc. But not for translating every combination of them too. So IMO, just replace all single strings with translations in code and combine with /.
If I e.g. wanted to change 'Controls' translation I now have to update it in 12 strings.
Given all that, I think about 80 or more translations would be not needed.

We could do something like %1$s / %2$s / %3$s so people can reverse it and also shorten it if they run out of screen space. Translations of 1-word strings can easily be 3x as long as the original string, so for the deeper menus, some languages might run into space problems.

....

I know there are a few annoying bits. They are there, due to certain constraints in the gui implementation. Getting rid of them is not trivial, else they would have been fixed already. For larger edits I recommend using a text editor (doesn't have to be poedit), even the most basic ones should have search and replace functionality.

There are 38 title strings of the A / B / C kind. Most of them are of the group Options / Controls / ... They should be a simple copy & paste job, not take more than 5 minutes really.

These strings (page titles, numbers, resolution strings) are not generated by the game. The game gui has no concept of page titles eg, they are simply text labels in the gui skin files.
Find all posts by this user
Quote this message in a reply
08-11-2014, 09:03 AM
Post: #12
RE: VDrift Localization on Transifex
@GunChleoc
Thanks for info, this is very useful.
I think we'll probably move to transifex too.
What bothers me the most is that all strings are just in 1 big list. Sorted by the text itself.
There aren't any groups (like e.g. editor, hud, tooltips etc). Only way would be probably adding some prefixes to string identifiers.
@NaN
Ok. I didn't know those are limitations of the Gui code.
Cool that you removed the numbers and resolutions.
I translated most, is at 90%. You can add pl to language in menu (I don't know how to do that).
Visit this user's website Find all posts by this user
Quote this message in a reply
08-11-2014, 01:31 PM
Post: #13
RE: VDrift Localization on Transifex
(08-10-2014 07:27 AM)CrystalH Wrote: In order to view links, you must have to reply to this thread.Right. OK. I've done to 84%.
Found some broken translations:

Start a race using the selcted car and track. (bad spelling, should be removed)
Start a race using the selected car and track.

Quit VDrift (is it needed twice ?)
Quit VDrift.

Select car's hood camera . (has a space before .)
...
Fixed in master. Thanks for reporting.
Find all posts by this user
Quote this message in a reply
08-14-2014, 03:45 AM
Post: #14
RE: VDrift Localization on Transifex
(08-11-2014 09:03 AM)CrystalH Wrote: In order to view links, you must have to reply to this thread.What bothers me the most is that all strings are just in 1 big list. Sorted by the text itself.
With Gettext, the programmer can sort the strings either alphabetically or by orruccence in the source file. The second order is always better IMO, because it gives translators a bit of context.

Programmers can also add comment for translators directly aboc the string in the source code . if you're using Intltool, simply prefix the comment with TRANSLATORS and it gets picked up. If you're not using Intltool, you can steal some code from Widelands. (their implementation is in utils/buildcat.py)
Visit this user's website Find all posts by this user
Quote this message in a reply
08-14-2014, 04:49 AM (This post was last modified: 08-14-2014 04:50 AM by NaN.)
Post: #15
RE: VDrift Localization on Transifex
(08-14-2014 03:45 AM)GunChleoc Wrote: In order to view links, you must have to reply to this thread.
(08-11-2014 09:03 AM)CrystalH Wrote: In order to view links, you must have to reply to this thread.What bothers me the most is that all strings are just in 1 big list. Sorted by the text itself.
With Gettext, the programmer can sort the strings either alphabetically or by orruccence in the source file. The second order is always better IMO, because it gives translators a bit of context.

Programmers can also add comment for translators directly aboc the string in the source code . if you're using Intltool, simply prefix the comment with TRANSLATORS and it gets picked up. If you're not using Intltool, you can steal some code from Widelands. (their implementation is in utils/buildcat.py)

Volunteers, please step forward! Smile

If there is anyone interested to work on the UI, I'd be happy to assist. Extending the string grabbing script (data/locale/genpot.py) to fetch hints for translators shouldn't be too difficult.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)