hktang / covid-hyogo

Responsible visualizations of COVID-19 in Hyogo Prefecture, Japan
https://covid19hyogo.org
MIT License
7 stars 2 forks source link

Language - Hiragana mode #2

Open akiya64 opened 4 years ago

akiya64 commented 4 years ago

I think Hiragana "ひらがな" mode is usefull. It would be helpfull for foreigners who unfamiliar with Kanji and usefull for japanese children. I will implement within several days.

私はひらがなの表示モードが役立つと思います。 漢字に不慣れな外国人の助けになる。日本人の子供も使いやすい。 数日中に実装する予定です。

hktang commented 4 years ago

Thank you for the nice idea! 手伝ってくれてありがとうございます。

akiya64 commented 3 years ago

I try use ruby tag for "やさしい にほんご” mode.

I changed use 'v-html' , it works all language. <h2>{{ $t("age.title") }}</h2> changed <h2 v-html="$t('age.title')"></h2>

2020-09-04_05h50_56

And, If put explanation area on the out side of bar chart template, use ruby tag for chart explanation. 2020-09-04_06h06_28

But I have no idea to use ruby tag inner a tag, like this code.

<i18n path="footer.dataFrom.text" tag="p">
  <template v-slot:0>
    <a :href="urls.spreadsheet">{{ $t("footer.dataFrom.spreadsheet") }}</a>
  </template>
  <template v-slot:1>
    <a :href="urls.hyogo">{{ $t("footer.dataFrom.hyogoPage") }}</a>
  </template>
</i18n>
hktang commented 3 years ago

Thank you so much for taking care of this issue. Yes, it seems it only works in the first scenario.

For now maybe we can do this:

Meanwhile, let's check whether Vue-i18n supports raw HTML: https://kazupon.github.io/vue-i18n/guide/interpolation.html#slots-syntax-usage... If so, we can fix the footer links later. What do you think?

hktang commented 3 years ago

This repo is also worth exploring... https://github.com/hexenq/kuroshiro

akiya64 commented 3 years ago

Thanks for Idea and reference URL. I think too that we can put off footer till later. About summary section, it is better to show hurikatna for summary when release easy japanese mode. I'll continue to implement summary or date text refering vue-i18n/guide.