[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] propername: return UTF-8 translation when possible
From: |
Bruno Haible |
Subject: |
Re: [PATCH] propername: return UTF-8 translation when possible |
Date: |
Sun, 3 May 2009 14:37:17 +0200 |
User-agent: |
KMail/1.9.9 |
Hi Jim,
> * 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"': /;' \
...
Bruno
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.
--- lib/propername.c.orig 2009-05-03 14:28:47.000000000 +0200
+++ lib/propername.c 2009-05-03 14:28:31.000000000 +0200
@@ -1,5 +1,5 @@
/* Localization of proper names.
- Copyright (C) 2006-2008 Free Software Foundation, Inc.
+ Copyright (C) 2006-2009 Free Software Foundation, Inc.
Written by Bruno Haible <address@hidden>, 2006.
This program is free software: you can redistribute it and/or modify
@@ -242,7 +242,10 @@
name_converted_translit != NULL ? name_converted_translit :
name_ascii);
- if (translation != name_ascii)
+ /* See whether we have a translation. Some translators have not understood
+ that they should use the UTF-8 form of the name, if possible. So if the
+ translator provided a no-op translation, we ignore it. */
+ if (strcmp (translation, name_ascii) != 0)
{
/* See whether the translation contains the original name. */
if (mbsstr_trimmed_wordbounded (translation, name_ascii)