RSSHub icon indicating copy to clipboard operation
RSSHub copied to clipboard

Multilingual descriptions/labels for routes

Open antermin opened this issue 11 months ago • 6 comments

What feature is it?

Instead of having just 1 description parameter, there can be multiple parameters for descriptions/labels in English, Simplified Chinese, and Traditional Chinese (or even more, such as Japanese).

What problem does this feature solve?

Even though RSSHub's documentation website has English and Simplified Chinese versions, the following can be observed:

  • For some routes, descriptions are always in English, even if you are viewing the website in Simplified Chinese, e.g. https://docs.rsshub.app/zh/routes/social-media#telegram
  • For some routes, descriptions are always in Chinese, even if you are viewing the website in English, e.g. https://docs.rsshub.app/routes/shopping#furstar
  • For some routes, some parameters use Simplified Chinese descriptions while some parameters use Traditional Chinese descriptions, e.g. https://docs.rsshub.app/routes/shopping#openrice%E9%96%8B%E9%A3%AF%E5%96%87

If such feature is implemented, people can contribute translations for the descriptions.

Additional description

Some websites supported by RSSHub are in English, Japanese, or other languages. Improving i18n/l10n can help overseas users.

This is not a duplicated feature request or new RSS proposal

antermin avatar Mar 26 '25 01:03 antermin

A good idea, but RSSHub is already support, but it is not a force choice, you can add zh or other tag list in

https://github.com/DIYgod/RSSHub/blob/facc6d543c731c0f84ebe5e1e7fdba1ebff92a1d/lib/types.ts#L362-L366

like

https://github.com/DIYgod/RSSHub/blob/facc6d543c731c0f84ebe5e1e7fdba1ebff92a1d/lib/routes/bugzilla/bug.ts#L55-L58

English is a default option, you can add translation via Pull request.

cscnk52 avatar Apr 09 '25 14:04 cscnk52

@cscnk52

Using Mercari as an example: https://github.com/DIYgod/RSSHub/blob/8508789087d56576430614f6b81de91fdd1f59a7/lib/routes/mercari/namespace.ts#L3-L9

Since the documentation defined zh: { name: '煤炉' },, I expected https://docs.rsshub.app/zh/routes/shopping#mercari to show "煤炉" instead of "Mercari".

Another example: https://github.com/DIYgod/RSSHub/blob/8508789087d56576430614f6b81de91fdd1f59a7/lib/routes/linkresearcher/index.ts#L19-L38

https://docs.rsshub.app/zh/routes/journal#link-research still shows "Articles", but I expected it to show "文章".

So I guess there is a bug that the documentation website is not using the translations as defined in the source code?

antermin avatar Apr 10 '25 01:04 antermin

@antermin I have made a PR to fix, thank you finding this question.

cscnk52 avatar Apr 12 '25 09:04 cscnk52

Removed abuse link

For anyone who sees this later: the website contains malicious viruses. Do not click on it. Please delete it immediately.

@TonyRL Please delete comment, it contain malicious viruses.

cscnk52 avatar Apr 13 '25 01:04 cscnk52

Thanks @cscnk52 , I have reported that user to GitHub.

antermin avatar Apr 13 '25 04:04 antermin