Skip to content

Commit

Permalink
fix #270, auto generate translator credits
Browse files Browse the repository at this point in the history
  • Loading branch information
bkw777 committed Jun 26, 2023
1 parent 690cf97 commit 65b1678
Show file tree
Hide file tree
Showing 21 changed files with 293 additions and 369 deletions.
41 changes: 24 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ build_symbols := -X -D'INSTALL_PREFIX="$(prefix)"' \
-X -D'GETTEXT_PACKAGE="$(BRANDING_SHORTNAME)"'

misc_files := README.md \
INSTALL \
$(BRANDING_SHORTNAME).desktop \
debian/control \
debian/copyright \
Expand All @@ -67,14 +66,19 @@ DEB_BUILD_NUMBER := 0000
DEB_PKG_VERSION := $(BRANDING_VERSION)
-include .deb_build_number.mak

host_dist := $(shell lsb_release -sc)
host_arch := $(shell dpkg --print-architecture)
dist := $(shell lsb_release -sc)
arch := $(shell dpkg --print-architecture)
pkg_version = $(shell dpkg-parsechangelog -S Version)
dsc_file = release/deb-src/$(BRANDING_SHORTNAME)_$(pkg_version).dsc
deb_file = release/deb/$(BRANDING_SHORTNAME)_$(pkg_version).$(DEB_BUILD_NUMBER)_$(host_dist)_$(host_arch).deb
deb_file = release/deb/$(BRANDING_SHORTNAME)_$(pkg_version).$(DEB_BUILD_NUMBER)_$(dist)_$(arch).deb

################################################################################

# Override debhelper>9 using make -jN in "make deb", which breaks vala unless you do
# https://wiki.gnome.org/Projects/Vala/Documentation/ParallelBuilds
# which is ridiculous nonsense
.NOTPARALLEL:

.PHONY: all
all: $(BRANDING_SHORTNAME) $(BRANDING_SHORTNAME)-gtk

Expand All @@ -83,19 +87,22 @@ $(BRANDING_SHORTNAME): $(misc_files) $(common_vala_files) $(tui_vala_files) TRAN
--pkg $(glib) --pkg $(gio-unix) --pkg posix --pkg $(gee) --pkg $(json-glib) \
$(common_vala_files) $(tui_vala_files) -o $(@)

# Override debhelper setting LANG=C & LC_ALL=C in "make deb"
# which causes valac to die on the non-ascii in -D'TRANSLATORS=...'
$(BRANDING_SHORTNAME)-gtk: $(misc_files) $(common_vala_files) $(gui_vala_files) TRANSLATORS
valac $(VALACFLAGS) -X -w $(build_symbols) --Xcc="-lm" \
LANG=C.UTF-8;LC_ALL=$${LANG};LANGUAGE=$${LANG};T=;while read t;do T+="$$t\n";done<TRANSLATORS;set -x; \
valac $(VALACFLAGS) -X -w $(build_symbols) -X -D'TRANSLATORS="'"$${T:0:-2}"'"' --Xcc="-lm" \
--pkg $(glib) --pkg $(gio-unix) --pkg posix --pkg $(gee) --pkg $(json-glib) --pkg $(gtk+) --pkg $(vte) --pkg x11 \
$(common_vala_files) $(gui_vala_files) -o $(@)

$(misc_files): %: %.src BRANDING.mak
sed -e 's/BRANDING_SHORTNAME/$(BRANDING_SHORTNAME)/g' \
-e ';s/BRANDING_LONGNAME/$(BRANDING_LONGNAME)/g' \
-e ';s/BRANDING_AUTHORNAME/$(BRANDING_AUTHORNAME)/g' \
-e ';s/BRANDING_AUTHOREMAIL/$(BRANDING_AUTHOREMAIL)/g' \
-e ';s|BRANDING_WEBSITE|$(BRANDING_WEBSITE)|g' \
-e ';s/BRANDING_VERSION/$(BRANDING_VERSION)/g' \
-e ';s|BRANDING_GITREPO|$(BRANDING_GITREPO)|g' \
sed 's|BRANDING_SHORTNAME|$(BRANDING_SHORTNAME)|g' \
';s|BRANDING_LONGNAME|$(BRANDING_LONGNAME)|g' \
';s|BRANDING_AUTHORNAME|$(BRANDING_AUTHORNAME)|g' \
';s|BRANDING_AUTHOREMAIL|$(BRANDING_AUTHOREMAIL)|g' \
';s|BRANDING_WEBSITE|$(BRANDING_WEBSITE)|g' \
';s|BRANDING_VERSION|$(BRANDING_VERSION)|g' \
';s|BRANDING_GITREPO|$(BRANDING_GITREPO)|g' \
$(@).src >$(@)

$(pot_file): $(common_vala_files) $(tui_vala_files) $(gui_vala_files)
Expand Down Expand Up @@ -164,7 +171,7 @@ deb-src: $(dsc_file)
.PHONY: dsc
dsc: $(dsc_file)

$(dsc_file): debian/changelog $(misc_files) $(common_vala_files) $(gui_vala_files) TRANSLATORS
$(dsc_file): debian/changelog debian/compat debian/rules $(misc_files) $(common_vala_files) $(gui_vala_files) AUTHORS INSTALL settings.md Makefile BRANDING.mak
@[[ "$(pkg_version)" == "$(BRANDING_VERSION)" ]] || { echo -e "Version number in debian/changelog ($(pkg_version)) does not match BRANDING.mak ($(BRANDING_VERSION)).\n(Maybe need to run \"dch\"?)" >&2 ; exit 1 ; }
$(MAKE) clean
dpkg-source --build .
Expand All @@ -178,16 +185,16 @@ deb: $(deb_file)

.PHONY: deb_env_create
deb_env_create: pbuilder-dist
pbuilder-dist $(host_dist) $(host_arch) create
pbuilder-dist $(dist) $(arch) create

.PHONY: deb_env_update
deb_env_update: pbuilder-dist
pbuilder-dist $(host_dist) $(host_arch) update
pbuilder-dist $(dist) $(arch) update

$(deb_file): $(dsc_file) pbuilder-dist
mkdir -pv release/deb
pbuilder-dist $(host_dist) $(host_arch) build $(dsc_file) --buildresult release/deb
mv -fv release/deb/$(BRANDING_SHORTNAME)_$(pkg_version)_$(host_arch).deb $(@)
pbuilder-dist $(dist) $(arch) build $(dsc_file) --buildresult release/deb
mv -fv release/deb/$(BRANDING_SHORTNAME)_$(pkg_version)_$(arch).deb $(@)
ls -lv release/deb

.PHONY: install-deb
Expand Down
2 changes: 1 addition & 1 deletion TRANSLATORS
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ it: Demetrio Mendozzi
ko: Kevin Kim <[email protected]>
nl: Heimen Stoffels <[email protected]>
pl: Matthaiks
ru: Faust3000 (Original) | Danik2343 (Update Transaltio
ru: Danik2343 <[email protected]>
sv: Åke Engelbrektson <[email protected]>
tr: Sabri Ünal <[email protected]>
uk: Serhii Golovko <[email protected]>
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
mainline (1.3.20) unstable; urgency=medium

* add support for external terminal programs

-- Brian K. White <[email protected]> Mon, 26 Jun 2023 03:32:01 -0400

mainline (1.3.19) unstable; urgency=medium

* remove AboutWindow.vala, replaced with Gtk.show_about_dialog()
Expand Down
19 changes: 2 additions & 17 deletions debian/rules
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# debhelper>9 uses make -jN by default, which fails on vala projects
# https://github.com/bkw777/mainline/issues/74
# unless you do
# https://wiki.gnome.org/Projects/Vala/Documentation/ParallelBuilds
# which is ridiculous nonsense
# add --no-parallel to prevent debhelper>9 from using make -jN
#DH_VERBOSE = 1

%:
dh $@ --no-parallel
dh $@
40 changes: 18 additions & 22 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mainline\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-24 16:28-0400\n"
"POT-Creation-Date: 2023-06-26 02:02-0400\n"
"PO-Revision-Date: 2023-02-20 18:40+0100\n"
"Last-Translator: Marvin Meysel <[email protected]>\n"
"Language-Team: German\n"
Expand Down Expand Up @@ -71,7 +71,7 @@ msgstr "Läuft"
msgid "is locked."
msgstr ""

#: src/Common/LinuxKernel.vala:669 src/Gtk/MainWindow.vala:485
#: src/Common/LinuxKernel.vala:669 src/Gtk/MainWindow.vala:472
msgid "Running"
msgstr "Läuft"

Expand Down Expand Up @@ -148,7 +148,7 @@ msgstr "ist bereits installiert."
msgid "download failed."
msgstr ""

#: src/Common/LinuxKernel.vala:1018 src/Gtk/MainWindow.vala:511
#: src/Common/LinuxKernel.vala:1018 src/Gtk/MainWindow.vala:498
#, fuzzy
msgid "Install: no installable kernels specified"
msgstr "Befehl nicht angegeben"
Expand All @@ -162,7 +162,7 @@ msgstr "Deinstallation des angegebenen Kernels"
msgid "Not uninstalling the currently running kernel"
msgstr "Den aktuell laufenden Kernel wird nicht deinstalliert"

#: src/Common/LinuxKernel.vala:1043 src/Gtk/MainWindow.vala:507
#: src/Common/LinuxKernel.vala:1043 src/Gtk/MainWindow.vala:494
msgid "is locked"
msgstr ""

Expand Down Expand Up @@ -196,7 +196,7 @@ msgstr ""
msgid "The following kernels will be uninstalled"
msgstr "Die folgenden Kernel werden deinstalliert"

#: src/Common/LinuxKernel.vala:1109
#: src/Common/LinuxKernel.vala:1109 src/lib/l.misc.vala:12
#, fuzzy
msgid "Continue? (y/N): "
msgstr "Weiter ?"
Expand All @@ -211,41 +211,41 @@ msgstr "Keine Updates gefunden"
msgid "Install Kernel Version %s ? (y/N): "
msgstr "Kernel-Version %s installieren? (j/n):"

#: src/Common/Main.vala:197
#: src/Common/Main.vala:198
msgid "Missing Thread support in Glib."
msgstr ""

#: src/Common/Main.vala:290
#: src/Common/Main.vala:291
msgid "Wrote config file"
msgstr ""

#: src/Common/Main.vala:309
#: src/Common/Main.vala:310
msgid "No config file"
msgstr ""

#: src/Common/Main.vala:376
#: src/Common/Main.vala:377
msgid "Loaded config file"
msgstr ""

#: src/Common/Main.vala:396
#: src/Common/Main.vala:397
msgid "Called from"
msgstr "Angerufen von"

#: src/Common/Main.vala:396
#: src/Common/Main.vala:397
msgid "at logon"
msgstr "beim start"

#: src/Common/Main.vala:397
#: src/Common/Main.vala:398
msgid ""
"This file is over-written and executed again whenever settings are saved in"
msgstr ""
"Diese Datei wird überschrieben und erneut ausgeführt, wenn Einstellungen in"

#: src/Common/Main.vala:429
#: src/Common/Main.vala:430
msgid "Notifications are disabled"
msgstr "Benachrichtigungen sind deaktiviert"

#: src/Common/Main.vala:482
#: src/Common/Main.vala:483
msgid "Can not reach site"
msgstr "Fehler beim lesen der Datei"

Expand Down Expand Up @@ -490,21 +490,21 @@ msgstr ""
msgid "Forked"
msgstr ""

#: src/Gtk/MainWindow.vala:447
#: src/Gtk/MainWindow.vala:434
#, fuzzy
msgid "Updating kernels"
msgstr "Aktualisieren von Kernels"

#: src/Gtk/MainWindow.vala:489
#: src/Gtk/MainWindow.vala:476
msgid "available"
msgstr "Verfügbar"

#: src/Gtk/MainWindow.vala:506
#: src/Gtk/MainWindow.vala:493
#, fuzzy
msgid "is already installed"
msgstr "ist bereits installiert."

#: src/Gtk/MainWindow.vala:508
#: src/Gtk/MainWindow.vala:495
msgid "adding"
msgstr ""

Expand Down Expand Up @@ -683,7 +683,3 @@ msgstr "Abbrechen"
#: src/Gtk/TerminalWindow.vala:153
msgid "Close"
msgstr "Schließen"

#: src/lib/l.misc.vala:12
msgid "Proceed? (y/N): "
msgstr ""
40 changes: 18 additions & 22 deletions po/el.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mainline\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-06-24 16:28-0400\n"
"POT-Creation-Date: 2023-06-26 02:02-0400\n"
"PO-Revision-Date: 2023-01-10 02:03-0600\n"
"Last-Translator: Vasilis Kosmidis <[email protected]>\n"
"Language-Team: Greek\n"
Expand Down Expand Up @@ -71,7 +71,7 @@ msgstr "Ενεργός"
msgid "is locked."
msgstr ""

#: src/Common/LinuxKernel.vala:669 src/Gtk/MainWindow.vala:485
#: src/Common/LinuxKernel.vala:669 src/Gtk/MainWindow.vala:472
msgid "Running"
msgstr "Ενεργός"

Expand Down Expand Up @@ -148,7 +148,7 @@ msgstr "είναι ήδη εγκατεστημένο."
msgid "download failed."
msgstr ""

#: src/Common/LinuxKernel.vala:1018 src/Gtk/MainWindow.vala:511
#: src/Common/LinuxKernel.vala:1018 src/Gtk/MainWindow.vala:498
#, fuzzy
msgid "Install: no installable kernels specified"
msgstr "Η εντολή δεν προσδιορίστηκε"
Expand All @@ -162,7 +162,7 @@ msgstr "Απεγκατάσταση επιλεγμένων πυρήνων"
msgid "Not uninstalling the currently running kernel"
msgstr "δεν θα απεγκαταστήσει τον πυρήνα που εκτελείται αυτήν τη στιγμή"

#: src/Common/LinuxKernel.vala:1043 src/Gtk/MainWindow.vala:507
#: src/Common/LinuxKernel.vala:1043 src/Gtk/MainWindow.vala:494
msgid "is locked"
msgstr ""

Expand Down Expand Up @@ -196,7 +196,7 @@ msgstr ""
msgid "The following kernels will be uninstalled"
msgstr "Θα καταργηθεί η εγκατάσταση των ακόλουθων πυρήνων"

#: src/Common/LinuxKernel.vala:1109
#: src/Common/LinuxKernel.vala:1109 src/lib/l.misc.vala:12
#, fuzzy
msgid "Continue? (y/N): "
msgstr "Συνέχεια;"
Expand All @@ -211,42 +211,42 @@ msgstr "Δεν βρέθηκαν ενημερώσεις"
msgid "Install Kernel Version %s ? (y/N): "
msgstr "Εγκατάσταση του πυρήνα έκδοσης %s ; (ν/ό):"

#: src/Common/Main.vala:197
#: src/Common/Main.vala:198
msgid "Missing Thread support in Glib."
msgstr ""

#: src/Common/Main.vala:290
#: src/Common/Main.vala:291
msgid "Wrote config file"
msgstr ""

#: src/Common/Main.vala:309
#: src/Common/Main.vala:310
msgid "No config file"
msgstr ""

#: src/Common/Main.vala:376
#: src/Common/Main.vala:377
msgid "Loaded config file"
msgstr ""

#: src/Common/Main.vala:396
#: src/Common/Main.vala:397
msgid "Called from"
msgstr "Κλήθηκε από"

#: src/Common/Main.vala:396
#: src/Common/Main.vala:397
msgid "at logon"
msgstr "κατά την εκκίνηση"

#: src/Common/Main.vala:397
#: src/Common/Main.vala:398
msgid ""
"This file is over-written and executed again whenever settings are saved in"
msgstr ""
"Αυτό το αρχείο αντικαθίσταται και εκτελείται ξανά κάθε φορά που "
"αποθηκεύονται οι ρυθμίσεις στο"

#: src/Common/Main.vala:429
#: src/Common/Main.vala:430
msgid "Notifications are disabled"
msgstr "Οι ειδοποιήσεις είναι απενεργοποιημένες"

#: src/Common/Main.vala:482
#: src/Common/Main.vala:483
msgid "Can not reach site"
msgstr "Αποτυχία ανάγνωσης του αρχείου"

Expand Down Expand Up @@ -491,21 +491,21 @@ msgstr ""
msgid "Forked"
msgstr ""

#: src/Gtk/MainWindow.vala:447
#: src/Gtk/MainWindow.vala:434
#, fuzzy
msgid "Updating kernels"
msgstr "Ενημέρωση πυρήνων"

#: src/Gtk/MainWindow.vala:489
#: src/Gtk/MainWindow.vala:476
msgid "available"
msgstr "διαθέσιμος"

#: src/Gtk/MainWindow.vala:506
#: src/Gtk/MainWindow.vala:493
#, fuzzy
msgid "is already installed"
msgstr "είναι ήδη εγκατεστημένο."

#: src/Gtk/MainWindow.vala:508
#: src/Gtk/MainWindow.vala:495
msgid "adding"
msgstr ""

Expand Down Expand Up @@ -684,7 +684,3 @@ msgstr "Άκυρο"
#: src/Gtk/TerminalWindow.vala:153
msgid "Close"
msgstr "Κλείσιμο"

#: src/lib/l.misc.vala:12
msgid "Proceed? (y/N): "
msgstr ""
Loading

0 comments on commit 65b1678

Please sign in to comment.