localization scripts, samples, localization for cubescript

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4631 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2009-08-12 22:06:34 +00:00
parent 6a2e6b7fc2
commit 83b9dbcbfb
11 changed files with 151 additions and 18 deletions
+12
View File
@@ -0,0 +1,12 @@
// localization tools
// enables localization for a string, so it can be picked up by xgettext
alias gettext [
result $arg1
]
// shortcut, same as the known c++ macro
alias _ [
result (gettext $arg1)
]
+8 -8
View File
@@ -6,14 +6,14 @@ exec config/menus_mappack.cfg
newmenu main
menuitem "Multiplayer" "showmenu multiplayer"
menuitem "Singleplayer" "showmenu singleplayer"
menuitem "Settings" "showmenu settings"
menuitem "Demo" [ showmenu "Play demo" ]
menuitem "Editing" "showmenu editing"
menuitem "Help" "showmenu help"
menuitem "About" "showmenu about"
menuitem "Quit" "savequit"
menuitem (_ "Multiplayer") "showmenu multiplayer"
menuitem (_ "Singleplayer") "showmenu singleplayer"
menuitem (_ "Settings") "showmenu settings"
menuitem (_ "Demo") [ showmenu "Play demo" ]
menuitem (_ "Editing") "showmenu editing"
menuitem (_ "Help") "showmenu help"
menuitem (_ "About") "showmenu about"
menuitem (_ "Quit") "savequit"
// Start maps.
+20 -7
View File
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-12 20:23+0200\n"
"POT-Creation-Date: 2009-08-12 23:55+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -16,31 +16,44 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: R:\projects\actioncube\_svn\trunk\ac\source\src\main.cpp:614
#: i18n.cpp:14
msgid "hello world\n"
msgstr ""
#: main.cpp:650
msgid ""
"could not find core textures (hint: run AssaultCube from the parent of the "
"bin directory)"
msgstr ""
#: menus.cfg:9
msgid "Multiplayer"
msgstr ""
msgid "Singleplayer"
#: menus.cfg:10
msgid "Singleplayer"
msgstr ""
msgid "Settings"
#: menus.cfg:11
msgid "Settings"
msgstr ""
msgid "Demo"
#: menus.cfg:12
msgid "Demo"
msgstr ""
msgid "Editing"
#: menus.cfg:13
msgid "Editing"
msgstr ""
msgid "Help"
#: menus.cfg:14
msgid "Help"
msgstr ""
#: menus.cfg:15
msgid "About"
msgstr ""
#: menus.cfg:16
msgid "Quit"
msgstr ""
+6
View File
@@ -0,0 +1,6 @@
Info:
1. Run update_pot_template to extract all localizable strings from the C++ source and from cubescript. The AC.pot template will be updated.
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
3. Finally run de_compile_mo to compile the po file into a binary format, it will be copied to the packages/locale folder
4. Run AC to see if the strings look okay in the UI
+17 -2
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: AC\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-08-12 20:23+0200\n"
"POT-Creation-Date: 2009-08-12 23:55+0200\n"
"PO-Revision-Date: 2009-08-12 20:23+0200\n"
"Last-Translator: dude <EMAIL@ADDRESS>\n"
"Language-Team: German <[email protected]>\n"
@@ -14,29 +14,44 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: menus.cfg:15
msgid "About"
msgstr "Info"
#: menus.cfg:12
msgid "Demo"
msgstr "Demo"
#: menus.cfg:13
msgid "Editing"
msgstr "Editieren"
#: menus.cfg:14
msgid "Help"
msgstr "Hilfe"
#: menus.cfg:9
msgid "Multiplayer"
msgstr "Mehrspieler"
#: menus.cfg:16
msgid "Quit"
msgstr "Beenden"
#: menus.cfg:11
msgid "Settings"
msgstr "Einstellungen"
#: menus.cfg:10
msgid "Singleplayer"
msgstr "Einzelspieler"
#: main.cpp:650
msgid ""
"could not find core textures (hint: run AssaultCube from the parent of the "
"bin directory)"
msgstr "konnte die Texturen nicht finden (Tipp: Führe AssaultCube vom übergeordneten Verzeichnis von 'bin' aus)"
#: i18n.cpp:14
msgid "hello world\n"
msgstr "HALLO WELT\n"
msgstr "hallo welt"
+74
View File
@@ -0,0 +1,74 @@
audiomanager.cpp
client.cpp
clientgame.cpp
clients2c.cpp
command.cpp
command.h
console.cpp
console.h
cube.h
docs.cpp
editing.cpp
entities.cpp
entity.h
geom.h
hash.h
hudgun.h
i18n.cpp
i18n.h
log.cpp
main.cpp
Makefile
md2.h
md3.h
menus.cpp
model.h
modelcache.h
oggstream.cpp
openal.cpp
packetqueue.cpp
pch.cpp
pch.h
physics.cpp
protocol.cpp
protocol.h
protos.h
rendercubes.cpp
rendergl.cpp
renderhud.cpp
rendermodel.cpp
renderparticles.cpp
rendertext.cpp
rndmap.cpp
scale.h
scoreboard.cpp
server.cpp
server.h
serveractions.h
serverbrowser.cpp
servercontroller.h
serverevents.h
serverfiles.h
serverms.cpp
shadow.cpp
sound.cpp
sound.h
soundlocation.cpp
soundscheduler.cpp
texture.cpp
tools.cpp
tools.h
tristrip.h
vertmodel.h
vote.h
water.cpp
weapon.cpp
weapon.h
winserviceinstaller.h
wizard.cpp
world.cpp
world.h
worldio.cpp
worldlight.cpp
worldocull.cpp
worldrender.cpp
@@ -0,0 +1 @@
menus.cfg
+7
View File
@@ -0,0 +1,7 @@
REM search C++ source files
xgettext -d AC -o AC.pot --sort-by-file -k_ -C -D ..\src -f translate_cpp_files.txt
REM 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
pause
+2 -1
View File
@@ -647,7 +647,7 @@ int main(int argc, char **argv)
gl_init(scr_w, scr_h, usedcolorbits, useddepthbits, usedfsaa);
notexture = noworldtexture = textureload("packages/misc/notexture.jpg");
if(!notexture) fatal("could not find core textures (hint: run AssaultCube from the parent of the bin directory)");
if(!notexture) fatal(_("could not find core textures (hint: run AssaultCube from the parent of the bin directory)"));
initlog("console");
persistidents = false;
@@ -677,6 +677,7 @@ int main(int argc, char **argv)
applymenu = addmenu("apply", "apply changes now?", true, refreshapplymenu);
exec("config/scontext.cfg");
exec("config/locale.cfg");
exec("config/keymap.cfg");
exec("config/menus.cfg");
exec("config/scripts.cfg");
+4
View File
@@ -1990,6 +1990,10 @@
RelativePath="..\..\config\keymap.cfg"
>
</File>
<File
RelativePath="..\..\config\locale.cfg"
>
</File>
<File
RelativePath="..\..\config\maprot.cfg"
>