]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
make sure prvm_language is always set (turn empty string into "en")
authorRudolf Polzer <divverent@xonotic.org>
Thu, 9 Feb 2012 14:29:15 +0000 (15:29 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 9 Feb 2012 14:29:15 +0000 (15:29 +0100)
qcsrc/menu/menu.qc
qcsrc/menu/xonotic/dialog_firstrun.c
qcsrc/menu/xonotic/util.qc

index e80247338eadb152219e65fef80090ce381df325..9f9d30fc4b3cb89de1076a1e3b938160afaaed91 100644 (file)
@@ -29,7 +29,13 @@ void m_sync()
 void m_init()
 {
        cvar_set("_menu_alpha", "0");
-       prvm_language = strzone(cvar_string("prvm_language"));
+       prvm_language = cvar_string("prvm_language");
+       if(prvm_language == "")
+       {
+               prvm_language = "en";
+               cvar_set("prvm_language", prvm_language);
+       }
+       prvm_language = strzone(prvm_language);
        cvar_set("_menu_prvm_language", prvm_language);
 
        check_unacceptable_compiler_bugs();
index 67b886ec933c754897a03a3ba845abf1ce279458..d52c4c7b4cdf7db83af1cd7fff0661922864b362 100644 (file)
@@ -20,7 +20,7 @@ float CheckFirstRunButton(entity me)
        if(cvar_string("_cl_name") != "Player")
                return 1;
                
-       if(cvar_string("prvm_language") != prvm_language)
+       if(cvar_string("_menu_prvm_language") != prvm_language)
                return 1; // OK will then reopen the dialog in another language
                
        if(cvar_string("cl_allow_uid2name") != "-1")
index ab86bebae013665cceb5dc20994d1bb858c03540..580f22a93c7c7e5caab333763150067fa5a0173f 100644 (file)
@@ -31,7 +31,7 @@ string getZonedTooltipForIdentifier(string s)
                if(t != "")
                        return strzone(t);
        }
-       if(prvm_language == "en" || prvm_language == "")
+       if(prvm_language == "en")
        {
                t = cvar_description(s);
                if(t != "" && t != "custom cvar")