← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1807701_string_fixes into lp:widelands

 

kaputtnik has proposed merging lp:~widelands-dev/widelands/bug-1807701_string_fixes into lp:widelands.

Commit message:
Various stringfixes. Allow translation of 'and many, many more...' in developers list.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1807701 in widelands: "Extraneous TRANSLATORS comment"
  https://bugs.launchpad.net/widelands/+bug/1807701

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1807701_string_fixes/+merge/360968

Some small string fixes.

Make the string 'and many, many more...' translatable by splitting it off from header 'Other' and make it an extra key 'epilog'. This will then show up like shown in https://bugs.launchpad.net/widelands/+bug/1807701/+attachment/5221736/+files/dvelopers.png

This needs also changes to the website code. So this branch should only be merged after the branch for the website was merged: https://code.launchpad.net/~widelands-dev/widelands-website/bug-1807701_string_fixes_website
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1807701_string_fixes into lp:widelands.
=== modified file 'data/txts/AUTHORS.lua'
--- data/txts/AUTHORS.lua	2017-12-19 18:05:43 +0000
+++ data/txts/AUTHORS.lua	2018-12-15 11:27:10 +0000
@@ -8,14 +8,19 @@
    local authors = developers()
    local result = ""
    for i, category in ipairs(authors) do
-      result = result .. h1_authors(category["heading"])
-      for j, entry in ipairs(category["entries"])  do
-         if (entry["subheading"] ~= nil) then
-            result = result .. h2_authors(entry["subheading"])
-         end
-         for k, member in ipairs(entry["members"])  do
-            result = result .. p(img(category["image"]) .. " " .. member)
-         end
+      if category['heading'] then
+         result = result .. h1_authors(category["heading"])
+         for j, entry in ipairs(category["entries"])  do
+            if (entry["subheading"] ~= nil) then
+               result = result .. h2_authors(entry["subheading"])
+            end
+            for k, member in ipairs(entry["members"])  do
+               result = result .. p(img(category["image"]) .. " " .. member)
+            end
+         end
+      end
+      if category['epilog'] then
+         result = result .. b(category['epilog'])
       end
       result = result .. p(vspace(6))
    end

=== modified file 'data/txts/README.lua'
--- data/txts/README.lua	2018-02-28 09:53:42 +0000
+++ data/txts/README.lua	2018-12-15 11:27:10 +0000
@@ -22,7 +22,7 @@
 
       h2(_"Reporting Bugs") ..
       p(_"If you encounter a bug, please report it to our bugtracker:") ..
-      p(a("widelands.org/wiki/ReportingBugs]")) ..
+      p(a("widelands.org/wiki/ReportingBugs")) ..
       p(_"Please provide enough background information. Tell us:") ..
       p(
           li(_"Detailed steps on how to trigger the bug, if possible.") ..

=== modified file 'data/txts/developers.json'
--- data/txts/developers.json	2018-10-12 17:15:47 +0000
+++ data/txts/developers.json	2018-12-15 11:27:10 +0000
@@ -392,11 +392,13 @@
 					"members":[
 						"Matt Howe (mdhowe)",
 						"Samuel Tilly (eldamar)",
-						"WorldSavior",
-						"and many, many more (thank you for everything you've done)"
+						"WorldSavior"
 					]
 				}
 			]
+		},
+		{
+			"epilog": "and many, many more (thank you for everything you've done)"
 		}
 	]
 }

=== modified file 'data/txts/developers.lua'
--- data/txts/developers.lua	2018-10-26 05:29:19 +0000
+++ data/txts/developers.lua	2018-12-15 11:27:10 +0000
@@ -1,3 +1,3 @@
 -- Do not edit this file - it is automatically generated
 -- by utils/update_authors.py from developers.json.
