bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] propername: return UTF-8 translation when possible


From: Jim Meyering
Subject: Re: [PATCH] propername: return UTF-8 translation when possible
Date: Sun, 03 May 2009 15:30:51 +0200

Bruno Haible wrote:
>> * lib/propername.c (proper_name_utf8): Test not pointer equality,
>> but rather string equality.
>
> Thanks, applied with a comment, as below.
>
>> Without this, coreutils' "make check-AUTHORS" test fails.
>
> The check-AUTHORS rule in coreutils/src/Makefile.am also has a second
> problem: it expects the English translation
>
>             | sed -n -e '/Written by /{ s//'"$$i"': /;' \
>                   -e 's/,* and /, /; s/\.$$//; p; }';   \
>
> whereas for French you will need soemthing like
>
>             | sed -n -e '/Écrit par /{ s//'"$$i"': /;' \
>                   ...
>
> 2009-05-03  Jim Meyering  <address@hidden>
>             Bruno Haible  <address@hidden>
>
>       * lib/propername.c (proper_name_utf8): Ignore no-op translations;
>       use the converted UTF-8 variant of the name instead.

Hi Bruno,

Thanks.  Good idea to add that comment.

Regarding check-AUTHORS, Andreas Schwab mentioned the same thing:

  http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/16784/focus=16793

But even when I modified that patch to use "É" in place of my ".",
the rule still failed during a "make distcheck" build due to
the fact that the translations were not yet installed.
So now, I'm considering going back to using en_US.UTF-8,
with this patch:


>From f6b7d785fd508e878e64eabf24d42160d87633a5 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 2 May 2009 21:56:25 +0200
Subject: [PATCH] tests: correct the "make check"-run check-AUTHORS test

* src/Makefile.am (check-AUTHORS): Revert back to using
en_US.UTF-8, to ease parsing (English-only) text around the
list of names, even when .po files are not installed.
Reported by Andreas Schwab.
Along the way, use $(AM_V_GEN), not "@".
(sc_tight_scope): Use $(AM_V_GEN) here, too.
---
 src/Makefile.am |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 5c09906..136cada 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -382,15 +382,15 @@ check-duplicate-no-install: tr
        test -z "`echo '$(EXTRA_PROGRAMS)'| ./tr ' ' '\n' | uniq -d`"

 # Ensure that the list of programs and author names is accurate.
-# We need a UTF8 locale, and any one should do, but since configure
-# already tries to find a French one, use it.  It's fine to skip this test.
+# We need a UTF8 locale.  If a lack of locale support or a missing
+# translation inhibits printing of UTF-8 names, just skip this test.
 au_dotdot = authors-dotdot
 au_actual = authors-actual
 .PHONY: check-AUTHORS
 check-AUTHORS: $(all_programs)
-       @locale='$(LOCALE_FR_UTF8)';                    \
-       case "$$locale" in                              \
-         ''|none) echo "$@: skipping this check"; exit 0;; esac; \
+       $(AM_V_GEN)LC_ALL="$$locale" ./cat --version    \
+           | grep ' Torbjorn '                         \
+         && { echo "$@: skipping this check"; exit 0; }; \
        rm -f $(au_actual) $(au_dotdot);                \
        for i in `ls $(all_programs) | sed -e 's,$(EXEEXT)$$,,' \
            | $(ASSORT) -u`; do                         \
@@ -420,7 +420,7 @@ check-AUTHORS: $(all_programs)
 # The second nm|grep checks for file-scope variables with `extern' scope.
 .PHONY: sc_tight_scope
 sc_tight_scope: $(bin_PROGRAMS)
-       @t=exceptions-$$$$;                                             \
+       $(AM_V_GEN)t=exceptions-$$$$;                                   \
        trap "s=$$?; rm -f $$t; exit $$s" 0 1 2 13 15;                  \
        src=`for f in $(SOURCES); do                                    \
               test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`;   \
--
1.6.3.rc4.190.g4648




reply via email to

[Prev in Thread] Current Thread [Next in Thread]