2017-07-11 14:54:17 +00:00
|
|
|
component Japanese(text string)
|
|
|
|
if arn.ContainsUnicodeLetters(text)
|
2017-07-11 22:55:24 +00:00
|
|
|
for _, token := range japanese.Tokenize(text)
|
2017-07-11 14:54:17 +00:00
|
|
|
if token.NeedsFurigana()
|
|
|
|
a.japanese(href="http://jisho.org/search/" + token.Original, target="_blank", rel="noopener")
|
|
|
|
ruby(title=token.Romaji)= token.Original
|
|
|
|
rt.furigana= token.Hiragana
|
|
|
|
else
|
|
|
|
ruby.japanese(title=token.Romaji)= token.Original
|
2017-07-11 15:15:45 +00:00
|
|
|
rt.furigana
|
2017-07-11 14:54:17 +00:00
|
|
|
else
|
|
|
|
span.japanese= text
|