widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #12357
[Merge] lp:~widelands-dev/widelands/fix_encyclopedia into lp:widelands
kaputtnik has proposed merging lp:~widelands-dev/widelands/fix_encyclopedia into lp:widelands.
Commit message:
Fix a crash when trying to open the tribal encyclopedia
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1746035 in widelands: "Open Tribal encyclopedia causes a crash"
https://bugs.launchpad.net/widelands/+bug/1746035
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/fix_encyclopedia/+merge/336788
Fix a crash when trying to open the tribal encyclopedia
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/fix_encyclopedia into lp:widelands.
=== modified file 'data/tribes/scripting/help/immovable_help.lua'
--- data/tribes/scripting/help/immovable_help.lua 2017-11-12 16:21:28 +0000
+++ data/tribes/scripting/help/immovable_help.lua 2018-01-29 16:41:23 +0000
@@ -32,8 +32,7 @@
-- TRANSLATORS: Put 2 sentences one after the other. Languages using Chinese script probably want to lose the blank space here.
local purpose_text = pgettext("sentence_separator", "%s %s"):bformat(immovable_helptext(), immovable_helptext(tribe.name))
-
- local result = rt("image=" .. immovable_description.representative_image, p(purpose_text))
+ local result = li_image(immovable_description.representative_image, purpose_text)
-- Build cost
local buildcost = ""
@@ -45,17 +44,17 @@
-- Space required
local space_required = ""
if (immovable_description.size == "small") then
- space_required = space_required .. text_line(_"Space required:",_"Small plot","images/wui/overlays/small.png")
+ space_required = space_required .. image_line("images/wui/overlays/small.png", 1, _"Space required: " .. _"Small plot")
elseif (immovable_description.size == "medium") then
- space_required = space_required .. text_line(_"Space required:",_"Medium plot","images/wui/overlays/medium.png")
+ space_required = space_required .. image_line("images/wui/overlays/medium.png", 1, _"Space required: " .. _"Medium plot")
elseif (immovable_description.size == "big") then
- space_required = space_required .. text_line(_"Space required:",_"Big plot","images/wui/overlays/big.png")
+ space_required = space_required .. image_line("images/wui/overlays/big.png", 1, _"Space required: " .. _"Big plot")
end
if (buildcost ~= "" or space_required ~= "") then
- result = result .. rt(spacer() .. h2(_"Requirements"))
+ result = result .. h2(_"Requirements")
if (buildcost ~= "") then
- result = result .. rt(h3(_"Build cost:")) .. buildcost
+ result = result .. h3(_"Build cost:") .. buildcost
end
result = result .. space_required
end
@@ -64,7 +63,7 @@
local affinity = immovable_description.terrain_affinity
if (affinity ~= nil) then
include "scripting/help.lua"
- result = result .. rt(h2(_"Preferred Terrains"))
+ result = result .. h2(_"Preferred Terrains")
result = result .. terrain_affinity_help(immovable_description)
end
Follow ups