[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: rpm-info and translations

O/H Tommy Reynolds έγραψε:
Uttered Dimitris Glezos <dimitris glezos com>, spake thus:

A quick Q: Is there a reason for rpm-info.xml not following the normal translation procedure with po-files?

Yes.  We didn't think of it ;-)

Well, I didn't think of it.  My idea was to have *all* the
RPM-related information in "rpm-info.xml" and then selectively
extract whatever we needed from it.  I was unfamiliar with the
translator's PO-centric approach.

Changing "rpm-info.xml" to become part of the PO process is on our
list, but so far neither Paul nor I have had time to work on it.

Anybody want to step up?

Attaching a patch that does it.

I moved `rpm-info.xml` inside `en_US/`, where it should be now that the translations will be handled from the po files. If this is too big of a change, I guess we can live with the file at the root of each doc.


Dimitris Glezos
Jabber ID: glezos jabber org, PGP: 0xA5A04C3B

"He who gives up functionality for ease of use
loses both and deserves neither." (Anonymous)
Index: docs-common/Makefile.common
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.123
diff -u -p -u -r1.123 Makefile.common
--- docs-common/Makefile.common	15 Jul 2006 15:20:46 -0000	1.123
+++ docs-common/Makefile.common	24 Jul 2006 02:31:39 -0000
@@ -102,7 +102,7 @@ ifeq	"${PRI_LANG}" ""
 ifeq	"${RPMINFO}" ""
-RPMINFO		= ${PWD}/rpm-info.xml
+RPMINFO		= ${PWD}/${PRI_LANG}/rpm-info.xml
 ifeq	"${RPMPREP}" ""
@@ -307,7 +307,8 @@ po/${DOCBASE}.pot:: ${DOC_ENTITIES_XML-$
 	[ -d po/CVS ] || (echo ADD po/ TO CVS >&2; exit 1)
 	@printf ${TFMT} 'po/${DOCBASE}.pot' 'Writes one POT file for all XML'
@@ -633,13 +634,16 @@ help::
 define fdp-info_template
 $(1)/fdp-info.xml::	$(RPMINFO)
 	mkdir -p ${1}
+# Translate rpm-info.xml and put it in the language directory:
+	${XML2PO} ${XML2POFLAGS} -p po/${1}.po 				\
+		$(RPMINFO) >${1}/rpm-info.xml
 	LANG=$(1).UTF-8 ${XSLTPROC} --stringparam lang $(1)		\
 		--stringparam fdpdir $(FDPDIR)				\
 		--stringparam doctype $(shell				\
 			doctype ${PRI_LANG}/$(DOCBASE).xml)		\
 		--stringparam legalbase ${LEGALNOTICEBASE}		\
 		${FDPDIR}/docs-common/packaging/bookinfo.xsl 		\
-		$(RPMINFO) 					| 	\
+		${1}/rpm-info.xml 				| 	\

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]