[BZ#15608] New locale for nan_TW.
Ondřej Bílka
neleai@seznam.cz
Mon Sep 23 21:03:00 GMT 2013
On Mon, Sep 23, 2013 at 10:13:48PM +0200, Andreas Jaeger wrote:
> On 09/23/2013 09:06 PM, Chris Leonard wrote:
> > From fec5525d9a94477daa9e59dde9669c42293783ed Mon Sep 17 00:00:00 2001
> > From: Wei-Lun Chao <bluebat@member.fsf.org>
> > Date: Mon, 23 Sep 2013 14:55:38 -0400
> > Subject: [PATCH] New locale for nan_TW
> >
> > ---
> > NEWS | 4 +-
> > localedata/SUPPORTED | 1 +
> > localedata/locales/nan_TW | 221 ++++++++++++++++++++++++++++++++++++++++++++++
> > 3 files changed, 224 insertions(+), 2 deletions(-)
> > create mode 100644 localedata/locales/nan_TW
> >
> > diff --git a/NEWS b/NEWS
> > index b52b52e..071216b 100644
> > --- a/NEWS
> > +++ b/NEWS
> > @@ -12,7 +12,7 @@ Version 2.19
> > 13985, 14155, 14699, 15427, 15522, 15531, 15532, 15640, 15736, 15748,
> > 15749, 15797, 15844, 15849, 15855, 15856, 15857, 15859, 15867, 15886,
> > 15887, 15890, 15892, 15893, 15895, 15897, 15905, 15909, 15919, 15921,
> > - 15923, 15939, 15963, 15966.
> > + 15923, 15939, 15963, 15966, 15608.
>
> We sort the bugs, so 15608 should much earlier.
>
Adding bug number across few lines is bit tedious, so I use a script to
almost automate it (attached).
To use it you need prepare commit with commit message containing bug
numbers in format BZ 1234 or BZ #1234 or BZ 1, 12, 34, ...
then you run
ruby scripts/mknews.rb
which adds these numbers to NEWS. You should check git diff HEAD^ if
NEWS are ok.
Then script ammends modified NEWS and oppens bugzilla tab in firefox.
I do not know yet how setup fields there so I only print fixed in commit
text.
-------------- next part --------------
#!/usr/bin/env ruby
def add_to_news(args)
f1=File.open("NEWS")
f2=File.open(".NEWS","w")
s=""
begin
s=f1.gets
s=s.chomp if s
f2.puts s
end while s!="* The following bugs are resolved with this release:"
s=f1.gets
s=s.chomp if s
f2.puts s
ary=[]
begin
s=f1.gets
s=s.chomp if s
ary+=s.strip.split(/[.,]/).map{|x|x.to_i}
end while s!=""
ary += args
ary = ary.sort.uniq
first=false
r=""
rf=nil
ary.size.times{|i|
r2=r+", "+ary[i].to_s
if r2.size>=75
r[0,1]=" "
first = true
rf=r
r=" "+ary[i].to_s
else
if first
f2.puts rf+","
first=false
end
r = r2
end
}
r[0,1]=" "
f2.puts rf+","
f2.puts r+"."
f2.puts
begin
s=f1.gets
s=s.chomp if s
f2.puts s if s
end while s
f2.close
puts `cp .NEWS NEWS`
end
msg = `git log -1 HEAD`
args=[]
if msg.index("BZ ")
puts msg[(msg.index("BZ ")+3)...-1].split(",").inspect
msg[(msg.index("BZ ")+3)...-1].split(",").each{|s|
s=s[1..-1] if s[0,1] == " "
s=s[1..-1] if s[0,1] == "#"
break if !s || s.to_i == 0
args << s.to_i
}
end
puts "ADDING #{args*","}"
add_to_news(args)
`git add NEWS`
`git commit -C HEAD --amend --no-verify`
puts "Fixed by #{`git rev-parse HEAD`}."
args.each {|a|
fork {
`firefox -new-tab http://sourceware.org/bugzilla/show_bug.cgi?id=#{a}`
}
}
More information about the Libc-alpha
mailing list