Check a .po file:
1
$ msgfmt -c -v -o /dev/null file.poWipe out a .po file and keep only translated messages:
1
$ msgattrib --translated -o cleaned.po messy.poDelete duplicate messages in a .po file:
1
$ msguniq -o no_duplicate.po duplicate_content.poShow differences between two .po files (thanks to JΓ©rome!):
1
$ msgcat -u file1.po file2.po > diff.poGenerate a .mo file from a .po file:
1
$ msgfmt -o target.mo source.poIf you want to have command-line tools use raw string instead of localized ones, add the following directives to your ~/.bash_profile:
1
$ export LANGUAGE=C2$ export LANG=C3$ export LC_MESSAGES=C