mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 00:57:19 +02:00
Enhancement - locale variant stripping
- If a locale (locale=en-US) contains variant (locale=en-US.UTF8), then task ignores the variant. For now.
This commit is contained in:
parent
ed2ed7c2e2
commit
9a94ea963c
2 changed files with 6 additions and 2 deletions
|
@ -24,8 +24,6 @@
|
||||||
(thanks to Federico Hernandez).
|
(thanks to Federico Hernandez).
|
||||||
+ Removed obsolete DEVELOPERS file. The online support forums at
|
+ Removed obsolete DEVELOPERS file. The online support forums at
|
||||||
http://taskwarrior.org will provide better information.
|
http://taskwarrior.org will provide better information.
|
||||||
+ Replaced website references with http://taskwarrior.org.
|
|
||||||
+ Replaced contact references with support@taskwarrior.org.
|
|
||||||
|
|
||||||
------ old releases ------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,12 @@ void Context::initialize ()
|
||||||
// allow all subsequent messages to be localizable.
|
// allow all subsequent messages to be localizable.
|
||||||
std::string location = expandPath (config.get ("data.location"));
|
std::string location = expandPath (config.get ("data.location"));
|
||||||
std::string locale = config.get ("locale");
|
std::string locale = config.get ("locale");
|
||||||
|
|
||||||
|
// If there is a locale variant (en-US.<variant>), then strip it.
|
||||||
|
std::string::size_type period = locale.find ('.');
|
||||||
|
if (period != std::string::npos)
|
||||||
|
locale = locale.substr (0, period);
|
||||||
|
|
||||||
if (locale != "")
|
if (locale != "")
|
||||||
stringtable.load (location + "/strings." + locale);
|
stringtable.load (location + "/strings." + locale);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue