README for tuxpaint-website/po Bill Kendrick July 27, 2014 / December 8, 2021 This document describes the translation files for the tuxpaint.org website, located within the 'tuxpaint-website' repository, under the 'po' subdirectory. == Adding a new language == 1. Fetch the 'tuxpaint-website-hi.pot' and 'tuxpaint-website-lo.pot' PO template files, and create a locale files for each (e.g., xx_YY.po) ("-hi" contains text from high-priority pages to translate; "-lo" contains text that is less important to translate) 2. Add the new PO file(s) to Git. 3. Merge the low and high priority PO files into a combined one (use `merge.sh`) 4. Running "make" produces MO files (in the 'tuxpaint-website' repo's 'locales' subdirectory) out of all PO files, and updates the 'supported_langs.txt' file 5. Add the new language to 'layout/langswitch.php3', so that the language is made available in the pulldown menu. 6. Follow the steps below for updating the website when languages get updated... == Updating POT & PO files when strings are added or changed == 0. If any new files containing 'gettext()' PHP calls have been added to the site, first add them to "po/priority-[high|low]/POTFILES.in" ("-high" or "-low", depending on how important it is for the page to be translated). 1. Run the "update-po.sh" script in the 'po/priority-[high|low]' subdirectory. 2. 'git add [filenames]', 'git commit', and 'git push' to commit the updated POT and PO files to the repository. 3. Let translators know there were changes (email the 'tuxpaint-i18n' list) == Updating website to reflect changes == (Currently (August 2018), this server is completely managed by Bill Kendrick) 1. Run 'git pull --all' to fetch all new content 2. Run 'sudo ./update_locales.sh' in the 'po' directory, which does the following: * Runs 'merge.sh' to merge the high- & low-priority PO files into combined ones, which will be used by the remaining steps. * Runs 'make' in the toplevel 'po' directory (to generate the MO files based on the combined PO files; the MO files are not in the Git repository). * Runs 'make install' to copy all the MO files into the 'locales' dir. * Updates '/var/lib/locales/supported.d/tuxpaint' to make sure it lists all languages represented by the PO files. * Runs 'dpkg-reconfigure locales'