Skip to content
Snippets Groups Projects
Commit d9e52f79 authored by Olivier Dony's avatar Olivier Dony
Browse files

[FIX] res.lang: filter out unsupported format options in default locale info

parent 1d99784a
No related branches found
No related tags found
Loading
......@@ -94,6 +94,10 @@ class lang(osv.osv):
be 100% cross-platform we map to the directives required by
the C standard (1989 version), always available on platforms
with a C standard implementation."""
# For some locales, nl_langinfo returns a D_FMT/T_FMT that contains
# unsupported '%-' patterns, e.g. for cs_CZ
format = format.replace('%-', '%')
for pattern, replacement in tools.DATETIME_FORMATS_MAP.iteritems():
format = format.replace(pattern, replacement)
return str(format)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment