[gnome-video-effects] Allow translations of the effects files
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-video-effects] Allow translations of the effects files
- Date: Sat, 3 Aug 2019 23:57:34 +0000 (UTC)
commit a1a7ed179fca82ee25d5af1aae5a14c4cfcfb79a
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Fri Aug 2 22:52:07 2019 +0200
Allow translations of the effects files
The `effect` files are not translatable at the moment. The issue
lies in the fact that, even though the `effect` uses the Desktop
entry specification[0], it is not recongnized as such by `gettext`
because it uses the file extension to detect the supported files.
As a workaround for this problem, the files has been renamed to
include the `desktop` extension, which helps gettext detecting the
`effect` files. After the translation merge process they are renamed
to their right name without the `desktop` extension.
[0] https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
Refs !1
Makefile.am | 7 ++-
.../{bulge.effect.in => bulge.effect.desktop.in} | 0
...cartoon.effect.in => cartoon.effect.desktop.in} | 0
...vara.effect.in => cheguevara.effect.desktop.in} | 0
.../{chrome.effect.in => chrome.effect.desktop.in} | 0
.../{dicetv.effect.in => dicetv.effect.desktop.in} | 0
...tion.effect.in => distortion.effect.desktop.in} | 0
.../{edgetv.effect.in => edgetv.effect.desktop.in} | 0
effects/{flip.effect.in => flip.effect.desktop.in} | 0
effects/{heat.effect.in => heat.effect.desktop.in} | 0
...ical.effect.in => historical.effect.desktop.in} | 0
effects/{hulk.effect.in => hulk.effect.desktop.in} | 0
...rsion.effect.in => inversion.effect.desktop.in} | 0
...pe.effect.in => kaleidoscope.effect.desktop.in} | 0
.../{mauve.effect.in => mauve.effect.desktop.in} | 0
effects/meson.build | 3 +-
.../{mirror.effect.in => mirror.effect.desktop.in} | 0
effects/{noir.effect.in => noir.effect.desktop.in} | 0
effects/{optv.effect.in => optv.effect.desktop.in} | 0
.../{pinch.effect.in => pinch.effect.desktop.in} | 0
...quarktv.effect.in => quarktv.effect.desktop.in} | 0
...oactv.effect.in => radioactv.effect.desktop.in} | 0
.../{revtv.effect.in => revtv.effect.desktop.in} | 0
.../{ripple.effect.in => ripple.effect.desktop.in} | 0
...tion.effect.in => saturation.effect.desktop.in} | 0
.../{sepia.effect.in => sepia.effect.desktop.in} | 0
...tv.effect.in => shagadelictv.effect.desktop.in} | 0
.../{sobel.effect.in => sobel.effect.desktop.in} | 0
.../{square.effect.in => square.effect.desktop.in} | 0
...reaktv.effect.in => streaktv.effect.desktop.in} | 0
...stretch.effect.in => stretch.effect.desktop.in} | 0
...delay.effect.in => timedelay.effect.desktop.in} | 0
.../{twirl.effect.in => twirl.effect.desktop.in} | 0
...igotv.effect.in => vertigotv.effect.desktop.in} | 0
.../{warptv.effect.in => warptv.effect.desktop.in} | 0
effects/{xray.effect.in => xray.effect.desktop.in} | 0
po/POTFILES.in | 68 +++++++++++-----------
37 files changed, 40 insertions(+), 38 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index f7bc48c..623555a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,13 +7,14 @@ DIST_SUBDIRS = po
pkgconfigdir = $(datadir)/pkgconfig
pkgconfig_DATA = gnome-video-effects.pc
-%.effect: %.effect.in $(wildcard $(top_srcdir)/po/*po)
+# FIXME: effect files use the *.desktop.in suffix so gettext can find them
+%.effect: %.effect.desktop.in $(wildcard $(top_srcdir)/po/*po)
$(AM_V_GEN) $(MSGFMT) --desktop --keyword=Name --keyword=Comment --template $< -d $(top_srcdir)/po -o
$@
effectsdir = $(pkgdatadir)
-effects_in_files = $(wildcard effects/*.effect.in)
+effects_in_files = $(wildcard effects/*.effect.desktop.in)
-effects_DATA = $(effects_in_files:.effect.in=.effect)
+effects_DATA = $(effects_in_files:.effect.desktop.in=.effect)
dist_noinst_SCRIPTS = autogen.sh
diff --git a/effects/bulge.effect.in b/effects/bulge.effect.desktop.in
similarity index 100%
rename from effects/bulge.effect.in
rename to effects/bulge.effect.desktop.in
diff --git a/effects/cartoon.effect.in b/effects/cartoon.effect.desktop.in
similarity index 100%
rename from effects/cartoon.effect.in
rename to effects/cartoon.effect.desktop.in
diff --git a/effects/cheguevara.effect.in b/effects/cheguevara.effect.desktop.in
similarity index 100%
rename from effects/cheguevara.effect.in
rename to effects/cheguevara.effect.desktop.in
diff --git a/effects/chrome.effect.in b/effects/chrome.effect.desktop.in
similarity index 100%
rename from effects/chrome.effect.in
rename to effects/chrome.effect.desktop.in
diff --git a/effects/dicetv.effect.in b/effects/dicetv.effect.desktop.in
similarity index 100%
rename from effects/dicetv.effect.in
rename to effects/dicetv.effect.desktop.in
diff --git a/effects/distortion.effect.in b/effects/distortion.effect.desktop.in
similarity index 100%
rename from effects/distortion.effect.in
rename to effects/distortion.effect.desktop.in
diff --git a/effects/edgetv.effect.in b/effects/edgetv.effect.desktop.in
similarity index 100%
rename from effects/edgetv.effect.in
rename to effects/edgetv.effect.desktop.in
diff --git a/effects/flip.effect.in b/effects/flip.effect.desktop.in
similarity index 100%
rename from effects/flip.effect.in
rename to effects/flip.effect.desktop.in
diff --git a/effects/heat.effect.in b/effects/heat.effect.desktop.in
similarity index 100%
rename from effects/heat.effect.in
rename to effects/heat.effect.desktop.in
diff --git a/effects/historical.effect.in b/effects/historical.effect.desktop.in
similarity index 100%
rename from effects/historical.effect.in
rename to effects/historical.effect.desktop.in
diff --git a/effects/hulk.effect.in b/effects/hulk.effect.desktop.in
similarity index 100%
rename from effects/hulk.effect.in
rename to effects/hulk.effect.desktop.in
diff --git a/effects/inversion.effect.in b/effects/inversion.effect.desktop.in
similarity index 100%
rename from effects/inversion.effect.in
rename to effects/inversion.effect.desktop.in
diff --git a/effects/kaleidoscope.effect.in b/effects/kaleidoscope.effect.desktop.in
similarity index 100%
rename from effects/kaleidoscope.effect.in
rename to effects/kaleidoscope.effect.desktop.in
diff --git a/effects/mauve.effect.in b/effects/mauve.effect.desktop.in
similarity index 100%
rename from effects/mauve.effect.in
rename to effects/mauve.effect.desktop.in
diff --git a/effects/meson.build b/effects/meson.build
index 7e3241b..91fd750 100644
--- a/effects/meson.build
+++ b/effects/meson.build
@@ -34,8 +34,9 @@ effects = ['bulge.effect',
'xray.effect']
foreach effect : effects
+ # FIXME: effect files use the *.desktop.in suffix so gettext can find them
i18n.merge_file(
- input: effect + '.in',
+ input: effect + '.desktop.in',
output: effect,
po_dir: '../po',
install: true,
diff --git a/effects/mirror.effect.in b/effects/mirror.effect.desktop.in
similarity index 100%
rename from effects/mirror.effect.in
rename to effects/mirror.effect.desktop.in
diff --git a/effects/noir.effect.in b/effects/noir.effect.desktop.in
similarity index 100%
rename from effects/noir.effect.in
rename to effects/noir.effect.desktop.in
diff --git a/effects/optv.effect.in b/effects/optv.effect.desktop.in
similarity index 100%
rename from effects/optv.effect.in
rename to effects/optv.effect.desktop.in
diff --git a/effects/pinch.effect.in b/effects/pinch.effect.desktop.in
similarity index 100%
rename from effects/pinch.effect.in
rename to effects/pinch.effect.desktop.in
diff --git a/effects/quarktv.effect.in b/effects/quarktv.effect.desktop.in
similarity index 100%
rename from effects/quarktv.effect.in
rename to effects/quarktv.effect.desktop.in
diff --git a/effects/radioactv.effect.in b/effects/radioactv.effect.desktop.in
similarity index 100%
rename from effects/radioactv.effect.in
rename to effects/radioactv.effect.desktop.in
diff --git a/effects/revtv.effect.in b/effects/revtv.effect.desktop.in
similarity index 100%
rename from effects/revtv.effect.in
rename to effects/revtv.effect.desktop.in
diff --git a/effects/ripple.effect.in b/effects/ripple.effect.desktop.in
similarity index 100%
rename from effects/ripple.effect.in
rename to effects/ripple.effect.desktop.in
diff --git a/effects/saturation.effect.in b/effects/saturation.effect.desktop.in
similarity index 100%
rename from effects/saturation.effect.in
rename to effects/saturation.effect.desktop.in
diff --git a/effects/sepia.effect.in b/effects/sepia.effect.desktop.in
similarity index 100%
rename from effects/sepia.effect.in
rename to effects/sepia.effect.desktop.in
diff --git a/effects/shagadelictv.effect.in b/effects/shagadelictv.effect.desktop.in
similarity index 100%
rename from effects/shagadelictv.effect.in
rename to effects/shagadelictv.effect.desktop.in
diff --git a/effects/sobel.effect.in b/effects/sobel.effect.desktop.in
similarity index 100%
rename from effects/sobel.effect.in
rename to effects/sobel.effect.desktop.in
diff --git a/effects/square.effect.in b/effects/square.effect.desktop.in
similarity index 100%
rename from effects/square.effect.in
rename to effects/square.effect.desktop.in
diff --git a/effects/streaktv.effect.in b/effects/streaktv.effect.desktop.in
similarity index 100%
rename from effects/streaktv.effect.in
rename to effects/streaktv.effect.desktop.in
diff --git a/effects/stretch.effect.in b/effects/stretch.effect.desktop.in
similarity index 100%
rename from effects/stretch.effect.in
rename to effects/stretch.effect.desktop.in
diff --git a/effects/timedelay.effect.in b/effects/timedelay.effect.desktop.in
similarity index 100%
rename from effects/timedelay.effect.in
rename to effects/timedelay.effect.desktop.in
diff --git a/effects/twirl.effect.in b/effects/twirl.effect.desktop.in
similarity index 100%
rename from effects/twirl.effect.in
rename to effects/twirl.effect.desktop.in
diff --git a/effects/vertigotv.effect.in b/effects/vertigotv.effect.desktop.in
similarity index 100%
rename from effects/vertigotv.effect.in
rename to effects/vertigotv.effect.desktop.in
diff --git a/effects/warptv.effect.in b/effects/warptv.effect.desktop.in
similarity index 100%
rename from effects/warptv.effect.in
rename to effects/warptv.effect.desktop.in
diff --git a/effects/xray.effect.in b/effects/xray.effect.desktop.in
similarity index 100%
rename from effects/xray.effect.in
rename to effects/xray.effect.desktop.in
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3cc3650..933a1cf 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,36 +1,36 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
-effects/bulge.effect.in
-effects/cartoon.effect.in
-effects/cheguevara.effect.in
-effects/chrome.effect.in
-effects/dicetv.effect.in
-effects/distortion.effect.in
-effects/edgetv.effect.in
-effects/flip.effect.in
-effects/heat.effect.in
-effects/historical.effect.in
-effects/hulk.effect.in
-effects/inversion.effect.in
-effects/kaleidoscope.effect.in
-effects/mauve.effect.in
-effects/mirror.effect.in
-effects/noir.effect.in
-effects/optv.effect.in
-effects/pinch.effect.in
-effects/quarktv.effect.in
-effects/radioactv.effect.in
-effects/revtv.effect.in
-effects/ripple.effect.in
-effects/saturation.effect.in
-effects/sepia.effect.in
-effects/shagadelictv.effect.in
-effects/sobel.effect.in
-effects/square.effect.in
-effects/streaktv.effect.in
-effects/stretch.effect.in
-effects/timedelay.effect.in
-effects/twirl.effect.in
-effects/vertigotv.effect.in
-effects/warptv.effect.in
-effects/xray.effect.in
+effects/bulge.effect.desktop.in
+effects/cartoon.effect.desktop.in
+effects/cheguevara.effect.desktop.in
+effects/chrome.effect.desktop.in
+effects/dicetv.effect.desktop.in
+effects/distortion.effect.desktop.in
+effects/edgetv.effect.desktop.in
+effects/flip.effect.desktop.in
+effects/heat.effect.desktop.in
+effects/historical.effect.desktop.in
+effects/hulk.effect.desktop.in
+effects/inversion.effect.desktop.in
+effects/kaleidoscope.effect.desktop.in
+effects/mauve.effect.desktop.in
+effects/mirror.effect.desktop.in
+effects/noir.effect.desktop.in
+effects/optv.effect.desktop.in
+effects/pinch.effect.desktop.in
+effects/quarktv.effect.desktop.in
+effects/radioactv.effect.desktop.in
+effects/revtv.effect.desktop.in
+effects/ripple.effect.desktop.in
+effects/saturation.effect.desktop.in
+effects/sepia.effect.desktop.in
+effects/shagadelictv.effect.desktop.in
+effects/sobel.effect.desktop.in
+effects/square.effect.desktop.in
+effects/streaktv.effect.desktop.in
+effects/stretch.effect.desktop.in
+effects/timedelay.effect.desktop.in
+effects/twirl.effect.desktop.in
+effects/vertigotv.effect.desktop.in
+effects/warptv.effect.desktop.in
+effects/xray.effect.desktop.in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]