- if code loads files with text, use language_filename()
- test by:
find . -type f -not -name \*.po -not -name \*.txt | xgettext -LC -k_ -f- gamecommand.qc
-- interesting vi macros:
+- interesting vim macros:
:map # /"<return>
:map ' i_(<esc>2f"a)<esc>/"<return>
List of files to do:
-./xonotic/dialog_multiplayer.c
-./xonotic/dialog_multiplayer_create_advanced.c
-./xonotic/dialog_multiplayer_create.c
-./xonotic/dialog_multiplayer_create_mapinfo.c
-./xonotic/dialog_multiplayer_create_mutators.c
./xonotic/dialog_multiplayer_demo.c
./xonotic/dialog_multiplayer_join.c
./xonotic/dialog_multiplayer_join_serverinfo.c
t = cvar_type(me.cvarName);
me.cvarType = "";
if(t & CVAR_TYPEFLAG_SAVED)
- me.cvarType = strcat(me.cvarType, _(", will be saved to config.cfg"));
+ me.cvarType = strcat(me.cvarType, ", ", _("will be saved to config.cfg"));
else
- me.cvarType = strcat(me.cvarType, _(", will not be saved"));
+ me.cvarType = strcat(me.cvarType, ", ", _("will not be saved"));
if(t & CVAR_TYPEFLAG_PRIVATE)
- me.cvarType = strcat(me.cvarType, _(", private"));
+ me.cvarType = strcat(me.cvarType, ", ", _("private"));
if(t & CVAR_TYPEFLAG_ENGINE)
- me.cvarType = strcat(me.cvarType, _(", engine setting"));
+ me.cvarType = strcat(me.cvarType, ", ", _("engine setting"));
if(t & CVAR_TYPEFLAG_READONLY)
- me.cvarType = strcat(me.cvarType, _(", read only"));
+ me.cvarType = strcat(me.cvarType, ", ", _("read only"));
me.cvarType = strzone(substring(me.cvarType, 2, strlen(me.cvarType) - 2));
me.cvarNameBox.setText(me.cvarNameBox, me.cvarName);
#ifdef INTERFACE
CLASS(XonoticMultiplayerDialog) EXTENDS(XonoticDialog)
METHOD(XonoticMultiplayerDialog, fill, void(entity))
- ATTRIB(XonoticMultiplayerDialog, title, string, "Multiplayer")
+ ATTRIB(XonoticMultiplayerDialog, title, string, _("Multiplayer"))
ATTRIB(XonoticMultiplayerDialog, color, vector, SKINCOLOR_DIALOG_MULTIPLAYER)
ATTRIB(XonoticMultiplayerDialog, intendedWidth, float, 0.96)
ATTRIB(XonoticMultiplayerDialog, rows, float, 24)
entity mc, e;
mc = makeXonoticTabController(me.rows - 2);
me.TR(me);
- me.TD(me, 1, 1, e = mc.makeTabButton(mc, "Servers", makeXonoticServerListTab()));
+ me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Servers"), makeXonoticServerListTab()));
setDependentStringNotEqual(e, "_cl_name", "Player");
- me.TD(me, 1, 1, e = mc.makeTabButton(mc, "Create", makeXonoticServerCreateTab()));
+ me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Create"), makeXonoticServerCreateTab()));
setDependentStringNotEqual(e, "_cl_name", "Player");
- me.TD(me, 1, 1, mc.makeTabButton(mc, "Demos", makeXonoticDemoBrowserTab()));
- me.TD(me, 1, 1, e = mc.makeTabButton(mc, "Player Setup", makeXonoticPlayerSettingsTab()));
+ me.TD(me, 1, 1, mc.makeTabButton(mc, _("Demos"), makeXonoticDemoBrowserTab()));
+ me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Player Setup"), makeXonoticPlayerSettingsTab()));
if(cvar_string("_cl_name") == "Player")
e.onClick(e, e.onClickEntity); // lol animation
CLASS(XonoticServerCreateTab) EXTENDS(XonoticTab)
METHOD(XonoticServerCreateTab, fill, void(entity))
METHOD(XonoticServerCreateTab, gameTypeChangeNotify, void(entity))
- ATTRIB(XonoticServerCreateTab, title, string, "Create")
+ ATTRIB(XonoticServerCreateTab, title, string, _("Create"))
ATTRIB(XonoticServerCreateTab, intendedWidth, float, 0.9)
ATTRIB(XonoticServerCreateTab, rows, float, 22)
ATTRIB(XonoticServerCreateTab, columns, float, 6.5)
float n;
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Game type:"));
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Game type:")));
me.TR(me);
me.TD(me, 9, 3, e = makeXonoticGametypeList());
me.TR(me);
me.TR(me);
me.TR(me);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Match settings:"));
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Match settings:")));
me.TR(me);
me.sliderTimelimit = makeXonoticSlider(1.0, 60.0, 0.5, "timelimit_override");
- me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderTimelimit, "Time limit:"));
+ me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderTimelimit, _("Time limit:")));
me.TD(me, 1, 2, me.sliderTimelimit);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderTimelimit, "Use map specified default"));
+ me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderTimelimit, _("Use map specified default")));
me.TR(me);
me.sliderFraglimit = makeXonoticSlider(1.0, 2000.0, 5, "fraglimit_override");
- me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderFraglimit, "Point limit:"));
+ me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, me.sliderFraglimit, _("Point limit:")));
me.checkboxFraglimit = e;
me.TD(me, 1, 2, me.sliderFraglimit);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderFraglimit, "Use map specified default"));
+ me.TD(me, 1, 2.8, e = makeXonoticSliderCheckBox(-1, 0, me.sliderFraglimit, _("Use map specified default")));
me.checkboxFraglimitMapinfo = e;
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Player slots:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Player slots:")));
me.TD(me, 1, 2, makeXonoticSlider(1, 32, 1, "menu_maxplayers"));
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Number of bots:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Number of bots:")));
me.TD(me, 1, 2, makeXonoticSlider(0, 9, 1, "bot_number"));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, "Bot skill:"));
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Bot skill:")));
setDependent(e, "bot_number", 0, -1);
me.TD(me, 1, 2, e = makeXonoticTextSlider("skill"));
- e.addValue(e, "Botlike", "0");
- e.addValue(e, "Beginner", "1");
- e.addValue(e, "You will win", "2");
- e.addValue(e, "You can win", "3");
- e.addValue(e, "You might win", "4");
- e.addValue(e, "Advanced", "5");
- e.addValue(e, "Expert", "6");
- e.addValue(e, "Pro", "7");
- e.addValue(e, "Assassin", "8");
- e.addValue(e, "Unhuman", "9");
- e.addValue(e, "Godlike", "10");
+ e.addValue(e, _("Botlike"), "0");
+ e.addValue(e, _("Beginner"), "1");
+ e.addValue(e, _("You will win"), "2");
+ e.addValue(e, _("You can win"), "3");
+ e.addValue(e, _("You might win"), "4");
+ e.addValue(e, _("Advanced"), "5");
+ e.addValue(e, _("Expert"), "6");
+ e.addValue(e, _("Pro"), "7");
+ e.addValue(e, _("Assassin"), "8");
+ e.addValue(e, _("Unhuman"), "9");
+ e.addValue(e, _("Godlike"), "10");
e.configureXonoticTextSliderValues(e);
setDependent(e, "bot_number", 0, -1);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticButton("Mutators...", '0 0 0'));
+ me.TD(me, 1, 1, e = makeXonoticButton(_("Mutators..."), '0 0 0'));
e.onClick = DialogOpenButton_Click;
e.onClickEntity = main.mutatorsDialog;
main.mutatorsDialog.refilterEntity = me.mapListBox;
e0.allowCut = 1;
me.TR(me);
me.TDempty(me, 0.5);
- me.TD(me, 1, 2, e = makeXonoticButton("Advanced settings...", '0 0 0'));
+ me.TD(me, 1, 2, e = makeXonoticButton(_("Advanced settings..."), '0 0 0'));
e.onClick = DialogOpenButton_Click;
e.onClickEntity = main.advancedDialog;
main.advancedDialog.refilterEntity = me.mapListBox;
me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
me.mapListBox = makeXonoticMapList();
- me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Map list:"));
+ me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Map list:")));
makeCallback(e, me.mapListBox, me.mapListBox.refilterCallback);
me.TR(me);
me.TD(me, me.rows - 4, 3, me.mapListBox);
me.gotoRC(me, me.rows - 3, 3.5);
me.TDempty(me, 0.25);
- me.TD(me, 1, 1.125, e = makeXonoticButton("Select all", '0 0 0'));
+ me.TD(me, 1, 1.125, e = makeXonoticButton(_("Select all"), '0 0 0'));
e.onClick = MapList_All;
e.onClickEntity = me.mapListBox;
- me.TD(me, 1, 1.125, e = makeXonoticButton("Select none", '0 0 0'));
+ me.TD(me, 1, 1.125, e = makeXonoticButton(_("Select none"), '0 0 0'));
e.onClick = MapList_None;
e.onClickEntity = me.mapListBox;
me.TDempty(me, 0.25);
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton("Start Multiplayer!", '0 0 0'));
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("Start Multiplayer!"), '0 0 0'));
e.onClick = MapList_LoadMap;
e.onClickEntity = me.mapListBox;
me.mapListBox.startButton = e;
l2 = me.checkboxFraglimitMapinfo;
switch(gt)
{
- case MAPINFO_TYPE_CTF: GameType_ConfigureSliders(e, l, l2, "Capture limit:", 1, 20, 1, "capturelimit_override"); break;
- case MAPINFO_TYPE_DOMINATION: GameType_ConfigureSliders(e, l, l2, "Point limit:", 50, 500, 10, "g_domination_point_limit"); break;
- case MAPINFO_TYPE_KEYHUNT: GameType_ConfigureSliders(e, l, l2, "Point limit:", 200, 1500, 50, "g_keyhunt_point_limit"); break;
- case MAPINFO_TYPE_RUNEMATCH: GameType_ConfigureSliders(e, l, l2, "Point limit:", 50, 500, 10, "g_runematch_point_limit"); break;
- case MAPINFO_TYPE_LMS: GameType_ConfigureSliders(e, l, l2, "Lives:", 3, 50, 1, "g_lms_lives_override"); break;
- case MAPINFO_TYPE_RACE: GameType_ConfigureSliders(e, l, l2, "Laps:", 1, 25, 1, "g_race_laps_limit"); break;
- case MAPINFO_TYPE_NEXBALL: GameType_ConfigureSliders(e, l, l2, "Goals:", 1, 50, 1, "g_nexball_goallimit"); break;
- case MAPINFO_TYPE_ASSAULT: GameType_ConfigureSliders(e, l, l2, "Point limit:", 50, 500, 10, ""); break;
- case MAPINFO_TYPE_ONSLAUGHT: GameType_ConfigureSliders(e, l, l2, "Point limit:", 50, 500, 10, ""); break;
- case MAPINFO_TYPE_CTS: GameType_ConfigureSliders(e, l, l2, "Point limit:", 50, 500, 10, ""); break;
- default: GameType_ConfigureSliders(e, l, l2, "Frag limit:", 5, 100, 5, "fraglimit_override"); break;
+ case MAPINFO_TYPE_CTF: GameType_ConfigureSliders(e, l, l2, _("Capture limit:"), 1, 20, 1, "capturelimit_override"); break;
+ case MAPINFO_TYPE_DOMINATION: GameType_ConfigureSliders(e, l, l2, _("Point limit:"), 50, 500, 10, "g_domination_point_limit"); break;
+ case MAPINFO_TYPE_KEYHUNT: GameType_ConfigureSliders(e, l, l2, _("Point limit:"), 200, 1500, 50, "g_keyhunt_point_limit"); break;
+ case MAPINFO_TYPE_RUNEMATCH: GameType_ConfigureSliders(e, l, l2, _("Point limit:"), 50, 500, 10, "g_runematch_point_limit"); break;
+ case MAPINFO_TYPE_LMS: GameType_ConfigureSliders(e, l, l2, _("Lives:"), 3, 50, 1, "g_lms_lives_override"); break;
+ case MAPINFO_TYPE_RACE: GameType_ConfigureSliders(e, l, l2, _("Laps:"), 1, 25, 1, "g_race_laps_limit"); break;
+ case MAPINFO_TYPE_NEXBALL: GameType_ConfigureSliders(e, l, l2, _("Goals:"), 1, 50, 1, "g_nexball_goallimit"); break;
+ case MAPINFO_TYPE_ASSAULT: GameType_ConfigureSliders(e, l, l2, _("Point limit:"), 50, 500, 10, ""); break;
+ case MAPINFO_TYPE_ONSLAUGHT: GameType_ConfigureSliders(e, l, l2, _("Point limit:"), 50, 500, 10, ""); break;
+ case MAPINFO_TYPE_CTS: GameType_ConfigureSliders(e, l, l2, _("Point limit:"), 50, 500, 10, ""); break;
+ default: GameType_ConfigureSliders(e, l, l2, _("Frag limit:"), 5, 100, 5, "fraglimit_override"); break;
}
me.mapListBox.refilter(me.mapListBox);
}
METHOD(XonoticAdvancedDialog, fill, void(entity))
METHOD(XonoticAdvancedDialog, showNotify, void(entity))
METHOD(XonoticAdvancedDialog, close, void(entity))
- ATTRIB(XonoticAdvancedDialog, title, string, "Advanced server settings")
+ ATTRIB(XonoticAdvancedDialog, title, string, _("Advanced server settings"))
ATTRIB(XonoticAdvancedDialog, color, vector, SKINCOLOR_DIALOG_ADVANCED)
ATTRIB(XonoticAdvancedDialog, intendedWidth, float, 0.5)
ATTRIB(XonoticAdvancedDialog, rows, float, 17)
{
entity e;
me.TR(me);
- me.TD(me, 1, 3, makeXonoticTextLabel(0, "Game settings:"));
+ me.TD(me, 1, 3, makeXonoticTextLabel(0, _("Game settings:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "sv_spectate", "Allow spectating"));
+ me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "sv_spectate", _("Allow spectating")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Spawn shield:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Spawn shield:")));
me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 15, 0.5, "g_spawnshieldtime"));
me.TR(me);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Game speed:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Game speed:")));
me.TD(me, 1, 1.6, e = makeXonoticSlider(0.5, 2.0, 0.1, "slowmo"));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 3, makeXonoticTextLabel(0, "Teamplay settings:"));
+ me.TD(me, 1, 3, makeXonoticTextLabel(0, _("Teamplay settings:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Friendly fire scale:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Friendly fire scale:")));
me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 1.0, 0.05, "g_friendlyfire"));
me.TR(me);
me.TDempty(me, 0.4);
- me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "g_friendlyfire_virtual", "Virtual friendly fire (effect only)"));
+ me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "g_friendlyfire_virtual", _("Virtual friendly fire (effect only)")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Friendly fire penalty:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Friendly fire penalty:")));
me.TD(me, 1, 1.6, e = makeXonoticSlider(0, 1.0, 0.05, "g_mirrordamage"));
me.TR(me);
me.TDempty(me, 0.4);
- me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "g_mirrordamage_virtual", "Virtual penalty (effect only)"));
+ me.TD(me, 1, 2.6, e = makeXonoticCheckBox(0, "g_mirrordamage_virtual", _("Virtual penalty (effect only)")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Teams:"));
+ me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Teams:")));
me.TD(me, 1, 1.6, e = makeXonoticTextSlider("g_tdm_teams_override g_domination_teams_override g_keyhunt_teams_override"));
e.addValue(e, "Default", "0");
e.addValue(e, "2 teams", "2");
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Map voting:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Map voting:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("g_maplist_votable"));
- e.addValue(e, "No voting", "0");
- e.addValue(e, "2 choices", "2");
- e.addValue(e, "3 choices", "3");
- e.addValue(e, "4 choices", "4");
- e.addValue(e, "5 choices", "5");
- e.addValue(e, "6 choices", "6");
- e.addValue(e, "7 choices", "7");
- e.addValue(e, "8 choices", "8");
- e.addValue(e, "9 choices", "9");
+ e.addValue(e, _("No voting"), "0");
+ e.addValue(e, _("2 choices"), "2");
+ e.addValue(e, _("3 choices"), "3");
+ e.addValue(e, _("4 choices"), "4");
+ e.addValue(e, _("5 choices"), "5");
+ e.addValue(e, _("6 choices"), "6");
+ e.addValue(e, _("7 choices"), "7");
+ e.addValue(e, _("8 choices"), "8");
+ e.addValue(e, _("9 choices"), "9");
e.configureXonoticTextSliderValues(e);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(0.5, 0, "sv_vote_simple_majority_factor", "Simple majority wins vcall"));
+ me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(0.5, 0, "sv_vote_simple_majority_factor", _("Simple majority wins vcall")));
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
CLASS(XonoticMapInfoDialog) EXTENDS(XonoticDialog)
METHOD(XonoticMapInfoDialog, fill, void(entity))
METHOD(XonoticMapInfoDialog, loadMapInfo, void(entity, float, entity))
- ATTRIB(XonoticMapInfoDialog, title, string, "Map Information")
+ ATTRIB(XonoticMapInfoDialog, title, string, _("Map Information"))
ATTRIB(XonoticMapInfoDialog, color, vector, SKINCOLOR_DIALOG_MAPINFO)
ATTRIB(XonoticMapInfoDialog, intendedWidth, float, 1.0)
ATTRIB(XonoticMapInfoDialog, rows, float, 12)
me.currentMapTitle = strzone(MapInfo_Map_title);
me.currentMapAuthor = strzone(MapInfo_Map_author);
me.currentMapDescription = strzone(MapInfo_Map_description);
- me.currentMapFeaturesText = strzone((MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_WEAPONS) ? "Full item placement" : "MinstaGib only");
+ me.currentMapFeaturesText = strzone((MapInfo_Map_supportedFeatures & MAPINFO_FEATURE_WEAPONS) ? _("Full item placement") : _("MinstaGib only"));
me.currentMapPreviewImage = strzone(strcat("/maps/", MapInfo_Map_bspname));
me.frame.setText(me.frame, me.currentMapBSPName);
me.previewImage = e;
me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn);
w = me.columns - me.currentColumn;
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Title:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Title:")));
me.TD(me, 1, w-1, e = makeXonoticTextLabel(0, ""));
e.colorL = SKINCOLOR_MAPLIST_TITLE;
e.allowCut = 1;
me.titleLabel = e;
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Author:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Author:")));
me.TD(me, 1, w-1, e = makeXonoticTextLabel(0, ""));
e.colorL = SKINCOLOR_MAPLIST_AUTHOR;
e.allowCut = 1;
me.authorLabel = e;
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Features:"));
+ me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Features:")));
me.TD(me, 1, w-1, e = makeXonoticTextLabel(0, ""));
e.allowCut = 1;
me.featuresLabel = e;
me.TR(me);
- me.TD(me, 1, w, e = makeXonoticTextLabel(0, "Game types:"));
+ me.TD(me, 1, w, e = makeXonoticTextLabel(0, _("Game types:")));
n = ceil(GameType_GetCount() / (me.rows - 6));
me.gotoRC(me, me.rows - 1, 0);
me.TDempty(me, 0.5);
- me.TD(me, 1, me.columns - 5.5, e = makeXonoticButton("Close", '0 0 0'));
+ me.TD(me, 1, me.columns - 5.5, e = makeXonoticButton(_("Close"), '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
- me.TD(me, 1, me.columns - 5.5, me.startButton = e = makeXonoticButton("Play", '0 0 0'));
+ me.TD(me, 1, me.columns - 5.5, me.startButton = e = makeXonoticButton(_("Play"), '0 0 0'));
me.startButton.onClick = MapList_LoadMap;
me.startButton.onClickEntity = NULL; // filled later
}
METHOD(XonoticMutatorsDialog, fill, void(entity))
METHOD(XonoticMutatorsDialog, showNotify, void(entity))
METHOD(XonoticMutatorsDialog, close, void(entity))
- ATTRIB(XonoticMutatorsDialog, title, string, "Mutators")
+ ATTRIB(XonoticMutatorsDialog, title, string, _("Mutators"))
ATTRIB(XonoticMutatorsDialog, color, vector, SKINCOLOR_DIALOG_MUTATORS)
ATTRIB(XonoticMutatorsDialog, intendedWidth, float, 0.9)
ATTRIB(XonoticMutatorsDialog, rows, float, 17)
if(s == "0")
return "";
if(s == "all")
- return "All Weapons Arena";
+ return _("All Weapons Arena");
if(s == "most")
- return "Most Weapons Arena";
+ return _("Most Weapons Arena");
if(s == weaponarenastring_cvar)
return weaponarenastring;
if(weaponarenastring)
s = strcat(s, " & ", e.message);
}
}
- s = strcat(substring(s, 3, strlen(s) - 3), " Arena");
+ s = sprintf(_("%s Arena"), substring(s, 3, strlen(s) - 3));
weaponarenastring = strzone(s);
string s;
s = "";
if(cvar("g_dodging"))
- s = strcat(s, ", Dodging");
+ s = strcat(s, ", ", _("Dodging"));
if(cvar("g_minstagib"))
- s = strcat(s, ", MinstaGib");
+ s = strcat(s, ", ", _("MinstaGib"));
if(cvar("g_nix"))
- s = strcat(s, ", NIX");
+ s = strcat(s, ", ", _("NIX"));
if(cvar("g_rocket_flying"))
- s = strcat(s, ", Rocket Flying");
+ s = strcat(s, ", ", _("Rocket Flying"));
if(cvar_string("g_weaponarena") != "0")
s = strcat(s, ", ", WeaponArenaString());
if(cvar("g_start_weapon_laser") == 0)
- s = strcat(s, ", No start weapons");
+ s = strcat(s, ", ", _("No start weapons"));
if(cvar("sv_gravity") < 800)
- s = strcat(s, ", Low gravity");
+ s = strcat(s, ", ", _("Low gravity"));
if(cvar("g_cloaked"))
- s = strcat(s, ", Cloaked");
+ s = strcat(s, ", ", _("Cloaked"));
if(cvar("g_grappling_hook"))
- s = strcat(s, ", Hook");
+ s = strcat(s, ", ", _("Hook"));
if(cvar("g_midair"))
- s = strcat(s, ", Midair");
+ s = strcat(s, ", ", _("Midair"));
if(cvar("g_vampire"))
- s = strcat(s, ", Vampire");
+ s = strcat(s, ", ", _("Vampire"));
if(cvar("g_pinata"))
- s = strcat(s, ", Pinata");
+ s = strcat(s, ", ", _("Pinata"));
if(cvar("g_weapon_stay"))
- s = strcat(s, ", Weapons stay");
+ s = strcat(s, ", ", _("Weapons stay"));
if(cvar("g_bloodloss") > 0)
- s = strcat(s, ", Bloodloss");
+ s = strcat(s, ", ", _("Bloodloss"));
if(cvar("g_jetpack"))
- s = strcat(s, ", Jet pack");
+ s = strcat(s, ", ", _("Jet pack"));
if(s == "")
- return "None";
+ return _("None");
else
return substring(s, 2, strlen(s) - 2);
}
float i, j;
string str, hstr;
me.TR(me);
- me.TD(me, 1, 2, makeXonoticTextLabel(0, "Gameplay mutators:"));
+ me.TD(me, 1, 2, makeXonoticTextLabel(0, _("Gameplay mutators:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_dodging", "Dodging"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_dodging", _("Dodging")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_cloaked", "Cloaked"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_cloaked", _("Cloaked")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_midair", "Midair"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_midair", _("Midair")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_vampire", "Vampire"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_vampire", _("Vampire")));
me.TR(me);
me.TDempty(me, 0.2);
s = makeXonoticSlider(10, 50, 1, "g_bloodloss");
- me.TD(me, 1, 2, e = makeXonoticSliderCheckBox(0, 1, s, "Blood loss"));
+ me.TD(me, 1, 2, e = makeXonoticSliderCheckBox(0, 1, s, _("Blood loss")));
me.TR(me);
me.TDempty(me, 0.4);
me.TD(me, 1, 1.8, s);
s = makeXonoticSlider(80, 400, 8, "sv_gravity");
s.valueDigits = 0;
s.valueDisplayMultiplier = 0.125; // show gravity in percent
- me.TD(me, 1, 2, e = makeXonoticSliderCheckBox(800, 1, s, "Low gravity"));
+ me.TD(me, 1, 2, e = makeXonoticSliderCheckBox(800, 1, s, _("Low gravity")));
e.savedValue = 200; // good on silvercity
me.TR(me);
me.TDempty(me, 0.4);
me.TD(me, 1, 1.8, s);
me.TR(me);
me.TR(me);
- me.TD(me, 1, 2, makeXonoticTextLabel(0, "Weapon & item mutators:"));
+ me.TD(me, 1, 2, makeXonoticTextLabel(0, _("Weapon & item mutators:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_grappling_hook", "Grappling hook"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_grappling_hook", _("Grappling hook")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_jetpack", "Jet pack"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_jetpack", _("Jet pack")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_rocket_flying", "Rocket Flying"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_rocket_flying", _("Rocket Flying")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_pinata", "Pinata"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_pinata", _("Pinata")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticCheckBoxEx(2, 0, "g_weapon_stay", "Weapons stay"));
+ me.TD(me, 1, 2, e = makeXonoticCheckBoxEx(2, 0, "g_weapon_stay", _("Weapons stay")));
me.TR(me);
me.gotoRC(me, 0, 2); me.setFirstColumn(me, me.currentColumn);
- me.TD(me, 1, 4, makeXonoticTextLabel(0, "Weapon arenas:"));
+ me.TD(me, 1, 4, makeXonoticTextLabel(0, _("Weapon arenas:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticRadioButton(1, string_null, string_null, "Regular (no arena)"));
+ me.TD(me, 1, 2, e = makeXonoticRadioButton(1, string_null, string_null, _("Regular (no arena)")));
for(i = WEP_FIRST, j = 0; i <= WEP_LAST; ++i)
{
w = get_weaponinfo(i);
}
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "menu_weaponarena_with_laser", "with laser"));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "menu_weaponarena_with_laser", _("with laser")));
// hook the draw function to gray it out
e.draw_weaponarena = e.draw;
e.draw = preDrawLaserWeaponArenaLaserButton;
e.saveCvars_weaponarena = e.saveCvars;
e.saveCvars = saveCvarsLaserWeaponArenaLaserButton;
me.TR(me);
- me.TD(me, 1, 4, makeXonoticTextLabel(0, "Special arenas:"));
+ me.TD(me, 1, 4, makeXonoticTextLabel(0, _("Special arenas:")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_minstagib", string_null, "MinstaGib"));
+ me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_minstagib", string_null, _("MinstaGib")));
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_nix", string_null, "NIX"));
+ me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_nix", string_null, _("NIX")));
me.TR(me);
me.TDempty(me, 0.4);
- me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "g_nix_with_laser", "with laser"));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "g_nix_with_laser", _("with laser")));
setDependent(e, "g_nix", 1, 1);
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_weaponarena", "most", "Most weapons"));
+ me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_weaponarena", "most", _("Most weapons")));
e.cvarOffValue = "0";
me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_start_weapon_laser", "0", "No start weapons"));
+ me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_start_weapon_laser", "0", _("No start weapons")));
e.cvarOffValue = "-1";
makeMulti(e, "g_start_weapon_shotgun g_start_weapon_uzi g_start_weapon_grenadelauncher g_start_weapon_minelayer g_start_weapon_electro g_start_weapon_crylink g_start_weapon_nex g_start_weapon_hagar g_start_weapon_rocketlauncher g_start_weapon_sniperrifle g_start_weapon_hlac g_start_weapon_seeker g_start_weapon_minstanex g_start_weapon_hook g_start_weapon_porto g_start_weapon_tuba g_start_weapon_minelayer");
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns, e = makeXonoticButton("OK", '0 0 0'));
+ me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
e.onClick = Dialog_Close;
e.onClickEntity = me;
}