summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Koegel <eric.koegel@gmail.com>2015-08-02 09:25:03 +0300
committerEric Koegel <eric.koegel@gmail.com>2015-08-02 09:25:32 +0300
commit5daee2c17a7dd25dda06f66ff7661730723744a3 (patch)
treeff1556fda6b32b803b915eca13c64ce793c9cfe5
parent210f12ff701e933f8396dcfaea61c50c1561b278 (diff)
downloadConsoleKit2-5daee2c17a7dd25dda06f66ff7661730723744a3.tar.gz
Update gettext to avoid a warning message
Also improve the translation messages in the process groups and mark that file translatable.
-rw-r--r--configure.ac2
-rw-r--r--po/ConsoleKit2.pot61
-rw-r--r--po/Makefile.in.in118
-rw-r--r--po/POTFILES.in1
-rw-r--r--po/bg.po59
-rw-r--r--po/es.po59
-rw-r--r--po/es_419.po59
-rw-r--r--po/ru.po59
-rw-r--r--src/ck-process-group.c80
9 files changed, 452 insertions, 46 deletions
diff --git a/configure.ac b/configure.ac
index 37a3c63..87d409f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,7 +44,7 @@ AC_SUBST(VERSION)
# Save flags to aclocal
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
-AM_GNU_GETTEXT_VERSION([0.15])
+AM_GNU_GETTEXT_VERSION([0.19])
GETTEXT_PACKAGE=ConsoleKit2
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of default gettext domain])
diff --git a/po/ConsoleKit2.pot b/po/ConsoleKit2.pot
index d853c9f..5f3d47e 100644
--- a/po/ConsoleKit2.pot
+++ b/po/ConsoleKit2.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: ConsoleKit2 0.9.5\n"
"Report-Msgid-Bugs-To: https://github.com/ConsoleKit2/ConsoleKit2/issues\n"
-"POT-Creation-Date: 2015-07-28 20:29+0300\n"
+"POT-Creation-Date: 2015-08-02 09:00+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -198,6 +198,63 @@ msgid ""
"doesn't support activation changes"
msgstr ""
+#. TRANSLATORS: This is letting the user know that cgmanager
+#. * support was compiled in, but the cgmanager daemon isn't
+#. * running.
+#.
+#: src/ck-process-group.c:109
+msgid ""
+"Failed to open connection to cgmanager. Is the cgmanager daemon running?"
+msgstr ""
+
+#. TRANSLATORS: There is an error with cgmanager, we're just
+#. * printing it out. Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:125
+#, c-format
+msgid "There was an error while initializing cgmanager, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:230
+#, c-format
+msgid "Failed to create cgroup, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:240
+#, c-format
+msgid "Failed to move the session leader process to cgroup, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:250
+#, c-format
+msgid ""
+"Failed to let cgmanager know that it can remove the cgroup when it's empty, "
+"the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:289
+#, c-format
+msgid "Failed to get the session id from cgmanager, the error was: %s"
+msgstr ""
+
#: tools/ck-history.c:903 tools/list-sessions.c:350
msgid "Version of this application"
msgstr ""
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index 2ed49e6..65184f6 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -1,5 +1,5 @@
# Makefile for PO directory in any package using GNU gettext.
-# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU General Public
@@ -8,12 +8,14 @@
# Please note that the actual code of GNU gettext is covered by the GNU
# General Public License and is *not* in the public domain.
#
-# Origin: gettext-0.15
+# Origin: gettext-0.19
+GETTEXT_MACRO_VERSION = 0.19
PACKAGE = @PACKAGE@
VERSION = @VERSION@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+SED = @SED@
SHELL = /bin/sh
@SET_MAKE@
@@ -30,7 +32,17 @@ gettextsrcdir = $(datadir)/gettext/po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
+
+# We use $(mkdir_p).
+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
+# @install_sh@ does not start with $(SHELL), so we add it.
+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
+# versions, $(mkinstalldirs) and $(install_sh) are unused.
mkinstalldirs = $(SHELL) @install_sh@ -d
+install_sh = $(SHELL) @install_sh@
+MKDIR_P = @MKDIR_P@
mkdir_p = @mkdir_p@
GMSGFMT_ = @GMSGFMT@
@@ -65,6 +77,16 @@ POTFILES = \
CATALOGS = @CATALOGS@
+POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
+POFILESDEPS_yes = $(POFILESDEPS_)
+POFILESDEPS_no =
+POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
+
+DISTFILESDEPS_ = update-po
+DISTFILESDEPS_yes = $(DISTFILESDEPS_)
+DISTFILESDEPS_no =
+DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
+
# Makevars gets inserted here. (Don't remove this line!)
.SUFFIXES:
@@ -77,8 +99,8 @@ CATALOGS = @CATALOGS@
.po.gmo:
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
- echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
- cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
.sin.sed:
sed -e '/^#/d' $< > t-$@
@@ -90,6 +112,13 @@ all: all-@USE_NLS@
all-yes: stamp-po
all-no:
+# Ensure that the gettext macros and this Makefile.in.in are in sync.
+CHECK_MACRO_VERSION = \
+ test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
+ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
+ exit 1; \
+ }
+
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
# we don't want to bother translators with empty POT files). We assume that
@@ -105,6 +134,7 @@ all-no:
# $(POFILES) has been designed to not touch files that don't need to be
# changed.
stamp-po: $(srcdir)/$(DOMAIN).pot
+ @$(CHECK_MACRO_VERSION)
test ! -f $(srcdir)/$(DOMAIN).pot || \
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
@@ -119,17 +149,53 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+# The determination of whether the package xyz is a GNU one is based on the
+# heuristic whether some file in the top level directory mentions "GNU xyz".
+# If GNU 'find' is available, we avoid grepping through monster files.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+ package_gnu="$(PACKAGE_GNU)"; \
+ test -n "$$package_gnu" || { \
+ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
+ LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
+ -size -10000000c -exec grep 'GNU @PACKAGE@' \
+ /dev/null '{}' ';' 2>/dev/null; \
+ else \
+ LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
+ fi; \
+ } | grep -v 'libtool:' >/dev/null; then \
+ package_gnu=yes; \
+ else \
+ package_gnu=no; \
+ fi; \
+ }; \
+ if test "$$package_gnu" = "yes"; then \
+ package_prefix='GNU '; \
+ else \
+ package_prefix=''; \
+ fi; \
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
else \
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
fi; \
- $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
- --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
- --files-from=$(srcdir)/POTFILES.in \
- --copyright-holder='$(COPYRIGHT_HOLDER)' \
- --msgid-bugs-address="$$msgid_bugs_address"
+ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --msgid-bugs-address="$$msgid_bugs_address" \
+ ;; \
+ *) \
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --package-name="$${package_prefix}@PACKAGE@" \
+ --package-version='@VERSION@' \
+ --msgid-bugs-address="$$msgid_bugs_address" \
+ ;; \
+ esac
test ! -f $(DOMAIN).po || { \
if test -f $(srcdir)/$(DOMAIN).pot; then \
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
@@ -153,12 +219,20 @@ $(srcdir)/$(DOMAIN).pot:
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
-$(POFILES): $(srcdir)/$(DOMAIN).pot
+$(POFILES): $(POFILESDEPS)
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
if test -f "$(srcdir)/$${lang}.po"; then \
+ test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
- echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
- cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
+ cd $(srcdir) \
+ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
+ esac; \
+ }; \
else \
$(MAKE) $${lang}.po-create; \
fi
@@ -181,7 +255,6 @@ install-data: install-data-@USE_NLS@
fi
install-data-no: all
install-data-yes: all
- $(mkdir_p) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
@@ -233,7 +306,6 @@ installdirs-data: installdirs-data-@USE_NLS@
fi
installdirs-data-no:
installdirs-data-yes:
- $(mkdir_p) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
@@ -311,7 +383,7 @@ maintainer-clean: distclean
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
- $(MAKE) update-po
+ test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: stamp-po $(DISTFILES)
@@ -359,9 +431,15 @@ update-po: Makefile
tmpdir=`pwd`; \
echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
- echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
cd $(srcdir); \
- if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
+ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ esac; \
+ }; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
@@ -382,9 +460,13 @@ $(DUMMYPOFILES):
update-gmo: Makefile $(GMOFILES)
@:
+# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
+# because execution permission bits may not work on the current file system.
+# Use @SHELL@, which is the shell determined by autoconf for the use by its
+# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
cd $(top_builddir) \
- && $(SHELL) ./config.status $(subdir)/$@.in po-directories
+ && @SHELL@ ./config.status $(subdir)/$@.in po-directories
force:
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 079826b..7f49771 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -37,6 +37,7 @@ src/test-tty-idle-monitor.c
src/ck-sysdeps-openbsd.c
src/ck-job.h
src/ck-sysdeps-freebsd.c
+src/ck-process-group.c
tools/ck-history.c
tools/list-sessions.c
tools/ck-log-system-stop.c
diff --git a/po/bg.po b/po/bg.po
index 4a50195..e358bcd 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ConsoleKit2\n"
"Report-Msgid-Bugs-To: https://github.com/ConsoleKit2/ConsoleKit2/issues\n"
-"POT-Creation-Date: 2015-07-28 20:29+0300\n"
+"POT-Creation-Date: 2015-08-02 09:00+0300\n"
"PO-Revision-Date: 2015-07-25 13:00+0000\n"
"Last-Translator: Ivailo Monev <xakepa10@gmail.com>\n"
"Language-Team: Bulgarian (http://www.transifex.com/projects/p/consolekit2/"
@@ -200,6 +200,63 @@ msgid ""
"doesn't support activation changes"
msgstr ""
+#. TRANSLATORS: This is letting the user know that cgmanager
+#. * support was compiled in, but the cgmanager daemon isn't
+#. * running.
+#.
+#: src/ck-process-group.c:109
+msgid ""
+"Failed to open connection to cgmanager. Is the cgmanager daemon running?"
+msgstr ""
+
+#. TRANSLATORS: There is an error with cgmanager, we're just
+#. * printing it out. Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:125
+#, c-format
+msgid "There was an error while initializing cgmanager, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:230
+#, c-format
+msgid "Failed to create cgroup, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:240
+#, c-format
+msgid "Failed to move the session leader process to cgroup, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:250
+#, c-format
+msgid ""
+"Failed to let cgmanager know that it can remove the cgroup when it's empty, "
+"the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:289
+#, c-format
+msgid "Failed to get the session id from cgmanager, the error was: %s"
+msgstr ""
+
#: tools/ck-history.c:903 tools/list-sessions.c:350
msgid "Version of this application"
msgstr ""
diff --git a/po/es.po b/po/es.po
index 17b84c9..2863a68 100644
--- a/po/es.po
+++ b/po/es.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ConsoleKit2\n"
"Report-Msgid-Bugs-To: https://github.com/ConsoleKit2/ConsoleKit2/issues\n"
-"POT-Creation-Date: 2015-07-28 20:29+0300\n"
+"POT-Creation-Date: 2015-08-02 09:00+0300\n"
"PO-Revision-Date: 2015-07-06 08:46+0000\n"
"Last-Translator: Eric Koegel <eric.koegel@gmail.com>\n"
"Language-Team: Spanish (http://www.transifex.com/projects/p/consolekit2/"
@@ -204,6 +204,63 @@ msgstr ""
"La señal de activación no se ha manejada. La sesión no se pudo unir al "
"puesto de trabajo, o el puesto de trabajo no admite cambios de activación."
+#. TRANSLATORS: This is letting the user know that cgmanager
+#. * support was compiled in, but the cgmanager daemon isn't
+#. * running.
+#.
+#: src/ck-process-group.c:109
+msgid ""
+"Failed to open connection to cgmanager. Is the cgmanager daemon running?"
+msgstr ""
+
+#. TRANSLATORS: There is an error with cgmanager, we're just
+#. * printing it out. Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:125
+#, c-format
+msgid "There was an error while initializing cgmanager, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:230
+#, c-format
+msgid "Failed to create cgroup, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:240
+#, c-format
+msgid "Failed to move the session leader process to cgroup, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:250
+#, c-format
+msgid ""
+"Failed to let cgmanager know that it can remove the cgroup when it's empty, "
+"the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:289
+#, c-format
+msgid "Failed to get the session id from cgmanager, the error was: %s"
+msgstr ""
+
#: tools/ck-history.c:903 tools/list-sessions.c:350
msgid "Version of this application"
msgstr "La versión de esta aplicación"
diff --git a/po/es_419.po b/po/es_419.po
index 20ef326..61e9ded 100644
--- a/po/es_419.po
+++ b/po/es_419.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ConsoleKit2\n"
"Report-Msgid-Bugs-To: https://github.com/ConsoleKit2/ConsoleKit2/issues\n"
-"POT-Creation-Date: 2015-07-28 20:29+0300\n"
+"POT-Creation-Date: 2015-08-02 09:00+0300\n"
"PO-Revision-Date: 2015-07-06 08:46+0000\n"
"Last-Translator: Eric Koegel <eric.koegel@gmail.com>\n"
"Language-Team: Spanish (Latin America) (http://www.transifex.com/projects/p/"
@@ -203,6 +203,63 @@ msgstr ""
"No se pudo manejar la señal de activación. La sesión no se adjuntará al "
"puesto de trabajo o el puesto no soporta cambios de activación"
+#. TRANSLATORS: This is letting the user know that cgmanager
+#. * support was compiled in, but the cgmanager daemon isn't
+#. * running.
+#.
+#: src/ck-process-group.c:109
+msgid ""
+"Failed to open connection to cgmanager. Is the cgmanager daemon running?"
+msgstr ""
+
+#. TRANSLATORS: There is an error with cgmanager, we're just
+#. * printing it out. Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:125
+#, c-format
+msgid "There was an error while initializing cgmanager, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:230
+#, c-format
+msgid "Failed to create cgroup, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:240
+#, c-format
+msgid "Failed to move the session leader process to cgroup, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:250
+#, c-format
+msgid ""
+"Failed to let cgmanager know that it can remove the cgroup when it's empty, "
+"the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:289
+#, c-format
+msgid "Failed to get the session id from cgmanager, the error was: %s"
+msgstr ""
+
#: tools/ck-history.c:903 tools/list-sessions.c:350
msgid "Version of this application"
msgstr "La versión de esta aplicación"
diff --git a/po/ru.po b/po/ru.po
index 52fa259..23096c0 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ConsoleKit2\n"
"Report-Msgid-Bugs-To: https://github.com/ConsoleKit2/ConsoleKit2/issues\n"
-"POT-Creation-Date: 2015-07-28 20:29+0300\n"
+"POT-Creation-Date: 2015-08-02 09:00+0300\n"
"PO-Revision-Date: 2015-07-19 06:03+0000\n"
"Last-Translator: bizdelnick <bizdelnick@gmail.com>\n"
"Language-Team: Russian (http://www.transifex.com/projects/p/consolekit2/"
@@ -204,6 +204,63 @@ msgstr ""
"Сигнал активации не обрабатывается. Сессия не привязана к рабочему месту или "
"рабочее место не поддерживает изменения активации"
+#. TRANSLATORS: This is letting the user know that cgmanager
+#. * support was compiled in, but the cgmanager daemon isn't
+#. * running.
+#.
+#: src/ck-process-group.c:109
+msgid ""
+"Failed to open connection to cgmanager. Is the cgmanager daemon running?"
+msgstr ""
+
+#. TRANSLATORS: There is an error with cgmanager, we're just
+#. * printing it out. Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:125
+#, c-format
+msgid "There was an error while initializing cgmanager, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:230
+#, c-format
+msgid "Failed to create cgroup, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:240
+#, c-format
+msgid "Failed to move the session leader process to cgroup, the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:250
+#, c-format
+msgid ""
+"Failed to let cgmanager know that it can remove the cgroup when it's empty, "
+"the error was: %s"
+msgstr ""
+
+#. TRANSLATORS: Please ensure you keep the %s in the
+#. * string somewhere. It's the detailed error message from
+#. * cgmanager.
+#.
+#: src/ck-process-group.c:289
+#, c-format
+msgid "Failed to get the session id from cgmanager, the error was: %s"
+msgstr ""
+
#: tools/ck-history.c:903 tools/list-sessions.c:350
msgid "Version of this application"
msgstr "Версия этого приложения"
diff --git a/src/ck-process-group.c b/src/ck-process-group.c
index b1e079f..e6ab36b 100644
--- a/src/ck-process-group.c
+++ b/src/ck-process-group.c
@@ -27,11 +27,21 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/* Note to porters, on Linux, cgroups are used here only to tag the session
+ * leader process with a string, the ssid. In doing so, the kernel will
+ * also tag any decendants of that process (via clone, fork, whatever) as well.
+ * This way even if the process does things like double-forks or forgets to
+ * pass along the XDG_SESSION_COOKIE, it and it's decendants always have
+ * that ssid so ConsoleKit2 doesn't get confused. We don't need or use
+ * anything else with cgroups such as resource management.
+ */
+
#include "config.h"
#include <glib.h>
#include <glib-object.h>
#include <glib/gstdio.h>
+#include <glib/gi18n.h>
#ifdef HAVE_CGMANAGER
#include <cgmanager/cgmanager.h>
@@ -62,6 +72,22 @@ static void ck_process_group_finalize (GObject *object);
G_DEFINE_TYPE (CkProcessGroup, ck_process_group, G_TYPE_OBJECT)
+
+#ifdef HAVE_CGMANAGER
+/* Ensure the warning message contains a %s to handle the actual warning
+ * text from libnih
+ */
+static void
+throw_nih_warning (const gchar *warning)
+{
+ NihError *nerr = nih_error_get ();
+ if (nerr != NULL) {
+ g_warning (warning, nerr->message);
+ nih_free (nerr);
+ }
+}
+#endif
+
static gboolean
ck_process_group_backend_init (CkProcessGroup *pgroup)
{
@@ -78,7 +104,11 @@ ck_process_group_backend_init (CkProcessGroup *pgroup)
*/
connection = dbus_connection_open_private (CGMANAGER_DBUS_PATH, &dbus_error);
if (!connection) {
- g_warning (_("Failed to open connection to cgmanager. Is the cgmanager service running?"));
+ /* TRANSLATORS: This is letting the user know that cgmanager
+ * support was compiled in, but the cgmanager daemon isn't
+ * running.
+ */
+ g_warning (_("Failed to open connection to cgmanager. Is the cgmanager daemon running?"));
dbus_error_free (&dbus_error);
return FALSE;
}
@@ -89,10 +119,12 @@ ck_process_group_backend_init (CkProcessGroup *pgroup)
pgroup->priv->cgmanager_proxy = nih_dbus_proxy_new (NULL, connection, NULL, "/org/linuxcontainers/cgmanager", NULL, NULL);
dbus_connection_unref (connection);
if (!pgroup->priv->cgmanager_proxy) {
- NihError *nerr;
- nerr = nih_error_get ();
- g_warning ("cgmanager initialization error: %s", nerr->message);
- nih_free (nerr);
+ /* TRANSLATORS: There is an error with cgmanager, we're just
+ * printing it out. Please ensure you keep the %s in the
+ * string somewhere. It's the detailed error message from
+ * cgmanager.
+ */
+ throw_nih_warning (_("There was an error while initializing cgmanager, the error was: %s"));
return FALSE;
}
#endif
@@ -146,6 +178,8 @@ ck_process_group_finalize (GObject *object)
#ifdef HAVE_CGMANAGER
CkProcessGroupPrivate *priv = CK_PROCESS_GROUP_GET_PRIVATE (object);
+ TRACE ();
+
if (priv->cgmanager_proxy) {
dbus_connection_flush(priv->cgmanager_proxy->connection);
dbus_connection_close(priv->cgmanager_proxy->connection);
@@ -191,28 +225,31 @@ ck_process_group_create (CkProcessGroup *pgroup,
*/
ret = cgmanager_create_sync (NULL, priv->cgmanager_proxy, "cpuacct", ssid, &existed);
if (ret != 0) {
- NihError *nerr;
- nerr = nih_error_get();
- g_debug ("failed to create cgroup: %s", nerr->message);
- nih_free(nerr);
+ /* TRANSLATORS: Please ensure you keep the %s in the
+ * string somewhere. It's the detailed error message from
+ * cgmanager.
+ */
+ throw_nih_warning (_("Failed to create cgroup, the error was: %s"));
return FALSE;
}
ret = cgmanager_move_pid_abs_sync (NULL, priv->cgmanager_proxy, "cpuacct", ssid, process);
if (ret != 0) {
- NihError *nerr;
- nerr = nih_error_get();
- g_debug ("failed to move pid to cgroup: %s", nerr->message);
- nih_free(nerr);
+ /* TRANSLATORS: Please ensure you keep the %s in the
+ * string somewhere. It's the detailed error message from
+ * cgmanager.
+ */
+ throw_nih_warning (_("Failed to move the session leader process to cgroup, the error was: %s"));
return FALSE;
}
ret = cgmanager_remove_on_empty_sync (NULL, priv->cgmanager_proxy, "cpuacct", ssid);
if (ret != 0) {
- NihError *nerr;
- nerr = nih_error_get();
- g_debug ("cgmanager_remove_on_empty_sync error: %s", nerr->message);
- nih_free(nerr);
+ /* TRANSLATORS: Please ensure you keep the %s in the
+ * string somewhere. It's the detailed error message from
+ * cgmanager.
+ */
+ throw_nih_warning (_("Failed to let cgmanager know that it can remove the cgroup when it's empty, the error was: %s"));
return FALSE;
}
@@ -247,10 +284,11 @@ ck_process_group_get_ssid (CkProcessGroup *pgroup,
ret = cgmanager_get_pid_cgroup_abs_sync (NULL, priv->cgmanager_proxy, "cpuacct", process, &nih_ssid);
if (ret != 0) {
- NihError *nerr;
- nerr = nih_error_get();
- g_debug ("cgmanager_get_pid_cgroup_abs_sync error: %s", nerr->message);
- nih_free(nerr);
+ /* TRANSLATORS: Please ensure you keep the %s in the
+ * string somewhere. It's the detailed error message from
+ * cgmanager.
+ */
+ throw_nih_warning (_("Failed to get the session id from cgmanager, the error was: %s"));
return NULL;
}