#NEWLINE# def usage( exit = True , code = 1 ) : #NEWLINE# #INDENT# print ( 'i18n wrapper script for formhub.\n' ) #NEWLINE# with indent ( 4 ) : #NEWLINE# #INDENT# puts ( colored . yellow ( ',/i18ntool.py add --lang <lang>' ) ) #NEWLINE# puts ( 'Create required files for enabling translation of language with code <lang>\n' ) #NEWLINE# puts ( colored . yellow ( './i18ntool.py refresh [--lang <lang>]' ) ) #NEWLINE# puts ( 'Update the PO file for <lang> based on code.\n<lang> is optionnal as we only use EN and do all translations in Transifex.\n' ) #NEWLINE# puts ( colored . yellow ( './i18ntool.py update --user <tx_user> --password <tx_pass> [--lang <lang>]' ) ) #NEWLINE# puts ( 'Downloads new PO files for <lang> (or all) from Transifex then compiles new MO files\n' ) #NEWLINE# puts ( colored . yellow ( './i18ntool.py compile [--lang <lang>]' ) ) #NEWLINE# puts ( 'Compiles all PO files for <lang> (or all) into MO files.\nNot required unless you want to.\n' ) #NEWLINE# #UNINDENT# if code : #NEWLINE# #INDENT# sys . exit ( code )