-function developers() return {{heading = _"Chieftains",image = "images/players/genstats_player.png",entries = {{members = {"GunChleoc (Since 2016)","Holger Rapp (SirVer) (2001 – 2016)",},},},},{heading = _"Elders",image = "images/players/genstats_player.png",entries = {{subheading = _"Graphics",members = {"Chuck Wilder (chuckw)",},},{subheading = _"Homepage",members = {"Markus Pfitzner (janus)",},},{subheading = _"Sound",members = {"Jan Bruns (solatis)",},},{subheading = _"Tongues",members = {"GunChleoc",},},},},{heading = _"Coders",image = "images/wui/stats/genstats_nrwares.png",entries = {{members = {"Holger Rapp (SirVer)","Nicolai Hähnle (ixprefect)","Florian Bluemel","Florian Falkner (foldrian)","Florian Weber (Bedouin)","Philipp Engelhard","Stefan Boettner","Tron","Martin Quinson","Raul Ferriz","Willem Jan Palenstijn","Josef Spillner","Christof Petig","Erik Sigra (sigra)","Nanne Wams","Surgery","Andrius R. (knutux)","Jari Hautio (jarih)","Peter Schwanemann (Nasenbaer)","Victor Pelt (Dwarik)","Axel Gehlert (dunkelbrauer)","András Eisenberger (Kiscsirke)","Andi","Timo","Hannes","TimoW","Jens Beyer (Qcumber-some)","Andreas Breitschopp (ab-tools)","Joachim Breitner (nomeata)","Nizamov Shawkat","Carl-Philip Hänsch (carli)","Martin Prussak (martin)","David Allwicher (aber)","Nathan Peters (nathanpeters)","Leif Sandstede (lcsand)","Matthias Horne (shevonar)","Borim (borim)","Angelo Locritani (alocritani)","Gabriel Margiani (gamag)","Anthony J. Bentley (anthonyjbentley)","Peter Waller (iri)","Johannes Ebke (sirius-in4matiker)","Andreas Eriksson","Mark Scott","Teppo Mäenpää","Steven De Herdt (stdh)","Charly Ghislain (cghislai)","Tino Miegel (TinoM)","Tibor Bamhor (tiborb95)","GunChleoc","Ferdinand Thiessen (f-thiessen)","Willy Scheibel (willyscheibel)","Martin Schmidt (mars)","Simon Eilting","Alexander Kartzow (daAlx1)","Łukasz Majcher","Paul Mehrer (meitis)","Miroslav Remák (MiroslavR)","Janosch Peters","Klaus Halfmann (Hasi50)","Philipp Klaus Krause (PkK)","Notabilis","Jukka Pakarinen","Evgeny Kapun","ypopezios","Toni Förster (stonerl)","Arty","Benedikt Straub (Nordfriese)",},},},},{heading = _"Graphicians",image = "images/wui/stats/genstats_nrbuildings.png",entries = {{members = {"Albert Jasiowka","Holger Rapp (SirVer)","Marz","Philipp Engelhard","Yannick Warnier","Delia","Florian Neuerburg","Jerome Rosinski","Mats Olsson","Odin Omdal","Wolfgang Weidner","Andreas Baier","Juri Chomé","Toralf Bethke (bithunter32)","Peter Schwanemann (Nasenbaer)","Alexia Death","Repsa Jih","Geoffroy Schmitlin (Trimard)","Benedikt Freisen (Objpaswriter)","Stefano Guidoni (Ilguido)","Samith Sandanayake (samithdisal)","Chuck Wilder (chuckw)","Astuur","Gerrit Familiegrosskopf (kingcreole)","Florian Angermeier (fraang)","DragonAtma","Benedikt Straub (Nordfriese)",},},},},{heading = _"Musicians",image = "images/wui/overlays/workarea123.png",entries = {{members = {"Kristian","MiddleFinger","Valerio Orlandini (Symbiosis)","Barry van Oudtshoorn (barryvan)","Jan Bruns (Solatis)","Nikola Whallon (Saturn)","Joshua O'Leary (Joshun)","Klaus Halfmann (Hasi50)","Stuart Marshall",},},},},{heading = _"Sound Effects",image = "images/wui/overlays/workarea123.png",entries = {{members = {"Stefan de Konik","Peter Schwanemann (Nasenbaer)","Stephan","Adam Piggott (_aD)","Stanisław Gackowski (Soeb)","Tada",},},},},{heading = _"Maps and Missions",image = "images/wui/stats/genstats_landsize.png",entries = {{members = {"Michal Szopa (Winterwind)","Jan-Henrik Kluth (Isch)","Peter Schwanemann (Nasenbaer)","Sven (deviant)","Tuxlands","Kamil Wilczek (Another Barbarian)","Tarvo Reim (Tarrei)","Manuel Holzmeier (Quappo)","ivh","Hanna Podewski (kristin)","Teppo Mäenpää","fk","Einstein13","Jenia","Robnick","wl-zocker","king of nowhere","kaputtnik","Stephan Lutz (hessenfarmer)","Benedikt Straub (Nordfriese)",},},},},{heading = _"Campaign Story",image = "images/ui_basic/ls_wlmap.png",entries = {{subheading = _"Barbarians",members = {"Bastian Rapp","Alexander Kahl (wolfpac)","Peter Schwanemann (Nasenbaer)",},},{subheading = _"Empire",members = {"Peter Schwanemann (Nasenbaer)","Stephan Lutz (hessenfarmer)",},},{subheading = _"Atlanteans",members = {"Holger Rapp (SirVer)","Peter Schwanemann (Nasenbaer)",},},{subheading = _"Frisians",members = {"Benedikt Straub (Nordfriese)",},},},},{heading = _"Packagers",image = "images/wui/stats/genstats_productivity.png",entries = {{subheading = _"Debian Linux",members = {"Martin Quinson",},},{subheading = _"Fedora Linux",members = {"Karol Trzcionka","Jochen Wiedmann",},},{subheading = _"Mandriva Linux",members = {"Emmanuel Andry (eandry)",},},{subheading = _"FreeBSD",members = {"Bartosz Fabianowski",},},{subheading = _"Mac OS X",members = {"Holger Rapp (SirVer)","Philipp Engelhard","Pierre Salagnac (Tarou)","Wolf St. Kappesser","David Allwicher (aber)","Toni Förster (stonerl)",},},{subheading = _"Windows",members = {"Tino Miegel (TinoM)","Alexander Kahl (Wolfpac)","Geodomus","Jari Hautio",},},{subheading = _"ZetaOS",members = {"BeSman",},},},},{heading = _"Homepage",image = "images/logos/WL-Editor-16.png",entries = {{subheading = _"Homepage Coders",members = {"Holger Rapp (SirVer)","Stanislaw Gackowski (Soeb)","Markus Pfitzner (janus)","Tobi","kaputtnik",},},{subheading = _"Documentation, Help and Wiki",members = {"Erik Sigra (sigra)","Florian Falkner (foldrian)","Florian Weber (bedouin)","Nicolai Haehnle","Holger Rapp (SirVer)","Johannes (nuefke)","Alexander Kahl (wolfpac)","Stanislaw Gackowski (Soeb)","Hanna Podewski (kristin)","king of nowhere","GunChleoc",},},},},{heading = _"Former Elders",image = "images/players/genstats_player.png",entries = {{subheading = _"Graphics",members = {"Salamander","Alexia Death (death)",},},{subheading = _"Homepage",members = {"holymoly","Stuart Eglington (DaaL1973)","Jon Harris (jonsjava)",},},{subheading = _"Sound",members = {"Yannick Warnier",},},{subheading = _"Translation",members = {"Peter Schwanemann (Nasenbaer)","Philipp Niemann (Azagtoth)",},},},},{heading = _"Other",image = "images/wui/stats/genstats_landsize.png",entries = {{members = {"Matt Howe (mdhowe)","Samuel Tilly (eldamar)","WorldSavior","and many, many more (thank you for everything you've done)",},},},},} end
+function developers() return {{heading = _"Chieftains",image = "images/players/genstats_player.png",entries = {{members = {"GunChleoc (Since 2016)","Holger Rapp (SirVer) (2001 – 2016)",},},},},{heading = _"Elders",image = "images/players/genstats_player.png",entries = {{subheading = _"Graphics",members = {"Chuck Wilder (chuckw)",},},{subheading = _"Homepage",members = {"Markus Pfitzner (janus)",},},{subheading = _"Sound",members = {"Jan Bruns (solatis)",},},{subheading = _"Tongues",members = {"GunChleoc",},},},},{heading = _"Coders",image = "images/wui/stats/genstats_nrwares.png",entries = {{members = {"Holger Rapp (SirVer)","Nicolai Hähnle (ixprefect)","Florian Bluemel","Florian Falkner (foldrian)","Florian Weber (Bedouin)","Philipp Engelhard","Stefan Boettner","Tron","Martin Quinson","Raul Ferriz","Willem Jan Palenstijn","Josef Spillner","Christof Petig","Erik Sigra (sigra)","Nanne Wams","Surgery","Andrius R. (knutux)","Jari Hautio (jarih)","Peter Schwanemann (Nasenbaer)","Victor Pelt (Dwarik)","Axel Gehlert (dunkelbrauer)","András Eisenberger (Kiscsirke)","Andi","Timo","Hannes","TimoW","Jens Beyer (Qcumber-some)","Andreas Breitschopp (ab-tools)","Joachim Breitner (nomeata)","Nizamov Shawkat","Carl-Philip Hänsch (carli)","Martin Prussak (martin)","David Allwicher (aber)","Nathan Peters (nathanpeters)","Leif Sandstede (lcsand)","Matthias Horne (shevonar)","Borim (borim)","Angelo Locritani (alocritani)","Gabriel Margiani (gamag)","Anthony J. Bentley (anthonyjbentley)","Peter Waller (iri)","Johannes Ebke (sirius-in4matiker)","Andreas Eriksson","Mark Scott","Teppo Mäenpää","Steven De Herdt (stdh)","Charly Ghislain (cghislai)","Tino Miegel (TinoM)","Tibor Bamhor (tiborb95)","GunChleoc","Ferdinand Thiessen (f-thiessen)","Willy Scheibel (willyscheibel)","Martin Schmidt (mars)","Simon Eilting","Alexander Kartzow (daAlx1)","Łukasz Majcher","Paul Mehrer (meitis)","Miroslav Remák (MiroslavR)","Janosch Peters","Klaus Halfmann (Hasi50)","Philipp Klaus Krause (PkK)","Notabilis","Jukka Pakarinen","Evgeny Kapun","ypopezios","Toni Förster (stonerl)","Arty","Benedikt Straub (Nordfriese)",},},},},{heading = _"Graphicians",image = "images/wui/stats/genstats_nrbuildings.png",entries = {{members = {"Albert Jasiowka","Holger Rapp (SirVer)","Marz","Philipp Engelhard","Yannick Warnier","Delia","Florian Neuerburg","Jerome Rosinski","Mats Olsson","Odin Omdal","Wolfgang Weidner","Andreas Baier","Juri Chomé","Toralf Bethke (bithunter32)","Peter Schwanemann (Nasenbaer)","Alexia Death","Repsa Jih","Geoffroy Schmitlin (Trimard)","Benedikt Freisen (Objpaswriter)","Stefano Guidoni (Ilguido)","Samith Sandanayake (samithdisal)","Chuck Wilder (chuckw)","Astuur","Gerrit Familiegrosskopf (kingcreole)","Florian Angermeier (fraang)","DragonAtma","Benedikt Straub (Nordfriese)",},},},},{heading = _"Musicians",image = "images/wui/overlays/workarea123.png",entries = {{members = {"Kristian","MiddleFinger","Valerio Orlandini (Symbiosis)","Barry van Oudtshoorn (barryvan)","Jan Bruns (Solatis)","Nikola Whallon (Saturn)","Joshua O'Leary (Joshun)","Klaus Halfmann (Hasi50)","Stuart Marshall",},},},},{heading = _"Sound Effects",image = "images/wui/overlays/workarea123.png",entries = {{members = {"Stefan de Konik","Peter Schwanemann (Nasenbaer)","Stephan","Adam Piggott (_aD)","Stanisław Gackowski (Soeb)","Tada",},},},},{heading = _"Maps and Missions",image = "images/wui/stats/genstats_landsize.png",entries = {{members = {"Michal Szopa (Winterwind)","Jan-Henrik Kluth (Isch)","Peter Schwanemann (Nasenbaer)","Sven (deviant)","Tuxlands","Kamil Wilczek (Another Barbarian)","Tarvo Reim (Tarrei)","Manuel Holzmeier (Quappo)","ivh","Hanna Podewski (kristin)","Teppo Mäenpää","fk","Einstein13","Jenia","Robnick","wl-zocker","king of nowhere","kaputtnik","Stephan Lutz (hessenfarmer)","Benedikt Straub (Nordfriese)",},},},},{heading = _"Campaign Story",image = "images/ui_basic/ls_wlmap.png",entries = {{subheading = _"Barbarians",members = {"Bastian Rapp","Alexander Kahl (wolfpac)","Peter Schwanemann (Nasenbaer)",},},{subheading = _"Empire",members = {"Peter Schwanemann (Nasenbaer)","Stephan Lutz (hessenfarmer)",},},{subheading = _"Atlanteans",members = {"Holger Rapp (SirVer)","Peter Schwanemann (Nasenbaer)",},},{subheading = _"Frisians",members = {"Benedikt Straub (Nordfriese)",},},},},{heading = _"Packagers",image = "images/wui/stats/genstats_productivity.png",entries = {{subheading = _"Debian Linux",members = {"Martin Quinson",},},{subheading = _"Fedora Linux",members = {"Karol Trzcionka","Jochen Wiedmann",},},{subheading = _"Mandriva Linux",members = {"Emmanuel Andry (eandry)",},},{subheading = _"FreeBSD",members = {"Bartosz Fabianowski",},},{subheading = _"Mac OS X",members = {"Holger Rapp (SirVer)","Philipp Engelhard","Pierre Salagnac (Tarou)","Wolf St. Kappesser","David Allwicher (aber)","Toni Förster (stonerl)",},},{subheading = _"Windows",members = {"Tino Miegel (TinoM)","Alexander Kahl (Wolfpac)","Geodomus","Jari Hautio",},},{subheading = _"ZetaOS",members = {"BeSman",},},},},{heading = _"Homepage",image = "images/logos/WL-Editor-16.png",entries = {{subheading = _"Homepage Coders",members = {"Holger Rapp (SirVer)","Stanislaw Gackowski (Soeb)","Markus Pfitzner (janus)","Tobi","kaputtnik",},},{subheading = _"Documentation, Help and Wiki",members = {"Erik Sigra (sigra)","Florian Falkner (foldrian)","Florian Weber (bedouin)","Nicolai Haehnle","Holger Rapp (SirVer)","Johannes (nuefke)","Alexander Kahl (wolfpac)","Stanislaw Gackowski (Soeb)","Hanna Podewski (kristin)","king of nowhere","GunChleoc",},},},},{heading = _"Former Elders",image = "images/players/genstats_player.png",entries = {{subheading = _"Graphics",members = {"Salamander","Alexia Death (death)",},},{subheading = _"Homepage",members = {"holymoly","Stuart Eglington (DaaL1973)","Jon Harris (jonsjava)",},},{subheading = _"Sound",members = {"Yannick Warnier",},},{subheading = _"Translation",members = {"Peter Schwanemann (Nasenbaer)","Philipp Niemann (Azagtoth)",},},},},{heading = _"Other",image = "images/wui/stats/genstats_landsize.png",entries = {{members = {"Matt Howe (mdhowe)","Samuel Tilly (eldamar)","WorldSavior",},},},},{epilog = _"and many, many more (thank you for everything you've done)"},} end

