auto-import changelog data from gettext-0.10.38-6.src.rpm
Wed Aug 22 2001 Trond Eivind Glomsrd <teg@redhat.com> 0.10.38-6 - Fix handling of multiline entries (rest of #50065) - don't use the references of the last entry in a po file - remove duplicates when inverting - Own the en@quot and en@boldquot locale dirs (#52164) - Handle entries with a first line of "" as identical to those without
This commit is contained in:
parent
31ff371cd2
commit
6b911056b6
15
gettext.spec
15
gettext.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: GNU libraries and utilities for producing multi-lingual messages.
|
Summary: GNU libraries and utilities for producing multi-lingual messages.
|
||||||
Name: gettext
|
Name: gettext
|
||||||
Version: 0.10.38
|
Version: 0.10.38
|
||||||
Release: 5
|
Release: 6
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.gz
|
Source: ftp://ftp.gnu.org/gnu/gettext/%{name}-%{version}.tar.gz
|
||||||
@ -95,8 +95,21 @@ exit 0
|
|||||||
%{_datadir}/gettext
|
%{_datadir}/gettext
|
||||||
%{_datadir}/aclocal/*
|
%{_datadir}/aclocal/*
|
||||||
%{_datadir}/emacs/site-lisp/*
|
%{_datadir}/emacs/site-lisp/*
|
||||||
|
# These aren't in glibc...
|
||||||
|
%dir /usr/share/locale/en@boldquot
|
||||||
|
%dir /usr/share/locale/en@boldquot/LC_MESSAGES
|
||||||
|
%dir /usr/share/locale/en@quot
|
||||||
|
%dir /usr/share/locale/en@quot/LC_MESSAGES
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 22 2001 Trond Eivind Glomsrød <teg@redhat.com> 0.10.38-6
|
||||||
|
- Fix handling of multiline entries (rest of #50065)
|
||||||
|
- don't use the references of the last entry in a po file
|
||||||
|
- remove duplicates when inverting
|
||||||
|
- Own the en@quot and en@boldquot locale dirs (#52164)
|
||||||
|
- Handle entries with a first line of "" as identical to those
|
||||||
|
without
|
||||||
|
|
||||||
* Thu Aug 9 2001 Trond Eivind Glomsrød <teg@redhat.com>
|
* Thu Aug 9 2001 Trond Eivind Glomsrød <teg@redhat.com>
|
||||||
- Added "--append" and "-o" to msghack, which should address
|
- Added "--append" and "-o" to msghack, which should address
|
||||||
initial concerns in #50065
|
initial concerns in #50065
|
||||||
|
57
msghack.py
57
msghack.py
@ -2,6 +2,8 @@
|
|||||||
## Copyright (C) 2001 Red Hat, Inc.
|
## Copyright (C) 2001 Red Hat, Inc.
|
||||||
## Copyright (C) 2001 Trond Eivind Glomsrød <teg@redhat.com>
|
## Copyright (C) 2001 Trond Eivind Glomsrød <teg@redhat.com>
|
||||||
|
|
||||||
|
## v0.2 - 2001-08-21
|
||||||
|
|
||||||
## This program is free software; you can redistribute it and/or modify
|
## This program is free software; you can redistribute it and/or modify
|
||||||
## it under the terms of the GNU General Public License as published by
|
## it under the terms of the GNU General Public License as published by
|
||||||
## the Free Software Foundation; either version 2 of the License, or
|
## the Free Software Foundation; either version 2 of the License, or
|
||||||
@ -49,30 +51,38 @@ class GTMessage:
|
|||||||
res=""
|
res=""
|
||||||
for ref in self._refs:
|
for ref in self._refs:
|
||||||
res=res+ref+"\n"
|
res=res+ref+"\n"
|
||||||
res=res+"msgid \"%s\"\nmsgstr \"%s\"\n" % (self._id,self._message)
|
res=res+"msgid %s\nmsgstr %s\n" % (self._id,self._message)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def invertedStrings(self):
|
def invertedStrings(self):
|
||||||
"""
|
"""
|
||||||
Returns a string representation, but with msgid and msgstr inverted
|
Returns a string representation, but with msgid and msgstr inverted.
|
||||||
|
Note: Don't invert the "" string
|
||||||
@self The object instance
|
@self The object instance
|
||||||
"""
|
"""
|
||||||
res=""
|
res=""
|
||||||
for ref in self._refs:
|
for ref in self._refs:
|
||||||
res=res+ref+"\n"
|
res=res+ref+"\n"
|
||||||
res=res+"msgid \"%s\"\nmsgstr \"%s\"\n" % (self._message,self._id)
|
if not self._id=="\"\"":
|
||||||
|
res=res+"msgid %s\nmsgstr %s\n" % (self._message,self._id)
|
||||||
|
else:
|
||||||
|
res=res+"msgid %s\nmsgstr %s\n" % (self._id,self._message)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def emptyMsgStrings(self):
|
def emptyMsgStrings(self):
|
||||||
"""
|
"""
|
||||||
Return a string representation of the object, but leave the msgstr
|
Return a string representation of the object, but leave the msgstr
|
||||||
empty - create a pot file from a po file
|
empty - create a pot file from a po file
|
||||||
|
Note: Won't remove the "" string
|
||||||
@self The object instance
|
@self The object instance
|
||||||
"""
|
"""
|
||||||
res=""
|
res=""
|
||||||
for ref in self._refs:
|
for ref in self._refs:
|
||||||
res=res+ref+"\n"
|
res=res+ref+"\n"
|
||||||
res=res+"msgid \"%s\"\nmsgstr \"\"\n" % (self._id)
|
if not self._id=="\"\"":
|
||||||
|
res=res+"msgid %s\nmsgstr \"\"\n" % (self._id)
|
||||||
|
else:
|
||||||
|
res=res+"msgid %s\nmsgstr %s\n" % (self._id,self._message)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def compareMessage(self,msg):
|
def compareMessage(self,msg):
|
||||||
@ -124,9 +134,9 @@ class GTMasterMessage:
|
|||||||
res=""
|
res=""
|
||||||
for ref in self._refs:
|
for ref in self._refs:
|
||||||
res=res+ref+"\n"
|
res=res+ref+"\n"
|
||||||
res=res+"msgid \"%s\"\n" % self._id
|
res=res+"msgid %s\n" % self._id
|
||||||
for message in self._messages:
|
for message in self._messages:
|
||||||
res=res+"msgstr(%s) \"%s\"\n" %(message[0],message[1])
|
res=res+"msgstr(%s) %s\n" %(message[0],message[1])
|
||||||
res=res+"\n"
|
res=res+"\n"
|
||||||
return res
|
return res
|
||||||
|
|
||||||
@ -158,17 +168,33 @@ class GTFile:
|
|||||||
def invertedStrings(self):
|
def invertedStrings(self):
|
||||||
"""
|
"""
|
||||||
Return a string representation of the object, with msgid and msgstr
|
Return a string representation of the object, with msgid and msgstr
|
||||||
swapped
|
swapped. Will remove duplicates...
|
||||||
@self The object instance
|
@self The object instance
|
||||||
"""
|
"""
|
||||||
res=""
|
|
||||||
|
msght={}
|
||||||
|
msgar=[]
|
||||||
|
|
||||||
for message in self._messages:
|
for message in self._messages:
|
||||||
res=res+message.invertedStrings()+"\n"
|
if message._id=='""' and len(msgar)==0:
|
||||||
|
msgar.append(GTMessage(message._id,message._message,message._refs))
|
||||||
|
continue
|
||||||
|
msg=GTMessage(message._message,message._id,message._refs)
|
||||||
|
if not msght.has_key(msg._id):
|
||||||
|
msght[msg._id]=msg
|
||||||
|
msgar.append(msg)
|
||||||
|
else:
|
||||||
|
msg2=msght[msg._id]
|
||||||
|
for ref in msg._refs:
|
||||||
|
msg2._refs.append(ref)
|
||||||
|
res=""
|
||||||
|
for message in msgar:
|
||||||
|
res=res+str(message)+"\n"
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def msgidDupes(self):
|
def msgidDupes(self):
|
||||||
"""
|
"""
|
||||||
Search for duplicates among the inverted strings
|
Search for duplicates in the msgids.
|
||||||
@self The object instance
|
@self The object instance
|
||||||
"""
|
"""
|
||||||
msgids={}
|
msgids={}
|
||||||
@ -248,13 +274,18 @@ class GTFile:
|
|||||||
if inmsgstr==1:
|
if inmsgstr==1:
|
||||||
if pos==-1:
|
if pos==-1:
|
||||||
inmsgstr=0
|
inmsgstr=0
|
||||||
|
#Handle entries with and without "" consistently
|
||||||
|
if msgid[:2]=='""' and len(msgid)>4:
|
||||||
|
msgid=msgid[2:]
|
||||||
|
if msgstr[:2]=='""' and len(msgstr)>4:
|
||||||
|
msgstr=msgstr[2:]
|
||||||
message=GTMessage(msgid,msgstr,refs)
|
message=GTMessage(msgid,msgstr,refs)
|
||||||
self._messages.append(message)
|
self._messages.append(message)
|
||||||
msgstr=""
|
msgstr=""
|
||||||
msgid=""
|
msgid=""
|
||||||
refs=[]
|
refs=[]
|
||||||
else:
|
else:
|
||||||
msgstr=msgstr+line[pos+1:pos2]+"\n"
|
msgstr=msgstr+line[pos:pos2+1]+"\n"
|
||||||
if inmsgid==0 and line[:5]=="msgid":
|
if inmsgid==0 and line[:5]=="msgid":
|
||||||
msgid=""
|
msgid=""
|
||||||
inmsgid=1
|
inmsgid=1
|
||||||
@ -262,9 +293,9 @@ class GTFile:
|
|||||||
if pos==-1:
|
if pos==-1:
|
||||||
inmsgid=0
|
inmsgid=0
|
||||||
else:
|
else:
|
||||||
msgid=msgid+line[pos+1:pos2]+"\n"
|
msgid=msgid+line[pos:pos2+1]+"\n"
|
||||||
if msgstr and msgid:
|
if msgstr and msgid:
|
||||||
message=GTMessage(msgid,msgstr)
|
message=GTMessage(msgid,msgstr,refs)
|
||||||
self._messages.append(message)
|
self._messages.append(message)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user