Skip to contentSkip to conversation

Add i18n support to gfs2-utils

PATCH New Carlos Maiolino 1 participant 1 message Jun 7, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add i18n support to gfs2-utils

This is a new version of the first patch, which adds i18n support to gfs2-utils, but makes use of an external libintl, instead of embed it into the package.

---
 ChangeLog              |    5 +
 Makefile.am            |    4 +-
 config.rpath           |  672 ++++++++++++++++++++++++++++++++++++++++++++++++
 configure.ac           |    5 +
 po/ChangeLog           |   12 +
 po/Makefile.in.in      |  444 ++++++++++++++++++++++++++++++++
 po/Makevars            |   41 +++
 po/POTFILES.in         |    1 +
 po/Rules-quot          |   47 ++++
 po/boldquot.sed        |   10 +
 po/en at boldquot.header  |   25 ++
 po/en at quot.header      |   22 ++
 po/insert-header.sin   |   23 ++
 po/quot.sed            |    6 +
 po/remove-potcdate.sin |   19 ++
 15 files changed, 1334 insertions(+), 2 deletions(-)
 create mode 100644 ChangeLog
 create mode 100755 config.rpath
 create mode 100644 po/ChangeLog
 create mode 100644 po/Makefile.in.in
 create mode 100644 po/Makevars
 create mode 100644 po/POTFILES.in
 create mode 100644 po/Rules-quot
 create mode 100644 po/boldquot.sed
 create mode 100644 po/en at boldquot.header
 create mode 100644 po/en at quot.header
 create mode 100644 po/insert-header.sin
 create mode 100644 po/quot.sed
 create mode 100644 po/remove-potcdate.sin
ChangeLog new file +5 -0
new file mode 100644
index 0000000..95edce4
@@ -0,0 +1,5 @@
+2011-06-07  gettextize  <[email protected]>
+
+	* Makefile.am (EXTRA_DIST): Add config.rpath, m4/ChangeLog.
+	* configure.ac (AC_CONFIG_FILES): Add po/Makefile.in.
+
Makefile.am +2 -2
index 688c350..2e5d9ae 100644
@@ -1,4 +1,4 @@
-EXTRA_DIST		= autogen.sh
+EXTRA_DIST		= config.rpath m4/ChangeLog  autogen.sh
 
 AUTOMAKE_OPTIONS	= foreign
 
@@ -12,7 +12,7 @@ noinst_HEADERS		= make/copyright.cf
 
 ACLOCAL_AMFLAGS		= -I m4
 
-SUBDIRS			= group gfs2 doc
+SUBDIRS			= po group gfs2 doc
 
 install-exec-local:
 			$(INSTALL) -d $(DESTDIR)/$(LOGDIR)
config.rpath new file +672 -0

672 lines not on this page · raw message

configure.ac +5 -0
index 3fc02d0..80ccdaf 100644
@@ -16,6 +16,10 @@ AC_PROG_LIBTOOL
 
 AC_LANG([C])
 
+#i18n support
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.18])
+
 # Sanitize path
 
 if test "$prefix" = "NONE"; then
@@ -282,6 +286,7 @@ AC_CONFIG_FILES([Makefile
 		 gfs2/tune/Makefile
 		 gfs2/man/Makefile
 		 doc/Makefile
+		 po/Makefile.in
 		 ])
 
 AC_OUTPUT
po/ChangeLog new file +12 -0
new file mode 100644
index 0000000..f9e9119
@@ -0,0 +1,12 @@
+2011-06-07  gettextize  <[email protected]>
+
+	* Makefile.in.in: New file, from gettext-0.18.1.
+	* boldquot.sed: New file, from gettext-0.18.1.
+	* en at boldquot.header: New file, from gettext-0.18.1.
+	* en at quot.header: New file, from gettext-0.18.1.
+	* insert-header.sin: New file, from gettext-0.18.1.
+	* quot.sed: New file, from gettext-0.18.1.
+	* remove-potcdate.sin: New file, from gettext-0.18.1.
+	* Rules-quot: New file, from gettext-0.18.1.
+	* POTFILES.in: New file.
+
po/Makefile.in.in new file +444 -0

444 lines not on this page · raw message

po/Makevars new file +41 -0

41 lines not on this page · raw message

po/POTFILES.in new file +1 -0
new file mode 100644
index 0000000..667e27c
@@ -0,0 +1 @@
+# List of source files which contain translatable strings.
po/Rules-quot new file +47 -0

47 lines not on this page · raw message

po/boldquot.sed new file +10 -0
new file mode 100644
index 0000000..4b937aa
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/???\1???/g
+s/`\([^`']*\)'/???\1???/g
+s/ '\([^`']*\)' / ???\1??? /g
+s/ '\([^`']*\)'$/ ???\1???/g
+s/^'\([^`']*\)' /???\1??? /g
+s/??????/""/g
+s/???/???/g
+s/???/???/g
+s/???/???/g
+s/???/???/g
po/en at boldquot.header new file +25 -0
new file mode 100644
index 0000000..fedb6a0
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
po/en at quot.header new file +22 -0
new file mode 100644
index 0000000..a9647fc
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
po/insert-header.sin new file +23 -0
new file mode 100644
index 0000000..b26de01
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
po/quot.sed new file +6 -0
new file mode 100644
index 0000000..0122c46
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/???\1???/g
+s/`\([^`']*\)'/???\1???/g
+s/ '\([^`']*\)' / ???\1??? /g
+s/ '\([^`']*\)'$/ ???\1???/g
+s/^'\([^`']*\)' /???\1??? /g
+s/??????/""/g
po/remove-potcdate.sin new file +19 -0
new file mode 100644
index 0000000..2436c49
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
Signature · 1 line
1.7.5.2