From 95e395eecd1233121db53b457a0ba9a1d36e35f6 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 21 Mar 2007 17:33:31 +0000 Subject: [PATCH] - don't store a translation if it is equal to the original string --- intltool-0.35.5-dont-duplicate-msgid.patch | 20 ++++++++++++++++++++ intltool.spec | 13 ++++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 intltool-0.35.5-dont-duplicate-msgid.patch diff --git a/intltool-0.35.5-dont-duplicate-msgid.patch b/intltool-0.35.5-dont-duplicate-msgid.patch new file mode 100644 index 0000000..576b163 --- /dev/null +++ b/intltool-0.35.5-dont-duplicate-msgid.patch @@ -0,0 +1,20 @@ +--- intltool-0.35.5/intltool-merge.in.in.dont-duplicate-msgid 2007-03-21 13:10:28.000000000 -0400 ++++ intltool-0.35.5/intltool-merge.in.in 2007-03-21 13:13:43.000000000 -0400 +@@ -428,7 +428,7 @@ + + if (/^msgid "((\\.|[^\\]+)*)"/ ) + { +- $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; ++ $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr && $msgid ne $msgstr; + $msgid = ""; + $msgstr = ""; + +@@ -455,7 +455,7 @@ + $msgstr .= unescape_po_string($1) if $inmsgstr; + } + } +- $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; ++ $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr && $msgstr ne $msgid; + } + } + diff --git a/intltool.spec b/intltool.spec index 551ca84..64f7b54 100644 --- a/intltool.spec +++ b/intltool.spec @@ -1,13 +1,12 @@ Name: intltool Summary: Utility for internationalizing various kinds of data files Version: 0.35.5 -Release: 2%{?dist} +Release: 3%{?dist} License: GPL Group: Development/Tools Source: http://ftp.gnome.org/pub/gnome/sources/intltool/0.35/%{name}-%{version}.tar.bz2 URL: http://www.gnome.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Patch: intltool-0.35.5-path.patch Requires: patch Obsoletes: xml-i18n-tools Provides: xml-i18n-tools = 0.11 @@ -15,6 +14,9 @@ Requires: perl(XML::Parser) BuildRequires: perl(XML::Parser) BuildRequires: gettext +Patch0: intltool-0.35.5-path.patch +Patch1: intltool-0.35.5-dont-duplicate-msgid.patch + %description This tool automatically extracts translatable strings from oaf, glade, bonobo ui, nautilus theme, .desktop, and other data files and puts @@ -22,7 +24,8 @@ them in the po files. %prep %setup -q -%patch -p1 -b .path +%patch0 -p1 -b .path +%patch1 -p1 -b .dont-duplicate-msgid %build %configure @@ -46,6 +49,10 @@ make %{_mandir}/man*/* %changelog +* Wed Mar 21 2007 Ray Strode - 0.35.5-3 +- don't store a translation if it is equal to the original + string + * Mon Mar 19 2007 Bill Nottingham - 0.35.5-2 - add upstream changeset 674 (GNOME bz#413461 - fix intltool-extract path)