there's a new `naturaltime' template tag coming with the Django dev
version. It construct a phrase specifying how much ago/from-now the given
time is.
https://docs.djangoproject.com/en/dev/ref/contrib/humanize/#naturaltime
When the difference is more than one day, it calls timesince/timeuntil and
translates its result using "%(delta) ago"/"%(delta) from now" msgids.
In my Czech language the translation of these is rather dumb unless I have
a chance to translate words generated here by timesince/timeuntil differently.
The past form would sound like either "age %(delta)s" or "%(delta)s in the
past". For second form I don't know anything better than "%(delta) in the
future". Not pretty.
Do other languages have similar trouble? In case there is considerable
number of them, I think the code should be changed.
The best I can see now would be to pass i18n contexts like "naturaltime
past"/"naturaltime future" to timesince/timeuntil
OR
don't call timesince/timeuntil at all and reimplement their functionality
using msgids containing words "hours", "minutes" etc. together with "ago"
and "from now" -- just as naturaltime already does when the delta is within
one day (u'a second from now', u'%(count)s seconds from now'), which is
completely ok.
Thank you for responses,
--
: Vladimir Macek : http://macek.sandbox.cz : +420 608 978 164
: UNIX && Dev || Training : Python, Django : GPG key 1F059424
I agree. We are getting nested translations here which does not work equally well in all languages. Translation strings have to be fully spelled.
--
You received this message because you are subscribed to the Google Groups "Django internationalization and localization" group.
To post to this group, send email to djang...@googlegroups.com.
To unsubscribe from this group, send email to django-i18n...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-i18n?hl=en.
V.
: MOJE AKT. SKOLENI: http://macek.sandbox.cz/skoleni/aktualni.html
Any repo would do, but I think that lictionary have a lot of i18n code
from different open projects making it easy to check horizontally.
I was thinking that you could browse to see how other open source
projects address this issue, and how they translate it into your
language of choice.
I'm not a Czech speaker (actually, the best I do is a little
Indonesian and even my English is wonky), so I can't give concrete
examples, apols.
cheers
L.