summaryrefslogtreecommitdiffstats
path: root/qt-gui.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-06 10:48:01 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-06 10:48:01 -0700
commit8092c0fdcd1c8eb3941fd8877a6ed8dbe1e74cd6 (patch)
tree3501d2ca9da4101669c80be26e369148de87641b /qt-gui.cpp
parent158a853d97db56450d9e11d8ba34ea6e1af636c4 (diff)
downloadsubsurface-8092c0fdcd1c8eb3941fd8877a6ed8dbe1e74cd6.tar.gz
Attempt to hack around the problems with Swedish date localization
When trying to shorten the long date format into a "medium" length date format we are messing up Swedish dates. This should fix the issue. Not a great solution but should be good enough for 4.2 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r--qt-gui.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp
index ed960d7eb..bb3001ff4 100644
--- a/qt-gui.cpp
+++ b/qt-gui.cpp
@@ -98,8 +98,11 @@ QString uiLanguage(QLocale *callerLoc)
shortDateFormat = loc.dateFormat(QLocale::ShortFormat);
dateFormat = loc.dateFormat(QLocale::LongFormat);
dateFormat.replace("dddd,", "ddd").replace("dddd", "ddd").replace("MMMM", "MMM");
+ // special hack for Swedish as our switching from long weekday names to short weekday names
+ // messes things up there
+ dateFormat.replace("'en' 'den' d:'e'", " d");
timeFormat = loc.timeFormat();
- timeFormat.replace("(t)", "").replace(" t", "").replace("t", "").replace("hh", "h").replace("HH", "H");
+ timeFormat.replace("(t)", "").replace(" t", "").replace("t", "").replace("hh", "h").replace("HH", "H").replace("'kl'.", "");
return uiLang;
}