help: Borrow "Lawful Bonus" translation from wesnoth-lib

Again, no-one marked this one as translatable.
This commit is contained in:
Iris Morelle 2018-03-31 06:45:03 -03:00
parent e9105ab8a7
commit 161d17bdb2
2 changed files with 10 additions and 2 deletions

View file

@ -17,7 +17,7 @@
* Fixed "Search" placeholder text in dialog item filters not being
translatable (bug #2709, bug #2732).
* Fixed "Time of Day Schedule" heading for the index for the ToD Schedule
top-level help section not being translatable.
top-level help section, and "Lawful Bonus" labels not being translatable.
* Updated translations: British English, Chinese (Simplified),
Scottish Gaelic, Spanish, Ukrainian
### Miscellaneous and bug fixes

View file

@ -375,6 +375,14 @@ std::vector<topic> generate_time_of_day_topics(const bool /*sort_generated*/)
topics.emplace_back(tod_schedule_heading, "..schedule", toplevel.str());
return topics;
}
// HACK: Wesnoth 1.14 only, to avoid breaking a string freeze in the middle
// of the RC phase. The string already exists in the wesnoth-lib
// textdomain and it's used for a similar purpose in the Editor UI.
// Future versions will just use the regular textdomain for this file.
const std::string& lawful_bonus_label =
translation::dsgettext("wesnoth-lib", "Lawful Bonus:");
const std::vector<time_of_day>& times = resources::tod_manager->times();
for (const time_of_day& time : times)
{
@ -387,7 +395,7 @@ std::vector<topic> generate_time_of_day_topics(const bool /*sort_generated*/)
text << image << '\n' <<
time.description.str() << '\n' <<
"Lawful Bonus: " << time.lawful_bonus << '\n' <<
lawful_bonus_label << ' ' << time.lawful_bonus << '\n' <<
'\n' << make_link(N_("Schedule"), "..schedule");
topics.emplace_back(time.name.str(), id, text.str());