# list of words that must not be used in the source as a single string;
-# use stripctx(_("CONTEXT^string")) instead
+# use ZCTX(_("CONTEXT^string")) instead
+# vi macro to do it:
+# :s/_("\([^"]*\)")/ZCTX(_("CONTEXT^\1"))/g
# test by:
-# grep -v ^# i18n-badwords.txt | while IFS= read -r W; do grep -r "_(\"$W\")" .; done
+# grep -v ^# i18n-badwords.txt | while IFS= read -r W; do grep -nri "_(\"$W\")" xonotic; done | sort -n
# this is done to help with languages like Russian where these words may need
# different grammatical gender in different instances
All
Medium
Normal
Off
-OFF
Ultra
+Small
+Large
+Custom
+Very short
+Short
+Long
+Full
+Empty
+None
+Few
+Many
+Lots
+Both
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Fade effect:")));
- me.TD(me, 1, 0.8, e = makeXonoticRadioButton(3, "hud_panel_weapons_timeout_effect", "0", _("None")));
+ me.TD(me, 1, 0.8, e = makeXonoticRadioButton(3, "hud_panel_weapons_timeout_effect", "0", ZCTX(_("EFFECT^None"))));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0");
me.TD(me, 1, 0.8, e = makeXonoticRadioButton(3, "hud_panel_weapons_timeout_effect", "1", _("Slide")));
setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_timeout")), "0");
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("Show weapon ID as:")));
- me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "0", _("None")));
+ me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "0", ZCTX(_("EFFECT^None"))));
me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "1", _("Number")));
me.TD(me, 1, 0.8, e = makeXonoticRadioButton(2, "hud_panel_weapons_label", "2", _("Bind")));
me.TR(me);
me.TR(me);
me.TD(me, 1, 1.4, e = makeXonoticTextLabel(0, _("HUD Dock:")));
me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_dock"));
- e.addValue(e, _("Disable"), "0");
- e.addValue(e, _("Small"), "dock_small");
- e.addValue(e, _("Medium"), "dock_medium");
- e.addValue(e, _("Large"), "dock_large");
+ e.addValue(e, ZCTX(_("DOCK^Disabled")), "0");
+ e.addValue(e, ZCTX(_("DOCK^Small")), "dock_small");
+ e.addValue(e, ZCTX(_("DOCK^Medium")), "dock_medium");
+ e.addValue(e, ZCTX(_("DOCK^Large")), "dock_large");
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TDempty(me, 0.2);
if(cvar("g_jetpack"))
s = strcat(s, ", ", _("Jet pack"));
if(s == "")
- return _("None");
+ return ZCTX(_("MUTATOR^None"));
else
return substring(s, 2, strlen(s) - 2);
}
e.onChangeEntity = slist;
btn.onClickEntity = e;
slist.controlledTextbox = e;
- me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showempty", _("Empty")));
+ me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showempty", ZCTX(_("SERVERS^Empty"))));
slist.filterShowEmpty = e.checked;
e.onClickEntity = slist;
e.onClick = ServerList_ShowEmpty_Click;
- me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showfull", _("Full")));
+ me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showfull", ZCTX(_("SERVERS^Full"))));
slist.filterShowFull = e.checked;
e.onClickEntity = slist;
e.onClick = ServerList_ShowFull_Click;
setDependent(e, "crosshair_dot", 1, 1);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Hit test:")));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "0", _("None")));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "0", ZCTX(_("HITTEST^None"))));
me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "1", _("TrueAim")));
me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "1.25", _("Enemies")));
me.TR(me);
me.TR(me);
#ifdef ALLOW_FORCEMODELS
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Force models:")));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, string_null, string_null, _("None")));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodelsfromxonotic", string_null, _("Custom")));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodels", string_null, _("All")));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, string_null, string_null, ZCTX(_("MODELS^None")));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodelsfromxonotic", string_null, ZCTX(_("MODELS^Custom"))));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodels", string_null, ZCTX(_("MODELS^All"))));
#endif
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_gentle", _("Disable gore effects")));
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gibs:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_nogibs"));
- e.addValue(e, _("None"), "1");
- e.addValue(e, _("Few"), "0.75");
- e.addValue(e, _("Many"), "0.5");
- e.addValue(e, _("Lots"), "0");
+ e.addValue(e, ZCTX(_("GIBS^None")), "1");
+ e.addValue(e, ZCTX(_("GIBS^Few")), "0.75");
+ e.addValue(e, ZCTX(_("GIBS^Many")), "0.5");
+ e.addValue(e, ZCTX(_("GIBS^Lots")), "0");
e.configureXonoticTextSliderValues(e);
setDependent(e, "cl_gentle", 0, 0);
me.TR(me);
me.TR(me);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Spatial voices:")));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "0", _("None")));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "2", _("Taunts")));
- me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "1", _("All")));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "0", ZCTX(_("VOICES^None"))));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "2", ZCTX(_("VOICES^Taunts"))));
+ me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "cl_voice_directional", "1", ZCTX(_("VOICES^All"))));
me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Taunt range:")));
setDependent(e, "cl_voice_directional", 0.5, -0.5);
me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_voice_directional_taunt_attenuation"));
- e.addValue(e, _("Very short"), "3");
- e.addValue(e, _("Short"), "2");
- e.addValue(e, _("Normal"), "0.5");
- e.addValue(e, _("Long"), "0.25");
- e.addValue(e, _("Full"), "0.015625");
+ e.addValue(e, ZCTX(_("RANGE^Very short")), "3");
+ e.addValue(e, ZCTX(_("RANGE^Short")), "2");
+ e.addValue(e, ZCTX(_("RANGE^Normal")), "0.5");
+ e.addValue(e, ZCTX(_("RANGE^Long")), "0.25");
+ e.addValue(e, ZCTX(_("RANGE^Full")), "0.015625");
e.configureXonoticTextSliderValues(e);
setDependent(e, "cl_voice_directional", 0.5, -0.5);
me.TR(me);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Time warning:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_sound_maptime_warning"));
- e.addValue(e, _("None"), "0");
+ e.addValue(e, ZCTX(_("WARNING^None")), "0");
e.addValue(e, _("1 minute"), "1");
e.addValue(e, _("5 minutes"), "2");
- e.addValue(e, _("Both"), "3");
+ e.addValue(e, ZCTX(_("WARNING^Both")), "3");
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_hitsound", _("Hit indicator")));
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Quality preset:")));
n = 5 + 2 * !!cvar("developer");
if(cvar("developer"))
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("OMG!"), '1 0 1', "exec effects-omg.cfg", 0));
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("Low"), '0 0 0', "exec effects-low.cfg", 0));
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("Medium"), '0 0 0', "exec effects-med.cfg", 0));
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("Normal"), '0 0 0', "exec effects-normal.cfg", 0));
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("High"), '0 0 0', "exec effects-high.cfg", 0));
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("Ultra"), '0 0 0', "exec effects-ultra.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(ZCTX(_("PRESET^OMG!")), '1 0 1', "exec effects-omg.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(ZCTX(_("PRESET^Low")), '0 0 0', "exec effects-low.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(ZCTX(_("PRESET^Medium")), '0 0 0', "exec effects-med.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(ZCTX(_("PRESET^Normal")), '0 0 0', "exec effects-normal.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(ZCTX(_("PRESET^High")), '0 0 0', "exec effects-high.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(ZCTX(_("PRESET^Ultra")), '0 0 0', "exec effects-ultra.cfg", 0));
if(cvar("developer"))
- me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(_("Ultimate"), '0 0 0', "exec effects-ultimate.cfg", 0));
+ me.TD(me, 1, 5.5 / n, e = makeXonoticCommandButton(ZCTX(_("PRESET^Ultimate")), '0 0 0', "exec effects-ultimate.cfg", 0));
me.TR(me);
me.TR(me);
me.TD(me, 1, 1.1, e = makeXonoticTextLabel(0, _("Geometry detail:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("r_subdivisions_tolerance"));
- e.addValue(e, _("Lowest"), "16");
- e.addValue(e, _("Low"), "8");
- e.addValue(e, _("Normal"), "4");
- e.addValue(e, _("Good"), "3");
- e.addValue(e, _("Best"), "2");
- e.addValue(e, _("Insane"), "1");
+ e.addValue(e, ZCTX(_("DETAIL^Lowest")), "16");
+ e.addValue(e, ZCTX(_("DETAIL^Low")), "8");
+ e.addValue(e, ZCTX(_("DETAIL^Normal")), "4");
+ e.addValue(e, ZCTX(_("DETAIL^Good")), "3");
+ e.addValue(e, ZCTX(_("DETAIL^Best")), "2");
+ e.addValue(e, ZCTX(_("DETAIL^Insane")), "1");
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TD(me, 1, 1.1, e = makeXonoticTextLabel(0, _("Antialiasing:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("vid_samples"));
- e.addValue(e, _("Disabled"), "1");
+ e.addValue(e, ZCTX(_("ANTIALIASING^Disabled")), "1");
e.addValue(e, _("2x"), "2");
e.addValue(e, _("4x"), "4");
e.configureXonoticTextSliderValues(e);
me.TD(me, 1, 1.1, e = makeXonoticTextLabel(0, _("Texture resolution:")));
me.TD(me, 1, 2, e = makeXonoticPicmipSlider());
if(cvar("developer"))
- e.addValue(e, _("Leet"), "1337");
- e.addValue(e, _("Lowest"), "2");
- e.addValue(e, _("Low"), "1");
- e.addValue(e, _("Normal"), "0");
- e.addValue(e, _("Good"), "-1");
- e.addValue(e, _("Best"), "-2");
+ e.addValue(e, ZCTX(_("RESOLUTION^Leet")), "1337");
+ e.addValue(e, ZCTX(_("RESOLUTION^Lowest")), "2");
+ e.addValue(e, ZCTX(_("RESOLUTION^Low")), "1");
+ e.addValue(e, ZCTX(_("RESOLUTION^Normal")), "0");
+ e.addValue(e, ZCTX(_("RESOLUTION^Good")), "-1");
+ e.addValue(e, ZCTX(_("RESOLUTION^Best")), "-2");
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TD(me, 1, 1.1, e = makeXonoticTextLabel(0, _("Anisotropy:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("gl_texture_anisotropy"));
- e.addValue(e, _("Disabled"), "1");
+ e.addValue(e, ZCTX(_("ANISOTROPY^Disabled")), "1");
e.addValue(e, _("2x"), "2");
e.addValue(e, _("4x"), "4");
e.addValue(e, _("8x"), "8");
setDependent(e, "vid_gl20", 1, 1);
me.TD(me, 1, 2, e = makeXonoticTextSlider("r_water_resolutionmultiplier"));
e.addValue(e, _("Blurred"), "0.25");
- e.addValue(e, _("Good"), "0.5");
+ e.addValue(e, ZCTX(_("REFLECTIONS^Good")), "0.5");
e.addValue(e, _("Sharp"), "1");
e.configureXonoticTextSliderValues(e);
setDependentAND(e, "vid_gl20", 1, 1, "r_water", 1, 1);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Font/UI size:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("menu_vid_scale"));
- e.addValue(e, _("Unreadable"), "-1");
- e.addValue(e, _("Tiny"), "-0.75");
- e.addValue(e, _("Little"), "-0.5");
- e.addValue(e, _("Small"), "-0.25");
- e.addValue(e, _("Medium"), "0");
- e.addValue(e, _("Large"), "0.25");
- e.addValue(e, _("Huge"), "0.5");
- e.addValue(e, _("Gigantic"), "0.75");
- e.addValue(e, _("Colossal"), "1");
+ e.addValue(e, ZCTX(_("SIZE^Unreadable")), "-1");
+ e.addValue(e, ZCTX(_("SIZE^Tiny")), "-0.75");
+ e.addValue(e, ZCTX(_("SIZE^Little")), "-0.5");
+ e.addValue(e, ZCTX(_("SIZE^Small")), "-0.25");
+ e.addValue(e, ZCTX(_("SIZE^Medium")), "0");
+ e.addValue(e, ZCTX(_("SIZE^Large")), "0.25");
+ e.addValue(e, ZCTX(_("SIZE^Huge")), "0.5");
+ e.addValue(e, ZCTX(_("SIZE^Gigantic")), "0.75");
+ e.addValue(e, ZCTX(_("SIZE^Colossal")), "1");
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Color depth:")));
me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Vertex Buffer Objects (VBOs)")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "0", _("Off")));
+ me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "0", ZCTX(_("VBO^Off"))));
me.TD(me, 1, 2.1, e = makeXonoticRadioButton(1, "gl_vbo", "3", _("Vertices, some Tris (compatible)")));
me.TR(me);
me.TDempty(me, 0.2);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Depth first:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("r_depthfirst"));
- e.addValue(e, _("Disabled"), "0");
- e.addValue(e, _("World"), "1");
- e.addValue(e, _("All"), "2");
+ e.addValue(e, ZCTX(_("DEPTHFIRST^Disabled")), "0");
+ e.addValue(e, ZCTX(_("DEPTHFIRST^World")), "1");
+ e.addValue(e, ZCTX(_("DEPTHFIRST^All")), "2");
e.configureXonoticTextSliderValues(e);
me.TR(me);
if(cvar_type("apple_multithreadedgl") & CVAR_TYPEFLAG_ENGINE)
string XonoticDecibelsSlider_valueToText(entity me, float v)
{
if(v < -33)
- return _("OFF");
+ return ZCTX(_("VOLUME^OFF"));
else if(v >= -0.1)
- return _("MAX");
+ return ZCTX(_("VOLUME^MAX"));
return sprintf(_("%s dB"), SUPER(XonoticDecibelsSlider).valueToText(me, v));
}
}
return s;
}
+string CTX(string s)
+{
+ float p = strstrofs(s, "^", 0);
+ if(p < 0)
+ return s;
+ return substring(s, p+1, -1);
+}
void dialog_hudpanel_common_notoggle(entity me, string panelname)
{
DIALOG_HUDPANEL_COMMON_NOTOGGLE()
string language_filename(string s);
+string CTX(string s);
+#define ZCTX(s) strzone(CTX(s))