GunChleoc has proposed merging lp:~widelands-dev/widelands/string-fixes into lp:widelands.
Commit message: Fixed issues with trailing whitespaces in translatable strings, because they lead to translation mistakes - Using localize_list in artifacts.lua. - Got rid of trailing whitespace in _"Spare required: " string and added it back into the UI. Requested reviews: Widelands Developers (widelands-dev) Related bugs: Bug #1421942 in widelands: "Unified term for "Black" and "Wasteland"" https://bugs.launchpad.net/widelands/+bug/1421942 Bug #1487887 in widelands: "Translation missing in editor and in replay tooltip" https://bugs.launchpad.net/widelands/+bug/1487887 Bug #1530240 in widelands: "wrong text in the tribal encyclopedia for the battle ax" https://bugs.launchpad.net/widelands/+bug/1530240 Bug #1530398 in widelands: "Wrong text above marble mine" https://bugs.launchpad.net/widelands/+bug/1530398 Bug #1547909 in widelands: "Some strings in the editor cannot be translated" https://bugs.launchpad.net/widelands/+bug/1547909 For more details, see: https://code.launchpad.net/~widelands-dev/widelands/string-fixes/+merge/342037 -- Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/string-fixes into lp:widelands.
=== modified file 'data/scripting/richtext.lua' --- data/scripting/richtext.lua 2018-03-15 02:38:55 +0000 +++ data/scripting/richtext.lua 2018-03-24 14:10:55 +0000 @@ -516,7 +516,7 @@ -- -- :arg items: An array of strings -- :arg listtype: The type of concatenation to use. --- Legal values are "&", "and", "or", and ";" +-- Legal values are "&", "and", "or", and "," -- :arg former_textdomain: The textdomain to restore after running this function. -- :returns: The concatenated list string, using localized concatenation operators. -- === modified file 'data/scripting/win_conditions/artifacts.lua' --- data/scripting/win_conditions/artifacts.lua 2017-05-12 11:30:43 +0000 +++ data/scripting/win_conditions/artifacts.lua 2018-03-24 14:10:55 +0000 @@ -134,16 +134,11 @@ local max_artifacts = _max(artifacts_per_team) local function _get_member_names(t) - local s = "" + local membernames = {} for idx, plr in ipairs(t) do - if s == "" then - s = plr.name - else - -- TRANSLATORS: This is used to seperate players’ names in a list, e.g. "Steve, Robert, David" - s = s .. _", " .. plr.name - end + table.insert(membernames, plr.name) end - return s + return localize_list(membernames, ",", "win_conditions") end local teams = {} === modified file 'data/tribes/scripting/help/building_help.lua' --- data/tribes/scripting/help/building_help.lua 2018-01-10 16:21:50 +0000 +++ data/tribes/scripting/help/building_help.lua 2018-03-24 14:10:55 +0000 @@ -15,24 +15,6 @@ -- ======================================================= -- RST --- .. function:: building_section_line(header, text, image) --- --- Creates a line of h3 formatted text followed by normal text and an image. --- --- :arg t1: header text. --- :arg t2: in-line paragraphs text. --- :arg image: image to be aligned right. --- :returns: header followed by normal text and image. --- -function building_section_line(header, text, image) - return - div("width=100%", - div("width=50%", p_font("size=13 color=D1D1D1", vspace(6) .. text .. space(6))) .. - div("width=*", p("align=right", vspace(6) .. img(image) .. vspace(12))) - ) -end - --- RST -- .. function:: dependencies_basic(images[, text = nil]) -- -- Creates a dependencies line of any length. @@ -460,16 +442,16 @@ -- Space required if (building_description.is_mine) then - result = result .. building_section_line(_"Space required:",_"Mine plot","images/wui/overlays/mine.png") + result = result .. plot_size_line(_"Space required:",_"Mine plot","images/wui/overlays/mine.png") elseif (building_description.is_port) then - result = result .. building_section_line(_"Space required:",_"Port plot","images/wui/overlays/port.png") + result = result .. plot_size_line(_"Space required:",_"Port plot","images/wui/overlays/port.png") else if (building_description.size == "small") then - result = result .. building_section_line(_"Space required:",_"Small plot","images/wui/overlays/small.png") + result = result .. plot_size_line(_"Space required:",_"Small plot","images/wui/overlays/small.png") elseif (building_description.size == "medium") then - result = result .. building_section_line(_"Space required:",_"Medium plot","images/wui/overlays/medium.png") + result = result .. plot_size_line(_"Space required:",_"Medium plot","images/wui/overlays/medium.png") elseif (building_description.size == "big") then - result = result .. building_section_line(_"Space required:",_"Big plot","images/wui/overlays/big.png") + result = result .. plot_size_line(_"Space required:",_"Big plot","images/wui/overlays/big.png") else result = result .. p(_"Space required:" .. _"Unknown") end === modified file 'data/tribes/scripting/help/format_help.lua' --- data/tribes/scripting/help/format_help.lua 2018-02-25 11:29:14 +0000 +++ data/tribes/scripting/help/format_help.lua 2018-03-24 14:10:55 +0000 @@ -37,6 +37,24 @@ ) end +-- RST +-- .. function:: plot_size_line(header, text, image) +-- +-- Creates a line of header colored text, followed by normal text and an image. +-- +-- :arg t1: header text. +-- :arg t2: in-line paragraphs text. +-- :arg image: image to be aligned right. +-- :returns: header followed by normal text and image. +-- +function plot_size_line(header, text, image) + return + div("width=100%", + div("float=right padding_l=6", p(img(image))) .. + p(join_sentences(font("size=13 color=D1D1D1", header), text)) + ) +end + -- ======================================================= -- ********** Helper functions for dependencies ********** === modified file 'data/tribes/scripting/help/immovable_help.lua' --- data/tribes/scripting/help/immovable_help.lua 2018-01-29 16:38:16 +0000 +++ data/tribes/scripting/help/immovable_help.lua 2018-03-24 14:10:55 +0000 @@ -44,11 +44,11 @@ -- Space required local space_required = "" if (immovable_description.size == "small") then - space_required = space_required .. image_line("images/wui/overlays/small.png", 1, _"Space required: " .. _"Small plot") + space_required = space_required .. plot_size_line(_"Space required:",_"Small plot","images/wui/overlays/small.png") elseif (immovable_description.size == "medium") then - space_required = space_required .. image_line("images/wui/overlays/medium.png", 1, _"Space required: " .. _"Medium plot") + space_required = space_required .. plot_size_line(_"Space required:",_"Medium plot","images/wui/overlays/medium.png") elseif (immovable_description.size == "big") then - space_required = space_required .. image_line("images/wui/overlays/big.png", 1, _"Space required: " .. _"Big plot") + space_required = space_required .. plot_size_line(_"Space required:",_"Big plot","images/wui/overlays/big.png") end if (buildcost ~= "" or space_required ~= "") then
_______________________________________________ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp