diff --git a/ChangeLog b/ChangeLog index eb5b65c41..0b06f7aca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-03-03 Vladimir Serbinenko + + Add a pig farm. + + * po/piglatin.sed: New file. + * po/en@piglatin.header: Likewise. + * po/Rules-piglatin: Likewise. + * po/README: Add en@piglatin to autogenerated languages. + 2012-03-03 Vladimir Serbinenko * grub-core/commands/date.c (GRUB_MOD_INIT): Remove non-uniform diff --git a/po/README b/po/README index 830f5f0b2..2fbde856b 100644 --- a/po/README +++ b/po/README @@ -10,7 +10,7 @@ that will hopefully clarify the situation. Then create a po/LINGUAS file listing all the language codes: - ((cd po && ls *.po| cut -d. -f1; echo "en@quot"; echo "de_CH") | sort |uniq | xargs) >po/LINGUAS + ((cd po && ls *.po| cut -d. -f1; echo "en@quot"; echo "en@piglatin"; echo "de_CH") | sort |uniq | xargs) >po/LINGUAS GRUB's build system will automatically detect those and include them in your install. diff --git a/po/Rules-piglatin b/po/Rules-piglatin new file mode 100644 index 000000000..891fd4b25 --- /dev/null +++ b/po/Rules-piglatin @@ -0,0 +1,41 @@ +# Special Makefile rules for Pig Latin message catalogs with quotation marks. + +DISTFILES.common.extra3 = piglatin.sed en@piglatin.header insert-header.sin Rules-piglatin + +.SUFFIXES: .insert-header .po-update-en + +en@piglatin.po-create: + $(MAKE) en@piglatin.po-update + +en@piglatin.po-update: en@piglatin.po-update-en + +.insert-header.po-update-en: + @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ + if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ + tmpdir=`pwd`; \ + echo "$$lang:"; \ + ll=`echo $$lang | sed -e 's/@.*//'`; \ + LC_ALL=C; export LC_ALL; \ + cd $(srcdir); \ + if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + rm -f $$tmpdir/$$lang.new.po; \ + else \ + if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ + :; \ + else \ + echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ + exit 1; \ + fi; \ + fi; \ + else \ + echo "creation of $$lang.po failed!" 1>&2; \ + rm -f $$tmpdir/$$lang.new.po; \ + fi + +en@piglatin.insert-header: insert-header.sin + sed -e '/^#/d' -e 's/HEADER/en@piglatin.header/g' $(srcdir)/insert-header.sin > en@piglatin.insert-header + +mostlyclean: mostlyclean-piglatin +mostlyclean-piglatin: + rm -f *.insert-header diff --git a/po/en@piglatin.header b/po/en@piglatin.header new file mode 100644 index 000000000..0da96543e --- /dev/null +++ b/po/en@piglatin.header @@ -0,0 +1,4 @@ +# This catalog in addition to fixing quoting like en@quot translates the +# messages into Pig Latin. Can be useful for testing that all strings are +# marked even before any translation is available or without knowing any +# specific language besides English. diff --git a/po/piglatin.sed b/po/piglatin.sed new file mode 100644 index 000000000..041688c7d --- /dev/null +++ b/po/piglatin.sed @@ -0,0 +1,21 @@ +/^Project-Id-Version:/ b +/^Report-Msgid-Bugs-To:/ b +/^POT-Creation-Date:/ b +/^PO-Revision-Date:/ b +/^Last-Translator:/ b +/^Language-Team:/ b +/^Language:/ b +/^MIME-Version:/ b +/^Content-Type:/ b +/^Content-Transfer-Encoding:/ b +/^Plural-Forms:/ b + +s/"\([^"]*\)"/“\1”/g +s/`\([^`']*\)'/‘\1’/g +s/ '\([^`']*\)' / ‘\1’ /g +s/ '\([^`']*\)'$/ ‘\1’/g +s/^'\([^`']*\)' /‘\1’ /g +s/“”/""/g + +s,\(^\|[^a-zA-Z0-9%\\]\)\([aoeuiAOEUI]\)\([a-zA-Z]*\),\1\2\3way,g +s,\(^\|[^a-zA-Z0-9%\\]\)\([bcdfghj-np-tvwxzBCDFGHJ-NP-TVWXZ][bcdfghj-np-tvwxzBCDFGHJ-NP-TVWXZ]*\)\([a-zA-Z]*\),\1\3\2ay,g