Template talk:Ruby

From Wikipedia, the free encyclopedia

Contents

[edit] Creation of template

I've created this template in order to simplify the entry of ruby characters in Wikipedia. The mess of <span> tags and style information is the result of fiddling with the markup until it displayed the right thing in the same way on Internet Explorer, Firefox and Opera. - Chamaeleon 01:51, 19 Feb 2005 (UTC)

[edit] When nested in wikitables, crashes in IE6

When nested in wikitables, this ruby template crashes Internet Explorer 6. For an example of this happening, use Internet Explorer 6 to view this revision [1] of House of Flying Daggers and scroll down to the ruby text (this, of course, assumes that no one's changed the template to fix the bug after I post this comment). —Lowellian (talk) 23:04, Apr 14, 2005 (UTC)

Wow, that is a bizarre bug. I hadn't noticed, since I use Firefox. Oh well, it's not our fault; it's an IE bug. — Chameleon 17:01, 21 Jun 2005 (UTC)

[edit] Separation of lang attribute

In my opinion this template is very useful for Wikipedia editors, because it simplifies the ruby syntax a lot (but note that I'm not an expert in Chinese or other Asian Languages, I only has some knowledge). However, I would like to propose removing from the template the lang and xml:lang attributes, currently set to zh, because ruby characters can be used with languages other than Chinese. IMHO it should be better to have the following syntax:


{{ruby | {{lang|zh|北}} | {{bopomofo|ㄅㄟˇ}} }}  {{ruby | {{lang|zh|京}} | {{bopomofo|ㄐㄧㄥ}} }}
{{ruby | {{lang|zh|北}} | {{pinyin|běi}} }}  {{ruby | {{lang|zh|京}} | {{pinyin|jīng}} }}

{{ruby | {{lang|ja|京}} | {{lang|ja|きょう}} }}
{{ruby | {{lang|ja|東}} | tō }} {{ruby | {{lang|ja|京}} | kyō }}
 

I know Template:bopomofo and Template:pinyin doesn't exists, but you can see my point, doesn't it? This approach gives full flexibility, and maybe other shorcuts can be created like Template:ruby-zh-p or Template:ruby-ja. Also, it seems that currently this template is only used in less than 20 articles, so little changes will be needed (I will help, of course). Hope this helps. --surueña 16:25, 11 March 2006 (UTC)

Created Template:ruby-zh-p (for piyin), Template:ruby-zh-b (for bopomofo), and Template:ruby-ja (for Japanese). Created two templates for Chinese for presentation reasons: in the future bopomofo characters should be rendered at the right instead of at the top. Also, Template:furi redirected to Template:ruby-ja. All the usages of template:ruby and template:furi changed. --surueña 22:06, 20 March 2006 (UTC)
I understand that the template is deprecated because it assumes Chinese to Pinyin whereas I have seen it used for Chinese to English. However, the recommended replacement with Template:Ruby-ja is valid only for Japanese text, and there is no universal template that would encompass Chinese to English as well. The existing templates should be reviewed and factored to extract a common base. And besides, the specialized templates recommend using the generic template that is deprecated, which is illogical. — Yecril (talk) 21:24, 23 May 2008 (UTC)

[edit] Breaks HTML

This template breaks HTML validation validate "Chinese language".

It inserts several Microsoft-specific tags which are not part of any HTML specification. It also includes a font specification with an MSIE hack which is broken by wikitext rendering, and breaks the validation of the inline style sheet.

Was this only tested on three browsers on Windows? Does it work right on Safari/Mac, Firefox/Mac, Lynx, in screen readers for the handicapped? Can this not be done using HTML standards? Michael Z. 2006-03-11 17:36 Z

Yes, this template breaks HTML validation because the server currently send Wikipedia pages as XHTML 1.0 Transitional, but the ruby tag is only available in XHTML 1.1 (and XHTML 2.0, etc.). If you force another doctype at validation time (and suppress all obsolescent features, as all lang and name attributes leaving only xml:lang and id attributes) it will be validated. Do you know any way to use the ruby module in XHTML 1.0 (using namespaces, e.g.)?
However, I don't understand why this tag is allowed in MediaWiki, but other valid in XHTML 1.0 like abbr aren't (acronym will be deprecated in XHTML 2.0, so it shouldn't be allowed). --surueña 09:47, 16 March 2006 (UTC)