From 9ccd438ce337e6fb8c95d9261f1e06a3952261c2 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 3 May 2009 14:32:16 +0200 Subject: [PATCH] Ignore no-op translations. --- ChangeLog | 6 ++++++ lib/propername.c | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 817788ae1..e8dbe5159 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ 2009-05-03 Jim Meyering + Bruno Haible + + * lib/propername.c (proper_name_utf8): Ignore no-op translations; + use the converted UTF-8 variant of the name instead. + +2009-05-03 Jim Meyering tests: tighten some getdate tests * tests/test-getdate.c (main): Tighten tests: require equality, diff --git a/lib/propername.c b/lib/propername.c index b3c91aee1..381a7a72c 100644 --- a/lib/propername.c +++ b/lib/propername.c @@ -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 , 2006. This program is free software: you can redistribute it and/or modify @@ -242,7 +242,10 @@ proper_name_utf8 (const char *name_ascii, const char *name_utf8) 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) -- 2.11.0