diff --git a/Makefile b/Makefile index c8a9315..9b64202 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +.PHONY: all +all: gui translations + .PHONY: gui gui: relational_gui/survey.py relational_gui/maingui.py relational_gui/rel_edit.py relational_gui/resources.py @@ -65,6 +68,7 @@ clean: rm -f relational_gui/maingui.py rm -f relational_gui/rel_edit.py rm -f relational_gui/resources.py + $(RM) po/*.mo .PHONY: install-relational-cli install-relational-cli: @@ -74,7 +78,7 @@ install-relational-cli: install -D relational-cli.1 $${DESTDIR:-/}/usr/share/man/man1/relational-cli.1 .PHONY: install-python3-relational -install-python3-relational: +install-python3-relational: install_translations python3 setup/python3-relational.setup.py install --root=$${DESTDIR:-/}; rm -rf build; @@ -89,3 +93,20 @@ install-relational: .PHONY: install install: install-relational-cli install-python3-relational install-relational + +po/messages.pot: relational.py + xgettext --from-code=utf-8 -L Python -j -o po/messages.pot --package-name=relational \ + relational.py + +po/it.po: po/messages.pot + msgmerge --update po/it.po po/messages.pot + +po/it.mo: po/it.po + msgfmt po/it.po --output-file po/it.mo + +.PHONY: translations +translations: po/it.mo + +.PHONY: install_translations +install_translations: + install -m644 -D po/it.mo $${DESTDIR:-/}/usr/share/locale/it/LC_MESSAGES/relational.mo diff --git a/po/it.po b/po/it.po new file mode 100644 index 0000000..b9ee79f --- /dev/null +++ b/po/it.po @@ -0,0 +1,41 @@ +#: relational.py:37 +msgid "" +"Copyright (C) 2008-2020 Salvo 'LtWorf' Tomaselli.\n" +"\n" +"This program comes with ABSOLUTELY NO WARRANTY.\n" +"This is free software, and you are welcome to redistribute it\n" +"under certain conditions.\n" +"For details see the GPLv3 Licese.\n" +"\n" +"Written by Salvo 'LtWorf' Tomaselli \n" +"\n" +"https://ltworf.github.io/relational/" +msgstr "" + +#: relational.py:56 +msgid " -v Print version and exits" +msgstr "" + +#: relational.py:57 +msgid " -h Print this help and exits" +msgstr "" + +#: relational.py:58 +msgid " -q Uses Qt user interface" +msgstr "" + +#: relational.py:59 +msgid " -r Uses readline user interface" +msgstr "" + +#: relational.py:92 +msgid "" +"Module relational_gui is missing.\n" +"Please install relational package or run make." +msgstr "" + +#: relational.py:128 +msgid "" +"Module relational_readline is missing.\n" +"Please install relational-cli package." +msgstr "" diff --git a/po/messages.pot b/po/messages.pot new file mode 100644 index 0000000..530abd9 --- /dev/null +++ b/po/messages.pot @@ -0,0 +1,60 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the relational package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: relational\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-10-21 08:13+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: relational.py:37 +msgid "" +"Copyright (C) 2008-2020 Salvo 'LtWorf' Tomaselli.\n" +"\n" +"This program comes with ABSOLUTELY NO WARRANTY.\n" +"This is free software, and you are welcome to redistribute it\n" +"under certain conditions.\n" +"For details see the GPLv3 Licese.\n" +"\n" +"Written by Salvo 'LtWorf' Tomaselli \n" +"\n" +"https://ltworf.github.io/relational/" +msgstr "" + +#: relational.py:56 +msgid " -v Print version and exits" +msgstr "" + +#: relational.py:57 +msgid " -h Print this help and exits" +msgstr "" + +#: relational.py:58 +msgid " -q Uses Qt user interface" +msgstr "" + +#: relational.py:59 +msgid " -r Uses readline user interface" +msgstr "" + +#: relational.py:92 +msgid "" +"Module relational_gui is missing.\n" +"Please install relational package or run make." +msgstr "" + +#: relational.py:128 +msgid "" +"Module relational_readline is missing.\n" +"Please install relational-cli package." +msgstr ""