]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
more gettextizing... now "only" xonotic/ is left for menuqc
authorRudolf Polzer <divverent@alientrap.org>
Sun, 16 Jan 2011 20:25:44 +0000 (21:25 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 16 Jan 2011 20:25:44 +0000 (21:25 +0100)
qcsrc/menu/item/gecko.c
qcsrc/menu/item/listbox.c
qcsrc/menu/item/slider.c
qcsrc/menu/item/textslider.c
qcsrc/menu/menu.qc
qcsrc/menu/stringfilelist.txt

index 139e87e1a03903baa96650e607b8347cb780d93f..dd752e6e54797aaac05e1bf5542621328810b097 100644 (file)
@@ -46,7 +46,7 @@ void Gecko_draw(entity me)
                local vector fontsize;
                fontsize_x = fontsize_y = 1.0 / 30.0;
                fontsize_z = 0.0;
-               draw_Text( '0 0 0', "Browser not initialized!", fontsize, '1 1 1', 1.0, 0 );
+               draw_Text( '0 0 0', _("Browser not initialized!"), fontsize, '1 1 1', 1.0, 0 );
        }
 }
 
index 361e3cb32561765ebb5298b1343bbf22b4acbabd..9664e93765575014aab68a8198ee3fc22bb3ca14 100644 (file)
@@ -297,6 +297,6 @@ void ListBox_clickListBoxItem(entity me, float i, vector where)
 
 void ListBox_drawListBoxItem(entity me, float i, vector absSize, float selected)
 {
-       draw_Text('0 0 0', strcat("Item ", ftos(i)), eX * (8 / absSize_x) + eY * (8 / absSize_y), (selected ? '0 1 0' : '1 1 1'), 1, 0);
+       draw_Text('0 0 0', sprintf(_("Item %d"), i), eX * (8 / absSize_x) + eY * (8 / absSize_y), (selected ? '0 1 0' : '1 1 1'), 1, 0);
 }
 #endif
index c8bab9bf80cda0314036564df6633b276d4da7d7..9a8a35fdcbc699d03ba12742342bb45f0e7fe0f4 100644 (file)
@@ -61,7 +61,7 @@ void Slider_setSliderValue(entity me, float val)
 }
 string Slider_toString(entity me)
 {
-       return strcat(ftos(me.value), " (", me.valueToText(me, me.value), ")");
+       return sprintf(_("%d (%s)"), me.value, me.valueToText(me, me.value));
 }
 void Slider_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
 {
index c4a7af7a890e6a5d84ae4cf727e7cde8d5c5151f..028a1603a16c35ef50e43577c587f2127e59b8d8 100644 (file)
@@ -26,9 +26,9 @@ string TextSlider_valueToIdentifier(entity me, float val)
 string TextSlider_valueToText(entity me, float val)
 {
        if(val >= me.nValues)
-               return "custom";
+               return _("custom");
        if(val < 0)
-               return "custom";
+               return _("custom");
        return me.(valueStrings[val]);
 }
 void TextSlider_setValueFromIdentifier(entity me, string id)
index 92da56a25377baee061139f736433b684aea0458..c4797019fbec89a3ae60f3b7133f2bac8c717915 100644 (file)
@@ -25,7 +25,7 @@ void() m_init =
        check_unacceptable_compiler_bugs();
 
 #ifdef WATERMARK
-       print("^4MQC Build information: ", WATERMARK(), "\n");
+       print(sprintf(_("^4MQC Build information: %s\n"), WATERMARK()));
 #endif
 
        // list all game dirs (TEST)
index 0edf372a026c44b8d01a6ae7f8060bb6bae18471..9e5aa089ea9395172be08dfb026ce21d1bd8d0e0 100644 (file)
@@ -1,5 +1,6 @@
 Guideline:
 - do NOT translate strings in error() messages, or in dprint()!
+- delete obviously useless developer prints while at it
 - change obvious developer prints from print to dprint (even in comments),
   unless in developer-only functions (e.g. *dumptree*)
 - mark translatable strings with _()
@@ -7,25 +8,6 @@ Guideline:
 
 List of files to do:
 
-./item/borderimage.c
-./item/button.c
-./item.c
-./item/checkbox.c
-./item/container.c
-./item/dialog.c
-./item/gecko.c
-./item/inputbox.c
-./item/label.c
-./item/listbox.c
-./item/nexposee.c
-./item/slider.c
-./item/textslider.c
-./mbuiltin.qh
-./menu.qc
-./menu.qh
-./oo/base.h
-./skin-customizables.inc
-./skin.qh
 ./xonotic/button.c
 ./xonotic/campaign.c
 ./xonotic/charmap.c