pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mail/quickml patch update. for ruby1.9



On Sun, 26 May 2013 19:16:49 +0900, 三輪晋( Miwa Susumu ) 
<miwarin%gmail.com@localhost> wrote:

oops....

2013/5/15 OBATA Akio <obache%netbsd.org@localhost>:

patch-install-sh
  broken :(

because install.sh it does not change, this file is not required.

OK, then it will be removed.

patch-Makefile.in
  It should be handled with options.mk (quickml-analog option).

because it does not change the Makefile, this file is not required.

OK, then it will be reverted.

patch-lib_quickml_core.rb
  Isn't it break gettextlize?

oh no...
it will be affected.

It is an error if the encoding of the code of quickml and encoding
specified in the messages are different.
As a solution, it is a good by adding String::force_encoding() in
place of gettext.
However, this is very dirty :-(

for example. generate_footer in core.rb.

before:
    def generate_footer (member_list_p = false)
      footer = "\n--\n" + "ML: #{@address}\n" +
      _("Info: %s\n", @config.info_url)
      footer << unsubscribe_info if member_added?
      footer << "\n" + member_list if member_added? or member_list_p
      footer
    end

after:
    def generate_footer (member_list_p = false)
      footer =
      "\n--\n".force_encoding(@catalog.charset) +
      "ML: #{@address}\n".force_encoding(@catalog.charset) +
      _("Info: %s\n", @config.info_url)
      footer << unsubscribe_info if member_added?
      footer << "\n" + member_list if member_added? or member_list_p
      footer
    end


Is there a good solution something?

I have no clear idea...but is it possible to modify gettext instead?
force_encoding("ASCII-8BIT")?

patch-lib_quickml_mail.rb
  Why is it required?

String::to_a method has been removed. in ruby 1.9.3

In order to run the pack method, I was to Array.

OK, then to_a is redundant? because [y.tojis] is already Array.

--
OBATA Akio / obache%NetBSD.org@localhost



Home | Main Index | Thread Index | Old Index