diff --git a/config.cpp b/config.cpp index 21aee104..6bc8ca30 100644 --- a/config.cpp +++ b/config.cpp @@ -1391,9 +1391,9 @@ EX void edit_sightrange() { EX void menuitem_sightrange_style(char c IS('c')) { dialog::addSelItem(XLAT("draw range based on"), - XLAT(vid.use_smart_range == 0 ? "distance" : - vid.use_smart_range == 1 ? "size (no gen)" : - "size"), + vid.use_smart_range == 0 ? XLAT("distance") : + vid.use_smart_range == 1 ? XLAT("size (no gen)") : + XLAT("size"), c ); dialog::add_action_push([] { @@ -1791,7 +1791,7 @@ EX void showJoyConfig() { dialog::addSelItem(XLAT("first joystick position (movement)"), its(joyx)+","+its(joyy), 0); dialog::addSelItem(XLAT("second joystick position (panning)"), its(panjoyx)+","+its(panjoyy), 0); - dialog::addSelItem(XLAT("joystick mode"), XLAT(autojoy ? "automatic" : "manual"), 'p'); + dialog::addSelItem(XLAT("joystick mode"), autojoy ? XLAT("automatic") : XLAT("manual"), 'p'); if(getcstat == 'p') { if(autojoy) mouseovers = XLAT("joystick mode: automatic (release the joystick to move)"); diff --git a/debug.cpp b/debug.cpp index beb585b5..185ec44a 100644 --- a/debug.cpp +++ b/debug.cpp @@ -346,7 +346,7 @@ struct debugScreen { gamescreen(0); getcstat = '-'; - dialog::init(XLAT(show_debug_data ? "debug values" : "internal details")); + dialog::init(show_debug_data ? XLAT("debug values") : XLAT("internal details")); for(auto& p: drawbugs) drawBug(p.first, p.second); diff --git a/expansion.cpp b/expansion.cpp index e87fea76..a65f8119 100644 --- a/expansion.cpp +++ b/expansion.cpp @@ -640,7 +640,7 @@ EX void viewdist_configure_dialog() { dialog::addItem(XLAT("move the player"), 'm'); dialog::add_action([] () { show_distance_lists = false; popScreenAll(); }); - dialog::addItem(XLAT(distance_from ? "show number of descendants by distance" : "show number of cells by distance"), 'l'); + dialog::addItem(distance_from ? XLAT("show number of descendants by distance") : XLAT("show number of cells by distance"), 'l'); dialog::add_action([] () { show_distance_lists = true; popScreenAll(); }); dialog::display(); diff --git a/geom-exp.cpp b/geom-exp.cpp index 1c70972f..e90c9640 100644 --- a/geom-exp.cpp +++ b/geom-exp.cpp @@ -302,11 +302,11 @@ void set_or_configure_geometry(eGeometry g) { else { if(among(g, gProduct, gRotSpace)) { if(WDIM == 3 || (g == gRotSpace && euclid)) { - addMessage(XLAT( + addMessage( g == gRotSpace ? - "Only works with 2D non-Euclidean geometries" - : "Only works with 2D geometries" - )); + XLAT("Only works with 2D non-Euclidean geometries") + : XLAT("Only works with 2D geometries") + ); return; } if(g == gRotSpace) { @@ -980,10 +980,10 @@ EX void showEuclideanMenu() { auto r = rots::underlying_scale; dialog::addSelItem(XLAT("view the underlying geometry"), r > 0 ? fts(r)+"x" : ONOFF(false), '6'); dialog::add_action([] { - dialog::editNumber(rots::underlying_scale, 0, 1, 0.05, 0.25, XLAT("view the underlying geometry"), - XLAT( - geometry == gRotSpace ? "The space you are currently in is the space of rotations of the underlying hyperbolic or spherical geometry. " - : "You are currently in a product space.") + + dialog::editNumber(rots::underlying_scale, 0, 1, 0.05, 0.25, XLAT("view the underlying geometry"), + geometry == gRotSpace ? + XLAT("The space you are currently in is the space of rotations of the underlying hyperbolic or spherical geometry. ") + : XLAT("You are currently in a product space.") + XLAT( "This option lets you see the underlying space. Lands and some walls (e.g. in the Graveyard) are based on " "the respective features in the underlying world, but details such as monsters or items are ignored." @@ -1022,7 +1022,7 @@ EX void showEuclideanMenu() { } if(geometry_has_alt_mine_rule()) { - dialog::addSelItem(XLAT("adjacency rule"), XLAT(mine_adjacency_rule ? "vertex" : WDIM == 3 ? "face" : "edge"), 'M'); + dialog::addSelItem(XLAT("adjacency rule"), mine_adjacency_rule ? XLAT("vertex") : WDIM == 3 ? XLAT("face") : XLAT("edge"), 'M'); dialog::add_action([] { stop_game(); mine_adjacency_rule = !mine_adjacency_rule; diff --git a/goldberg.cpp b/goldberg.cpp index dedc4d3e..c9f6a9b7 100644 --- a/goldberg.cpp +++ b/goldberg.cpp @@ -760,10 +760,10 @@ EX namespace gp { }); } - dialog::lastItem().value = S3 == 3 ? "GP(1,1)" : XLAT(BITRUNCATED ? "ON" : "OFF"); + dialog::lastItem().value = S3 == 3 ? "GP(1,1)" : ONOFF(BITRUNCATED); if(min_quality == 0 || min_quality_chess) { - dialog::addBoolItem(XLAT(S3 == 3 ? "chamfered" : "expanded"), univ_param() == loc(2,0) && GOLDBERG, 'c'); + dialog::addBoolItem(S3 == 3 ? XLAT("chamfered") : XLAT("expanded"), univ_param() == loc(2,0) && GOLDBERG, 'c'); dialog::lastItem().value = "GP(2,0)"; dialog::add_action_confirmed([] { whirl_set(loc(2, 0)); diff --git a/graph.cpp b/graph.cpp index b0a8bc56..7f77c99f 100644 --- a/graph.cpp +++ b/graph.cpp @@ -5190,8 +5190,8 @@ EX void gamescreen(int _darken) { drawCircle(xfire, yb, rad/2, 0xFF0000FF); } else { - if(!haveMobileCompass()) displayabutton(-1, +1, XLAT(andmode == 0 && useRangedOrb ? "FIRE" : andmode == 0 && WDIM == 3 && wclick ? "WAIT" : "MOVE"), andmode == 0 ? BTON : BTOFF); - displayabutton(+1, +1, rug::rugged ? "RUG" : XLAT(andmode == 1 ? "BACK" : GDIM == 3 ? "CAM" : "DRAG"), andmode == 1 ? BTON : BTOFF); + if(!haveMobileCompass()) displayabutton(-1, +1, andmode == 0 && useRangedOrb ? XLAT("FIRE") : andmode == 0 && WDIM == 3 && wclick ? XLAT("WAIT") : XLAT("MOVE"), andmode == 0 ? BTON : BTOFF); + displayabutton(+1, +1, rug::rugged ? XLAT("RUG") :andmode == 1 ? XLAT("BACK") : GDIM == 3 ? XLAT("CAM") : XLAT("DRAG"), andmode == 1 ? BTON : BTOFF); } displayabutton(-1, -1, XLAT("INFO"), andmode == 12 ? BTON : BTOFF); displayabutton(+1, -1, XLAT("MENU"), andmode == 3 ? BTON : BTOFF); @@ -5244,7 +5244,7 @@ EX void normalscreen() { keyhandler = handleKeyNormal; if(!playerfound && !anims::any_on() && !sphere && !no_find_player && mapeditor::drawplayer) - displayButton(current_display->xcenter, current_display->ycenter, XLAT(mousing ? "find the player" : "press SPACE to find the player"), ' ', 8); + displayButton(current_display->xcenter, current_display->ycenter, mousing ? XLAT("find the player") : XLAT("press SPACE to find the player"), ' ', 8); describeMouseover(); } diff --git a/help.cpp b/help.cpp index 805c99bd..6352e7d1 100644 --- a/help.cpp +++ b/help.cpp @@ -408,7 +408,7 @@ EX string generateHelpForItem(eItem it) { for(int i=0; id[dslayer].list)) { usershapelayer& ds(us->d[dslayer]); if(!EDITING_TRIANGLES) { displayButton(8, 8+fs*4, XLAT("1-9 = rotations: %1", its(ds.rots)), '1' + (ds.rots % 9), 0); - displayButton(8, 8+fs*5, XLAT(ds.sym ? "0 = symmetry" : "0 = asymmetry"), '0', 0); + displayButton(8, 8+fs*5, ds.sym ? XLAT("0 = symmetry") : XLAT("0 = asymmetry"), '0', 0); } displayfr(8, 8+fs*7, 2, vid.fsize, XLAT("%1 vertices", its(isize(ds.list))), 0xC0C0C0, 0); @@ -1866,7 +1866,7 @@ EX namespace mapeditor { displayButton(8, 8+fs*9, XLAT("m = move v"), 'm', 0); displayButton(8, 8+fs*10, XLAT("d = delete v"), 'd', 0); } - displaymm('c', 8, 8+fs*11, 2, vid.fsize, XLAT(autochoose ? "autochoose" : "c = choose"), 0); + displaymm('c', 8, 8+fs*11, 2, vid.fsize, autochoose ? XLAT("autochoose") : XLAT("c = choose"), 0); displayButton(8, 8+fs*12, XLAT("b = switch auto"), 'b', 0); } else { @@ -1888,7 +1888,7 @@ EX namespace mapeditor { } #if CAP_TEXTURE else if(freedraw) { - displayButton(8, 8+fs*2, XLAT(texture::texturesym ? "0 = symmetry" : "0 = asymmetry"), '0', 0); + displayButton(8, 8+fs*2, texture::texturesym ? XLAT("0 = symmetry") : XLAT("0 = asymmetry"), '0', 0); if(mousekey == 'g') displayButton(8, 8+fs*16, XLAT("p = grid color"), 'p', 0); else @@ -1916,11 +1916,11 @@ EX namespace mapeditor { } if(GDIM == 3) - displayfr(8, 8+fs*19, 2, vid.fsize, XLAT(front_config == eFront::sphere_camera ? "z = camera" : front_config == eFront::sphere_center ? "z = spheres" : - nonisotropic && front_config == eFront::equidistants ? "Z =" : - nonisotropic && front_config == eFront::const_x ? "X =" : - nonisotropic && front_config == eFront::const_y ? "Y =" : - "z = equi") + " " + fts(front_edit), 0xC0C0C0, 0); + displayfr(8, 8+fs*19, 2, vid.fsize, (front_config == eFront::sphere_camera ? XLAT("z = camera") : front_config == eFront::sphere_center ? XLAT("z = spheres") : + nonisotropic && front_config == eFront::equidistants ? XLAT("Z =") : + nonisotropic && front_config == eFront::const_x ? XLAT("X =") : + nonisotropic && front_config == eFront::const_y ? XLAT("Y =") : + XLAT("z = equi")) + " " + fts(front_edit), 0xC0C0C0, 0); displaymm('g', vid.xres-8, 8+fs*4, 2, vid.fsize, XLAT("g = grid"), 16); @@ -2399,7 +2399,7 @@ EX namespace mapeditor { dialog::add_action([] { front_config = eFront::sphere_camera; }); dialog::addBoolItem(XLAT("place points at fixed radius"), front_config == eFront::sphere_center, 'B'); dialog::add_action([] { front_config = eFront::sphere_center; }); - dialog::addBoolItem(XLAT(nonisotropic ? "place points on surfaces of const Z" : "place points on equidistant surfaces"), front_config == eFront::equidistants, 'C'); + dialog::addBoolItem(nonisotropic ? XLAT("place points on surfaces of const Z") : XLAT("place points on equidistant surfaces"), front_config == eFront::equidistants, 'C'); dialog::add_action([] { front_config = eFront::equidistants; }); if(nonisotropic) { dialog::addBoolItem(XLAT("place points on surfaces of const X"), front_config == eFront::const_x, 'D'); diff --git a/models.cpp b/models.cpp index 2b6a8f6e..4adc4af0 100644 --- a/models.cpp +++ b/models.cpp @@ -693,11 +693,11 @@ EX namespace models { dialog::init("models & projections"); if(GDIM == 2 && !euclid) { - dialog::addItem(XLAT(hyperbolic ? "Gans model" : "orthographic projection"), '1'); + dialog::addItem(hyperbolic ? XLAT("Gans model") : XLAT("orthographic projection"), '1'); dialog::add_action([] { if(rug::rugged) rug::close(); pconf.alpha = 999; pconf.scale = 998; pconf.xposition = pconf.yposition = 0; popScreen(); }); - dialog::addItem(XLAT(hyperbolic ? "Poincaré model" : "stereographic projection"), '2'); + dialog::addItem(hyperbolic ? XLAT("Poincaré model") : XLAT("stereographic projection"), '2'); dialog::add_action([] { if(rug::rugged) rug::close(); pconf.alpha = 1; pconf.scale = 1; pconf.xposition = pconf.yposition = 0; popScreen(); }); - dialog::addItem(XLAT(hyperbolic ? "Beltrami-Klein model" : "gnomonic projection"), '3'); + dialog::addItem(hyperbolic ? XLAT("Beltrami-Klein model") : XLAT("gnomonic projection"), '3'); dialog::add_action([] { if(rug::rugged) rug::close(); pconf.alpha = 0; pconf.scale = 1; pconf.xposition = pconf.yposition = 0; popScreen(); }); if(sphere) { dialog::addItem(XLAT("stereographic projection") + " " + XLAT("(zoomed out)"), '4'); diff --git a/multi.cpp b/multi.cpp index 52a8fd41..d2d38bc4 100644 --- a/multi.cpp +++ b/multi.cpp @@ -211,14 +211,14 @@ bool configdead; void handleConfig(int sym, int uni); EX string player_count_name(int p) { - return XLAT( - p == 2 ? "two players" : - p == 3 ? "three players" : - p == 4 ? "four players" : - p == 5 ? "five players" : - p == 6 ? "six players" : - p == 7 ? "seven players" : - "one player"); + return + p == 2 ? XLAT("two players") : + p == 3 ? XLAT("three players") : + p == 4 ? XLAT("four players") : + p == 5 ? XLAT("five players") : + p == 6 ? XLAT("six players") : + p == 7 ? XLAT("seven players") : + XLAT("one player"); } struct key_configurer { @@ -304,15 +304,15 @@ EX reaction_t get_key_configurer(int sc, vector& sct, string caption) { } EX reaction_t get_key_configurer(int sc, vector& sct) { - return key_configurer(sc, sct, XLAT(sc == 1 ? "configure player 1" : - sc == 2 ? "configure player 2" : - sc == 3 ? "configure panning" : - sc == 4 ? "configure player 3" : - sc == 5 ? "configure player 4" : - sc == 6 ? "configure player 5" : - sc == 7 ? "configure player 6" : - sc == 8 ? "configure player 7" : "" - )); + return key_configurer(sc, sct, sc == 1 ? XLAT("configure player 1") : + sc == 2 ? XLAT("configure player 2") : + sc == 3 ? XLAT("configure panning") : + sc == 4 ? XLAT("configure player 3") : + sc == 5 ? XLAT("configure player 4") : + sc == 6 ? XLAT("configure player 5") : + sc == 7 ? XLAT("configure player 6") : + sc == 8 ? XLAT("configure player 7") : "" + ); } #if CAP_SDLJOY @@ -395,7 +395,7 @@ struct shmup_configurer { if(players > 1) dialog::addItem(XLAT("configure player 2"), '2'); else if(players == 1 && !shmup::on) - dialog::addSelItem(XLAT("input"), XLAT(multi::alwaysuse ? "config" : "default"), 'a'); + dialog::addSelItem(XLAT("input"), multi::alwaysuse ? XLAT("config") : XLAT("default"), 'a'); else dialog::addBreak(100); if(players > 2) diff --git a/multigame.cpp b/multigame.cpp index 3b023dee..ec737784 100644 --- a/multigame.cpp +++ b/multigame.cpp @@ -425,7 +425,7 @@ EX namespace dual { EX void add_choice() { if(!state) return; dialog::addSelItem(XLAT("subgame affected"), - XLAT(affect_both ? "both" : main_side == 0 ? "left" : "right"), '`'); + affect_both ? XLAT("both") : main_side == 0 ? XLAT("left") : XLAT("right"), '`'); dialog::add_action([] () { affect_both = !affect_both; if(!affect_both) { diff --git a/nonisotropic.cpp b/nonisotropic.cpp index 3d12c23d..0eb677da 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -1536,9 +1536,9 @@ EX namespace hybrid { if(rotspace) { int e_steps = cgi.psl_steps / gcd(cgi.single_step, cgi.psl_steps); bool ubounded = PIU(bounded); - dialog::addSelItem( XLAT(sphere ? "elliptic" : "PSL(2,R)"), its(e_steps), 'P'); + dialog::addSelItem( sphere ? XLAT("elliptic") : XLAT("PSL(2,R)"), its(e_steps), 'P'); dialog::add_action(set_s(e_steps, true)); - dialog::addSelItem( XLAT(sphere ? "sphere" : "SL(2,R)"), its(2*e_steps), 'P'); + dialog::addSelItem( sphere ? XLAT("sphere") : XLAT("SL(2,R)"), its(2*e_steps), 'P'); dialog::add_action(set_s(2*e_steps, true)); if(sl2 && !ubounded) { dialog::addSelItem( XLAT("universal cover"), its(0), 'P'); diff --git a/quit.cpp b/quit.cpp index 27b6fd24..0908c029 100644 --- a/quit.cpp +++ b/quit.cpp @@ -291,7 +291,7 @@ EX hint hints[] = { EX int hinttoshow; string contstr() { - return XLAT(canmove ? "continue" : "see how it ended"); + return canmove ? XLAT("continue") : XLAT("see how it ended"); } eLand nextHyperstone() { @@ -412,11 +412,10 @@ EX void showMission() { else if(landUnlocked(laHell) && ls::any_order()) { eLand l = nextHyperstone(); if(l) - dialog::addInfo( - XLAT( - l ? "Hyperstone Quest: collect at least %3 points in %the2" : - "Hyperstone Quest: collect at least %3 %1 in %the2", - treasureType(l), l, its(R10))); + dialog::addInfo( + l ? XLAT("Hyperstone Quest: collect at least %3 points in %the2", treasureType(l), l, its(R10)) + : XLAT("Hyperstone Quest: collect at least %3 %1 in %the2", treasureType(l), l, its(R10)) + ); else dialog::addInfo(XLAT("Hyperstone Quest completed!"), iinf[itHyperstone].color); } @@ -448,7 +447,7 @@ EX void showMission() { if(canmove) { if(sphere) { dialog::addItem(XLAT("return to your game"), '1'); - dialog::addItem(XLAT(pconf.alpha < 2 ? "orthogonal projection" : "stereographic projection"), '3'); + dialog::addItem(pconf.alpha < 2 ? XLAT("orthogonal projection") : XLAT("stereographic projection"), '3'); } else if(euclid) { dialog::addItem(XLAT("return to your game"), '2'); diff --git a/racing.cpp b/racing.cpp index a39b3a0a..cab55d8b 100644 --- a/racing.cpp +++ b/racing.cpp @@ -1024,7 +1024,7 @@ void race_projection() { }); if(true) { - dialog::addSelItem(XLAT("point of view"), XLAT(player_relative ? "player" : "track"), 'p'); + dialog::addSelItem(XLAT("point of view"), player_relative ? XLAT("player") : XLAT("track"), 'p'); if(racing::use_standard_centering()) dialog::lastItem().value = XLAT("N/A"); dialog::add_action([] () { diff --git a/yendor.cpp b/yendor.cpp index afd5e863..41eadf0c 100644 --- a/yendor.cpp +++ b/yendor.cpp @@ -737,9 +737,9 @@ EX namespace yendor { dialog::addBreak(60); if (yendor::on) dialog::addItem(XLAT("Return to the normal game"), '0'); - dialog::addSelItem(XLAT( - easy ? "Challenges do not get harder" : "Each challenge gets harder after each victory"), - " " + XLAT(easy ? "easy" : "challenge"), '1'); + dialog::addSelItem( + easy ? XLAT("Challenges do not get harder") : XLAT("Each challenge gets harder after each victory"), + " " + easy ? XLAT("easy") : XLAT("challenge"), '1'); dialog::addBack(); dialog::addHelp();