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>
This commit is contained in:
Dirk Hohndel 2014-08-06 10:48:01 -07:00
parent 158a853d97
commit 8092c0fdcd

View file

@ -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;
}