Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 976 Bytes

LOCALE.md

File metadata and controls

39 lines (27 loc) · 976 Bytes

Locale

To translate the photobooth, follow the steps below.

Make sure you have gettext installed.

sudo apt install gettext

Extract text from source files

This pulls the most recent content from the source files.

xgettext photobooth/**/*.py -o photobooth/locale/messages.pot

Update a language with new terms

export LOCALE_LANG=ex
msgmerge photobooth/locale/$LOCALE_LANG/LC_MESSAGES/photobooth.po photobooth/locale/messages.pot -o photobooth/locale/$LOCALE_LANG/LC_MESSAGES/photobooth.po

Create a new language setup

export LOCALE_LANG=ex
mkdir -p photobooth/locale/$LOCALE_LANG/LC_MESSAGES/
msginit -i photobooth/locale/messages.pot --locale=$LOCALE_LANG -o photobooth/locale/$LOCALE_LANG/LC_MESSAGES/photobooth.po

Bundle up into a binary file

export LOCALE_LANG=ex
msgfmt photobooth/locale/$LOCALE_LANG/LC_MESSAGES/photobooth.po -o photobooth/locale/$LOCALE_LANG/LC_MESSAGES/photobooth.mo