[Rt-devel] a patch for rt-message-catalog to translate local/ stuff; usage added
ruz at bestpractical.com
Wed Mar 16 13:49:03 EDT 2011
2011/3/16 Václav Ovsík <vaclav.ovsik at i.cz>:
> On Wed, Mar 16, 2011 at 11:41:29AM +0300, Ruslan Zakirov wrote:
>> It's better to split usage part from other things. Move usage docs
>> into POD documentation and use Pod::Usage. Look into
>> sbin/rt-setup-database for example.
> Sounds reasonable. I have prepared this already...
>> About main change. What would happen with plugins' strings and po files?
>> Code looks good, however if I want to translate local customizations
>> then I want the following:
>> * extract all strings
>> * generate local po file prefering its values
>> * shrink generated local po file so it contain only differences and
>> strings that are no in main po file and plugins' po files
>> As far as I can see you solve first and second things. The last one
>> would be cool to have as well.
> My notion was bad :(.
> I lived with idea, that stuff under local/ (including po) overwrites
> things from pure RT code.
They do, but also override plugins'.
> I looked at RT::I18N::Init and things make more sense now. :)
> Thanks for the right direction Ruslan!
> Should be scripts rt-message-catalog and extract-message-catalog kept
> separate for some reason? Solving the above problem you described needs
> probably addition some option switches controlling processing in both
See no problems in adding arguments into extract-message-catalog,
passing arguments from rt-message-catalog when extract called. I
really don't know why those are splitted.
I think what we need a command in rt-message-catalog that creates a
local po file that does the following:
1) extracts strings from files in local/, but skips plugins
2) updates local .po file if it already exists
3) uses API to extract dynamic strings with lifecycle we get bunch and
will have more in the future
4) has option to bring every string
5) has option to bring not translated strings
As bonus shrink command or a new one should be able to shrink local po
file to its minimal variant.
Will it do the job for you?
> Thanks for your time.
> Best Regards
Best regards, Ruslan.
More information about the rt-devel