diff --git a/classes.cpp b/classes.cpp index 7ac51a11..70a939f0 100644 --- a/classes.cpp +++ b/classes.cpp @@ -875,13 +875,13 @@ EX vector ginf = { {"{4,3,5}","none", "{4,3,5} hyperbolic honeycomb", "435", 6, 5, 0, giHyperb3, 0x31600, {{7, 2}}, eVariation::pure}, {"{3,3,3}","none", "{3,3,3} 5-cell", "333", 4, 3, qsSMALLB, giSphere3, 0x38000, {{SEE_ALL, SEE_ALL}}, eVariation::pure}, {"{3,3,4}","none", "{3,3,4} 16-cell", "334", 4, 4, qsSMALLB, giSphere3, 0x38200, {{SEE_ALL, SEE_ALL}}, eVariation::pure}, - {"{3,3,4}","elliptic","{3,3,4} 16-cell (elliptic)", "e334", 4, 4, qsSMALLBE, giSphere3, 0x39200, {{SEE_ALL, SEE_ALL}}, eVariation::pure}, + {"{3,3,4}","elliptic","{3,3,4} 16-cell (elliptic space)", "e334", 4, 4, qsSMALLBE, giSphere3, 0x39200, {{SEE_ALL, SEE_ALL}}, eVariation::pure}, {"{4,3,3}","none", "{4,3,3} 8-cell", "433", 6, 4, qsSMALLB, giSphere3, 0x38400, {{SEE_ALL, SEE_ALL}}, eVariation::pure}, - {"{4,3,3}","elliptic","{4,3,3} 8-cell (elliptic)", "e433", 6, 4, qsSMALLBE, giSphere3, 0x39400, {{SEE_ALL, SEE_ALL}}, eVariation::pure}, + {"{4,3,3}","elliptic","{4,3,3} 8-cell (elliptic space)", "e433", 6, 4, qsSMALLBE, giSphere3, 0x39400, {{SEE_ALL, SEE_ALL}}, eVariation::pure}, {"{3,4,3}","none", "{3,4,3} 24-cell", "343", 8, 3, qsSMALLB, giSphere3, 0x38600, {{SEE_ALL, SEE_ALL}}, eVariation::pure}, - {"{3,4,3}","elliptic","{3,4,3} 24-cell (elliptic)", "e343", 8, 3, qsSMALLBE, giSphere3, 0x39600, {{SEE_ALL, SEE_ALL}}, eVariation::pure}, + {"{3,4,3}","elliptic","{3,4,3} 24-cell (elliptic space)", "e343", 8, 3, qsSMALLBE, giSphere3, 0x39600, {{SEE_ALL, SEE_ALL}}, eVariation::pure}, {"{3,3,5}","none", "{3,3,5} 600-cell", "335", 4, 3, qsSMALLB, giSphere3, 0x41000, {{SEE_ALL, SEE_ALL}}, eVariation::pure}, - {"{3,3,5}","elliptic","{3,3,5} 600-cell (elliptic)", "e335", 4, 3, qsSMALLBE, giSphere3, 0x41200, {{SEE_ALL, SEE_ALL}}, eVariation::pure}, + {"{3,3,5}","elliptic","{3,3,5} 600-cell (elliptic space)", "e335", 4, 3, qsSMALLBE, giSphere3, 0x41200, {{SEE_ALL, SEE_ALL}}, eVariation::pure}, {"bin{3,6}", "none", "{3,6} on horospheres", "bin36", 8, 3, qBINARY, giHyperb3, 0x40000, {{7, 3}}, eVariation::pure}, {"bin-rect", "none", "rectangles on horospheres", "bin44/2", 7, 3, qBINARY, giHyperb3, 0x40200, {{7, 3}}, eVariation::pure}, {"bin{6,3}", "none", "{6,3} on horospheres", "bin63", 14, 3, qBINARY, giHyperb3, 0x40400, {{7, 3}}, eVariation::pure}, diff --git a/content.cpp b/content.cpp index cc47e7f7..8a80db93 100644 --- a/content.cpp +++ b/content.cpp @@ -322,7 +322,7 @@ MONSTER( 'Y', 0xFF8000, "Yendorian Researcher", moResearcher, ZERO, RESERVED, mo "They have no special features, other than wearing a strange hat." ) MONSTER( 'K', 0xA8A8A8, "Sparrowhawk", moSparrowhawk, CF_FACE_SIDE | CF_BIRD | CF_FLYING | CF_IGNORE_PLATE, RESERVED, moEagle, - "A bird who hunts in the treetops of Yendorian Forest." + "A bird who hunts in the treetops of the Yendorian Forest." ) MONSTER( 'K', 0xD0A0A0, "Kraken", moKrakenH, ZERO | CF_NOGHOST | CF_NOBLOW | CF_MULTITILE | CF_KRAKEN | CF_FACING, RESERVED, moNone, krakendesc) MONSTER( 'K', 0xC07070, "Kraken Tentacle", moKrakenT, ZERO | CF_NOGHOST | CF_NOBLOW | CF_PART | CF_MULTITILE | CF_KRAKEN, RESERVED, moNone, krakendesc) @@ -398,7 +398,7 @@ MONSTER( 'W', 0x202020, "Hunting Dog (regrouping)", moHunterChanging, ZERO, RESE "When your plan has clearly failed, it is better to abandon it and go to a safe place, to have a chance of succeeding next time. This dog clearly knows this.") MONSTER( 'B', 0xC00000, "North Pole", moNorthPole, ZERO | CF_MAGNETIC | CF_FACING, RESERVED, moYeti, NODESCYET) MONSTER( 'B', 0x0000C0, "South Pole", moSouthPole, ZERO | CF_MAGNETIC | CF_FACING, RESERVED, moYeti, NODESCYET) -MONSTER( 'P', 0xC03000, "Red Raider", moPair, CF_FACE_UP | CF_RAIDER | CF_FACING, RESERVED, moYeti, "Red Raiders travel in pairs. They have promised to always watch another one's back. They are able to destroy walls on their way.") +MONSTER( 'P', 0xC03000, "Red Raider", moPair, CF_FACE_UP | CF_RAIDER | CF_FACING, RESERVED, moYeti, "Red Raiders travel in pairs. They have promised to always watch each other's backs. They are able to destroy walls on their way.") MONSTER( 'H', 0xC0C0C0, "Gray Raider", moHexDemon, CF_FACE_UP | CF_RAIDER, RESERVED, moHexDemon, "Gray Raiders never step on gray cells.") MONSTER( 'A', 0x80B080, "Green Raider", moAltDemon, CF_FACE_UP | CF_RAIDER, RESERVED, moAltDemon, "Green Raiders never step from one green cell to another.") MONSTER( 'M', 0x904000, "Brown Raider", moMonk, CF_FACE_UP | CF_RAIDER, RESERVED, moMonk, "Brown Raiders never move adjacent to an item.") @@ -665,7 +665,7 @@ ITEM( '%', 0x606060, "Black Lotus", itLotus, IC_TREASURE, ZERO, RESERVED, osNone "without preparation.\n" ) ITEM( 'o', 0x505050, "Orb of Undeath", itOrbUndeath, IC_ORB, ZERO | IF_EMPATHY | IF_SHMUPLIFE | IF_REVIVAL, RESERVED, osFriend, - "Monsters slain by you in melee are turned into friendly ghosts, " + "Monsters slain by you in melee are turned into friendly ghosts. " "Does not affect plants and friends." ) ITEM( '*', 0x8080FF, "White Dove Feather", itWindstone, IC_TREASURE, ZERO, RESERVED, osNone, @@ -733,7 +733,7 @@ ITEM( 'o', 0x900000, "Orb of Domination", itOrbDomination, IC_ORB, ZERO | IF_RAN "Simply move onto such a creature to ride them; while riding, you are protected from dangerous terrains " "and partially from attacks (they cause you to lose half of your Domination power), " "but you cannot collect items.\n\n" - /*When only one charge is left, " + /*"When only one charge is left, " "you have to dismount this turn -- be very careful to make this possible, " "as your mount could attack you immediately!\n\n" */ "While riding, " @@ -849,7 +849,7 @@ ITEM( '*', 0xFFA860, "Tiger's Eye", itBrownian, IC_TREASURE, ZERO, RESERVED, osN ITEM( '$', 0xF0C0C0, "Meteorite", itWest, IC_TREASURE, ZERO, RESERVED, osNone, "These rocks falling from the sky have been captured to fall forever in the artificial gravity. Meteorite iron is believed to be a valuable material for magical weapons.") ITEM( '*', 0x30FF30, "Torbernite", itVarTreasure, IC_TREASURE, ZERO, RESERVED, osNone, - "Crystals emiting magical radiation.") + "Crystals emitting magical radiation.") ITEM( 'o', 0x703800, "Orb of Intensity", itOrbIntensity, IC_ORB, ZERO, RESERVED, osNone, "When you have this, initial and maximal charge amounts of all Orbs are increased by 20%." ) diff --git a/geom-exp.cpp b/geom-exp.cpp index bd6bf06f..80b3384d 100644 --- a/geom-exp.cpp +++ b/geom-exp.cpp @@ -810,7 +810,7 @@ EX void showEuclideanMenu() { 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 the space of rotations of the underlying hyperbolic or spherical geometry. " + 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.") + XLAT( "This option lets you see the underlying space. Lands and some walls (e.g. in the Graveyard) are based on " diff --git a/langen.cpp b/langen.cpp index 531ececb..008077f2 100644 --- a/langen.cpp +++ b/langen.cpp @@ -31,8 +31,13 @@ const char *escape(std::string s, const std::string& dft); template struct dictionary { std::map m; void add(const std::string& s, T val) { - if(m.count(s)) add(s + " [repeat]", std::move(val)); - else m[s] = std::move(val); + auto it = m.find(s); + if (it == m.end()) { + m.emplace(s, std::move(val)); + } + else if (val != it->second) { + printf("// #warning Two translations for %s\n", escape(s, s)); + } } T& operator [] (const std::string& s) { return m[s]; } int count(const std::string& s) const { return m.count(s); } @@ -53,6 +58,12 @@ struct noun { std::string nom, nomp, acc, abl; noun() = default; noun(const noun2& n) : genus(n.genus), nom(n.nom), nomp(n.nomp), acc(n.acc), abl(n.abl) {} + friend bool operator==(const noun& a, const noun& b) { + return std::tie(a.genus, a.nom, a.nomp, a.acc, a.abl) == std::tie(b.genus, b.nom, b.nomp, b.acc, b.abl); + } + friend bool operator!=(const noun& a, const noun& b) { + return std::tie(a.genus, a.nom, a.nomp, a.acc, a.abl) != std::tie(b.genus, b.nom, b.nomp, b.acc, b.abl); + } }; dictionary nouns[NUMLAN]; @@ -93,14 +104,7 @@ typedef unsigned hashcode; hashcode hashval; -bool isrepeat(const std::string& s) { - return s.find(" [repeat]") != std::string::npos; - } - hashcode langhash(const std::string& s) { - if(isrepeat(s)) { - return langhash(s.substr(0, s.size() - 9)) + 1; - } hashcode r = 0; for (char ch : s) r = hashval * r + ch; return r; @@ -265,13 +269,11 @@ void compute_completeness(const T& dict) else mis1 += which; } - if(mis != "" && !isrepeat(elt)) + if(mis != "") printf("// #warning Missing [%s/%s]: %s\n", mis.c_str(), mis1.c_str(), escape(elt, "?")); - if(!isrepeat(elt)) { - completeness[0]++; - for(int i=1; i special modes).\n\n", "Uruchom Wycieczkę, by zrozumieć geometrię HyperRogue (menu -> tryby specjalne).\n\n") @@ -6037,7 +6037,7 @@ S("would be destroyed in %the1", "by%ł1by zniszczon%y1 %abl1") S(" to go cold", " by ostygnąć") S("%The1 is destroyed by lava!", "%The1 jest zniszczon%y1 przez lawę!") S("%The1 is killed by lava!", "%The1 jest zabit%y1 przez lawę!") -S("Run away from the lava!", "Uciekaj od lawy!") +S("Run away from the magma!", "Uciekaj od lawy!") // Terracotta Army //----------------- @@ -6535,7 +6535,7 @@ N("Chrysoberyl", GEN_O, "Chryzoberyl", "Chryzoberyle", "Chryzoberyl", "Chryzober S("Fragment of the past glory.", "Fragment dawnej chwały.") N("Red Raider", GEN_M, "Czerwony Najeźdźca", "Czerwoni Najeźdźcy", "Czerwonego Najeźdźcę", "Czerwonym Najeźdźcą") -S("Red Raiders travel in pairs. They have promised to always watch another one's back. They are able to destroy walls on their way", +S("Red Raiders travel in pairs. They have promised to always watch each other's backs. They are able to destroy walls on their way.", "Czerwoni Najeźdźcy podróżują parami. Obiecali sobie nawzajem, że zawsze będą chronić swoje tyły. Mogą niszczyć ściany na swojej drodze.") N("Gray Raider", GEN_M, "Szary Najeźdźca", "Szarzy Najeźdźcy", "Szarego Najeźdźcę", "Szarym Najeźdźcą") @@ -7429,7 +7429,7 @@ S("A large bug native to the Brown Islands. Cannot be killed easily due to their N("Acid Gull", GEN_F, "Kwaśna Mewa", "Kwaśne Mewy", "Kwaśną Mewę", "Kwaśną Mewą") -S("Where did this strange bird come from?...\n\n Acid Gulls dissolve the land on which they fall when they die. ", +S("Where did this strange bird come from?...\n\nAcid Gulls dissolve the land on which they fall when they die. ", "Skąd się wziął ten dziwny ptak?...\n\nKwaśne Mewy rozpuszczają ląd, na który spadają, gdy zostaną zabite. ") @@ -7572,7 +7572,7 @@ S( N("Torbernite", GEN_O, "Torbernit", "Torbernity", "Torbernit", "Torbernitem") -S("Crystals emiting magical radiation.", "Te kryształy emitują magiczne promieniowanie.") +S("Crystals emitting magical radiation.", "Te kryształy emitują magiczne promieniowanie.") // other things: @@ -7661,7 +7661,7 @@ S("Crystal", "Kryształ") #define Cell(x) \ S(x "-cell", x "-komórka") \ - S(x "-cell (elliptic space", x "-komórka (przestrzeń eliptyczna)") + S(x "-cell (elliptic space)", x "-komórka (przestrzeń eliptyczna)") Cell("{3,3,3} 5") Cell("{4,3,3} 8") Cell("{3,3,4} 16") Cell("{3,4,3} 24") Cell("{5,3,3} 120") Cell("{3,3,5} 600") #undef Cell diff --git a/language-ptbr.cpp b/language-ptbr.cpp index c2683101..64d8f63d 100644 --- a/language-ptbr.cpp +++ b/language-ptbr.cpp @@ -4579,7 +4579,7 @@ S("Ground level is actually an equidistant surface, " "are not about points on the ground level, but " "about the matching points on the plane P -- " "divide them by the factor above to get actual " - "distances.", + "distances.)", "Poziom podłoża jest w rzeczywistości ekwidystantną powierzchnią " "%1 jednostek pod płaszczyzną P. Teoretycznie, ta wartość " @@ -4587,7 +4587,7 @@ S("Ground level is actually an equidistant surface, " "szybciej latając powyżej poziomu podłoża, na wysokości płaszczyzny " "P -- ale nie wpływa to na mechanikę gry w żaden sposób. " "(Odległości wyświetlane przez edytor grafiki " - "dotyczą odległości między odpowiednimi punktami na płaszczyźnie P.") + "dotyczą odległości między odpowiednimi punktami na płaszczyźnie P.)") S( "If we are viewing an equidistant g absolute units below a plane, " "from a point c absolute units above the plane, this corresponds " diff --git a/language-ru.cpp b/language-ru.cpp index 0d542ec7..6f6bff25 100644 --- a/language-ru.cpp +++ b/language-ru.cpp @@ -4676,7 +4676,7 @@ S("(Distances reported by the vector graphics editor " "are not about points on the ground level, but " "about the matching points on the plane P -- " "divide them by the factor above to get actual " - "distances.", + "distances.)", "(Расстояния в редакторе векторной графики относятся" "не к точкам на поверхности, а к их проекциям на плоскость P.)") @@ -6220,7 +6220,7 @@ S("would be destroyed in %the1", "будет уничтожено %abl1") S(" to go cold", " чтобы остыть") S("%The1 is destroyed by lava!", "%1 уничтожен%E1 лавой!") S("%The1 is killed by lava!", "%1 убит%E1 лавой!") -S("Run away from the lava!", "Беги из лавы!") +S("Run away from the magma!", "Беги из лавы!") // Terracotta Army //----------------- @@ -6760,7 +6760,7 @@ N("Chrysoberyl", GEN_O, "Хризоберилл", "Хризобериллы", " S("Fragment of the past glory.", "Фрагмент былой славы.") N("Red Raider", GEN_M, "Красный Рейдер", "Красные Рейдеры", "Красного Рейдера", "Красным Рейдером") -S("Red Raiders travel in pairs. They have promised to always watch another one's back. They are able to destroy walls on their way", +S("Red Raiders travel in pairs. They have promised to always watch each other's backs. They are able to destroy walls on their way.", "Красные рейдеры путешествуют парами. Они обещали, что будут защищать спины друг друга. Они могут разрушать стены на своем пути.") N("Gray Raider", GEN_M, "Серый Рейдер", "Серые Рейдеры", "Серого Рейдера", "Серым Рейдером")