widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #00192
[Merge] lp:~hjd/widelands/bug682405 into lp:widelands
Hans Joachim Desserud has proposed merging lp:~hjd/widelands/bug682405 into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
#682405 Some variables are not translatable
https://bugs.launchpad.net/bugs/682405
Note:this is more of a request for feedback/code review than an actual merge proposal.
-In the message a user receives when a quarry or fisher's hut run out of stone/fish, the resource name has been made translatable.
-When loading a map, the the tribe names are also translatable.
I have currently not uploaded the changes I have done to the po/widelands/widelands.pot file, as I am not quite sure how they should be handled. Currently I have manually edited the .pot-file and added the msgid/msgstr, to check that the variables are indeed translatable. However, I'm not sure exactly how the .pot-files are generated, and wonder if my manual changes would remain when they are regenerated. What is the best way to handle this?
--
https://code.launchpad.net/~hjd/widelands/bug682405/+merge/42095
Your team Widelands Developers is requested to review the proposed merge of lp:~hjd/widelands/bug682405 into lp:widelands.
=== modified file 'src/editor/editorinteractive.cc'
--- src/editor/editorinteractive.cc 2010-11-01 22:30:23 +0000
+++ src/editor/editorinteractive.cc 2010-11-29 12:02:22 +0000
@@ -167,7 +167,7 @@
std::vector<std::string> tribenames;
Widelands::Tribe_Descr::get_all_tribenames(tribenames);
container_iterate_const(std::vector<std::string>, tribenames, i) {
- loader_ui.stepf(_("Loading tribe: %s"), i.current->c_str());
+ loader_ui.stepf(_("Loading tribe: %s"), _(i.current->c_str()));
egbase().manually_load_tribe(*i.current);
}
}
@@ -572,7 +572,7 @@
Widelands::Tribe_Descr::get_all_tribenames(tribenames);
container_iterate_const(std::vector<std::string>, tribenames, i)
{
- loader_ui.stepf(_("Loading tribe: %s"), i.current->c_str());
+ loader_ui.stepf(_("Loading tribe: %s"), _(i.current->c_str()));
editor.manually_load_tribe(*i.current);
}
}
=== modified file 'src/logic/editor_game_base.cc'
--- src/logic/editor_game_base.cc 2010-11-21 11:44:22 +0000
+++ src/logic/editor_game_base.cc 2010-11-29 12:02:22 +0000
@@ -331,7 +331,7 @@
m_map->load_graphics(); // especially loads world data
container_iterate_const(Tribe_Vector, m_tribes, i) {
- loader_ui.stepf(_("Loading tribe: %s"), (*i.current)->name().c_str());
+ loader_ui.stepf(_("Loading tribe: %s"), _((*i.current)->name().c_str()));
(*i.current)->load_graphics();
}
=== modified file 'src/logic/worker.cc'
--- src/logic/worker.cc 2010-11-21 11:44:22 +0000
+++ src/logic/worker.cc 2010-11-29 12:02:22 +0000
@@ -589,13 +589,17 @@
building.send_message
(game,
"mine",
- _("Out of ") + res_type,
+ std::string
+ (_
+ ("Out of "))
+ +
+ _(res_type),
std::string
(_
("The worker of this building cannot find any more resources "
"of the following type: "))
+
- res_type,
+ _(res_type),
1800000, 0);
}