Stranica: [1]
  Ispis  
Autor Tema: DCS: LC_MESSAGES (gettext)  (Read 353 times)
0 Članova and 1 Gost are viewing this topic.
BabaLooey

*****

God Member
Poruka: 1.582
Moć reputacije: 37
BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!
Offline Offline
« ,: Stu 13, 2008, 10:53:28 »

General localization files are in format of gettext files, commonly used on Linux, but lately having wide usage on Windows.

Files in question are in folder:

Ka-50\l10n\ru\LC_MESSAGES\*.*
input.mo
missioneditor.mo
payloads.mo
simulator.mo


MO format is used by application itself, and these need to be converted into PO gettext format, which is a dedicated format for translators. These files are in attached RAR.

Best approach to is to use POedit: http://www.poedit.net/

You can use any other translating program that support gettext format, or a simple text editor like Notepad.

Do not forget to save the file in UTF-8 encoding!

Further instruction will be posted soon Smiley

NOTE: DCS came with files in *.mo format. To convert them to *.po, you can use this page:
http://jarfil.net/convert/msgunfmt.php

If above link does not work, you can manually convert *.mo to *.po with some help from POedit.
- go to poedit folder, copy folder bin and paste into yours HDD root
- into that new folder paste all *.mo files from Russian edition
- open command prompt in Windows (Start > Run > type "cmd" > press ENTER)
- switch to HDD root by typing "cd\" in prompt
- switch to bin folder by typing "cd bin"
- type following:
msgunfmt input.mo > input.po
- a file named input.po will be created in your "bin" folder
- repeat above commabd with other *.mo files (you can edit previous command by pressing UP ARROW key)

For transliteration:
http://translit.cc/
Attached files
* l10n_templates.rar (23.69 KB - downloaded 3 times.)
« Last Edit: Tra 21, 2010, 11:17:37 napisao ZB Admin » Prijavljen

Odlikovanja
Odlikovanja    Za časnu i uzornu službu od prve godine foruma i objavljivanje 200 poruka Iznimni pothvati u održavanju živosti foruma i više od 200 objavljenih poruka Sudjelovanje na LAN letenju 28. 08. 2010. Priznanje za osvojeno 2. mjesto u ukupnom poretku po učinkovitosti Priznanje za uspješnost veću od 50% Priznanje za sudjelovanje u svim kolima lige Priznanje za sudjelovanje u najmanje 10 ligaških susreta Djelovanje na lokalnoj i međunarodnoj prepoznatljivosti hrvatskih letača Iznimno junački i požrtvovani čin u borbi ili izravnoj ratnoj opasnosti Osobiti doprinos razvitku i ugledu foruma  i dobrobiti njegovih članova Sudjelovanje u međunarodnim letačkim susretima
BabaLooey

*****

God Member
Poruka: 1.582
Moć reputacije: 37
BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!
Offline Offline
« Odgovori #1 ,: Stu 14, 2008, 12:01:56 »

After installing Poedit, you only need to double click PO file to open it with Poedit.

To make your work with Poedit more comfortable, you may adjust few of its settings…

Language
Go to File ->Preferences… -> Change UI language
You will be prompted to restart Poedit.

View options
View menu -> check only:
-   Display line numbers
-   Shaded translation list

Font size
File -> Preferences -> Editor tab -> Use custom font for text fields

While you are here, make sure that first option on the top is checked:
Automatically compile *.mo file on save

This file format is the one that will be used later on by DCS, and will be saved in the same location as *.po file.

Translation memory
File -> Preferences -> Translation memory tab

Translation memory makes your work easier. It saves all of your translations and you can use it to speed up your translating and to check its consistency. I will explain this later on, as it is a bit more complex feature.

Open the PO file:


Translations list has two columns, original strings to the left, and translated to the right. Poedit sort strings so that unstranslated are always on top and in bold blue, fuzzy are the middle and in brown, and they are followed by translated strings.
Fuzzy strings are those that were changed. I'll explain that later on, but for now you can use this option to mark a string that needs review.

You write your translation into the "Translated text" field. When you change the row, string will change its font in the above list, and a yellow star will be added next to it. Strings are not automatically saved. You need to save the file to preserver your work. After saving, the list will be sorted automatically once again.

Your info

You can add your info into the file using two options:

Info on last translator, that will be used each time:
File -> Preferences -> Identity

Info of localization team, that will be used in individual files:
Catalogue -> Settings -> Project info tab

Here you can enter all relevant info about your team that will be written to a PO file.
Plural forms are irrelevant as DCS cannot manipulate with different plurals.



« Last Edit: Stu 20, 2008, 13:46:30 napisao Babalui » Prijavljen

Odlikovanja
Odlikovanja    Za časnu i uzornu službu od prve godine foruma i objavljivanje 200 poruka Iznimni pothvati u održavanju živosti foruma i više od 200 objavljenih poruka Sudjelovanje na LAN letenju 28. 08. 2010. Priznanje za osvojeno 2. mjesto u ukupnom poretku po učinkovitosti Priznanje za uspješnost veću od 50% Priznanje za sudjelovanje u svim kolima lige Priznanje za sudjelovanje u najmanje 10 ligaških susreta Djelovanje na lokalnoj i međunarodnoj prepoznatljivosti hrvatskih letača Iznimno junački i požrtvovani čin u borbi ili izravnoj ratnoj opasnosti Osobiti doprinos razvitku i ugledu foruma  i dobrobiti njegovih članova Sudjelovanje u međunarodnim letačkim susretima
BabaLooey

*****

God Member
Poruka: 1.582
Moć reputacije: 37
BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!
Offline Offline
« Odgovori #2 ,: Stu 14, 2008, 12:57:54 »

To understand PO file in detail, open it in Notepad:

On top of the file there is a section called header, where various information are stored. Poedit inserts them via above-mentioned menus. For some languages, it may be necessary to check this header.



Before header, you can insert more detailed info about your project. The lines have to start with character #. Poedit cannot edit this lines.

"Project-Id-Version: 1.0\n"
- you may wish to add a version number
"POT-Creation-Date: \n"
- you may insert the date of first creation (before \n)
"PO-Revision-Date: 2008-11-14 11:36+0100\n"
- automatically created by poedit
"Last-Translator: Renato Pavičić <renato.pavicic-attt-lockonhr.com>\n"
- as in File -> Preferences -> Identity
"Language-Team: Croatian <http://lockonhr.com>\n"
- as in Catalogue -> Settings -> Project info tab
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
- last three to be adapted if necessary

Below header you can see the strings, where msgid contains original text, and msgstr is a placeholder for your translation


Comments in PO file

PO files may have some comments that are inserted by program developer, and are intended to tell the translator more about the meaning and usage of the string. This reversal engineering of has no option to extract those comments, as they are not inserted into MO file at all, during it creation.

To view comments in Poedit, go to View menu and choose:
-   Show comment window
-   Show automatic comments window

I will try to insert as much comments as possible, but if you feel that something is to be commented, post here (under topic related to PO filename), or insert into PO using following option in Poedit:

Choose the desired string, and click Edit comment (notepad icon on a toolbar). Type your comment and click OK. You comment will appear in the lower pane of comments.




Now, open PO in Notepad, and you will see a line like this:



Comments are always inserted with #, and those that precede the string will be shown in Poedit comment window.
« Last Edit: Stu 20, 2008, 13:46:40 napisao Babalui » Prijavljen

Odlikovanja
Odlikovanja    Za časnu i uzornu službu od prve godine foruma i objavljivanje 200 poruka Iznimni pothvati u održavanju živosti foruma i više od 200 objavljenih poruka Sudjelovanje na LAN letenju 28. 08. 2010. Priznanje za osvojeno 2. mjesto u ukupnom poretku po učinkovitosti Priznanje za uspješnost veću od 50% Priznanje za sudjelovanje u svim kolima lige Priznanje za sudjelovanje u najmanje 10 ligaških susreta Djelovanje na lokalnoj i međunarodnoj prepoznatljivosti hrvatskih letača Iznimno junački i požrtvovani čin u borbi ili izravnoj ratnoj opasnosti Osobiti doprinos razvitku i ugledu foruma  i dobrobiti njegovih članova Sudjelovanje u međunarodnim letačkim susretima
BabaLooey

*****

God Member
Poruka: 1.582
Moć reputacije: 37
BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!BabaLooey predstavlja inspiraciju!
Offline Offline
« Odgovori #3 ,: Stu 26, 2008, 15:36:25 »

Updating your PO files

You do not have to manually add new lines to your PO. Poedit can do this for you. Go to Catalogue -> Update from POT file…



Browse to a folder in your local SVN copy where you can find corresponding POT file.



Efter seletcing the file, Poedit will display a message that informs your about newly added strings. Click OK.



Newly added lines will appear as untranslated. Tooltip bubble next to the string means that line has a comment.



Prijavljen

Odlikovanja
Odlikovanja    Za časnu i uzornu službu od prve godine foruma i objavljivanje 200 poruka Iznimni pothvati u održavanju živosti foruma i više od 200 objavljenih poruka Sudjelovanje na LAN letenju 28. 08. 2010. Priznanje za osvojeno 2. mjesto u ukupnom poretku po učinkovitosti Priznanje za uspješnost veću od 50% Priznanje za sudjelovanje u svim kolima lige Priznanje za sudjelovanje u najmanje 10 ligaških susreta Djelovanje na lokalnoj i međunarodnoj prepoznatljivosti hrvatskih letača Iznimno junački i požrtvovani čin u borbi ili izravnoj ratnoj opasnosti Osobiti doprinos razvitku i ugledu foruma  i dobrobiti njegovih članova Sudjelovanje u međunarodnim letačkim susretima
Stranica: [1]
  Ispis  
 
Kreni na:  

Teamspeak 3 tsviewer
TeamSpeak 3 podaci ->OVDJE<-
Poslužitelj za članove foruma.
Koristite isti nadimak kao na forumu.

On-line stats
Last 10 Shouts:
Danas at 14:46:26
Rain hoćeš letit?
Ruj 09, 2010, 22:56:59
Eagle, odi odigraj s Thunderom
Ruj 09, 2010, 22:21:18
frag, neš mi uletilo za sutra, nemrem večeras letiti Tongue
Ruj 09, 2010, 22:07:44
cro dino, argonaut i ostali fantomi koji spilaju il2 ajmo na ts Smiley Smiley Smiley
Ruj 09, 2010, 21:40:15
Baba, TS?
Ruj 09, 2010, 19:59:00
 kad opet neće nitko odoh ja za  Milano pa u Monzu pa na utrku F1 pa se vidimo i čujemo za 4-5 dana
Ruj 09, 2010, 19:23:43
ajde, izazivam SVE !
Ruj 09, 2010, 18:02:58
issati, spalit ću od ovih pravila Tongue
Ruj 09, 2010, 16:03:23
Najnovije
napisao BabaLooey
[Danas at 20:37:13]

napisao BabaLooey
[Danas at 20:30:50]

[Danas at 16:34:45]

[Danas at 15:08:12]

napisao StG77_mk108
[Danas at 14:48:02]

napisao =VARP=Thor
[Danas at 14:34:07]

[Danas at 09:01:05]

[Danas at 04:02:45]

napisao BabaLooey
[Danas at 02:02:20]

[Danas at 00:00:58]

napisao BabaLooey
[Ruj 09, 2010, 21:38:39]

napisao BabaLooey
[Ruj 09, 2010, 21:36:54]