[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Some help with po/pot files

> > 1) How do I keep the .po file in sync with the .pot file? To remove
> > redundant strings and add new ones? Is there a tool to merge them
> > somewhere?
> msgmerge old.po new.pot >new.po
> >From the context it seems you are now concerned about d-i translation
> (aka level1). Updating of these .po filee happens "automagically" --
> you just commit your current translation to the svn and the nightly
> script will merge in the new/changed strings.
> > 2) Is there a nice way to split a .po file into several chunks?
> > level1-po is big, and it'd be nice to be able to have many people
> > working on it at the same time. This is something I really need to know
> > before I start approaching local LUGs for translation help.
> Well, you can translate individual files from each component and then
> merge them together.

However, NEVER EVER commit PO files in packages/<package>/debian/po

They will be OVERWRITTEN by the next l10n-sync run.

What you can do, David:

Let's take netcfg as an example:

cd <di_root>
msgmerge packages/po/is.po packages/netcfg/debian/po/templates.pot \
  | msgattrib --no-obsolete >/tmp/netcfg.po

work on /tmp/netcfg.po

and do the same for other package's PO files

Then merge them all in a single PO file:

msgcat /tmp/netcfg.po /tmp/localechooser.po ..... >/tmp/is.po

msgmerge -U /tmp/is.po packages/po/template.pot

...the resulting is.po can then be commited to D-I repository.

Be aware that several messages are common to different packages, so if
they're translated differently in the small PO files, they will be
fuzzied by the last msgcat commant, leaving you the task of unfuzzying

In general, for all these PO files manipulations, please check the
msg* utilities from the gettext package.

Reply to: