[Rt-devel] a patch for rt-message-catalog to translate local/ stuff; usage added

Václav Ovsík vaclav.ovsik at i.cz
Sat Mar 19 14:00:49 EDT 2011

Hi Ruslan,

On Wed, Mar 16, 2011 at 08:49:03PM +0300, Ruslan Zakirov wrote:
> 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 did some work on github.com:zito/rt branch 3.8-trunk.

I moved the code from the extract-message-catalog into the
rt-message-catalog, the script extract-message-catalog replaced with
symlink to rt-message-catalog. Calling rt-message-catalog extract... and
extract-message-catalog... is equivalent now as before.
No need to duplicate options parsing.

> 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
done, passing --local option to extract command will do this job

> 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
Sorry, I don't understand this items.

> As bonus shrink command or a new one should be able to shrink local po
> file to its minimal variant.

Option --exclude-from added to the shrink command, so it excludes
strings from other po archives with the same name but other locations.
Extract with --local option calls shrink with options
--exclude-from lib/RT/I18N  --exclude-from local/plugins/*/po
so the messages from core RT code and from plugins are excluded.

> Will it do the job for you?

I hope it does. I tried to restart RT and see translated local strings
and a local cs.po archive is a fraction of previous. Thanks.

I hope my mods are useful for implementing the described functionality
into the common RT code.

Best Regards

More information about the rt-devel mailing list