2

Over on Chinese Language & Usage I started a meta topic yesterday on whether we might consider using the furigana extension from Japanese Language & Usage to add pinyin above characters just as here it's used to add kana above characters.

Example question from CL&U:

What's the difference between “大衣” (dàyī), “外套” (wàitào), and “外衣” (wàiyī) - which can all be translated to “coat”?

The same example question using the JL&U furigana extension:

What's the difference between 大衣{dàyī}, 外套{wàitào}, and 外衣{wàiyī} - which can all be translated to “coat”?

But I see it doesn't work "out of the box". Is it hard-coded to detect kana characters only between the { and }, or does it treat Latin characters specially, making it difficult to work with Pinyin which is also in the Latin alphabet?

For CL&U users to see how it would work, here's one of my old JL&U question titles but with furigana added:

When to use ください or お願{ねが}いします in requests?

1

Yes, the current regex won't work with romaji either. It checks for the presence of kanji before the curly brace, and kana inside it. It really should be easy enough for the devs to change it to support pinyin ruby (the requirement for kanji before the brace should make it specific enough to avoid any false detection).

Take it to your mods, I guess.

  • There already seems to be a guy running with it there. I mostly wanted a post on JL&U for the people from CL&U to look at so they can see an example without having to dig around. Thanks for your confirmation about how its internal regex works. – hippietrail Nov 20 '13 at 14:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .