added bash scripts for localization

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4636 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2009-08-16 13:20:50 +00:00
parent 0b9d47641b
commit cd055ee218
8 changed files with 906 additions and 41 deletions
+419 -10
View File
@@ -6,24 +6,406 @@
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: AC\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-12 23:55+0200\n" "POT-Creation-Date: 2009-08-16 13:25+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: 2009-08-16 13:25+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: test <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n" "Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: i18n.cpp:14 #: client.cpp:20
msgid "hello world\n" msgid "operation not available in multiplayer"
msgstr "" msgstr ""
#: main.cpp:650 #: client.cpp:27
msgid "editing in multiplayer requires coopedit mode (1)"
msgstr ""
#: client.cpp:70 client.cpp:205
msgid "aborting connection attempt"
msgstr ""
#: client.cpp:85
#, c-format
msgid "attempting to connect to %s%c%s"
msgstr ""
#: client.cpp:88
#, c-format
msgid "\f3could not resolve server %s"
msgstr ""
#: client.cpp:96
msgid "attempting to connect over LAN"
msgstr ""
#: client.cpp:112 client.cpp:514 client.cpp:550
msgid "\f3could not connect to server"
msgstr ""
#: client.cpp:175
msgid "disconnected"
msgstr ""
#: client.cpp:211
msgid "not connected"
msgstr ""
#: client.cpp:214 client.cpp:537
msgid "attempting to disconnect..."
msgstr ""
#: client.cpp:509
msgid "attempting to connect..."
msgstr ""
#: client.cpp:527
msgid "connected to server"
msgstr ""
#: client.cpp:555
#, c-format
msgid "\f3server network error, disconnecting (%s) ..."
msgstr ""
#: client.cpp:577
#, c-format
msgid "\f3map %s is secured, you can not send, receive or overwrite it"
msgstr ""
#: client.cpp:606
#, c-format
msgid "map %s is too large to send"
msgstr ""
#: client.cpp:622
#, c-format
msgid "sending map %s to server..."
msgstr ""
#: client.cpp:627
msgid "requesting map from server..."
msgstr ""
#: client.cpp:644
msgid "getting demo..."
msgstr ""
#: client.cpp:645
#, c-format
msgid "getting demo %d..."
msgstr ""
#: client.cpp:651
msgid "listing demos..."
msgstr ""
#: clientgame.cpp:122
#, c-format
msgid "ignored players: %s"
msgstr ""
#: clientgame.cpp:123
msgid "no players ignored."
msgstr ""
#: clientgame.cpp:143
#, c-format
msgid "muted players: %s"
msgstr ""
#: clientgame.cpp:144
msgid "no players muted."
msgstr ""
#: clientgame.cpp:169
#, c-format
msgid "your name is: %s"
msgstr ""
#: clientgame.cpp:170
msgid "curname"
msgstr ""
#: clientgame.cpp:187
#, c-format
msgid "\f3\"%s\" is not a valid team name (try CLA, RVSF or SPECTATOR)"
msgstr ""
#: clientgame.cpp:188
msgid "you need to be dead to become spectator"
msgstr ""
#: clientgame.cpp:191
#, c-format
msgid "your team is: %s"
msgstr ""
#: clientgame.cpp:692
msgid "intermission:"
msgstr ""
#: clientgame.cpp:693
msgid "game has ended!"
msgstr ""
#: clientgame.cpp:700
#, c-format
msgid "time remaining: %d minutes"
msgstr ""
#: clientgame.cpp:771
#, c-format
msgid "\f3invalid ctf-flag entity (%i)"
msgstr ""
#: clientgame.cpp:842
#, c-format
msgid "game mode is \"%s\"%s"
msgstr ""
#: clientgame.cpp:847
#, c-format
msgid "\f1%s"
msgstr ""
#: clientgame.cpp:1049
msgid "\f3invalid vote"
msgstr ""
#: clientgame.cpp:1070
msgid "\f3you voted already"
msgstr ""
#: clientgame.cpp:1089
#, c-format
msgid "%s called a vote: %s"
msgstr ""
#: clientgame.cpp:1105
#, c-format
msgid "\f3could not vote: %s"
msgstr ""
#: clientgame.cpp:1116
msgid "failed"
msgstr ""
#: clientgame.cpp:1116
msgid "passed"
msgstr ""
#: clientgame.cpp:1116
#, c-format
msgid "vote %s"
msgstr ""
#: clients2c.cpp:41
#, c-format
msgid "\f3demo was recorded on map revision %d, you have map revision %d"
msgstr ""
#: clients2c.cpp:61
msgid "\"getmap\" to download the current map from the server"
msgstr ""
#: clients2c.cpp:62
#, c-format
msgid "\"getmap\" to download a %s version of the current map from the server"
msgstr ""
#: clients2c.cpp:63
msgid "different"
msgstr ""
#: clients2c.cpp:63
msgid "newer"
msgstr ""
#: clients2c.cpp:63
msgid "older"
msgstr ""
#: clients2c.cpp:244
#, c-format
msgid "\f3you are using a different game protocol (you: %d, server: %d)"
msgstr ""
#: clients2c.cpp:250
msgid "INFO: this server is password protected"
msgstr ""
#: clients2c.cpp:358
#, c-format
msgid "%s is now known as %s"
msgstr ""
#: clients2c.cpp:363
#, c-format
msgid "connected: %s"
msgstr ""
#: clients2c.cpp:382
#, c-format
msgid "player %s disconnected"
msgstr ""
#: clients2c.cpp:433
msgid "new round starting... fight!"
msgstr ""
#: clients2c.cpp:497
#, c-format
msgid "bad scope-message for %s"
msgstr ""
#: clients2c.cpp:634
#, c-format
msgid "%s enlarged the map to size %d"
msgstr ""
#: clients2c.cpp:634
#, c-format
msgid "%s started a new map of size %d"
msgstr ""
#: clients2c.cpp:741
msgid "the round is over! next round in 5 seconds..."
msgstr ""
#: clients2c.cpp:742
msgid "the bots have won the round!"
msgstr ""
#: clients2c.cpp:743
msgid "everyone died!"
msgstr ""
#: clients2c.cpp:744
#, c-format
msgid "team %s has won the round!"
msgstr ""
#: clients2c.cpp:745
msgid "you are the survivor!"
msgstr ""
#: clients2c.cpp:746
#, c-format
msgid "%s is the survivor!"
msgstr ""
#: clients2c.cpp:802
#, c-format
msgid "%s claimed %s status"
msgstr ""
#: clients2c.cpp:802 clients2c.cpp:869
msgid "you"
msgstr ""
#: clients2c.cpp:813
#, c-format
msgid "you can't change to team %s"
msgstr ""
#: clients2c.cpp:817
msgid "active"
msgstr ""
#: clients2c.cpp:817
msgid "spectate"
msgstr ""
#: clients2c.cpp:817
#, c-format
msgid "you can't change to %s mode"
msgstr ""
#: clients2c.cpp:844
#, c-format
msgid "you're now in team %s"
msgstr ""
#: clients2c.cpp:847
#, c-format
msgid "the server forced you to team %s"
msgstr ""
#: clients2c.cpp:858
#, c-format
msgid "player %s switched to team %s"
msgstr ""
#: clients2c.cpp:861
#, c-format
msgid "the server forced %s to team %s"
msgstr ""
#: clients2c.cpp:862
msgid "the enemy"
msgstr ""
#: clients2c.cpp:862
#, c-format
msgid "the server forced %s to %s team"
msgstr ""
#: clients2c.cpp:862
msgid "your"
msgstr ""
#: clients2c.cpp:869
#, c-format
msgid "%s changed to active play"
msgstr ""
#: clients2c.cpp:938
#, c-format
msgid "" msgid ""
"could not find core textures (hint: run AssaultCube from the parent of the " "WHOIS client %d:\n"
"bin directory)" "\f5name\t%s\n"
"\f5IP\t%d.%d.%d.%d"
msgstr ""
#: clients2c.cpp:939
#, c-format
msgid ""
"WHOIS client %d:\n"
"\f5name\t%s\n"
"\f5IP\t%d.%d.x.x"
msgstr ""
#: clients2c.cpp:946
msgid "no demos available"
msgstr ""
#: clients2c.cpp:950
#, c-format
msgid "%d. %s"
msgstr ""
#: clients2c.cpp:1010
#, c-format
msgid "failed writing to \"%s\""
msgstr ""
#: clients2c.cpp:1013
#, c-format
msgid "received demo \"%s\""
msgstr ""
#: clients2c.cpp:1022
#, c-format
msgid "received map \"%s\" from server, reloading.."
msgstr ""
#: md2.h:258
#, c-format
msgid "could not load model skin for %s"
msgstr "" msgstr ""
#: menus.cfg:9 #: menus.cfg:9
@@ -57,3 +439,30 @@ msgstr ""
#: menus.cfg:16 #: menus.cfg:16
msgid "Quit" msgid "Quit"
msgstr "" msgstr ""
#: menus.cpp:1125
msgid "..restart AssaultCube for this setting to take effect"
msgstr ""
#: physics.cpp:781
#, c-format
msgid "can't find entity spawn spot! (%d, %d)"
msgstr ""
#: serverbrowser.cpp:1155
#, c-format
msgid ""
"server \"\fs%s\fr\" is in category '\fs%s\fr' because of key '%s', please "
"remove manually"
msgstr ""
#: serverbrowser.cpp:1159
#, c-format
msgid ""
"removing server \"\fs%s\fr\" from favourites category '\fs%s\fr' (rest '%s')"
msgstr ""
#: serverbrowser.cpp:1174
#, c-format
msgid "adding server \"\fs%s\fr\" to favourites category '\fs%s\fr' (new '%s')"
msgstr ""
+36 -5
View File
@@ -1,6 +1,37 @@
Info: ==AC Localization==
1. Run update_pot_template to extract all localizable strings from the C++ source and from cubescript. The AC.pot template will be updated. Install gnu gettext to get the required tools for building translation files. There are UI tools to help you on this task, as example on Linux you could try gtranslator or kbabel. These tools allow you to manage the translation files without ever touching the command line.
2. Run de_update_po to migrate those changes into the existing german translation file de/lc_messages/AC.po , edit it to translate new strings However the following text describes the usage of the underlying tools so you get an understanding of the process.
3. Finally run de_compile_mo to compile the po file into a binary format, it will be copied to the packages/locale folder More information can be found in the gnu gettext documentation/tutorials.
4. Run AC to see if the strings look okay in the UI
Steps:
1. Initial String Export
Run update_pot_template to extract all localizable strings from the C++ source and from cubescript. The AC.pot template will be updated. Edit AC.pot and fill out the header details, such as charset=UTF-8.
NOTE: This step will be done by a developer, so you can probably just skip this step.
2. Build language specific translation file from the template
2.a) Initial build
To create an initial translation file for your language, you need to run a command to initialize it based on the template.
Run:
msginit -l $lang -o $lang/LC_MESSAGES/AC.po -i AC.pot
Where $lang is the language token, such as "de" or "de_DE".
2.b) Subsequential update builds
Once the AC.pot template file gets updated, you can merge the new strings into your existing translation file:
Run:
msgmerge -s -U $lang/LC_MESSAGES/AC.po AC.pot
Where $lang is the language token, such as "de" or "de_DE".
3. Translation file compilation
Compile your translation file into a binary format which can then be read by AC.
Binary file not shown.
+437 -26
View File
@@ -1,22 +1,424 @@
# SOME DESCRIPTIVE TITLE. # German translations for PACKAGE package.
# Copyright (C) rabid viper productions # Copyright (C) 2009 THE PACKAGE'S COPYRIGHT HOLDER
# FIRST AUTHOR blah, 2009 # This file is distributed under the same license as the PACKAGE package.
# jars <[email protected]>, 2009.
# #
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: AC\n" "Project-Id-Version: AC\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-12 23:55+0200\n" "POT-Creation-Date: 2009-08-16 13:25+0200\n"
"PO-Revision-Date: 2009-08-12 20:23+0200\n" "PO-Revision-Date: 2009-08-16 13:29+0200\n"
"Last-Translator: dude <EMAIL@ADDRESS>\n" "Last-Translator: jars <[email protected]>\n"
"Language-Team: German <[email protected]>\n" "Language-Team: German\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: menus.cfg:15 #: client.cpp:20
msgid "About" msgid "operation not available in multiplayer"
msgstr "Info" msgstr ""
#: client.cpp:27
msgid "editing in multiplayer requires coopedit mode (1)"
msgstr ""
#: client.cpp:70 client.cpp:205
msgid "aborting connection attempt"
msgstr ""
#: client.cpp:85
#, c-format
msgid "attempting to connect to %s%c%s"
msgstr ""
#: client.cpp:88
#, c-format
msgid "\f3could not resolve server %s"
msgstr ""
#: client.cpp:96
msgid "attempting to connect over LAN"
msgstr ""
#: client.cpp:112 client.cpp:514 client.cpp:550
msgid "\f3could not connect to server"
msgstr ""
#: client.cpp:175
msgid "disconnected"
msgstr ""
#: client.cpp:211
msgid "not connected"
msgstr ""
#: client.cpp:214 client.cpp:537
msgid "attempting to disconnect..."
msgstr ""
#: client.cpp:509
msgid "attempting to connect..."
msgstr ""
#: client.cpp:527
msgid "connected to server"
msgstr ""
#: client.cpp:555
#, c-format
msgid "\f3server network error, disconnecting (%s) ..."
msgstr ""
#: client.cpp:577
#, c-format
msgid "\f3map %s is secured, you can not send, receive or overwrite it"
msgstr ""
#: client.cpp:606
#, c-format
msgid "map %s is too large to send"
msgstr ""
#: client.cpp:622
#, c-format
msgid "sending map %s to server..."
msgstr ""
#: client.cpp:627
msgid "requesting map from server..."
msgstr ""
#: client.cpp:644
msgid "getting demo..."
msgstr ""
#: client.cpp:645
#, c-format
msgid "getting demo %d..."
msgstr ""
#: client.cpp:651
msgid "listing demos..."
msgstr ""
#: clientgame.cpp:122
#, c-format
msgid "ignored players: %s"
msgstr ""
#: clientgame.cpp:123
msgid "no players ignored."
msgstr ""
#: clientgame.cpp:143
#, c-format
msgid "muted players: %s"
msgstr ""
#: clientgame.cpp:144
msgid "no players muted."
msgstr ""
#: clientgame.cpp:169
#, c-format
msgid "your name is: %s"
msgstr ""
#: clientgame.cpp:170
msgid "curname"
msgstr ""
#: clientgame.cpp:187
#, c-format
msgid "\f3\"%s\" is not a valid team name (try CLA, RVSF or SPECTATOR)"
msgstr ""
#: clientgame.cpp:188
msgid "you need to be dead to become spectator"
msgstr ""
#: clientgame.cpp:191
#, c-format
msgid "your team is: %s"
msgstr ""
#: clientgame.cpp:692
msgid "intermission:"
msgstr ""
#: clientgame.cpp:693
msgid "game has ended!"
msgstr ""
#: clientgame.cpp:700
#, c-format
msgid "time remaining: %d minutes"
msgstr ""
#: clientgame.cpp:771
#, c-format
msgid "\f3invalid ctf-flag entity (%i)"
msgstr ""
#: clientgame.cpp:842
#, c-format
msgid "game mode is \"%s\"%s"
msgstr ""
#: clientgame.cpp:847
#, c-format
msgid "\f1%s"
msgstr ""
#: clientgame.cpp:1049
msgid "\f3invalid vote"
msgstr ""
#: clientgame.cpp:1070
msgid "\f3you voted already"
msgstr ""
#: clientgame.cpp:1089
#, c-format
msgid "%s called a vote: %s"
msgstr ""
#: clientgame.cpp:1105
#, c-format
msgid "\f3could not vote: %s"
msgstr ""
#: clientgame.cpp:1116
msgid "failed"
msgstr ""
#: clientgame.cpp:1116
msgid "passed"
msgstr ""
#: clientgame.cpp:1116
#, c-format
msgid "vote %s"
msgstr ""
#: clients2c.cpp:41
#, c-format
msgid "\f3demo was recorded on map revision %d, you have map revision %d"
msgstr ""
#: clients2c.cpp:61
msgid "\"getmap\" to download the current map from the server"
msgstr ""
#: clients2c.cpp:62
#, c-format
msgid "\"getmap\" to download a %s version of the current map from the server"
msgstr ""
#: clients2c.cpp:63
msgid "different"
msgstr ""
#: clients2c.cpp:63
msgid "newer"
msgstr ""
#: clients2c.cpp:63
msgid "older"
msgstr ""
#: clients2c.cpp:244
#, c-format
msgid "\f3you are using a different game protocol (you: %d, server: %d)"
msgstr ""
#: clients2c.cpp:250
msgid "INFO: this server is password protected"
msgstr ""
#: clients2c.cpp:358
#, c-format
msgid "%s is now known as %s"
msgstr ""
#: clients2c.cpp:363
#, c-format
msgid "connected: %s"
msgstr ""
#: clients2c.cpp:382
#, c-format
msgid "player %s disconnected"
msgstr ""
#: clients2c.cpp:433
msgid "new round starting... fight!"
msgstr ""
#: clients2c.cpp:497
#, c-format
msgid "bad scope-message for %s"
msgstr ""
#: clients2c.cpp:634
#, c-format
msgid "%s enlarged the map to size %d"
msgstr ""
#: clients2c.cpp:634
#, c-format
msgid "%s started a new map of size %d"
msgstr ""
#: clients2c.cpp:741
msgid "the round is over! next round in 5 seconds..."
msgstr ""
#: clients2c.cpp:742
msgid "the bots have won the round!"
msgstr ""
#: clients2c.cpp:743
msgid "everyone died!"
msgstr ""
#: clients2c.cpp:744
#, c-format
msgid "team %s has won the round!"
msgstr ""
#: clients2c.cpp:745
msgid "you are the survivor!"
msgstr ""
#: clients2c.cpp:746
#, c-format
msgid "%s is the survivor!"
msgstr ""
#: clients2c.cpp:802
#, c-format
msgid "%s claimed %s status"
msgstr ""
#: clients2c.cpp:802 clients2c.cpp:869
msgid "you"
msgstr ""
#: clients2c.cpp:813
#, c-format
msgid "you can't change to team %s"
msgstr ""
#: clients2c.cpp:817
msgid "active"
msgstr ""
#: clients2c.cpp:817
msgid "spectate"
msgstr ""
#: clients2c.cpp:817
#, c-format
msgid "you can't change to %s mode"
msgstr ""
#: clients2c.cpp:844
#, c-format
msgid "you're now in team %s"
msgstr ""
#: clients2c.cpp:847
#, c-format
msgid "the server forced you to team %s"
msgstr ""
#: clients2c.cpp:858
#, c-format
msgid "player %s switched to team %s"
msgstr ""
#: clients2c.cpp:861
#, c-format
msgid "the server forced %s to team %s"
msgstr ""
#: clients2c.cpp:862
msgid "the enemy"
msgstr ""
#: clients2c.cpp:862
#, c-format
msgid "the server forced %s to %s team"
msgstr ""
#: clients2c.cpp:862
msgid "your"
msgstr ""
#: clients2c.cpp:869
#, c-format
msgid "%s changed to active play"
msgstr ""
#: clients2c.cpp:938
#, c-format
msgid ""
"WHOIS client %d:\n"
"\f5name\t%s\n"
"\f5IP\t%d.%d.%d.%d"
msgstr ""
#: clients2c.cpp:939
#, c-format
msgid ""
"WHOIS client %d:\n"
"\f5name\t%s\n"
"\f5IP\t%d.%d.x.x"
msgstr ""
#: clients2c.cpp:946
msgid "no demos available"
msgstr ""
#: clients2c.cpp:950
#, c-format
msgid "%d. %s"
msgstr ""
#: clients2c.cpp:1010
#, c-format
msgid "failed writing to \"%s\""
msgstr ""
#: clients2c.cpp:1013
#, c-format
msgid "received demo \"%s\""
msgstr ""
#: clients2c.cpp:1022
#, c-format
msgid "received map \"%s\" from server, reloading.."
msgstr ""
#: md2.h:258
#, c-format
msgid "could not load model skin for %s"
msgstr ""
#: menus.cfg:9
msgid "Multiplayer"
msgstr "Mehrspieler"
#: menus.cfg:10
msgid "Singleplayer"
msgstr "Einzelspieler"
#: menus.cfg:11
msgid "Settings"
msgstr "Einstellungen"
#: menus.cfg:12 #: menus.cfg:12
msgid "Demo" msgid "Demo"
@@ -30,28 +432,37 @@ msgstr "Editieren"
msgid "Help" msgid "Help"
msgstr "Hilfe" msgstr "Hilfe"
#: menus.cfg:9 #: menus.cfg:15
msgid "Multiplayer" msgid "About"
msgstr "Mehrspieler" msgstr "Über"
#: menus.cfg:16 #: menus.cfg:16
msgid "Quit" msgid "Quit"
msgstr "Beenden" msgstr "Beenden"
#: menus.cfg:11 #: menus.cpp:1125
msgid "Settings" msgid "..restart AssaultCube for this setting to take effect"
msgstr "Einstellungen" msgstr ""
#: menus.cfg:10 #: physics.cpp:781
msgid "Singleplayer" #, c-format
msgstr "Einzelspieler" msgid "can't find entity spawn spot! (%d, %d)"
msgstr ""
#: main.cpp:650 #: serverbrowser.cpp:1155
#, c-format
msgid "" msgid ""
"could not find core textures (hint: run AssaultCube from the parent of the " "server \"\fs%s\fr\" is in category '\fs%s\fr' because of key '%s', please "
"bin directory)" "remove manually"
msgstr "konnte die Texturen nicht finden (Tipp: Führe AssaultCube vom übergeordneten Verzeichnis von 'bin' aus)" msgstr ""
#: i18n.cpp:14 #: serverbrowser.cpp:1159
msgid "hello world\n" #, c-format
msgstr "hallo welt" msgid ""
"removing server \"\fs%s\fr\" from favourites category '\fs%s\fr' (rest '%s')"
msgstr ""
#: serverbrowser.cpp:1174
#, c-format
msgid "adding server \"\fs%s\fr\" to favourites category '\fs%s\fr' (new '%s')"
msgstr ""
+3
View File
@@ -0,0 +1,3 @@
msgfmt -c -v -o de/LC_MESSAGES/AC.mo de/LC_MESSAGES/AC.po
cp -f de/LC_MESSAGES/AC.mo ../../packages/locale/de/LC_MESSAGES/AC.mo
+2
View File
@@ -0,0 +1,2 @@
msginit -l de_DE -o de/LC_MESSAGES/AC.po -i AC.pot
+2
View File
@@ -0,0 +1,2 @@
msgmerge -s -U de/LC_MESSAGES/AC.po AC.pot
+7
View File
@@ -0,0 +1,7 @@
# search C++ source files
xgettext -d AC -o AC.pot --sort-by-file -k_ -C -D ../src -f translate_cpp_files.txt
# add script translations to it
xgettext -d AC -o AC.pot --sort-by-file -k_ -j -L Lisp -D ../../config -f translate_cubescript_files.txt