Skip to content

Add i18n support #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@ py-compile
.tags1
.vscode

ABOUT-NLS
po/Makefile.in.in
po/POTFILES
po/Makevars.template
po/Rules-quot
po/*.gmo
po/*.header
po/*.sed
po/*.sin
po/*.pot
4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
SUBDIRS = src
SUBDIRS = src po

ACLOCAL_AMFLAGS = -I m4
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ AS_IF([test "x$with_gtk3" != xno],
#AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETEX_PACKAGE"], [Define the gettext package to be used])
#AC_SUBST(GETTEXT_PACKAGE)

#AM_GLIB_GNU_GETTEXT
AM_GNU_GETTEXT_VERSION([0.19])
AM_GNU_GETTEXT([external])

#m4_pattern_allow([AM_V_GEN])dnl Make autoconf not complain about the rule below
#PANEL_INTLTOOL_MATE_PANEL_APPLET_RULE='%.mate-panel-applet: %.mate-panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(AM_V_GEN) LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
#AC_SUBST([PANEL_INTLTOOL_MATE_PANEL_APPLET_RULE])

#AC_CONFIG_FILES([Makefile src/Makefile po/Makefile.in])
AC_CONFIG_FILES([Makefile src/Makefile])
AC_CONFIG_FILES([Makefile src/Makefile po/Makefile.in])

AC_OUTPUT
2 changes: 2 additions & 0 deletions po/LINGUAS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
es
fr
55 changes: 55 additions & 0 deletions po/Makevars
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Makefile variables for PO directory in any package using GNU gettext.

# Usually the message domain is the same as the package name.
# However, the package name doesn't have the "mate" prefix but we want
# to avoid catalog name clashes so we add it here.
DOMAIN = mate-dock-applet

# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..

# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=utf-8

# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Free Software Foundation, Inc.

# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = https://github.com/ubuntu-mate/mate-dock-applet/issues

# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =

# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
# context. Possible values are "yes" and "no". Set this to yes if the
# package uses functions taking also a message context, like pgettext(), or
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
USE_MSGCTXT = no

# These options get passed to msgmerge.
# Useful options are in particular:
# --previous to keep previous msgids of translated messages,
# --quiet to reduce the verbosity.
MSGMERGE_OPTIONS =
17 changes: 17 additions & 0 deletions po/POTFILES.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# List of source files which contain translatable strings.
src/dock.py
src/dock_about.py
src/dock_action_list.py
src/dock_applet.py
src/dock_color_changer.py
src/dock_custom_launcher.py
src/dock_info.py
src/dock_popup.py
src/dock_prefs.py
src/dock_win_list.py
src/dock_xml.py
src/docked_app.py
src/docked_app_helpers.py
src/dom_color.py
src/log_it.py
src/window_control.py
Loading