Skip to content

Commit

Permalink
migrate from intltools to gettext
Browse files Browse the repository at this point in the history
  • Loading branch information
yetist committed Dec 27, 2019
1 parent 0568d8e commit 164489b
Show file tree
Hide file tree
Showing 23 changed files with 171 additions and 76 deletions.
7 changes: 4 additions & 3 deletions baobab/data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ baobabapp_DATA = $(baobabapp_in_files:.desktop.in=.desktop)
$(baobabapp_in_files): $(baobabapp_in_files:.desktop.in=.desktop.in.in)
sed -e "s|\@VERSION\@|@VERSION@|" $< > $@

@INTLTOOL_DESKTOP_RULE@
$(baobabapp_DATA): $(baobabapp_in_files)
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@


@INTLTOOL_XML_RULE@
appdatadir = $(datadir)/metainfo
appdata_in_files = mate-disk-usage-analyzer.appdata.xml.in
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
$(appdata_DATA): $(appdata_in_files)
$(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@

gsettings_SCHEMAS = org.mate.disk-usage-analyzer.gschema.xml
@GSETTINGS_RULES@
Expand Down
6 changes: 3 additions & 3 deletions baobab/data/mate-disk-usage-analyzer.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<name>MATE Disk Usage Analyzer</name>
<_summary>A disk usage analyzing tool for MATE Desktop</_summary>
<_description>
<summary>A disk usage analyzing tool for MATE Desktop</summary>
<description>
<p>
As its name implies, Disk Usage Analyzer is a graphical utility that you
can use to view and monitor your disk usage and folder structure. It displays
Expand All @@ -17,7 +17,7 @@
or remote. There is also an option to constantly monitor any external changes
to the home directory and warn the user if a file is added/removed.
</p>
</_description>
</description>
<screenshots>
<screenshot type="default">
<image width="960" height="540">
Expand Down
6 changes: 4 additions & 2 deletions baobab/data/mate-disk-usage-analyzer.desktop.in.in
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
[Desktop Entry]
_Name=MATE Disk Usage Analyzer
_Comment=Check folder sizes and available disk space
Name=MATE Disk Usage Analyzer
Comment=Check folder sizes and available disk space
TryExec=mate-disk-usage-analyzer
Exec=mate-disk-usage-analyzer
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=mate-disk-usage-analyzer
Terminal=false
Type=Application
StartupNotify=true
Categories=GTK;System;Filesystem;
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=MATE;check;disk;usage;analyze;size;space;
OnlyShowIn=MATE;
X-MATE-Bugzilla-Bugzilla=MATE
Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ AM_SILENT_RULES([yes])
MATE_COMMON_INIT
MATE_DEBUG_CHECK([no])

IT_PROG_INTLTOOL([0.50.1])

AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
Expand Down Expand Up @@ -325,10 +323,12 @@ AS_IF([test "x$enable_zlib" != "xno"],
AC_SUBST(Z_LIBS)

dnl Internationalization
AM_GNU_GETTEXT_VERSION([0.19.8])
AM_GNU_GETTEXT([external])

GETTEXT_PACKAGE=mate-utils
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE", [Define the gettext package to use])
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT

GLIB_GSETTINGS

Expand Down
8 changes: 4 additions & 4 deletions gsearchtool/data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ icon_DATA = thumbnail_frame.png
gsettingsschema_in_files = org.mate.search-tool.gschema.xml.in
gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
.PRECIOUS: $(gsettings_SCHEMAS)

@INTLTOOL_DESKTOP_RULE@

@GSETTINGS_RULES@

@INTLTOOL_XML_RULE@
appdatadir = $(datadir)/metainfo
appdata_in_files = mate-search-tool.appdata.xml.in
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
$(appdata_DATA): $(appdata_in_files)
$(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@

man_MANS = mate-search-tool.1

Utilitiesdir = $(datadir)/applications
Utilities_in_files = mate-search-tool.desktop.in
Utilities_DATA = $(Utilities_in_files:.desktop.in=.desktop)
$(Utilities_DATA): $(Utilities_in_files)
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@

EXTRA_DIST = \
$(icon_DATA) \
Expand Down
6 changes: 3 additions & 3 deletions gsearchtool/data/mate-search-tool.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<name>MATE Search Tool</name>
<_summary>A file searching tool for MATE Desktop</_summary>
<_description>
<summary>A file searching tool for MATE Desktop</summary>
<description>
<p>
MATE Search Tool is a simple but powerful utility that allows you to
search for files and folders on any mounted file system. Its interface
gives you instant access to a wide variety of parameters for each search,
such as text contained within a file, ownership, date of modification,
file size, folder exclusion, etc..
</p>
</_description>
</description>
<screenshots>
<screenshot type="default">
<image width="960" height="540">
Expand Down
6 changes: 4 additions & 2 deletions gsearchtool/data/mate-search-tool.desktop.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[Desktop Entry]
_Name=MATE Search Tool
_Comment=Locate documents and folders on this computer by name or content
Name=MATE Search Tool
Comment=Locate documents and folders on this computer by name or content
Exec=mate-search-tool
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=system-search
Terminal=false
Type=Application
StartupNotify=true
Categories=GTK;Utility;Core;
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=MATE;search;files;locate;documents;folders;computer;name;content;find;tool;
OnlyShowIn=MATE;
X-MATE-DocPath=mate-search-tool/mate-search-tool.xml
Expand Down
6 changes: 2 additions & 4 deletions logview/data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ desktop_in_files = mate-system-log.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
$(desktop_in_files): $(desktop_in_files:.desktop.in=.desktop.in.in)
@sed -e "s|\@VERSION\@|@VERSION@|" $< > $@
@INTLTOOL_DESKTOP_RULE@
$(desktop_DATA): $(desktop_in_files)
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@

man_MANS = mate-system-log.1

gsettings_SCHEMAS = org.mate.system-log.gschema.xml

@INTLTOOL_XML_RULE@

@GSETTINGS_RULES@

EXTRA_DIST = \
Expand Down
6 changes: 4 additions & 2 deletions logview/data/mate-system-log.desktop.in.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[Desktop Entry]
_Name=Log File Viewer
_Comment=View or monitor system log files
Name=Log File Viewer
Comment=View or monitor system log files
Exec=mate-system-log
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=mate-system-log
Terminal=false
Type=Application
StartupNotify=true
Categories=GTK;System;Monitor;
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=MATE;monitor;view;system;log;files;logviewer;
OnlyShowIn=MATE;
X-MATE-DocPath=mate-system-log/mate-system-log.xml
Expand Down
21 changes: 12 additions & 9 deletions mate-dictionary/data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ gdictapp_DATA = $(gdictapp_in_files:.desktop.in=.desktop)
$(gdictapp_in_files): $(gdictapp_in_files:.desktop.in=.desktop.in.in)
$(AM_V_GEN)sed -e "s|\@VERSION\@|@VERSION@|" $< > $@

@INTLTOOL_DESKTOP_RULE@

# dictionary sources definitions
dictsourcedir = $(datadir)/mate-dict/sources
dictsource_in_files = \
default.desktop.in \
thai.desktop.in \
$(NULL)
dictsource_DATA = $(dictsource_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@

%.desktop: %.desktop.in
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@

builderdir = $(datadir)/mate-dictionary
builder_DATA = \
Expand All @@ -33,15 +33,16 @@ if BUILD_GDICT_APPLET

# applet file, dbus service, and menu definition
appletdir = $(datadir)/mate-panel/applets
applet_in_files = org.mate.DictionaryApplet.mate-panel-applet.in
applet_DATA = $(applet_in_files:.mate-panel-applet.in=.mate-panel-applet)
applet_in_files = org.mate.DictionaryApplet.mate-panel-applet.desktop.in
applet_DATA = $(applet_in_files:.mate-panel-applet.desktop.in=.mate-panel-applet)

$(applet_in_files): $(applet_in_files).in Makefile
$(AM_V_GEN)sed \
-e "s|\@LIBEXECDIR\@|$(libexecdir)|" \
$< > $@

%.mate-panel-applet: %.mate-panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
$(applet_DATA): $(applet_in_files) Makefile
$(AM_V_GEN) $(MSGFMT) --desktop --keyword=Name --keyword=Description --template $< -d $(top_srcdir)/po -o $@

servicedir = $(datadir)/dbus-1/services
service_in_files = org.mate.panel.applet.DictionaryAppletFactory.service.in
Expand All @@ -56,18 +57,19 @@ ui_DATA += dictionary-applet-menu.xml

endif # BUILD_GDICT_APPLET

@INTLTOOL_XML_RULE@
appdatadir = $(datadir)/metainfo
appdata_in_files = mate-dictionary.appdata.xml.in
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
$(appdata_DATA): $(appdata_in_files)
$(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@

gsettings_SCHEMAS = org.mate.dictionary.gschema.xml
@GSETTINGS_RULES@

EXTRA_DIST = \
org.mate.DictionaryApplet.mate-panel-applet.in.in \
$(applet_in_files).in \
$(service_in_files) \
mate-dictionary.desktop.in.in \
$(gdictapp_in_files).in \
$(dictsource_in_files) \
$(man_MANS) \
$(appdata_in_files) \
Expand All @@ -78,6 +80,7 @@ EXTRA_DIST = \
CLEANFILES = \
$(applet_DATA) \
$(applet_DATA).in \
$(applet_in_files) \
$(service_DATA) \
$(dictsource_DATA) \
$(gdictapp_in_files) \
Expand Down
2 changes: 1 addition & 1 deletion mate-dictionary/data/default.desktop.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Dictionary Source]
Name=Default
_Description=Default Dictionary Server
Description=Default Dictionary Server
Transport=dictd
Hostname=dict.org
Port=2628
6 changes: 3 additions & 3 deletions mate-dictionary/data/mate-dictionary.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<name>MATE Dictionary</name>
<_summary>A dictionary for MATE Desktop</_summary>
<_description>
<summary>A dictionary for MATE Desktop</summary>
<description>
<p>
MATE Dictionary allows you to look up words in on-line dictionaries.
It comes preconfigured with a list of Dict servers (RFC 2229), to which
you can add your own sources, while you can select specific servers
for a specific query.
</p>
</_description>
</description>
<screenshots>
<screenshot type="default">
<image width="960" height="540">
Expand Down
6 changes: 4 additions & 2 deletions mate-dictionary/data/mate-dictionary.desktop.in.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[Desktop Entry]
_Name=MATE Dictionary
_Comment=Check word definitions and spellings in an online dictionary
Name=MATE Dictionary
Comment=Check word definitions and spellings in an online dictionary
Exec=mate-dictionary
Terminal=false
Type=Application
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=accessories-dictionary
StartupNotify=true
Categories=GTK;Office;Dictionary;
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=MATE;dictionary;applet;thesaurus;spelling;definitions;online;
OnlyShowIn=MATE;
X-MATE-DocPath=mate-dictionary/mate-dictionary.xml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Applet Factory]
Id=DictionaryAppletFactory
Location=@LIBEXECDIR@/mate-dictionary-applet
Name=Dictionary Applet Factory
Description=Factory for the dictionary applet

[DictionaryApplet]
Name=Dictionary Look up
Description=Look up words in a dictionary
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=accessories-dictionary
MateComponentId=OAFIID:MATE_DictionaryApplet

This file was deleted.

2 changes: 1 addition & 1 deletion mate-dictionary/data/thai.desktop.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Dictionary Source]
Name=Thai
_Description=Longdo Thai-English Dictionaries
Description=Longdo Thai-English Dictionaries
Transport=dictd
Hostname=dict.longdo.com
Port=2628
3 changes: 2 additions & 1 deletion mate-disk-image-mounter/data/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ NULL =
diskimagemounterdir = $(datadir)/applications
diskimagemounter_in_files = mate-disk-image-mounter.desktop.in
diskimagemounter_DATA = $(diskimagemounter_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
$(diskimagemounter_DATA): $(diskimagemounter_in_files)
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@

EXTRA_DIST = \
$(diskimagemounter_in_files) \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Desktop Entry]
_Name=MATE Disk Image Mounter
_Comment=Attach and mount one or more disk image files
Name=MATE Disk Image Mounter
Comment=Attach and mount one or more disk image files
TryExec=mate-disk-image-mounter
Exec=mate-disk-image-mounter %U
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Expand Down
6 changes: 4 additions & 2 deletions mate-screenshot/data/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
mate_screenshotdir = $(datadir)/applications
mate_screenshot_in_files = mate-screenshot.desktop.in
mate_screenshot_DATA = $(mate_screenshot_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
$(mate_screenshot_DATA): $(mate_screenshot_in_files)
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@

man_MANS = mate-screenshot.1

@INTLTOOL_XML_RULE@
appdatadir = $(datadir)/metainfo
appdata_in_files = mate-screenshot.appdata.xml.in
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
$(appdata_DATA): $(appdata_in_files)
$(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@

gsettings_SCHEMAS = org.mate.screenshot.gschema.xml
@GSETTINGS_RULES@
Expand Down
6 changes: 3 additions & 3 deletions mate-screenshot/data/mate-screenshot.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<name>MATE Screenshot</name>
<_summary>A screenshot utility for MATE Desktop</_summary>
<_description>
<summary>A screenshot utility for MATE Desktop</summary>
<description>
<p>
MATE Screenshot is a simple utility that lets you capture screenshots
of your desktop or of application windows. You can select to copy them
to the system clipboard or save them in Portable Network Graphics (.png)
image format.
</p>
</_description>
</description>
<screenshots>
<screenshot type="default">
<image width="800" height="450">
Expand Down
6 changes: 4 additions & 2 deletions mate-screenshot/data/mate-screenshot.desktop.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
[Desktop Entry]
_Name=Take Screenshot
_Comment=Save images of your desktop or individual windows
Name=Take Screenshot
Comment=Save images of your desktop or individual windows
Exec=mate-screenshot --interactive
Terminal=false
Type=Application
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=applets-screenshooter
StartupNotify=true
Categories=GTK;Utility;
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=MATE;screenshot;snapshot;desktop;window;image;
OnlyShowIn=MATE;
X-MATE-Bugzilla-Bugzilla=MATE
Expand Down
Loading

0 comments on commit 164489b

Please sign in to comment.