Message6286
* John Rouillard: " [issue2551007] Selection fields are not translated" (Thu,
11 Oct 2018 21:48:15 +0000):
Hi John,
> In message <20181011145128.2afb36f1@monsterix.mbehrle.de>,
> Mathias Behrle writes:
> >* Ralf Schlatterbeck: " Re: [Roundup-devel] [issue2551007] Selection fields
> > are not translated" (Thu, 11 Oct 2018 09:07:43 +0200):
> >> On Wed, Oct 10, 2018 at 09:05:30PM -0400, John P. Rouillard wrote:
> [...]
> >> ...
> [...]
> [...]
> >>
> >> Yes, that's correct.
> >>
> [...]
> [...]
> >>
> >> That would also be my first guess, on the other hand this can also
> >> be a bug introduced with python3 support.
> >> So if the same (unmodified) templates worked with an earlier version
> >> of roundup and no longer works now, I would expect this.
> >
> >Indeed the main reason were lost translations in the po file. After
> >re-creating the po file and merging the old translations they now
> >appear translated
>
> Do you have the exact steps you took to do this?
Basically it was:
# Create new messages.pot
roundup-gettext <tracker-home>
# Add strings from other files in tracker home
xgettext -a -j -o locale/messages.pot initial_data.py
xgettext -a -j -o locale/messages.pot schema.py
# Update po from catalog
poedit de.po
Catalog/Update from messages.pot
# Merge old translations:
msgcat --use-first -o update.po ../../../roundup/locale/de.po ./de.po
[./de.po.new]
-> this creates a new file update.po from the indicated source files with
preference of translations from the roundup translations
# [Optional]: Delete obsolete entries:
msgmerge update.po messages.pot | msgattrib --no-obsolete > de.po
> Ralf should we open a ticket to do this and check the changes into
> mercurial?
>
> > except a few ones:
> >- all date/time values in column activity (yesterday, month ago, day,
> > ago...)
>
> Hmm, I see:
>
> #: ../roundup/date.py:854
> msgid "yesterday"
> msgstr "gestern"
>
> in de.po as well as translations for tomorrow, "just
> now". Translations for days seem to be of the form %(number)s days
> not just "day". I am not sure if this is a problem with the strings
> not being marked for extraction or some other issue.
>
> >- the first item in selection boxes which is '- no selection -'
> > (encountered also when using the jinja2 templates - which I like very
> > much btw.)
> >
> >The latter item is translated and in the po file:
> >
> >#: ../html/issue.item.html:122 ../html/issue.item.html:197
> >#: ../html/issue.item.html:220
> >msgid "- no selection -"
> >msgstr "- nichts ausgewählt -"
>
> I see:
>
> #: ../roundup/cgi/templating.py:1929
> #, python-format
> msgid "<option %svalue=\"-1\">- no selection -</option>"
> msgstr "<option %svalue=\"-1\">- nichts ausgewählt -</option>"
>
> in locale/de.po, so not quite the same.
I will have to re-check, if there are not matching msgid's.
--
Mathias Behrle
MBSolutions
Gilgenmatten 10 A
D-79114 Freiburg
Tel: +49(761)471023
Fax: +49(761)4770816
http://www.m9s.biz
UStIdNr: DE 142009020
PGP/GnuPG key availabable from any keyserver, ID: 0xD6D09BE48405BBF6
AC29 7E5C 46B9 D0B6 1C71 7681 D6D0 9BE4 8405 BBF6 |
|
Date |
User |
Action |
Args |
2018-10-12 23:40:25 | mathiasb | set | recipients:
+ mathiasb, schlatterbeck, rouilj, mbehrle |
2018-10-12 23:40:25 | mathiasb | link | issue2551007 messages |
2018-10-12 23:40:24 | mathiasb | create | |
|