]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
oops, I hadn't document DP_QC_I18N back then... sorry for that
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 30 Sep 2011 15:02:30 +0000 (15:02 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 30 Sep 2011 15:02:30 +0000 (15:02 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11378 d7cf8633-e32d-0410-b094-e92efae38249

dpdefs/dpextensions.qc
mvm_cmds.c
svvm_cmds.c

index f88283b5cf5a48d3f929908b9031eea421b01740..a5addb3ebc31060ce05761d67f86e2ce6b51ebee 100644 (file)
@@ -882,6 +882,30 @@ float GETTIME_CDTRACK = 4;
 //returns the playing time of the current cdtrack when passed to gettime()
 //see DP_END_GETSOUNDTIME for similar functionality but for entity sound channels
 
+//DP_QC_I18N
+//idea: divVerent
+//darkplaces implementation: divVerent
+//description:
+//
+//The engine supports translating by gettext compatible .po files.
+//progs.dat uses progs.dat.<LANGUAGE>.po
+//menu.dat uses menu.dat.<LANGUAGE>.po
+//csprogs.dat uses csprogs.dat.<LANGUAGE>.po
+//
+//To create a string that can be translated, define it as
+//  string dotranslate_FILENOTFOUND = "File not found";
+//Note: if the compiler does constant folding, this will only work if there is
+//no other "File not found" string in the progs!
+//
+//Alternatively, if using the Xonotic patched fteqcc compiler, you can simplify
+//this by using _("File not found") directly in the source code.
+//
+//The language is set by the "prvm_language" cvar: if prvm_language is set to
+//"de", it will read progs.dat.de.po for translating strings in progs.dat.
+//
+//If prvm_language is set to to the special name "dump", progs.dat.pot which is
+//a translation template to be edited by filling out the msgstr entries.
+
 //DP_QC_LOG
 //darkplaces implementation: divVerent
 //builtin definitions:
index 9d154b4969510e8ac968bfac217618d382589925..5b02c245b8ca14674a6a5f6a7188ab42d7f986dd 100644 (file)
@@ -27,6 +27,7 @@ const char *vm_m_extensions =
 "DP_QC_CVAR_TYPE "
 "DP_QC_CVAR_DESCRIPTION "
 "DP_QC_FINDCHAIN_TOFIELD "
+"DP_QC_I18N "
 "DP_QC_LOG "
 "DP_QC_RENDER_SCENE "
 "DP_QC_SPRINTF "
index 2e105d933b8c8600f1c180728d3ba44b603a9eef..8f0d5c787aeb6d6fad427356a321699dde80f07b 100644 (file)
@@ -108,6 +108,7 @@ const char *vm_sv_extensions =
 "DP_QC_GETTAGINFO_BONEPROPERTIES "
 "DP_QC_GETTIME "
 "DP_QC_GETTIME_CDTRACK "
+"DP_QC_I18N "
 "DP_QC_LOG "
 "DP_QC_MINMAXBOUND "
 "DP_QC_MULTIPLETEMPSTRINGS "