This is an experimental change to have help sorted by the current language,
rather than English. However, I don't know if it actually is correct and need some feedback. This is to try and solve #6281, but could be extended to also solve #6383 if the general approach works.
This commit is contained in:
parent
650739354e
commit
565d9bf90b
2 changed files with 4 additions and 2 deletions
|
@ -152,7 +152,8 @@ private:
|
|||
class title_less
|
||||
{
|
||||
public:
|
||||
bool operator()(const topic &t1, const topic &t2) { return t1.title < t2.title; }
|
||||
bool operator()(const topic &t1, const topic &t2) {
|
||||
return strcoll(t1.title.c_str(), t2.title.c_str()) < 0; }
|
||||
};
|
||||
|
||||
struct delete_section
|
||||
|
@ -1317,7 +1318,7 @@ struct unit_topic_less {
|
|||
std::pair<const unit_type*,topic> b) {
|
||||
if (a.first->race() == b.first->race())
|
||||
return a.second.title < b.second.title;
|
||||
return a.first->race() < b.first->race();
|
||||
return strcoll(a.first->race().c_str(), b.first->race().c_str()) < 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -191,6 +191,7 @@ bool set_language(const language_def& locale)
|
|||
|
||||
current_language = locale;
|
||||
wesnoth_setlocale(LC_MESSAGES, locale.localename);
|
||||
wesnoth_setlocale(LC_COLLATE, locale.localename);
|
||||
|
||||
// fill string_table (should be moved somwhere else some day)
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue