]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
do NOT use the crc inside the file name for .po file loading
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 20 Apr 2011 13:56:53 +0000 (13:56 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 20 Apr 2011 13:56:53 +0000 (13:56 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11073 d7cf8633-e32d-0410-b094-e92efae38249

prvm_edict.c

index 18238abb3dd57072645459657269bf5ef1169880..c62ea463719b14c85008a7393813db874d7b40d8 100644 (file)
@@ -2335,6 +2335,7 @@ void PRVM_LoadProgs (const char * filename, int numrequiredfunc, const char **re
        // later idea: include a list of authorized .po file checksums with the csprogs
        {
                qboolean deftrans = !!strcmp(PRVM_NAME, "client");
+               const char *realfilename = (strcmp(PRVM_NAME, "client") ? filename : sv.csqc_progname);
                if(deftrans) // once we have dotranslate_ strings, ALWAYS use the opt-in method!
                {
                        for (i=0 ; i<prog->progs->numglobaldefs ; i++)
@@ -2351,8 +2352,8 @@ void PRVM_LoadProgs (const char * filename, int numrequiredfunc, const char **re
                }
                if(!strcmp(prvm_language.string, "dump"))
                {
-                       qfile_t *f = FS_OpenRealFile(va("%s.pot", filename), "w", false);
-                       Con_Printf("Dumping to %s.pot\n", filename);
+                       qfile_t *f = FS_OpenRealFile(va("%s.pot", realfilename), "w", false);
+                       Con_Printf("Dumping to %s.pot\n", realfilename);
                        if(f)
                        {
                                for (i=0 ; i<prog->progs->numglobaldefs ; i++)
@@ -2377,7 +2378,7 @@ void PRVM_LoadProgs (const char * filename, int numrequiredfunc, const char **re
                }
                else
                {
-                       po_t *po = PRVM_PO_Load(va("%s.%s.po", filename, prvm_language.string), prog->progs_mempool);
+                       po_t *po = PRVM_PO_Load(va("%s.%s.po", realfilename, prvm_language.string), prog->progs_mempool);
                        if(po)
                        {
                                for (i=0 ; i<prog->progs->numglobaldefs ; i++)