[pitivi/wip/piotrdrag/kill-intltool] Port from intltool to gettext
- From: Piotr Drąg <piotrdrag src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/wip/piotrdrag/kill-intltool] Port from intltool to gettext
- Date: Fri, 28 Sep 2018 18:49:38 +0000 (UTC)
commit 20170d59a609bda3c40462e1d905baf8ec60b7a8
Author: Piotr Drąg <piotrdrag gmail com>
Date: Fri Sep 28 20:43:37 2018 +0200
Port from intltool to gettext
Fixes https://gitlab.gnome.org/GNOME/pitivi/issues/2216
data/meson.build | 19 +-
...tivi-mime.xml => org.pitivi.Pitivi-mime.xml.in} | 0
data/org.pitivi.Pitivi.appdata.xml.in | 22 +-
data/org.pitivi.Pitivi.desktop.in | 10 +-
gettext/its/mime.its | 6 +
gettext/its/mime.loc | 6 +
help/meson.build | 2 -
intltool-extract.in | 841 ------------
intltool-merge.in | 1356 --------------------
intltool-update.in | 1089 ----------------
meson.build | 8 +-
po/Makefile.in.in | 220 ----
po/POTFILES.in | 41 +-
po/meson.build | 3 -
14 files changed, 67 insertions(+), 3556 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 0baf5425..a1db6086 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -6,19 +6,26 @@ install_subdir('audiopresets', install_dir: pkgdatadir)
install_subdir('videopresets', install_dir: pkgdatadir)
install_subdir('gstpresets', install_dir: pkgdatadir)
-custom_target('org.pitivi.Pitivi.desktop',
+i18n.merge_file('org.pitivi.Pitivi.desktop',
+ type: 'desktop',
output : 'org.pitivi.Pitivi.desktop',
input : 'org.pitivi.Pitivi.desktop.in',
- command : [intltool_merge, '--desktop-style', podir, '@INPUT@', '@OUTPUT@'],
+ po_dir: podir,
install : true,
install_dir : join_paths(get_option('datadir'), 'applications'))
-custom_target('org.pitivi.Pitivi.appdata.xml',
+i18n.merge_file('org.pitivi.Pitivi.appdata.xml',
+ type: 'xml',
output : 'org.pitivi.Pitivi.appdata.xml',
input : 'org.pitivi.Pitivi.appdata.xml.in',
- command : [intltool_merge, '--xml-style', podir, '@INPUT@', '@OUTPUT@'],
+ po_dir: podir,
install : true,
- install_dir : join_paths(get_option('datadir'), 'appdata'))
+ install_dir : join_paths(get_option('datadir'), 'metainfo'))
-install_data('org.pitivi.Pitivi-mime.xml',
+i18n.merge_file('org.pitivi.Pitivi-mime.xml',
+ output : 'org.pitivi.Pitivi-mime.xml',
+ input : 'org.pitivi.Pitivi-mime.xml.in',
+ po_dir: podir,
+ data_dirs: itsdir,
+ install: true,
install_dir : join_paths(get_option('datadir'), 'mime/packages'))
diff --git a/data/org.pitivi.Pitivi-mime.xml b/data/org.pitivi.Pitivi-mime.xml.in
similarity index 100%
rename from data/org.pitivi.Pitivi-mime.xml
rename to data/org.pitivi.Pitivi-mime.xml.in
diff --git a/data/org.pitivi.Pitivi.appdata.xml.in b/data/org.pitivi.Pitivi.appdata.xml.in
index 0cac3df6..d93fcad1 100644
--- a/data/org.pitivi.Pitivi.appdata.xml.in
+++ b/data/org.pitivi.Pitivi.appdata.xml.in
@@ -5,18 +5,18 @@
<launchable type="desktop-id">org.pitivi.Pitivi.desktop</launchable>
<metadata_license>CC-BY-3.0</metadata_license>
<project_license>LGPL-2.0+</project_license>
- <_name>Pitivi</_name>
- <_summary>Create and edit your own movies</_summary>
+ <name>Pitivi</name>
+ <summary>Create and edit your own movies</summary>
<description>
- <_p>Pitivi is a video editor that aims to appeal to hobbyists and professionals alike, with a strong
focus on efficiency, quality and usability. It integrates well with other applications and sports a beautiful
user interface designed to be powerful yet easy to learn.</_p>
- <_p>With a non-modal editing workflow, a framerate-independent and playhead-centric timeline, Pitivi
allows you quickly and accurately trim, split and review your scenes. Pitivi's ripple and roll editing
features allow spending more time on storytelling and less time on "pushing clips around".</_p>
- <_p>Some other features include:</_p>
+ <p>Pitivi is a video editor that aims to appeal to hobbyists and professionals alike, with a strong
focus on efficiency, quality and usability. It integrates well with other applications and sports a beautiful
user interface designed to be powerful yet easy to learn.</p>
+ <p>With a non-modal editing workflow, a framerate-independent and playhead-centric timeline, Pitivi
allows you quickly and accurately trim, split and review your scenes. Pitivi's ripple and roll editing
features allow spending more time on storytelling and less time on "pushing clips around".</p>
+ <p>Some other features include:</p>
<ul>
- <_li>Accepts any file formats supported by the GStreamer multimedia framework</_li>
- <_li>Can animate hundreds of special effects and filters with keyframable properties</_li>
- <_li>Ability to set custom aspect ratios, framerates and rendering presets</_li>
- <_li>Easy to use crossfades and SMPTE transitions</_li>
- <_li>Multihead-friendly with detachable user interface components</_li>
+ <li>Accepts any file formats supported by the GStreamer multimedia framework</li>
+ <li>Can animate hundreds of special effects and filters with keyframable properties</li>
+ <li>Ability to set custom aspect ratios, framerates and rendering presets</li>
+ <li>Easy to use crossfades and SMPTE transitions</li>
+ <li>Multihead-friendly with detachable user interface components</li>
</ul>
</description>
<screenshots>
@@ -38,7 +38,7 @@
<update_contact>pitivi pitivi org</update_contact>
<project_group>GNOME</project_group>
<translation type="gettext">pitivi</translation>
- <_developer_name>The Pitivi Team</_developer_name>
+ <developer_name>The Pitivi Team</developer_name>
<releases>
<release version="0.999" date="2018-08-20">
diff --git a/data/org.pitivi.Pitivi.desktop.in b/data/org.pitivi.Pitivi.desktop.in
index 4cc55c63..0c54a113 100644
--- a/data/org.pitivi.Pitivi.desktop.in
+++ b/data/org.pitivi.Pitivi.desktop.in
@@ -1,13 +1,15 @@
[Desktop Entry]
Encoding=UTF-8
-_Name=Pitivi
-_GenericName=Video Editor
-_Comment=Create and edit your own movies
+Name=Pitivi
+GenericName=Video Editor
+Comment=Create and edit your own movies
Exec=pitivi %f
Terminal=false
Type=Application
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=org.pitivi.Pitivi
Categories=GNOME;GTK;AudioVideo;Video;AudioVideoEditing;
MimeType=text/x-xges;text/x-xptv;
StartupNotify=true
-_Keywords=video;film;movie;editor;
+# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list
MUST also end with a semicolon!
+Keywords=video;film;movie;editor;
diff --git a/gettext/its/mime.its b/gettext/its/mime.its
new file mode 100644
index 00000000..dec8d136
--- /dev/null
+++ b/gettext/its/mime.its
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<its:rules xmlns:its="http://www.w3.org/2005/11/its"
+ version="2.0">
+ <its:translateRule selector="/mime-info" translate="no"/>
+ <its:translateRule selector="//comment" translate="yes"/>
+</its:rules>
diff --git a/gettext/its/mime.loc b/gettext/its/mime.loc
new file mode 100644
index 00000000..a34fe8dc
--- /dev/null
+++ b/gettext/its/mime.loc
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<locatingRules>
+ <locatingRule name="mime" pattern="*.xml">
+ <documentRule localName="mime-info" target="mime.its"/>
+ </locatingRule>
+</locatingRules>
diff --git a/help/meson.build b/help/meson.build
index 9c19fdbb..e82d5586 100644
--- a/help/meson.build
+++ b/help/meson.build
@@ -1,5 +1,3 @@
-gnome = import('gnome')
-
sources = [
'about.page',
'cheatsheet.page',
diff --git a/meson.build b/meson.build
index 1d96ee06..c4bb1940 100644
--- a/meson.build
+++ b/meson.build
@@ -1,9 +1,6 @@
project('pitivi', 'c', version : '1.90.0.1', meson_version : '>= 0.41.0')
python = find_program('python3')
-intltool_merge = find_program('intltool-merge')
-itstool = find_program('itstool')
-msgfmt = find_program('msgfmt')
python_dep = dependency('python3', version : '>= 3.3')
if get_option('build-gst')
@@ -25,6 +22,11 @@ pycairo_dep = dependency('py3cairo')
gst_transcoder_dep = dependency('gst-transcoder-1.0', version : '>= 1.8.1',
fallback : ['gst-transcoder', 'gst_transcoder_dep'])
+gnome = import('gnome')
+i18n = import('i18n')
+
+podir = join_paths(meson.current_source_dir(), 'po')
+itsdir = join_paths(meson.current_source_dir(), 'gettext')
pkgdatadir = join_paths(get_option('datadir'), meson.project_name())
git = find_program('git', required : false)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index dc5a6e78..c4129f0e 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,28 +1,27 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
-# [encoding: UTF-8]
-data/org.pitivi.Pitivi-mime.xml
+data/org.pitivi.Pitivi-mime.xml.in
data/org.pitivi.Pitivi.appdata.xml.in
data/org.pitivi.Pitivi.desktop.in
-[type: gettext/glade]data/ui/alignmentprogress.ui
-[type: gettext/glade]data/ui/clipmediaprops.ui
-[type: gettext/glade]data/ui/cliptransformation.ui
-[type: gettext/glade]data/ui/customwidgets/alpha.ui
-[type: gettext/glade]data/ui/customwidgets/frei0r-filter-3-point-color-balance.ui
-[type: gettext/glade]data/ui/customwidgets/frei0r-filter-alphaspot.ui
-[type: gettext/glade]data/ui/depsmanager.ui
-[type: gettext/glade]data/ui/effectslibrary.ui
-[type: gettext/glade]data/ui/elementsettingsdialog.ui
-[type: gettext/glade]data/ui/filelisterrordialog.ui
-[type: gettext/glade]data/ui/greeter.ui
-[type: gettext/glade]data/ui/mainmenubutton.ui
-[type: gettext/glade]data/ui/medialibrary.ui
-[type: gettext/glade]data/ui/preferences.ui
-[type: gettext/glade]data/ui/projectsettings.ui
-[type: gettext/glade]data/ui/renderingdialog.ui
-[type: gettext/glade]data/ui/renderingprogress.ui
-[type: gettext/glade]data/ui/timelinetoolbar.ui
-[type: gettext/glade]data/ui/titleeditor.ui
+data/ui/alignmentprogress.ui
+data/ui/clipmediaprops.ui
+data/ui/cliptransformation.ui
+data/ui/customwidgets/alpha.ui
+data/ui/customwidgets/frei0r-filter-3-point-color-balance.ui
+data/ui/customwidgets/frei0r-filter-alphaspot.ui
+data/ui/depsmanager.ui
+data/ui/effectslibrary.ui
+data/ui/elementsettingsdialog.ui
+data/ui/filelisterrordialog.ui
+data/ui/greeter.ui
+data/ui/mainmenubutton.ui
+data/ui/medialibrary.ui
+data/ui/preferences.ui
+data/ui/projectsettings.ui
+data/ui/renderingdialog.ui
+data/ui/renderingprogress.ui
+data/ui/timelinetoolbar.ui
+data/ui/titleeditor.ui
pitivi/application.py
pitivi/check.py
pitivi/clipproperties.py
diff --git a/po/meson.build b/po/meson.build
index dbc0cdde..e9b77d79 100644
--- a/po/meson.build
+++ b/po/meson.build
@@ -1,4 +1 @@
-# Used for .desktop and .appdata translation
-podir = '@0@'.format(meson.current_source_dir())
-i18n = import('i18n')
i18n.gettext(meson.project_name(), preset: 'glib')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]