docs-common/bin fdp-functions,1.6,1.7

Tommy Reynolds (jtr) fedora-docs-commits at redhat.com
Fri Feb 3 15:50:54 UTC 2006


Author: jtr

Update of /cvs/docs/docs-common/bin
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18264

Modified Files:
	fdp-functions 
Log Message:
Added shell command "apply_po foo-en.xml" has a shortcut to the
actual "po2xml foo-en.xml foo-en.po" file.  Use it like this:

fdpsh> make po
fdpsh> kbable foo-en.po
fdpsh> apply_po foo-en.xml >foo-xx.xml




Index: fdp-functions
===================================================================
RCS file: /cvs/docs/docs-common/bin/fdp-functions,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- fdp-functions	21 Jan 2006 14:30:26 -0000	1.6
+++ fdp-functions	3 Feb 2006 15:50:47 -0000	1.7
@@ -84,3 +84,15 @@
 validate_rpm_info()	{
 	xmllint --noout --valid ${RPMINFO} && echo ${RPMINFO} OK
 }
+
+apply_po()	{
+	if [ $# -ne 1 ]; then
+		echo "usage: apply_po filename.xml">&2
+	fi
+	POFILE=`/bin/basename "$1" .xml`.po
+	if [ ! -f "${POFILE}" ]; then
+		echo "apply_po: file '${POFILE}' not found." >&2
+		return 1
+	fi
+	po2xml "$1" "${POFILE}"
+}




More information about the Fedora-docs-commits mailing list