From 624cb2929567b86701d29ff51d55cba7b74d86fc Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 30 Sep 2011 15:02:30 +0000 Subject: [PATCH] oops, I hadn't document DP_QC_I18N back then... sorry for that git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11378 d7cf8633-e32d-0410-b094-e92efae38249 --- dpdefs/dpextensions.qc | 24 ++++++++++++++++++++++++ mvm_cmds.c | 1 + svvm_cmds.c | 1 + 3 files changed, 26 insertions(+) diff --git a/dpdefs/dpextensions.qc b/dpdefs/dpextensions.qc index f88283b5..a5addb3e 100644 --- a/dpdefs/dpextensions.qc +++ b/dpdefs/dpextensions.qc @@ -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..po +//menu.dat uses menu.dat..po +//csprogs.dat uses csprogs.dat..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: diff --git a/mvm_cmds.c b/mvm_cmds.c index 9d154b49..5b02c245 100644 --- a/mvm_cmds.c +++ b/mvm_cmds.c @@ -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 " diff --git a/svvm_cmds.c b/svvm_cmds.c index 2e105d93..8f0d5c78 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -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 " -- 2.39.2