Bug#469493: gettext issue on apt-listbugs

2008-03-23 Thread Junichi Uekawa
Hi,
 
 However I think, it's better that we transit to use ruby-gettext
 from liblocale-ruby + libintl-gettext-ruby.
 Because setlocale in C layer provides some bad side-effect on
 ruby (breaks Mershal and probably another). But unfortunally,
 ruby-gettext can NOT support full-feature of locale at present.
 It just loads gettext catalog (no support for date and number format).
 
 If you agree with my suggestion, please see the patch attached.
 Thant is fixes to transit ruby-gettext from locale.so + intl.
 # The patch includes changes to rename Config class. Because it
 # conflicts with ruby built-in class name provided by rbconfig.


I've done some regression testing, and my logs indicate that
translated strings are used most of the time, but it isn't used when
in exception handling. Why might that be?



-ネットワーク接続がダウンしているか、プロキシサーバがうまくうごいていないか、BTSサーバ自身に障害が発生している可能性があります。ネットワーク設定を確認して、
再度試行してみてください。
- 失敗
-サーバからバグ報告を取得する際に下記のエラーが発生しました。
+It could be because your network is down, or because of broken proxy servers, 
or the BTS server itself is down. Check network configuration and try again
+ Fail
+Error retrieving bug reports from the server with the following error message:
  W: unsupported proxy `false'


regards,
junichi
-- 
[EMAIL PROTECTED],netfort.gr.jp}   Debian Project



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#469493: gettext issue on apt-listbugs

2008-03-23 Thread Tatsuki Sugiura
Hello!

 In Message Re: gettext issue on apt-listbugs
[EMAIL PROTECTED],
 Junichi Uekawa [EMAIL PROTECTED]  said;
 I've done some regression testing, and my logs indicate that
 translated strings are used most of the time, but it isn't used when
 in exception handling. Why might that be?

Thanks! I find a bug on ruby-gettext. My patch hits the bug fortunally(?).
There is a problem on module function (not exception).

Anyway, I report that to upstream and find workaround.
http://rubyforge.org/tracker/index.php?func=detailaid=19056group_id=855atid=3377

Please change
  bindtextdomain(apt-listbugs)
to
  GetText::bindtextdomain(apt-listbugs)
.

-- 
Tatsuki Sugiura   mailto:[EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#469493: gettext issue on apt-listbugs

2008-03-23 Thread Junichi Uekawa
Hi,

  In Message Re: gettext issue on apt-listbugs
 [EMAIL PROTECTED],
  Junichi Uekawa [EMAIL PROTECTED]  said;
  I've done some regression testing, and my logs indicate that
  translated strings are used most of the time, but it isn't used when
  in exception handling. Why might that be?
 
 Thanks! I find a bug on ruby-gettext. My patch hits the bug fortunally(?).
 There is a problem on module function (not exception).
 
 Anyway, I report that to upstream and find workaround.
 http://rubyforge.org/tracker/index.php?func=detailaid=19056group_id=855atid=3377
 
 Please change
   bindtextdomain(apt-listbugs)
 to
   GetText::bindtextdomain(apt-listbugs)
 .


I notice that the only remaining beviour change is that messages from
libc is no longer translated. I think that's probably by design; but
it is a change.


- W: 接続を拒否されました - connect(2) (merkel.debian.org, #81)
+ W: Connection refused - connect(2) (merkel.debian.org, #81)


I'll go ahead and upload.


regards,
junichi
-- 
[EMAIL PROTECTED],netfort.gr.jp}   Debian Project





-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#469493: gettext issue on apt-listbugs

2008-03-22 Thread Tatsuki Sugiura
Hello,

Now, upstream author of libgettext-ruby replaces liblocale-ruby
by his module intentionally. I didn't check that before upload 
new version. That's my fault. I should to notice and discuss and
before uploading.

Anyway,
libgettex-ruby provides locale support in pure ruby. Therefor
you can run as before by rewriting just;
  require 'locale'
to 
  require 'locale.so'
.

However I think, it's better that we transit to use ruby-gettext
from liblocale-ruby + libintl-gettext-ruby.
Because setlocale in C layer provides some bad side-effect on
ruby (breaks Mershal and probably another). But unfortunally,
ruby-gettext can NOT support full-feature of locale at present.
It just loads gettext catalog (no support for date and number format).

If you agree with my suggestion, please see the patch attached.
Thant is fixes to transit ruby-gettext from locale.so + intl.
# The patch includes changes to rename Config class. Because it
# conflicts with ruby built-in class name provided by rbconfig.

Regards,
-- 
Tatsuki Sugiura   mailto:[EMAIL PROTECTED]
diff -ur apt-listbugs-0.0.86/apt-listbugs apt-listbugs-0.0.86.1/apt-listbugs
--- apt-listbugs-0.0.86/apt-listbugs	2008-01-29 21:27:18.0 +0900
+++ apt-listbugs-0.0.86.1/apt-listbugs	2008-03-23 03:56:20.0 +0900
@@ -222,11 +222,11 @@
 require 'debian/bts'
 require 'thread'
 require 'tempfile'
-require 'intl'
-require 'locale'
+require 'gettext'
 require 'rss/maker'
+include GetText
 
-$intl = Intl.new(apt-listbugs)
+bindtextdomain(apt-listbugs)
 
 # ad-hoc
 require 'debian/mytempfile'
@@ -236,38 +236,38 @@
   end
 end
 
-class Config
+class AppConfig
 
   QUERYBTS = /usr/bin/querybts
   WWW_BROWSER = /usr/bin/www-browser
   SENSIBLE_BROWSER = /usr/bin/sensible-browser
 
   def usage
-$stderr.print $intl._(Usage: ), File.basename($0),
-  $intl._( [options] command [arguments]),
+$stderr.print _(Usage: ), File.basename($0),
+  _( [options] command [arguments]),
   \n,
-  $intl._(Options:\n),
-  $intl._( -h   : Display this help and exit.\n),
-  $intl._( -v   : Show version number and exit\n),
-  sprintf($intl._( -s severities  : Severities you want to see [%s], or [all].\n), @severity.join(',')),
-  $intl._( -T tags: Tags you want to see.\n),
-  sprintf($intl._( -S stats   : Stats you want to see [%s].\n), @stats.join(',')),
-  $intl._( -D   : Show downgraded packages, too.\n),
-  sprintf($intl._( -H hostname: Hostname of Debian Bug Tracking System [%s].\n), @hostname),
-  sprintf($intl._( -p port: Port number of the server [%s]\n), @port),
-  sprintf($intl._( --pin-priority   : Specifies Pin-Priority value [%s]\n), @pin_priority),
-  $intl._( --title  : Specifies the title of rss output.\n),
-  $intl._( -f   : Retrieve bug reports from BTS forcibly.\n),
-  $intl._( -q   : Don't display progress bar.\n),
-  $intl._( -C apt.conf: Specify apt.conf.\n),
-  $intl._( -y   : Assume that you select yes for all questions.\n),
-  $intl._( -n   : Assume that you select no for all questions.\n),
-  $intl._( -d   : Debug.\n),
-  $intl._(Commands:\n),
-  $intl._( apt  : apt mode\n),
-  $intl._( list pkg...: list bug reports of the specified packages\n), 
-  $intl._( rss pkg... : list bug reports of the specified packages in rss\n), 
-  $intl._(See the manual page for the long options.\n)
+  _(Options:\n),
+  _( -h   : Display this help and exit.\n),
+  _( -v   : Show version number and exit\n),
+  sprintf(_( -s severities  : Severities you want to see [%s], or [all].\n), @severity.join(',')),
+  _( -T tags: Tags you want to see.\n),
+  sprintf(_( -S stats   : Stats you want to see [%s].\n), @stats.join(',')),
+  _( -D   : Show downgraded packages, too.\n),
+  sprintf(_( -H hostname: Hostname of Debian Bug Tracking System [%s].\n), @hostname),
+  sprintf(_( -p port: Port number of the server [%s]\n), @port),
+  sprintf(_( --pin-priority   : Specifies Pin-Priority value [%s]\n), @pin_priority),
+  _( --title  : Specifies the title of rss output.\n),
+  _( -f   : Retrieve bug reports from BTS forcibly.\n),
+  _( -q   : Don't display progress bar.\n),
+  _( -C apt.conf: Specify apt.conf.\n),
+  _( -y   : Assume that you select yes for all questions.\n),
+  _( -n   : Assume that you select no for all questions.\n),
+  _( -d   : Debug.\n),
+  _(Commands:\n),
+  _( apt  : apt mode\n),
+  _( list pkg...: list bug reports of the specified packages\n), 
+  _( rss pkg... : list bug reports of the specified packages in rss\n), 
+  _(See the manual page for the long options.\n)
   end