refactor[i18n]: repeat structure in locales/lang/*.json
Type of i18n contribution
Other i18n-related issue
Language
All
Description
Currently, each language’s JSON file under locales/lang/ contains duplicate data representing language options, as seen in the following data:
"langs.ar-DZ": "العربية (الجزائر)",
"langs.ar-IQ": "العربية (العراق)",
"langs.ar-KW": "العربية (الكويت)",
"langs.ar-MA": "العربية (المغرب)",
"langs.ar-SA": "العربية (السعودية)",
"langs.ar-TN": "العربية (تونس)",
"langs.en": "English",
"langs.es": "Español",
"langs.fi": "Suomi",
"langs.fr": "Français",
"langs.it": "Italiano",
"langs.ja": "日本語",
"langs.pt": "Português",
"langs.ru": "Русский",
"langs.zh-CN": "简体中文",
"langs.zh-HK": "繁體中文(香港)",
"langs.zh-TW": "繁體中文(台灣)",
When adding a new language, all existing files must be modified. IMO, we should refactor the structure to avoid redundancy and simplify the process of adding new languages.
Additional context
https://github.com/RSSNext/Follow/tree/cd4473b3062ca780c0c163c81d3d265077c26862/locales/lang
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
This was originally designed to display the name of each language under the current language. But no one is adhering to this principle right now, and it's not a mandatory rule, but see if subsequent changes are needed.
I've adjusted the specification of lang/*.json so that the json under each lang/ now needs to correspond to the name of the current language