Commit 89b1053f authored by Piotr Drąg's avatar Piotr Drąg 😐 Committed by Alexandru Băluț

Port from intltool to gettext

Fixes #2216
parent da55acfb
Pipeline #33006 passed with stages
in 14 minutes and 55 seconds
......@@ -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'))
......@@ -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">
......
[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;
<?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>
<?xml version="1.0"?>
<locatingRules>
<locatingRule name="mime" pattern="*.xml">
<documentRule localName="mime-info" target="mime.its"/>
</locatingRule>
</locatingRules>
gnome = import('gnome')
sources = [
'about.page',
'cheatsheet.page',
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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)
......
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
#
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
#
# - Modified by jacob berkman <jacob@ximian.com> to install
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
#
# - Modified by Rodney Dawes <dobey@novell.com> for use with intltool
#
# We have the following line for use by intltoolize:
# INTLTOOL_MAKEFILE
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ..
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
datarootdir = @datarootdir@
libdir = @libdir@
itlocaledir = $(datadir)/locale
subdir = po
install_sh = @install_sh@
# Automake >= 1.8 provides @mkdir_p@.
# Until it can be supposed, use the safe fallback:
mkdir_p = $(install_sh) -d
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
ALL_LINGUAS = @ALL_LINGUAS@
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
POFILES=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.po "; done)
DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
POTFILES = \
#This Gets Replace for some reason
CATALOGS=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
.SUFFIXES:
.SUFFIXES: .po .pox .gmo .mo .msg .cat
.po.pox:
$(MAKE) $(GETTEXT_PACKAGE).pot
$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
.po.mo:
$(MSGFMT) -o $@ $<
.po.gmo:
file=`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && gencat $@ $*.msg
all: all-@USE_NLS@
all-yes: $(CATALOGS)
all-no:
$(GETTEXT_PACKAGE).pot: $(POTFILES)
$(GENPOT)
install: install-data
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
$(mkdir_p) $(DESTDIR)$(itlocaledir)
if test -n "$(PO_LINGUAS)"; then \
linguas="$(PO_LINGUAS)"; \
else \
linguas="$(ALL_LINGUAS)"; \
fi; \
for lang in $$linguas; do \
dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
$(mkdir_p) $$dir; \
if test -r $$lang.gmo; then \
$(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
else \
$(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $(srcdir)/$$lang.gmo as" \
"$$dir/$(GETTEXT_PACKAGE).mo"; \
fi; \
if test -r $$lang.gmo.m; then \
$(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
if test -r $(srcdir)/$$lang.gmo.m ; then \
$(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
$$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $(srcdir)/$$lang.gmo.m as" \
"$$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
true; \
fi; \
fi; \
done
# Empty stubs to satisfy archaic automake needs
dvi info tags TAGS ID:
# Define this as empty until I found a useful application.
installcheck:
uninstall:
if test -n "$(PO_LINGUAS)"; then \
linguas="$(PO_LINGUAS)"; \
else \
linguas="$(ALL_LINGUAS)"; \
fi; \
for lang in $$linguas; do \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
done
check: all $(GETTEXT_PACKAGE).pot
mostlyclean:
rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
rm -f .intltool-merge-cache
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES stamp-it
rm -f *.mo *.msg *.cat *.cat.m *.gmo
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f Makefile.in.in
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: $(DISTFILES)
dists="$(DISTFILES)"; \
extra_dists="$(EXTRA_DISTFILES)"; \
for file in $$extra_dists; do \
test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
done; \
for file in $$dists; do \
test -f $$file || file="$(srcdir)/$$file"; \
ln $$file $(distdir) 2> /dev/null \
|| cp -p $$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(GETTEXT_PACKAGE).pot
tmpdir=`pwd`; \
if test -n "$(PO_LINGUAS)"; then \
linguas="$(PO_LINGUAS)"; \
else \
linguas="$(ALL_LINGUAS)"; \
fi; \
for lang in $$linguas; do \
echo "$$lang:"; \
result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
if $$result; then \
if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$lang.gmo failed!"; \
rm -f $$tmpdir/$$lang.new.po; \
fi; \
done
Makefile POTFILES: stamp-it
@if test ! -f $@; then \
rm -f stamp-it; \
$(MAKE) stamp-it; \
fi
stamp-it: Makefile.in.in ../config.status POTFILES.in
cd .. \
&& CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
# 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
......
# Used for .desktop and .appdata translation
podir = '@0@'.format(meson.current_source_dir())
i18n = import('i18n')
i18n.gettext(meson.project_name(), preset: 'glib')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment