<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ARuby-zh</id>
	<title>Module:Ruby-zh - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ARuby-zh"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Ruby-zh&amp;action=history"/>
	<updated>2026-05-27T16:28:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Ruby-zh&amp;diff=144950&amp;oldid=prev</id>
		<title>imported&gt;Izno: not sure I understand what&#039;s going on here, but rb is deprecated per whatwg html</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Ruby-zh&amp;diff=144950&amp;oldid=prev"/>
		<updated>2021-05-08T03:29:59Z</updated>

		<summary type="html">&lt;p&gt;not sure I understand what&amp;#039;s going on here, but rb is deprecated per whatwg html&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- Template for generating Ruby for Chinese characters.&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Annotate a single character with bopomofo.&lt;br /&gt;
-- This can be done in a template... but something else can&amp;#039;t.&lt;br /&gt;
function p._zhuyin1(char, bopo, tone)	-- inline-table&lt;br /&gt;
	local ru = mw.html.create(&amp;#039;span&amp;#039;)&lt;br /&gt;
	ru&lt;br /&gt;
		:addClass(&amp;#039;zhuyin-ru&amp;#039;)&lt;br /&gt;
		:wikitext(char)&lt;br /&gt;
		:tag(&amp;#039;span&amp;#039;)	-- inline-block&lt;br /&gt;
			:addClass(&amp;#039;zhuyin-rt&amp;#039;)&lt;br /&gt;
			:tag(&amp;#039;span&amp;#039;)&lt;br /&gt;
				:addClass(&amp;#039;zhuyin-rt-phon&amp;#039;)&lt;br /&gt;
				:wikitext(bopo)&lt;br /&gt;
			:done()&lt;br /&gt;
			:tag(&amp;#039;span&amp;#039;)&lt;br /&gt;
				:addClass(&amp;#039;zhuyin-rt-tone&amp;#039;)&lt;br /&gt;
				:wikitext(tone)&lt;br /&gt;
	return ru&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Annotate objects in pinyin.&lt;br /&gt;
-- Pinyin orthography allow multiple characters to be annotated.&lt;br /&gt;
-- In this case, we might be adding a pinyin to multiple bopo-annotated pairs.&lt;br /&gt;
-- (And this of course applies to other romanisations of Chinese.)&lt;br /&gt;
function p._pinyin(tbl, pinyin, n)&lt;br /&gt;
	n = n or #tbl&lt;br /&gt;
	local ruby = mw.html.create(&amp;#039;ruby&amp;#039;)&lt;br /&gt;
	ruby:addClass(&amp;#039;zhuyin-container&amp;#039;)&lt;br /&gt;
	for i, v in ipairs(tbl) do&lt;br /&gt;
		ruby:node(v)&lt;br /&gt;
	end&lt;br /&gt;
	ruby:tag(&amp;#039;rt&amp;#039;)&lt;br /&gt;
		:attr(&amp;#039;rbspan&amp;#039;, tostring(n))&lt;br /&gt;
		:wikitext(pinyin)&lt;br /&gt;
	return ruby&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- This is for test.&lt;br /&gt;
function p.test()&lt;br /&gt;
	return p._pinyin({&lt;br /&gt;
		p._zhuyin1(&amp;#039;謝&amp;#039;, &amp;#039;ㄒㄧㄝ&amp;#039;, &amp;#039;ˋ&amp;#039;),&lt;br /&gt;
		p._zhuyin1(&amp;#039;謝&amp;#039;, &amp;#039;ㄒㄧㄝ&amp;#039;, &amp;#039;˙&amp;#039;)&lt;br /&gt;
	}, &amp;#039;xièxie&amp;#039;, 2)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Now the CSS still needs to be written. And the interface is obviously clumsy,&lt;br /&gt;
-- and not translatable to templates yet. The main problem is that we will need&lt;br /&gt;
-- to either separate the syllables themselves or come up with a way for the user&lt;br /&gt;
-- to express the separation in a template-string.&lt;br /&gt;
--&lt;br /&gt;
-- Also there&amp;#039;s a point in tagging stuff with lang&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Izno</name></author>
	</entry>
</feed>