- don't store a translation if it is equal to the original string

This commit is contained in:
Ray Strode 2007-03-21 17:33:31 +00:00
parent 3e23f0dabf
commit 95e395eecd
2 changed files with 30 additions and 3 deletions

View File

@ -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;
}
}

View File

@ -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 <rstrode@redhat.com> - 0.35.5-3
- don't store a translation if it is equal to the original
string
* Mon Mar 19 2007 Bill Nottingham <notting@redhat.com> - 0.35.5-2
- add upstream changeset 674 (GNOME bz#413461 - fix intltool-extract path)