On Wed, Dec 22, 2010 at 11:52:01AM -0500, Stephen Gallagher wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 12/22/2010 10:36 AM, Sumit Bose wrote: > > On Mon, Dec 20, 2010 at 11:52:18AM -0500, Stephen Gallagher wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA1 > >> > >> On 12/20/2010 11:03 AM, Sumit Bose wrote: > >>> On Mon, Dec 20, 2010 at 04:13:10PM +0100, Sumit Bose wrote: > >>>> On Mon, Dec 20, 2010 at 02:41:18PM +0100, Sumit Bose wrote: > >>>>> On Mon, Dec 20, 2010 at 01:46:49PM +0100, Sumit Bose wrote: > >>>>>> On Fri, Dec 17, 2010 at 09:19:56AM -0500, Stephen Gallagher > >>>>>> wrote: > >>> On 12/16/2010 08:51 AM, Jakub Hrozek wrote: > >>>>>>>>> On 12/16/2010 01:31 PM, Stephen Gallagher wrote: > >>>>>>>>>> On 12/16/2010 06:36 AM, Jakub Hrozek wrote: > >>>>>>>>>>> On 12/15/2010 09:48 PM, Stephen Gallagher wrote: > >> > > .... > >> Sorry, this is still a Nack. > > .... > > > > ok, kind of a new start. We discussed that we want to have the > > translated xml files in the tar ball so that po4a is not needed to build > > translated man pages. I also choose to include the po4a config file into > > the repository instead of auto-generating it. The main reason, besides > > making the makefile simpler, is that we might want special options like > > char set for different languages. > > > Nack. > > While 'make all' doesn't update the .pot files on manpage changes > (correctly), doing a 'make clean' causes the .pot files to be regenerated. >
New version attached. bye, Sumit > All of my other tests seemed to be working smoothly, so hopefully this > is the last iteration. > > - -- > Stephen Gallagher > RHCE 804006346421761 > > Delivering value year after year. > Red Hat ranks #1 in value among software vendors. > http://www.redhat.com/promo/vendor/ > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.11 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk0SLLEACgkQeiVVYja6o6OtcwCgmRtqQmwXH8yOUmLf9nOhdZiD > RLQAniPdu3RYxTtAyMEbAdLCgys9Cg2m > =NXDB > -----END PGP SIGNATURE----- > _______________________________________________ > sssd-devel mailing list > sssd-devel@lists.fedorahosted.org > https://fedorahosted.org/mailman/listinfo/sssd-devel
From 3b3941f83ad33886ebe7f2689e34406fd3006d5c Mon Sep 17 00:00:00 2001 From: Jakub Hrozek <jhro...@redhat.com> Date: Wed, 20 Oct 2010 17:23:11 +0200 Subject: [PATCH 1/2] Make manual pages translatable Utilizes PO4A to extract translatable strings from Docbook XML sources and allows translators to submit ordinary .PO files. PO4A then generates translated Docbook documents that can be used to generate translated end user documentation. https://fedorahosted.org/sssd/ticket/297 --- Makefile.am | 47 +++---------- configure.ac | 4 +- contrib/sssd.spec.in | 2 + src/man/Makefile.am | 160 ++++++++++++++++++++++++++++++++++++++++++++ src/man/po/po4a.cfg | 22 ++++++ src/man/sss_groupdel.8.xml | 2 +- 6 files changed, 198 insertions(+), 39 deletions(-) create mode 100644 src/man/Makefile.am create mode 100644 src/man/po/po4a.cfg diff --git a/Makefile.am b/Makefile.am index d2cf3d0..174c775 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ DISTCHECK_CONFIGURE_FLAGS = --with-ldb-lib-dir="$$dc_install_base"/lib/ldb -SUBDIRS = po +SUBDIRS = po src/man # Some old versions of automake don't define builddir builddir ?= . @@ -957,41 +957,15 @@ pysss_la_LDFLAGS = \ -module endif -############ -# MANPAGES # -############ - -#Special Rules: -export SGML_CATALOG_FILES -DOCBOOK_XSLT = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl -XMLLINT_FLAGS = --catalogs --postvalid --nonet --xinclude --noout -XSLTPROC_FLAGS = --catalogs --xinclude --nonet - -man_MANS = \ - src/man/sss_useradd.8 src/man/sss_userdel.8 src/man/sss_usermod.8 \ - src/man/sss_groupadd.8 src/man/sss_groupdel.8 src/man/sss_groupmod.8 \ - src/man/sssd.8 src/man/sssd.conf.5 src/man/sssd-ldap.5 \ - src/man/sssd-krb5.5 src/man/sssd-ipa.5 src/man/sssd-simple.5 \ - src/man/sssd_krb5_locator_plugin.8 src/man/sss_groupshow.8 \ - src/man/pam_sss.8 src/man/sss_obfuscate.8 -EXTRA_DIST += $(man_MANS:%=%.xml) $(wildcard $(srcdir)/src/man/include/*.xml) - -SUFFIXES = .1.xml .1 .3.xml .3 .5.xml .5 .8.xml .8 -.1.xml.1: - $(XMLLINT) $(XMLLINT_FLAGS) $< - $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(DOCBOOK_XSLT) $< - -.3.xml.3: - $(XMLLINT) $(XMLLINT_FLAGS) $< - $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(DOCBOOK_XSLT) $< - -.5.xml.5: - $(XMLLINT) $(XMLLINT_FLAGS) $< - $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(DOCBOOK_XSLT) $< - -.8.xml.8: - $(XMLLINT) $(XMLLINT_FLAGS) $< - $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(DOCBOOK_XSLT) $< +################ +# TRANSLATIONS # +################ +update-po: + $(MAKE) -C src/man update-po + $(MAKE) -C po update-po + +translated-manpages: + $(MAKE) -C src/man translate ####################### # Installation Extras # @@ -1083,7 +1057,6 @@ if BUILD_PYTHON_BINDINGS cd $(srcdir)/src/config; $(PYTHON) setup.py build --build-base $(abs_builddir)/src/config clean --all endif rm -Rf doc - rm -f $(man_MANS) CLEANFILES = *.X */*.X */*/*.X diff --git a/configure.ac b/configure.ac index 1ebf2f7..6192c53 100644 --- a/configure.ac +++ b/configure.ac @@ -142,6 +142,8 @@ if test x$HAVE_MANPAGES != x; then CHECK_STYLESHEET([$SGML_CATALOG_FILES], [http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl], [Docbook XSL templates]) + AC_CHECK_PROG([PO4A],[po4a],[po4a],[no]) + AM_CONDITIONAL([HAVE_PO4A], [test "x$PO4A" != "xno"]) fi if test x$HAVE_PYTHON_BINDINGS != x; then @@ -184,6 +186,6 @@ AC_DEFINE_UNQUOTED([ABS_BUILD_DIR], ["$abs_build_dir"], [Absolute path to the bu AC_SUBST([abs_builddir], $abs_build_dir) AC_CONFIG_FILES([Makefile contrib/sssd.spec src/examples/rwtab src/doxy.config - src/sysv/systemd/sssd.service po/Makefile.in]) + src/sysv/systemd/sssd.service po/Makefile.in src/man/Makefile]) AC_OUTPUT diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index d1e505b..0f9ff64 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -73,6 +73,7 @@ BuildRequires: bind-utils BuildRequires: keyutils-libs-devel BuildRequires: libnl-devel BuildRequires: nscd +BuildRequires: po4a %description Provides a set of daemons to manage access to remote directories and @@ -118,6 +119,7 @@ use with ldap_default_authtok_type = obfuscated_password. --disable-rpath make %{?_smp_mflags} +make translated-manpages %check export CK_TIMEOUT_MULTIPLIER=10 diff --git a/src/man/Makefile.am b/src/man/Makefile.am new file mode 100644 index 0000000..695696b --- /dev/null +++ b/src/man/Makefile.am @@ -0,0 +1,160 @@ +# The following variable is dependent on placement of this file +top_builddir = ../.. + +############ +# MANPAGES # +############ + +#Special Rules: +export SGML_CATALOG_FILES +DOCBOOK_XSLT = http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl +XMLLINT_FLAGS = --catalogs --postvalid --nonet --xinclude --noout +XSLTPROC_FLAGS = --catalogs --xinclude --nonet + +man_MANS = \ + sss_useradd.8 sss_userdel.8 sss_usermod.8 \ + sss_groupadd.8 sss_groupdel.8 sss_groupmod.8 \ + sssd.8 sssd.conf.5 sssd-ldap.5 \ + sssd-krb5.5 sssd-ipa.5 sssd-simple.5 \ + sssd_krb5_locator_plugin.8 sss_groupshow.8 \ + pam_sss.8 sss_obfuscate.8 +EXTRA_DIST = $(man_MANS:%=%.xml) $(wildcard $(srcdir)/include/*.xml) + +SUFFIXES = .1.xml .1 .3.xml .3 .5.xml .5 .8.xml .8 +.1.xml.1: + $(XMLLINT) $(XMLLINT_FLAGS) $< + $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(DOCBOOK_XSLT) $< + +.3.xml.3: + $(XMLLINT) $(XMLLINT_FLAGS) $< + $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(DOCBOOK_XSLT) $< + +.5.xml.5: + $(XMLLINT) $(XMLLINT_FLAGS) $< + $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(DOCBOOK_XSLT) $< + +.8.xml.8: + $(XMLLINT) $(XMLLINT_FLAGS) $< + $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(DOCBOOK_XSLT) $< + +######################## +# MANPAGE TRANSLATIONS # +######################## + +po...@po4a@ +s...@sed@ + +PACKAGE_DOC=sssd-docs + +POTFILE = po/$(PACKAGE_DOC).pot +PO4A_CONFIG = po/po4a.cfg + +# Extract the list of languages from the po4a config file. +LINGUAS_DIST = `$(SED) -ne 's/^.*\[po4a_langs\] \(.*\)$$/\1/p' $(srcdir)/$(PO4A_CONFIG)` + +# If the user has not defined it let's use the default. +LINGUAS ?= $(LINGUAS_DIST) + +PO4A_COMMON_OPTS = --option doctype=docbook \ + --package-name $(PACKAGE_DOC) \ + --variable builddir=$(CURDIR) \ + --package-version $(PACKAGE_VERSION) \ + --msgid-bugs-address sssd-de...@redhat.com \ + --copyright-holder "Red Hat" + +PO4A_BUILD_OPTS = $(PO4A_COMMON_OPTS) --no-backups + +EXTRA_DIST += \ + $(POTFILE)\ + $(PO4A_CONFIG) + +XML_DOC = $(wildcard $(srcdir)/*.xml) $(wildcard $(srcdir)/include/*.xml) + +if HAVE_PO4A + +# FIXME: Use a stamp file until po4a supports them internally. +man.stamp: $(XML_DOC) + cd $(srcdir) && \ + $(PO4A) $(PO4A_BUILD_OPTS) $(PO4A_CONFIG) + touch $@ + +update-po: + cd $(srcdir) && \ + $(PO4A) $(PO4A_BUILD_OPTS) --force $(PO4A_CONFIG) + +# Generate translated manual pages +translate: man.stamp + if [ -z $$recursion ]; then \ + for lang in $(LINGUAS); do \ + if [ -d $$lang ]; then \ + sources=$$(ls $$lang/*.xml); \ + manpages=$$(echo $$sources | $(SED) 's/\.xml//'); \ + $(MAKE) recursion=1 man_MANS="$$manpages"; \ + fi \ + done \ + fi + + +dist-hook: man.stamp + if [ -f man.stamp ]; then \ + cp man.stamp $(distdir); \ + for lang in $(LINGUAS_DIST); do \ + cp $(srcdir)/po/$$lang.po $(distdir)/po; \ + $(mkdir_p) $(distdir)/$$lang; \ + cp -r $(builddir)/$$lang $(distdir)/; \ + done; \ + else \ + cp $(srcdir)/man.stamp $(distdir); \ + for lang in $(LINGUAS_DIST); do \ + cp $(srcdir)/po/$$lang.po $(distdir)/po; \ + $(mkdir_p) $(distdir)/$$lang; \ + cp -r $(srcdir)/$$lang $(distdir)/; \ + done; \ + fi + + +clean-local: clean-loc...@use_nls@ +distclean-local: clean-loc...@use_nls@ +mostlyclean-local: clean-loc...@use_nls@ +maintainer-clean-local: clean-loc...@use_nls@ + +clean-local-no: +clean-local-yes: + for lang in $(LINGUAS); do \ + if [ -d $$lang ]; then \ + rm -rf $$lang; \ + fi \ + done + rm -f $(man_MANS) + rm -f man.stamp + +install-data-local: install-data-loc...@use_nls@ +install-data-local-no: +install-data-local-yes: + for lang in $(LINGUAS); do \ + if [ -d $$lang ]; then \ + sources=$$(ls $$lang/*.xml); \ + manpages=$$(echo $$sources | $(SED) 's/\.xml//'); \ + $(MAKE) install-man \ + mandir="$(mandir)/$$lang" \ + man_MANS="$$manpages"; \ + fi \ + done + +uninstall-local: uninstall-loc...@use_nls@ +uninstall-local-no: +uninstall-local-yes: + for lang in $(LINGUAS); do \ + if [ -d $$lang ]; then \ + sources=$$(ls $$lang/*.xml); \ + manpages=$$(echo $$sources | $(SED) 's/\.xml//'); \ + $(MAKE) uninstall-man \ + mandir="$(mandir)/$$lang" \ + man_MANS="$$manpages"; \ + fi \ + done + +else +translate: + @echo No po4a, skipping translations +endif diff --git a/src/man/po/po4a.cfg b/src/man/po/po4a.cfg new file mode 100644 index 0000000..4628642 --- /dev/null +++ b/src/man/po/po4a.cfg @@ -0,0 +1,22 @@ +[po4a_langs] cs +[po4a_paths] po/sssd-docs.pot $lang:po/$lang.po +[type:docbook] sss_groupmod.8.xml $lang:$(builddir)/$lang/sss_groupmod.8.xml +[type:docbook] sssd.conf.5.xml $lang:$(builddir)/$lang/sssd.conf.5.xml +[type:docbook] sssd-ldap.5.xml $lang:$(builddir)/$lang/sssd-ldap.5.xml +[type:docbook] pam_sss.8.xml $lang:$(builddir)/$lang/pam_sss.8.xml +[type:docbook] sssd_krb5_locator_plugin.8.xml $lang:$(builddir)/$lang/sssd_krb5_locator_plugin.8.xml +[type:docbook] sssd-simple.5.xml $lang:$(builddir)/$lang/sssd-simple.5.xml +[type:docbook] sssd-ipa.5.xml $lang:$(builddir)/$lang/sssd-ipa.5.xml +[type:docbook] sssd.8.xml $lang:$(builddir)/$lang/sssd.8.xml +[type:docbook] sss_obfuscate.8.xml $lang:$(builddir)/$lang/sss_obfuscate.8.xml +[type:docbook] sss_useradd.8.xml $lang:$(builddir)/$lang/sss_useradd.8.xml +[type:docbook] sssd-krb5.5.xml $lang:$(builddir)/$lang/sssd-krb5.5.xml +[type:docbook] sss_groupadd.8.xml $lang:$(builddir)/$lang/sss_groupadd.8.xml +[type:docbook] sss_userdel.8.xml $lang:$(builddir)/$lang/sss_userdel.8.xml +[type:docbook] sss_groupdel.8.xml $lang:$(builddir)/$lang/sss_groupdel.8.xml +[type:docbook] sss_groupshow.8.xml $lang:$(builddir)/$lang/sss_groupshow.8.xml +[type:docbook] sss_usermod.8.xml $lang:$(builddir)/$lang/sss_usermod.8.xml +[type:docbook] include/service_discovery.xml $lang:$(builddir)/$lang/include/service_discovery.xml opt:"-k 0" +[type:docbook] include/upstream.xml $lang:$(builddir)/$lang/include/upstream.xml opt:"-k 0" +[type:docbook] include/failover.xml $lang:$(builddir)/$lang/include/failover.xml opt:"-k 0" +[type:docbook] include/param_help.xml $lang:$(builddir)/$lang/include/param_help.xml opt:"-k 0" diff --git a/src/man/sss_groupdel.8.xml b/src/man/sss_groupdel.8.xml index 22f4fca..978fc73 100644 --- a/src/man/sss_groupdel.8.xml +++ b/src/man/sss_groupdel.8.xml @@ -13,7 +13,7 @@ <refnamediv id='name'> <refname>sss_groupdel</refname> - <refpurpose>create a new group</refpurpose> + <refpurpose>delete a group</refpurpose> </refnamediv> <refsynopsisdiv id='synopsis'> -- 1.7.3.3
0002-Add-Czech-translation.patch.bz2
Description: BZip2 compressed data
_______________________________________________ sssd-devel mailing list sssd-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/sssd-devel