First time here? Check out the FAQ!

Revision history  [back]

We've edited django.po files but translations do not work. Why?

I'm using the ru locale and it is translated in to Russian but on my site it still appears in English.

Translation :

#: utils/functions.py:82
msgid "2 days ago"
msgstr "2 дня назад"

#: utils/functions.py:84
msgid "yesterday"
msgstr "вчера"

#: utils/functions.py:87
#, python-format
msgid "%(hr)d hour ago"
msgid_plural "%(hr)d hours ago"
msgstr[0] "%(hr)d час назад"
msgstr[1] "%(hr)d часов назад"
msgstr[2] "%(hr)d часа назад"

#: utils/functions.py:93
#, python-format
msgid "%(min)d min ago"
msgid_plural "%(min)d mins ago"
msgstr[0] "%(min)d минуту назад"
msgstr[1] "%(min)d минут назад"
msgstr[2] "%(min)d минуты назад"

I've tried

python manage.py compilemessages

then server restart.

80% of the messeges were translated, but not the time/date messages.

I've tried to manipulate functions.py (there are the original time messages), but I then the whole site does not work

EDIT:

Does it work with time translation now ?

We've edited django.po files but translations do not work. Why?

I'm using the ru locale and it is translated in to Russian but on my site it still appears in English.

Translation :

#: utils/functions.py:82
msgid "2 days ago"
msgstr "2 дня назад"

#: utils/functions.py:84
msgid "yesterday"
msgstr "вчера"

#: utils/functions.py:87
#, python-format
msgid "%(hr)d hour ago"
msgid_plural "%(hr)d hours ago"
msgstr[0] "%(hr)d час назад"
msgstr[1] "%(hr)d часов назад"
msgstr[2] "%(hr)d часа назад"

#: utils/functions.py:93
#, python-format
msgid "%(min)d min ago"
msgid_plural "%(min)d mins ago"
msgstr[0] "%(min)d минуту назад"
msgstr[1] "%(min)d минут назад"
msgstr[2] "%(min)d минуты назад"

I've tried

python manage.py compilemessages

then server restart.

80% of the messeges were translated, but not the time/date messages.

I've tried to manipulate functions.py (there are the original time messages), but I then the whole site does not work

EDIT: EDIT:strong text

Does it work now with time translation now ?translation?

We've edited django.po files but translations do not work. Why?

I'm using the ru locale and it is translated in to Russian but on my site it still appears in English.

Translation :

#: utils/functions.py:82
msgid "2 days ago"
msgstr "2 дня назад"

#: utils/functions.py:84
msgid "yesterday"
msgstr "вчера"

#: utils/functions.py:87
#, python-format
msgid "%(hr)d hour ago"
msgid_plural "%(hr)d hours ago"
msgstr[0] "%(hr)d час назад"
msgstr[1] "%(hr)d часов назад"
msgstr[2] "%(hr)d часа назад"

#: utils/functions.py:93
#, python-format
msgid "%(min)d min ago"
msgid_plural "%(min)d mins ago"
msgstr[0] "%(min)d минуту назад"
msgstr[1] "%(min)d минут назад"
msgstr[2] "%(min)d минуты назад"

I've tried

python manage.py compilemessages

then server restart.

80% of the messeges were translated, but not the time/date messages.

I've tried to manipulate functions.py (there are the original time messages), but I then the whole site does not work

EDIT: strong textDoes it work now with time translation?

We've edited django.po files but translations do not work. Why?

I'm using the ru locale and it is translated in to Russian but on my site it still appears in English.

Translation :

#: utils/functions.py:82
msgid "2 days ago"
msgstr "2 дня назад"

#: utils/functions.py:84
msgid "yesterday"
msgstr "вчера"

#: utils/functions.py:87
#, python-format
msgid "%(hr)d hour ago"
msgid_plural "%(hr)d hours ago"
msgstr[0] "%(hr)d час назад"
msgstr[1] "%(hr)d часов назад"
msgstr[2] "%(hr)d часа назад"

#: utils/functions.py:93
#, python-format
msgid "%(min)d min ago"
msgid_plural "%(min)d mins ago"
msgstr[0] "%(min)d минуту назад"
msgstr[1] "%(min)d минут назад"
msgstr[2] "%(min)d минуты назад"

I've tried

python manage.py compilemessages

then server restart.

80% of the messeges were translated, but not the time/date messages.

I've tried to manipulate functions.py (there are the original time messages), but I then the whole site does not work

We've edited django.po files but translations do not work. Why?

I'm using the ru locale and it is translated in to Russian but on my site it still appears in English.

Translation :

#: utils/functions.py:82
msgid "2 days ago"
msgstr "2 дня назад"

#: utils/functions.py:84
msgid "yesterday"
msgstr "вчера"

#: utils/functions.py:87
#, python-format
msgid "%(hr)d hour ago"
msgid_plural "%(hr)d hours ago"
msgstr[0] "%(hr)d час назад"
msgstr[1] "%(hr)d часов назад"
msgstr[2] "%(hr)d часа назад"

#: utils/functions.py:93
#, python-format
msgid "%(min)d min ago"
msgid_plural "%(min)d mins ago"
msgstr[0] "%(min)d минуту назад"
msgstr[1] "%(min)d минут назад"
msgstr[2] "%(min)d минуты назад"

I've tried

python manage.py compilemessages

then

  • server restart.

    restart

and 80% of the messeges were translated, but not the time/date messages.

I've tried to manipulate functions.py (there are the original time messages), functions.py, but I then the whole site does not work

We've edited django.po files but translations do not work. Why?

I'm using the ru locale and it is translated in to Russian but on my site it still appears in English.

Translation :Translation:

#: utils/functions.py:82
msgid "2 days ago"
msgstr "2 дня назад"

#: utils/functions.py:84
msgid "yesterday"
msgstr "вчера"

#: utils/functions.py:87
#, python-format
msgid "%(hr)d hour ago"
msgid_plural "%(hr)d hours ago"
msgstr[0] "%(hr)d час назад"
msgstr[1] "%(hr)d часов назад"
msgstr[2] "%(hr)d часа назад"

#: utils/functions.py:93
#, python-format
msgid "%(min)d min ago"
msgid_plural "%(min)d mins ago"
msgstr[0] "%(min)d минуту назад"
msgstr[1] "%(min)d минут назад"
msgstr[2] "%(min)d минуты назад"

I've tried

python manage.py compilemessages
  • server restart

and 80% of the messeges were translated, but not the time/date messages.

I've tried to manipulate functions.py, but I then the whole site does not work

We've edited django.po files but translations do not work. Why?How to translate a questions time and date?

I'm using the ru locale and it is translated in to Russian but on my site it still appears in English.

Translation:

#: utils/functions.py:82
msgid "2 days ago"
msgstr "2 дня назад"

#: utils/functions.py:84
msgid "yesterday"
msgstr "вчера"

#: utils/functions.py:87
#, python-format
msgid "%(hr)d hour ago"
msgid_plural "%(hr)d hours ago"
msgstr[0] "%(hr)d час назад"
msgstr[1] "%(hr)d часов назад"
msgstr[2] "%(hr)d часа назад"

#: utils/functions.py:93
#, python-format
msgid "%(min)d min ago"
msgid_plural "%(min)d mins ago"
msgstr[0] "%(min)d минуту назад"
msgstr[1] "%(min)d минут назад"
msgstr[2] "%(min)d минуты назад"

I've tried to manipulate functions.py, but I then the whole site does not work