RDoc and i18n

K

KUBO Takehiro

KUBO Takehiro said:
Hi,

Has anyone write code for RDoc I18n support described in the following
wiki page.
http://www.rubygarden.org/ruby?RDocI18n

If nobody hasn't done it, I'll implement a subset of that page. I 'll
use it for the document of my extension library.

I made a patch for it. The spec is different slightly.
http://www.jiubao.org/ruby-rdoc/

In addition, I made another patch for rdoc and will make 3 patches at
the next weekend.

Cheers
 
K

KUBO Takehiro

Dave Thomas said:
I need to understand this patch.

When we all talked about this (here on and ruby-core) a while back, the
consensus was that you can't really work with a file that has multiple
encodings: if you're editing with one encoding, it will mess up the
sections of the file that have another encoding. As I result, we didn't
go ahead with RDoc support for conditional comments based on encoding.

Firstly, sorry I haven't read the discussion. I subscribed to
ruby-talk about one year ago, but I was not interested in rdoc until
quite recently.

Secondly, you are right. IMHO, if multiple encoding consist of only
iso-8859-*, there would be no problem (in theory). But with Japanese
encoding (Shift_JIS or EUC-JP), it will mess up others. So the first
example of 'automatic charset conversion' is my mistake.

Thirdly, the second example of 'automatic charset conversion' is
usefull in some case. All comments are written in utf-8 and converted
to proper encoding on generateing html files. For example, older
browsers could not read utf-8, so I want to change the encoding to
EUC-JP. But it could be done for the html files which are generated by
rdoc. Hmm.
Did we get it wrong? It would be wonderful if we could support multiple
languages, encodings, and character sets in the same comment blocks.


Confused of Dallas

Sorry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top