Localizzazione EN di default: qsTr() su tutte le stringhe QML, catalogo italiano translations/harbour-calibreweb_it.ts, lrelease+install .qm nello spec (pattern quill), .pro aggiornato

This commit is contained in:
2026-08-19 16:17:30 +02:00
parent 9758f2b528
commit e3ba9b5e87
12 changed files with 360 additions and 52 deletions
+23
View File
@@ -25,6 +25,8 @@ in locale.
%changelog
* Wed Aug 19 2026 Carlo Baratto <carlo@carlobaratto.it> - 0.2.0-1
- Localizzazione: lingua di default inglese (qsTr ovunque), catalogo
italiano harbour-calibreweb_it.ts/.qm installato in /usr/share/translations
- Fix configurazione persa: file di configurazione unico e fisso
(/home/nemo/.config/harbour/calibreweb.conf) indipendente dall'utente
che avvia l'app (launcher nemo / debug SSH defaultuser), con migrazione
@@ -46,12 +48,32 @@ in locale.
%qmake5
make %{?_smp_mflags}
# Translation catalogue: generated explicitly with lrelease (the sailfishapp_i18n
# template does not produce the .qm reliably on the 5.1 kit). The .ts lives in
# the source tree; sfdk uses the sources live (shadow build), so locate it
# across the possible layouts.
if [ -f %{_builddir}/../%{name}-%{version}/translations/%{name}_it.ts ]; then
TS=%{_builddir}/../%{name}-%{version}/translations/%{name}_it.ts
elif [ -f %{_builddir}/%{name}-%{version}/translations/%{name}_it.ts ]; then
TS=%{_builddir}/%{name}-%{version}/translations/%{name}_it.ts
elif [ -f %{_builddir}/translations/%{name}_it.ts ]; then
TS=%{_builddir}/translations/%{name}_it.ts
else
echo "ERROR: %{name}_it.ts not found" >&2
exit 1
fi
lrelease "$TS" -qm %{_builddir}/%{name}_it.qm
%install
make install INSTALL_ROOT=%{buildroot}
mkdir -p %{buildroot}%{_datadir}/applications
install -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop || true
# Italian translation: installed from the spec, like the desktop file.
mkdir -p %{buildroot}/usr/share/translations
install -m 0644 %{_builddir}/%{name}_it.qm %{buildroot}/usr/share/translations/
%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
@@ -59,3 +81,4 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop || tr
%{_datadir}/icons/hicolor/86x86/apps/%{name}.png
%{_datadir}/icons/hicolor/108x108/apps/%{name}.png
%{_datadir}/%{name}/qml
/usr/share/translations/%{name}*.qm