=== modified file 'data/world/terrains/init.lua'
--- data/world/terrains/init.lua	2018-11-03 11:14:46 +0000
+++ data/world/terrains/init.lua	2018-12-15 11:27:10 +0000
@@ -79,7 +79,6 @@
 --        *Optional*. Additional custom tooltip entries, e.g.::
 --
 --            tooltips = {
---               -- TRANSLATORS: This is an entry in a terrain tooltip. Try to use 1 word if possible.
 --               _"likes trees",
 --            },
 --

=== modified file 'utils/update_authors.py'
--- utils/update_authors.py	2016-12-03 16:08:18 +0000
+++ utils/update_authors.py	2018-12-15 11:27:10 +0000
@@ -120,6 +120,7 @@
 
 source_file = open(source_path + '/developers.json', 'r')
 developers = json.load(source_file)['developers']
+source_file.close()
 
 lua_string = """-- Do not edit this file - it is automatically generated
 -- by utils/update_authors.py from developers.json.
@@ -127,8 +128,8 @@
 lua_string += 'function developers() return {'  # developers
 
 for category in developers:
-    print('- Adding ' + category['heading'])
-    if category['heading'] != 'Translators':  # Unused hook for adding translators
+    if 'heading' in category and category['heading'] != 'Translators':  # Unused hook for adding translators
+        print('- Adding ' + category['heading'])
         lua_string += '{'  # category
         lua_string += 'heading = _"' + \
             category['heading'] + '",'  # This will be localized
@@ -149,8 +150,15 @@
 
             lua_string += '},'  # entry
         lua_string += '},'  # entries
-
         lua_string += '},'  # category
+
+    if 'epilog' in category:
+        lua_string += '{'  # epilog
+        lua_string += 'epilog = _"' +\
+            category['epilog'] +'"'
+        lua_string += '},'
+
+
 lua_string += '} end\n'  # developers
 
 print('Writing developers')
@@ -158,4 +166,5 @@
 dest_filepath = source_path + '/' + dest_filename
 dest_file = codecs.open(dest_filepath, encoding='utf-8', mode='w')
 dest_file.write(lua_string)
+dest_file.close()
 print('Done.')


Follow ups