[Yum-devel] [PATCH] Make the source xgettext-friendly.

Zdenek Pavlas zpavlas at redhat.com
Fri Jun 24 08:04:42 UTC 2011


> I think we have to rethink this a little, splitting up a string is bad
> for translation, because the translator can change the order of the
> words and cant see the context of the single strings.

> ..  translates can see the whole sentence, and change placement of %5d

I agree in general.  I've considered P_('%5d Package', '%5d Packages') for a while
to give a broader context.  But this case is somewhat special- we do not output 
a message but a formatted table.  Change of wording is not wanted, really.

> "install" : [_("Installed %5d package"),_("Installed %5d packages")]

It's a different thing, these messages are printed somewhere else, AFTER the transaction.
Also, It won't work this way, you'd have to use 'lambda count: P_(.., count) % count'.  
Defining functions would be probably better.  There would be only 1 or 2 call sites.
It does not make much sense. xgettext merges identical translations, right?

--
Zdenek


More information about the Yum-devel mailing list