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 );
}
}
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
}
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)
{
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)
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)
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 _()
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