Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#10855 closed defect (fixed)

some locale's message.mo file is not generated

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:

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.

Attachments (0)

Change History (9)

comment:1 by Genie, 7 years ago

Description: modified (diff)

comment:2 by Christian Boos, 7 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, 7 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, 7 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, 7 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 []

in reply to:  5 ; comment:6 by Genie, 7 years ago

Thanks, I think this issue was resolved with releasing Trac 1.0.1.

Replying to cboos:

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 []

in reply to:  6 comment:7 by Genie, 7 years ago

Oops, I misunderstood.

Replying to Genie:

Thanks, I think this issue was resolved with releasing Trac 1.0.1.

Replying to cboos:

comment:8 by Christian Boos, 7 years ago

Resolution: fixed
Status: assignedclosed

No problem ;-)

Patch from comment:5 committed in r11684.

comment:9 by Christian Boos, 7 years ago

Somehow I knew that this innocent looking change from comment:5 would be trouble if committed right before 1.0.1 ;-)

Hopefully it's now all sorted out with r11691.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.