build/make-l10n
John J. McDonough
jjmcd at fedoraproject.org
Fri Sep 25 00:31:14 UTC 2009
build/make-l10n | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 118 insertions(+)
New commits:
commit e0c1faca66712af5b1be9aace689d67019b8f7ab
Author: John J. McDonough <jjmcd at fedoraproject.org>
Date: Thu Sep 24 20:31:06 2009 -0400
Script used to build beta release notes for L10N
diff --git a/build/make-l10n b/build/make-l10n
new file mode 100755
index 0000000..4c405f6
--- /dev/null
+++ b/build/make-l10n
@@ -0,0 +1,118 @@
+#!/bin/sh
+#
+# Test build Fedora 12 release notes and push to is-sixsigma
+#
+# This is the script running on the crontab to build the Fedora 12
+# release notes for L10N to review.
+#
+# NOTE that this will require editing to run on your system
+#
+# jjmcd - 2009-09-24
+#
+# These first two are the ones that need changed. In addition, your
+# .netrc must contain credentials for logging on to ftp
+BUILDDIR=~/Projects/Release-Notes/F12/beta
+GITIT="git clone ssh://jjmcd@git.fedorahosted.org/git/docs/release-notes.git"
+#
+BRANCH=remotes/origin/f12-tx
+MAIN=master
+# Languages in Transifex
+TFXLAN=(as bn_IN ca cs da de el es fi fr gu he hi hr hu id it ja kn ko ml mr ms nb nl or pa pl pt_BR pt ru sk sr_Latn sr sv ta te uk zh_CN zh_TW)
+# Corresponding languages in Publican
+PUBLAN=(as-IN bn-IN ca-ES cs-CZ da-DK de-DE el-GR es-ES fi-FI fr-FR gu-IN he-IL hi-IN hr-HR hu-HU id-ID it-IT ja-JP kn-IN ko-KR ml-IN mr-IN ms-MY nb-NO nl-NL or-IN pa-IN pl-PL pt-BR pt-PT ru-RU sk-SK sr-Latn-RS sr-RS sv-SE ta-IN te-IN uk-UA zh-CN zh-TW)
+#
+# Retrieve latest from git.fh.o
+#
+cd ${BUILDDIR}
+rm -Rf release-notes
+$GITIT
+#
+# Grab the po files from f12-tx and stash them
+#
+pushd release-notes
+git checkout ${BRANCH}
+mkdir ../hold
+cp po/* ../hold/
+#
+# Go back to the master branch and put the po files as well
+# as the doctored makefile where they belong
+#
+git checkout ${MAIN}
+cp ../hold/* po/
+cp ../Makefile .
+rm -Rf ../hold
+#
+# Build the en-US notes
+#
+make html-en-US
+#
+# Now make a script to copy them up and execute it
+#
+echo "cd /var/www/fedora/F12beta" >ftp.tmp
+echo "mkdir en-US" >>ftp.tmp
+echo "lcd tmp/en-US/html" >>ftp.tmp
+echo "cd en-US" >>ftp.tmp
+echo "mkdir Common_Content" >>ftp.tmp
+echo "mkdir Common_Content/css" >>ftp.tmp
+echo "mkdir Common_Content/images" >>ftp.tmp
+echo "mkdir images" >>ftp.tmp
+echo "mput *" >>ftp.tmp
+echo "cd images" >>ftp.tmp
+echo "lcd images" >>ftp.tmp
+echo "mput *" >>ftp.tmp
+echo "cd ../Common_Content/css" >>ftp.tmp
+echo "lcd ../Common_Content/css" >>ftp.tmp
+echo "mput *" >>ftp.tmp
+echo "cd ../images" >>ftp.tmp
+echo "lcd ../images" >>ftp.tmp
+echo "mput *" >>ftp.tmp
+echo "bye" >>ftp.tmp
+ftp -pi fedora.is-sixsigma.com <ftp.tmp
+# pots in master out of date????
+# Some are missing, so this is a temp fix
+make update-pot
+#
+# Loop through the various languages and execute them in turn
+#
+for NUM in {0..39} ; do
+ #
+ # Generate the po files from the munged up tfx po's
+ #
+ mv po/${TFXLAN[${NUM}]}.po po/${PUBLAN[${NUM}]}.po
+ mkdir ${PUBLAN[${NUM}]}
+ for POTFILE in pot/*.pot; do
+ msgmerge po/${PUBLAN[${NUM}]}.po ${POTFILE} | msgattrib --no-obsolete \
+ > ${PUBLAN[${NUM}]}/$(basename ${POTFILE} .pot).po
+ done
+ #
+ # Now build the notes
+ #
+ make html-${PUBLAN[${NUM}]} 2> ../${PUBLAN[${NUM}]}.log
+ #
+ # and copy them up as before, if some sort of failure,
+ # don't poison dates on web
+ #
+ if [ -r tmp/${PUBLAN[${NUM}]}/html ] ; then
+ echo "cd /var/www/fedora/F12beta" >ftp.tmp
+ echo "mkdir ${PUBLAN[${NUM}]}" >>ftp.tmp
+ echo "lcd tmp/${PUBLAN[${NUM}]}/html" >>ftp.tmp
+ echo "cd ${PUBLAN[${NUM}]}" >>ftp.tmp
+ echo "mkdir Common_Content" >>ftp.tmp
+ echo "mkdir Common_Content/css" >>ftp.tmp
+ echo "mkdir Common_Content/images" >>ftp.tmp
+ echo "mkdir images" >>ftp.tmp
+ echo "mput *" >>ftp.tmp
+ echo "cd images" >>ftp.tmp
+ echo "lcd images" >>ftp.tmp
+ echo "mput *" >>ftp.tmp
+ echo "cd ../Common_Content/css" >>ftp.tmp
+ echo "lcd ../Common_Content/css" >>ftp.tmp
+ echo "mput *" >>ftp.tmp
+ echo "cd ../images" >>ftp.tmp
+ echo "lcd ../images" >>ftp.tmp
+ echo "mput *" >>ftp.tmp
+ echo "bye" >>ftp.tmp
+ ftp -pi fedora.is-sixsigma.com <ftp.tmp
+ fi
+ done
+popd
More information about the Fedora-docs-commits
mailing list