Added Finnish DATETIME based on feedback from Nike@Translatewiki. #205

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

(Native Finn, translator, and founder of Translatewiki.net) Niklas Laxström has helped me add DATETIME to the Finnish formats.py. I've tested the format itself with Django 1.4, and the result is a DATETIME like this: "12. joulukuuta 2011 kello 12.12.12".

Member

akaariai commented Jul 31, 2012

Anybody recall if the localized formats are tested? I don't think so but would like to confirm. Otherwise LGTM.

Member

claudep commented Aug 2, 2012

No, I don't think they are tested.

@claudep claudep commented on the diff Aug 2, 2012

django/conf/locale/fi/formats.py
@@ -7,7 +7,7 @@
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. E Y'
TIME_FORMAT = 'G.i.s'
-# DATETIME_FORMAT =
+DATETIME_FORMAT = 'j. E Y \k\e\l\l\o G.i.s'
@claudep

claudep Aug 2, 2012

Member

I think that the string should be prefixed by 'r' (raaw string), so as the backslashes are not interpreted as special sequences.

@dittaeva

dittaeva Aug 2, 2012

That's over my head, but note that I have tested it without problems (see description), and the documentation doesn't mention it. I don't think I checked if I really needed to escape all of them though.

@claudep

claudep Aug 3, 2012

Member

In fact, unless you have a special sequence like \n, \r, \t, the raw prefix is not strictly necessary. But for consistency, it's better to always add it to indicate that none of the escaped letters have to be interpreted as special-meaning sequences.

@dittaeva

dittaeva Aug 3, 2012

Thanks for enlightening me :)

Member

claudep commented Aug 3, 2012

Committed in 8fbfd21

claudep closed this Aug 3, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment