Edgewall Software

Opened 12 years ago

Last modified 11 months ago

#10855 closed defect

some locale's message.mo file is not generated — at Version 5

Reported by: Genie Owned by: Christian Boos
Priority: highest Milestone: 1.0.2
Component: i18n Version: 1.0
Severity: major Keywords:
Cc: Branch:
Release Notes:

Only populate the language menus with languages for which the compiled message catalogs are actually available.

API Changes:
Internal Changes:

Description (last modified by Genie)

Hi~

after r11293,

some locale's message.mo file is not generated.

  • hy, ko, pl and tr locale

and message is displayed in english only.

Change History (5)

comment:1 by Genie, 12 years ago

Description: modified (diff)

comment:2 by Christian Boos, 12 years ago

Milestone: next-stable-1.0.x

Yes, it's normal, the catalogs haven't been updated by their respective translators and they contain fuzzy translations so they were skipped while compiling.

Full list:

$ make compile | grep fuzzy
catalog 'trac/locale\\el\\LC_MESSAGES\\messages.po' is marked as fuzzy, skipping
catalog 'trac/locale\\fa\\LC_MESSAGES\\messages.po' is marked as fuzzy, skipping
catalog 'trac/locale\\hy\\LC_MESSAGES\\messages.po' is marked as fuzzy, skipping
catalog 'trac/locale\\ko\\LC_MESSAGES\\messages.po' is marked as fuzzy, skipping
catalog 'trac/locale\\pl\\LC_MESSAGES\\messages.po' is marked as fuzzy, skipping
catalog 'trac/locale\\tr\\LC_MESSAGES\\messages.po' is marked as fuzzy, skipping
catalog 'trac/locale\\vi\\LC_MESSAGES\\messages.po' is marked as fuzzy, skipping

See TracL10N#Translationcoordination for contact information if you need to get in touch with some of the current translators.

At some point during 1.0.x, we should do something about "abandoned" translations, targeting in particular those who are below 50%:

$ make summary locale="el fa hy ko pl tr vi"
l10n/el: translations updated (45%)
l10n/fa: translations updated (41%)
l10n/hy: translations updated (75%)
l10n/ko: translations updated (53%)
l10n/pl: translations updated (65%)
l10n/tr: translations updated (76%)
l10n/vi: translations updated (46%)

comment:3 by Genie, 12 years ago

Thanks for your answer, but it is not normal.

This changes was applied suddenly after Trac 1.0 rc1.

Currently, All messages are displayed in english only for Korean user on Trac 1.0 release.

I'm very shocked because suddenly changed.

comment:4 by Christian Boos, 12 years ago

Well, the risk of using the Korean translation (or any other translation which fails make check) is not just to miss a translation or two, but to trigger internal errors (like #9197 or #10066). So better not. If this is really a problem for you, then by all means contribute (or find someone to contribute) the fixes.

If no one takes action or shows interest for these translations after a while, then we're simply going to drop the translation to not have the misleading choice.

Maybe we could even have a way to remove them from the list now? (trac.util.translation.get_available_locales() could look for messages.mo files instead of just the directories).

in reply to:  4 comment:5 by Christian Boos, 11 years ago

Milestone: next-stable-1.0.x1.0.2
Owner: set to Christian Boos
Release Notes: modified (diff)
Status: newassigned

Maybe we could even have a way to remove them from the list now? (trac.util.translation.get_available_locales() could look for messages.mo files instead of just the directories).

  • trac/util/translation.py

     
    337337
    338338        try:
    339339            return [dirname for dirname
    340340                    in pkg_resources.resource_listdir('trac', 'locale')
    341                     if '.' not in dirname]
     341                    if '.' not in dirname
     342                    and pkg_resources.resource_exists(
     343                    'trac', 'locale/%s/LC_MESSAGES/messages.mo' % dirname)]
    342344        except Exception:
    343345            return []
Note: See TracTickets for help on using tickets.