mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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:
parent
158a853d97
commit
8092c0fdcd
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue