Merge lp:~hjd/widelands/bug682405 into lp:widelands

Proposed by Hans Joachim Desserud
Status: Rejected
Rejected by: Hans Joachim Desserud
Proposed branch: lp:~hjd/widelands/bug682405
Merge into: lp:widelands
Diff against target: 57 lines (+9/-5)
3 files modified
src/editor/editorinteractive.cc (+2/-2)
src/logic/editor_game_base.cc (+1/-1)
src/logic/worker.cc (+6/-2)
To merge this branch: bzr merge lp:~hjd/widelands/bug682405
Reviewer Review Type Date Requested Status
SirVer Needs Fixing
Review via email: mp+42095@code.launchpad.net

Description of the change

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?

To post a comment you must log in.
Revision history for this message
SirVer (sirver) wrote :

The *.pot files are generated by utils/buildcat.py by grepping through the source code, lua files and conf files. Your manual changes will be lost.

the resources names should be taken from the worlds catalog and the tribe names should be taken from the tribes catalog, your fix will likely search for them in the widelands catalog.

Also the tribe name displayed to the user should likely be the descr_name() of the tribe, not it's internal name; maybe that's what get_all_tribenames() does. Maybe get_all_tribenames() is also a good place to do the i18n stuff, but it's usage must be checked; maybe it is used elsewhere.

review: Needs Fixing
Revision history for this message
Nicolai Hähnle (nha) wrote :

What's the status of this merge? It seems to have been idle for two months now.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Hi Nicolai. You're right, this has not been touched for a while, and current status is best described as "no longer worked on". As I commented in the bug report (see bug 682405 for elaborate explanation), this turned out to be harder than I first imagined, and while I have tried a few approaches I haven't really gotten any further since last commit.

I changed the bug report from "In progress" in case others wish to work on this, but I should probably have cleaned up this branch as well. Sorry about that. I'll set the branch to abandoned at least, and see if that removes it from the list of active reviews. The review itself doesn't seem to have a status describing the same, so I hope that will be enough.

Revision history for this message
Nicolai Hähnle (nha) wrote :

Don't feel bad about it, given time I'm sure this can be resolved eventually. Most importantly, thank you for the update.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Set status to Rejected to keep it from appearing in the list of active reviews.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/editor/editorinteractive.cc'
2--- src/editor/editorinteractive.cc 2010-11-01 22:30:23 +0000
3+++ src/editor/editorinteractive.cc 2010-11-29 12:02:22 +0000
4@@ -167,7 +167,7 @@
5 std::vector<std::string> tribenames;
6 Widelands::Tribe_Descr::get_all_tribenames(tribenames);
7 container_iterate_const(std::vector<std::string>, tribenames, i) {
8- loader_ui.stepf(_("Loading tribe: %s"), i.current->c_str());
9+ loader_ui.stepf(_("Loading tribe: %s"), _(i.current->c_str()));
10 egbase().manually_load_tribe(*i.current);
11 }
12 }
13@@ -572,7 +572,7 @@
14 Widelands::Tribe_Descr::get_all_tribenames(tribenames);
15 container_iterate_const(std::vector<std::string>, tribenames, i)
16 {
17- loader_ui.stepf(_("Loading tribe: %s"), i.current->c_str());
18+ loader_ui.stepf(_("Loading tribe: %s"), _(i.current->c_str()));
19 editor.manually_load_tribe(*i.current);
20 }
21 }
22
23=== modified file 'src/logic/editor_game_base.cc'
24--- src/logic/editor_game_base.cc 2010-11-21 11:44:22 +0000
25+++ src/logic/editor_game_base.cc 2010-11-29 12:02:22 +0000
26@@ -331,7 +331,7 @@
27 m_map->load_graphics(); // especially loads world data
28
29 container_iterate_const(Tribe_Vector, m_tribes, i) {
30- loader_ui.stepf(_("Loading tribe: %s"), (*i.current)->name().c_str());
31+ loader_ui.stepf(_("Loading tribe: %s"), _((*i.current)->name().c_str()));
32 (*i.current)->load_graphics();
33 }
34
35
36=== modified file 'src/logic/worker.cc'
37--- src/logic/worker.cc 2010-11-21 11:44:22 +0000
38+++ src/logic/worker.cc 2010-11-29 12:02:22 +0000
39@@ -589,13 +589,17 @@
40 building.send_message
41 (game,
42 "mine",
43- _("Out of ") + res_type,
44+ std::string
45+ (_
46+ ("Out of "))
47+ +
48+ _(res_type),
49 std::string
50 (_
51 ("The worker of this building cannot find any more resources "
52 "of the following type: "))
53 +
54- res_type,
55+ _(res_type),
56 1800000, 0);
57 }
58

Subscribers

People subscribed via source and target branches

to status/vote changes: