Merge lp:~widelands-dev/widelands/odd_locale_fix into lp:widelands

Proposed by Klaus Halfmann
Status: Merged
Merged at revision: 8778
Proposed branch: lp:~widelands-dev/widelands/odd_locale_fix
Merge into: lp:widelands
Diff against target: 14 lines (+3/-1)
1 file modified
src/base/i18n.cc (+3/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/odd_locale_fix
Reviewer Review Type Date Requested Status
Toni Förster Approve
Review via email: mp+352934@code.launchpad.net

Commit message

Fix undefined / unexpected behaviour in case LANG environment is empty.

Description of the change

Falback to 'en' in case LANG is empty

To post a comment you must log in.
Revision history for this message
Toni Förster (stonerl) wrote :

Works forme, tested this on macOS 10.13.6.

review: Approve
Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 3771. State: errored. Details: https://travis-ci.org/widelands/widelands/builds/414931628.
Appveyor build 3570. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_odd_locale_fix-3570.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks!

Travis problems are from trunk.

@bunnybot merge force

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/base/i18n.cc'
2--- src/base/i18n.cc 2018-04-07 16:59:00 +0000
3+++ src/base/i18n.cc 2018-08-11 18:17:57 +0000
4@@ -145,7 +145,9 @@
5 lang = getenv("LANGUAGE");
6 if (lang != nullptr) {
7 env_locale = lang;
8- }
9+ } else { // Finall fallback in case we cannot find out anything (#1784495)
10+ env_locale = "en";
11+ }
12 }
13 locale = "C";
14 SETLOCALE(LC_ALL, "C");

Subscribers

People subscribed via source and target branches

to status/vote changes: