From 624a22f0b89ddac65edc738f9571a1f07b1b1f2f Mon Sep 17 00:00:00 2001 From: Niels De Graef Date: Tue, 12 Jun 2018 13:17:26 +0200 Subject: Migrate from intltool to gettext. --- autogen.sh | 7 -- configure.ac | 3 +- data/Makefile.am | 12 +-- data/applications/Makefile.am | 7 +- data/gdm.schemas.in.in | 133 ----------------------------- data/org.gnome.login-screen.gschema.xml | 102 ++++++++++++++++++++++ data/org.gnome.login-screen.gschema.xml.in | 102 ---------------------- po/Makevars | 78 +++++++++++++++++ po/POTFILES.in | 3 +- 9 files changed, 191 insertions(+), 256 deletions(-) delete mode 100644 data/gdm.schemas.in.in create mode 100644 data/org.gnome.login-screen.gschema.xml delete mode 100644 data/org.gnome.login-screen.gschema.xml.in create mode 100644 po/Makevars diff --git a/autogen.sh b/autogen.sh index 3c3a3de8..9fdd170a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -13,15 +13,8 @@ if test -z $AUTORECONF; then exit 1 fi -INTLTOOLIZE=`which intltoolize` -if test -z $INTLTOOLIZE; then - echo "*** No intltoolize found, please install the intltool package ***" - exit 1 -fi - set -e -intltoolize --force --copy --automake autoreconf --force --install --verbose cd $olddir diff --git a/configure.ac b/configure.ac index 109c077f..24e69937 100644 --- a/configure.ac +++ b/configure.ac @@ -50,7 +50,8 @@ enable_documentation=yes AM_CONDITIONAL(ENABLE_DOCUMENTATION, test x$enable_documentation = xyes) # i18n stuff -IT_PROG_INTLTOOL([0.40.0]) +AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.19.8]) GETTEXT_PACKAGE=gdm AC_SUBST(GETTEXT_PACKAGE) diff --git a/data/Makefile.am b/data/Makefile.am index 192dfa05..75a38189 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -35,9 +35,6 @@ dbusconfdir = $(DBUS_SYS_DIR) dbusconf_in_files = gdm.conf.in dbusconf_DATA = $(dbusconf_in_files:.conf.in=.conf) -@INTLTOOL_SCHEMAS_RULE@ -@INTLTOOL_XML_NOMERGE_RULE@ - # dconf database and profile dconf_db_files = \ dconf/defaults/00-upstream-settings \ @@ -57,8 +54,7 @@ gsettings_SCHEMAS = org.gnome.login-screen.gschema.xml schemasdir = $(pkgdatadir) schemas_in_files = gdm.schemas.in schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) - -gdm.schemas.in: $(srcdir)/gdm.schemas.in.in +$(schemas_DATA): $(schemas_in_files) sed -e 's,[@]GDMPREFETCHCMD[@],$(GDMPREFETCHCMD),g' \ -e 's,[@]GDM_CUSTOM_CONF[@],$(GDM_CUSTOM_CONF),g' \ -e 's,[@]GDM_USER_PATH[@],$(GDM_USER_PATH),g' \ @@ -81,7 +77,7 @@ gdm.schemas.in: $(srcdir)/gdm.schemas.in.in -e 's,[@]logdir[@],$(logdir),g' \ -e 's,[@]pixmapdir[@],$(pixmapdir),g' \ -e 's,[@]sbindir[@],$(sbindir),g' \ - <$(srcdir)/gdm.schemas.in.in >gdm.schemas.in + <$(srcdir)/gdm.schemas.in >gdm.schemas EXTRA_DIST += gnome-login.session.in @@ -168,19 +164,18 @@ EXTRA_DIST += $(srcdir)/61-gdm.rules.in EXTRA_DIST += \ $(dconf_db_files) \ + $(gsettings_SCHEMAS) \ $(schemas_in_files) \ $(schemas_DATA) \ $(dbusconf_in_files) \ $(localealias_DATA) \ $(udevrules_DATA) \ - gdm.schemas.in.in \ gdm.conf-custom.in \ Xsession.in \ Init.in \ PreSession.in \ PostSession.in \ PostLogin \ - org.gnome.login-screen.gschema.xml.in \ $(NULL) CLEANFILES = \ @@ -189,7 +184,6 @@ CLEANFILES = \ Init \ PreSession \ PostSession \ - $(gsettings_SCHEMAS) \ greeter-dconf-defaults \ $(NULL) diff --git a/data/applications/Makefile.am b/data/applications/Makefile.am index e1213ca1..948a168f 100644 --- a/data/applications/Makefile.am +++ b/data/applications/Makefile.am @@ -10,11 +10,14 @@ edit = sed \ %.desktop.in: %.desktop.in.in Makefile $(edit) $< >$@ -@INTLTOOL_DESKTOP_RULE@ desktopdir = $(pkgdatadir)/greeter/applications -desktop_DATA = mime-dummy-handler.desktop \ +desktop_in_files = mime-dummy-handler.desktop \ mimeapps.list \ $(NULL) +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) +$(desktop_DATA): $(desktop_in_files) + $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@ + EXTRA_DIST = \ $(desktop_DATA) \ diff --git a/data/gdm.schemas.in.in b/data/gdm.schemas.in.in deleted file mode 100644 index 8ad20310..00000000 --- a/data/gdm.schemas.in.in +++ /dev/null @@ -1,133 +0,0 @@ - - - - - chooser/Multicast - b - false - - - chooser/MulticastAddr - s - ff02::1 - - - - daemon/User - s - @GDM_USERNAME@ - - - daemon/Group - s - @GDM_GROUPNAME@ - - - daemon/AutomaticLoginEnable - b - false - - - daemon/AutomaticLogin - s - - - - daemon/TimedLoginEnable - b - false - - - daemon/TimedLogin - s - - - - daemon/TimedLoginDelay - i - 30 - - - daemon/InitialSetupEnable - b - true - - - daemon/WaylandEnable - b - true - - - security/AllowRemoteAutoLogin - b - false - - - - debug/Enable - b - false - - - - security/DisallowTCP - b - true - - - xdmcp/Enable - b - false - - - xdmcp/ShowLocalGreeter - b - true - - - xdmcp/MaxPending - i - 4 - - - xdmcp/MaxSessions - i - 16 - - - xdmcp/MaxWait - i - 30 - - - xdmcp/DisplaysPerHost - i - 1 - - - xdmcp/Port - i - 177 - - - xdmcp/HonorIndirect - b - true - - - xdmcp/MaxWaitIndirect - i - 30 - - - xdmcp/PingIntervalSeconds - i - 0 - - - xdmcp/Willing - s - @gdmconfdir@/Xwilling - - - diff --git a/data/org.gnome.login-screen.gschema.xml b/data/org.gnome.login-screen.gschema.xml new file mode 100644 index 00000000..7b5c54d1 --- /dev/null +++ b/data/org.gnome.login-screen.gschema.xml @@ -0,0 +1,102 @@ + + + + + true + + Whether or not to allow fingerprint readers for login + + + The login screen can optionally allow users who have enrolled + their fingerprints to log in using those prints. + + + + true + + Whether or not to allow smartcard readers for login + + + The login screen can optionally allow users who have smartcards + to log in using those smartcards. + + + + true + + Whether or not to allow passwords for login + + + The login screen can be configured to disallow password authentication, + forcing the user to use smartcard or fingerprint authentication. + + + + '' + + Path to small image at top of user list + + + The login screen can optionally show a small image to provide site + administrators and distributions a way to display branding. + + + + '' + + Path to small image at top of user list + + + The fallback login screen can optionally show a small image to provide + site administrators and distributions a way to display branding. + + + + false + + Avoid showing user list + + + The login screen normally shows a list of available users to log in + as. This setting can be toggled to disable showing the user list. + + + + false + + Enable showing the banner message + + + Set to true to show the banner message text. + + + + '' + + Banner message text + + + Text banner message to show in the login window. + + + + false + + Disable showing the restart buttons + + + Set to true to disable showing the restart buttons in the login window. + + + + 3 + + Number of allowed authentication failures + + + The number of times a user is allowed to attempt authentication, before + giving up and going back to user selection. + + + + diff --git a/data/org.gnome.login-screen.gschema.xml.in b/data/org.gnome.login-screen.gschema.xml.in deleted file mode 100644 index aacb3046..00000000 --- a/data/org.gnome.login-screen.gschema.xml.in +++ /dev/null @@ -1,102 +0,0 @@ - - - - - true - <_summary> - Whether or not to allow fingerprint readers for login - - <_description> - The login screen can optionally allow users who have enrolled - their fingerprints to log in using those prints. - - - - true - <_summary> - Whether or not to allow smartcard readers for login - - <_description> - The login screen can optionally allow users who have smartcards - to log in using those smartcards. - - - - true - <_summary> - Whether or not to allow passwords for login - - <_description> - The login screen can be configured to disallow password authentication, - forcing the user to use smartcard or fingerprint authentication. - - - - '' - <_summary> - Path to small image at top of user list - - <_description> - The login screen can optionally show a small image to provide site - administrators and distributions a way to display branding. - - - - '' - <_summary> - Path to small image at top of user list - - <_description> - The fallback login screen can optionally show a small image to provide - site administrators and distributions a way to display branding. - - - - false - <_summary> - Avoid showing user list - - <_description> - The login screen normally shows a list of available users to log in - as. This setting can be toggled to disable showing the user list. - - - - false - <_summary> - Enable showing the banner message - - <_description> - Set to true to show the banner message text. - - - - '' - <_summary> - Banner message text - - <_description> - Text banner message to show in the login window. - - - - false - <_summary> - Disable showing the restart buttons - - <_description> - Set to true to disable showing the restart buttons in the login window. - - - - 3 - <_summary> - Number of allowed authentication failures - - <_description> - The number of times a user is allowed to attempt authentication, before - giving up and going back to user selection. - - - - diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 00000000..54516f88 --- /dev/null +++ b/po/Makevars @@ -0,0 +1,78 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments + +# 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 = GDM Contributors + +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + +# 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://gitlab.gnome.org/GNOME/gdm/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 = yes + +# 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 = + +# These options get passed to msginit. +# If you want to disable line wrapping when writing PO files, add +# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and +# MSGINIT_OPTIONS. +MSGINIT_OPTIONS = + +# This tells whether or not to regenerate a PO file when $(DOMAIN).pot +# has changed. Possible values are "yes" and "no". Set this to no if +# the POT file is checked in the repository and the version control +# program ignores timestamps. +PO_DEPENDS_ON_POT = no + +# This tells whether or not to forcibly update $(DOMAIN).pot and +# regenerate PO files on "make dist". Possible values are "yes" and +# "no". Set this to no if the POT file and PO files are maintained +# externally. +DIST_DEPENDS_ON_UPDATE_PO = no diff --git a/po/POTFILES.in b/po/POTFILES.in index 8fe82c5b..e84eef26 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -38,8 +38,7 @@ daemon/gdm-x-session.c daemon/main.c daemon/session-worker-main.c daemon/test-session-client.c -data/gdm.schemas.in.in -data/org.gnome.login-screen.gschema.xml.in +data/org.gnome.login-screen.gschema.xml libgdm/gdm-user-switching.c utils/gdmflexiserver.c utils/gdm-screenshot.c -- cgit v1.2.1