birchill / 10ten-ja-reader

A browser extension to translate Japanese by hovering over words.
https://addons.mozilla.org/firefox/addon/10ten-ja-reader/
GNU General Public License v3.0
610 stars 45 forks source link

Idea: convert years automagically #202

Closed nicolasmaia closed 4 years ago

nicolasmaia commented 4 years ago

It would be nice it Rikai could natively read 昭和56年 and display 1981, for instance. Jisho.org does that: https://jisho.org/search/%E6%98%AD%E5%92%8C56%E5%B9%B4

birtles commented 4 years ago

Hopefully this mostly works now. If anyone wants to give it a spin they are welcome to try.

nicolasmaia commented 4 years ago

Awesome, thanks!

Looking forward to the next release 🙌

birtles commented 4 years ago

This has now shipped and should be available in 0.0.17.

nicolasmaia commented 4 years ago

I love it! Thanks!

birtles commented 4 years ago

Thanks for the idea!

nicolasmaia commented 4 years ago

Interesting quirk in this new feature: 昭和111年 -> 2036年

Probably not a bug that needs fixing per se, but interesting nevertheless.

birtles commented 4 years ago

Yes, that's deliberate. Sometimes you encounter content with years that don't technically exist, e.g. 平成32年 because materials were produced before the new era was announced. So Rikaichamp deliberately doesn't know or care about the end of each era and just calculates from the start.