From 8e8e6ea1597fef86c3708f8ac5fdc33e2645fa24 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 19 Sep 2021 13:01:24 +0200 Subject: [PATCH] mambabase: added UI translation for italian --- Makefile | 3 +- mambabase/SelectExtraPage.ui | 2 +- mambabase/WelcomePage.ui | 2 +- mambabase/mambabase.py | 15 +++- mambabase/mambabase_it.ts | 147 +++++++++++++++++++++++++++++++ mambabase/po/messages.pot | 85 ++++++++++++++++++ mambabase/update-translations.sh | 1 + 7 files changed, 248 insertions(+), 7 deletions(-) create mode 100644 mambabase/mambabase_it.ts create mode 100644 mambabase/po/messages.pot diff --git a/Makefile b/Makefile index 8d6868e..413ff47 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Makefile for desktop-base-openmamba package -# Copyright (C) 2004-2020 by Silvan Calarco +# Copyright (C) 2004-2021 by Silvan Calarco # Copyright (C) 2005-2007 by Davide Madrisan include VERSION @@ -140,6 +140,7 @@ install-locales: locales $(INSTALL_DIR) $$dir;\ $(INSTALL_DATA) $${f/.po/.mo} $$dir/openmamba-update.mo;\ done + @lrelease mambabase/mambabase_it.ts -qm $(DESTDIR)$(datadir)/locale/it/LC_MESSAGES/mambabase.qm install-kde-distro-addons: dist-update @$(INSTALL_DIR) $(DESTDIR)$(sysconfdir) diff --git a/mambabase/SelectExtraPage.ui b/mambabase/SelectExtraPage.ui index 8fedf71..729a593 100644 --- a/mambabase/SelectExtraPage.ui +++ b/mambabase/SelectExtraPage.ui @@ -117,7 +117,7 @@ background-color: rgb(255, 255, 255); - Broadcom B43 proprietary firmarwe from openwrt.org + Broadcom B43 proprietary firmware from openwrt.org diff --git a/mambabase/WelcomePage.ui b/mambabase/WelcomePage.ui index f23c470..254affa 100644 --- a/mambabase/WelcomePage.ui +++ b/mambabase/WelcomePage.ui @@ -90,7 +90,7 @@ - <html><head/><body><p><span style=" font-style:italic;">mambabase - Copyright (c) 2007-2020 by Silvan Calarco<br/>Released under the terms of the GNU GPL v3 license</span></p></body></html> + <html><head/><body><p><span style=" font-style:italic;">mambabase - Copyright (c) 2007-2021 by Silvan Calarco<br/>Released under the terms of the GNU GPL v3 license</span></p></body></html> Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter diff --git a/mambabase/mambabase.py b/mambabase/mambabase.py index 0455ec5..b8c99e9 100755 --- a/mambabase/mambabase.py +++ b/mambabase/mambabase.py @@ -2,11 +2,9 @@ # Copyright (c) 2019-2021 by Silvan Calarco # Release under the terms of the GPL version 3 license -from PyQt5 import QtCore -from PyQt5 import QtGui +from PyQt5 import QtGui, QtCore, QtWidgets, uic from PyQt5.QtCore import pyqtProperty -from PyQt5 import QtCore, QtWidgets -from PyQt5 import QtWidgets, uic +from PyQt5.QtCore import QLocale, QTranslator from pathlib import Path import gettext import subprocess @@ -354,6 +352,15 @@ if __name__ == '__main__': import sys app = QtWidgets.QApplication(sys.argv) app.setWindowIcon(QtGui.QIcon(DATADIR + "mambabase.png")) + # UI translations + locale = QLocale.system().name() + language = locale[0:2] + qtTranslator = QTranslator() + if qtTranslator.load("mambabase", "/usr/share/locale/" + locale + "/LC_MESSAGES/"): + app.installTranslator(qtTranslator) + elif qtTranslator.load("mambabase", "/usr/share/locale/" + language + "/LC_MESSAGES/"): + app.installTranslator(qtTranslator) + # PY translations gettext.install('mambabase', '/usr/share/locale') wizard = MambabaseWizard() wizard.show() diff --git a/mambabase/mambabase_it.ts b/mambabase/mambabase_it.ts new file mode 100644 index 0000000..fb8d739 --- /dev/null +++ b/mambabase/mambabase_it.ts @@ -0,0 +1,147 @@ + + + + + Form + + + + + + + Form + + + + + <html><head/><body><p align="center"><span style=" font-size:14pt; font-weight:600;">Installation completed.</span></p></body></html> + <html><head/><body><p align="center"><span style=" font-size:14pt; font-weight:600;">Installazione completata.</span></p></body></html> + + + + <html><head/><body><p>If you ran into problems, please check the installation log below for warnings or errors and send the report to the openmamba community at <a href="https://openmamba.org"><span style=" text-decoration: underline; color:#2980b9;">openmamba.org</span></a>.</p></body></html> + <html><head/><body><p>Se incontri dei problemmi per favore verifica i messaggi di avviso o errore riportati nel registro di installazione sottostante ed invia un report usando l'apposito form sul sito <a href="https://openmamba.org"><span style=" text-decoration: underline; color:#2980b9;">openmamba.org</span></a>.</p></body></html> + + + + <html><head/><body><p align="center"><span style=" font-size:14pt; font-weight:600;">Installation in progress...</span></p></body></html> + <html><head/><body><p align="center"><span style=" font-size:14pt; font-weight:600;">Installazione in corso...</span></p></body></html> + + + + <html><head/><body><p><span style=" font-weight:600;">Installation details:</span></p></body></html> + <html><head/><body><p><span style=" font-weight:600;">Dettagli dell'installazione:</span></p></body></html> + + + + + <html><head/><body><p><span style=" font-weight:600;">Please, select from the boxes below the components that you want to install or update from network.</span></p></body></html> + <html><head/><body><p><span style=" font-weight:600;">Per favore, seleziona usando i checkbox sottostanti i componenti che desideri installare o aggiornare dalla rete.</span></p></body></html> + + + + Proprietary software installations/updates + Installazione/aggiornamento di componenti software proprietari + + + + NVIDIA proprietary video driver (autodetected) from openmamba.org + Driver video proprietario NVIDIA (rilevato automaticamente) da openmamba.org + + + + Broadcom-sta proprietary wireless driver from openmamba.org + Driver wireless proprietario Broadcom-sta da openmamba.org + + + + Broadcom B43 proprietary firmware from openwrt.org + Firmware proprietario per Broadcom B43 da openwrt.org + + + + MS TrueType core fonts from sourceforge + MS TrueType core fonts da sourceforge + + + + VirtualBox extension pack from virtualbox.org + VirtualBox extension pack da virtualbox.org + + + + Widevine extension from google.com + Estensione Widevine da google.com + + + + openmamba installations/updates + Installazioni/aggiornamenti di openmamba + + + + System base packages (recommended) + Pacchetti base di sistema (raccomandato) + + + + Office packages (OpenOffice, ...) + Pacchetti per l'ufficio (OpenOffice, ...) + + + + Audio and Video players (VLC, kaffeine, ...) + Player audio e video (VLC, kaffeine, ...) + + + + Multimedia editing and production (kino, audacity, rosegarden, mixxx, ...) + Editing e produzione multimediale (kino, audacity, rosegarden, mixxx, ...) + + + + Internet communication and p2p + Internet, comunicazioni e p2p + + + + Graphics software (gimp, digikam, blender, krita) + Software per la grafica (gimp, digikam, blender, krita) + + + + Emulation and virtualization (VirtualBox, wine) + Emulazione e virtualizzazione (VirtualBox, wine) + + + + Base server packages (Apache, PHP, MariaDB, ...) + Base di pacchetti per server web (Apache, PHP, MariaDB, ...) + + + + Games (tuxracer, pingus, ksudoku, ...) + Giochi (tuxracer, pingus, ksudoku, ...) + + + + <html><head/><body><p><span style=" font-style:italic;">mambabase - Copyright (c) 2007-2021 by Silvan Calarco<br/>Released under the terms of the GNU GPL v3 license</span></p></body></html> + <html><head/><body><p><span style=" font-style:italic;">mambabase - Copyright (c) 2007-2021 by Silvan Calarco<br/>Rilasciato secondo i termini della licenza GNU GPL v3</span></p></body></html> + + + + <html><head/><body><p><a href="https://openmamba.org"><span style=" text-decoration: underline; color:#2980b9;">openmamba.org</span></a></p></body></html> + + + + + <html><head/><body><p>This program will complete the installation by adding the minimum recommended set of packages to the system. Additionally it will let you install, upon selection, macro-group of packages and proprietary software components.</p><p><span style=" font-weight:600;">TIP</span>: you may run this program at any time from the <span style=" font-style:italic;">openmamba control center</span> on the tray icon bar.</p></body></html> + <html><head/><body><p>Questa applicazione completerà l'installazione aggiungendo al sistema un set minimo di pacchetti raccomandati. In aggiunta permette di installare, se selezionati, gruppi di pacchetti e componenti properietary aggiuntivi.</p><p><span style=" font-weight:600;">TIP</span>: puoi eseguire questa applicazione in qualunque momento dal <span style=" font-style:italic;">centro di controllo di openmamba</span> sulla barra delle icone.</p></body></html> + + + + <html><head/><body><p><br/></p></body></html> + + + + diff --git a/mambabase/po/messages.pot b/mambabase/po/messages.pot new file mode 100644 index 0000000..e123c42 --- /dev/null +++ b/mambabase/po/messages.pot @@ -0,0 +1,85 @@ +# mambabase translations +# Copyright (C) 2021 Silvan Calarco +# This file is distributed under the same license as the mambabase package. +# Silvan Calarco , 2021. +# +#: _from_rc.cc:3 _from_rc.cc:4 _from_rc.cc:5 _from_rc.cc:12 _from_rc.cc:42 +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-09-19 11:05+0100\n" +"Last-Translator: Silvan Calarco \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: mambabase.py:338 +msgid "" +"

All done!

" +msgstr "" + +#: mambabase.py:65 +msgid "Checking installed extra components..." +msgstr "" + +#: mambabase.py:62 +msgid "Checking installed packages..." +msgstr "" + +#: mambabase.py:68 +msgid "Done. Please, press the Next button to continue." +msgstr "" + +#: mambabase.py:201 mambabase.py:202 +msgid "Installation finished!" +msgstr "" + +#: mambabase.py:179 mambabase.py:180 +#, python-format +msgid "Installing %s extra component..." +msgstr "" + +#: mambabase.py:150 mambabase.py:151 +#, python-format +msgid "Installing %s group packages..." +msgstr "" + +#: mambabase.py:218 +#, python-format +msgid "Installing %s package (%s)..." +msgstr "" + +#: mambabase.py:166 +#, python-format +msgid "Installing package %s" +msgstr "" + +#: mambabase.py:159 +#, python-format +msgid "Package %s is already installed" +msgstr "" + +#: mambabase.py:97 mambabase.py:98 +msgid "Starting installation..." +msgstr "" + +#: mambabase.py:118 mambabase.py:119 +msgid "Updating installed packages..." +msgstr "" + +#: mambabase.py:102 mambabase.py:103 +msgid "Updating packages list..." +msgstr "" + +#: mambabase.py:290 +#, python-format +msgid "WARNING: package %s from group %s not found in repositories" +msgstr "" + +#: mambabase.py:33 +msgid "openmamba base network installations" +msgstr "" diff --git a/mambabase/update-translations.sh b/mambabase/update-translations.sh index 4f174f6..a5a1e96 100755 --- a/mambabase/update-translations.sh +++ b/mambabase/update-translations.sh @@ -1,3 +1,4 @@ #!/bin/bash xgettext -s -o - mambabase.py --output=po/messages.pot msgmerge --update --no-fuzzy-matching --backup=off po/it.po po/messages.pot +lupdate *.ui -ts mambabase_it.ts \ No newline at end of file