-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(i18n): restructure i18n system and add EN/CN translations #235
Conversation
Crepveant
commented
Oct 22, 2024
•
edited
Loading
edited
- Restructure i18n file organization into separate modules
- Add English and Simplified Chinese translations for About/OpenData pages
- Fix translation rendering issues in templates
- Restructure i18n file organization into separate modules - Add English and Chinese translations for About/OpenData pages - Fix translation rendering issues in templates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
Add English and Simplified Chinese translations for About/OpenData pages
This is very helpful! I have wanted to do it for long but postponed.
Did you translate it by yourself? (Without machine translators and generative AI such as ChatGPT?)
I'm asking this because machine translators often limit usage of the generated translation text. This dictionary is licensed under an opensoure license (Apache License 2.0), but I guess the vendor of machine translators doesn't allow licensing with Apache.
Genrative AI is also legally risky because the author of its training data might claim their rights to forbid usage of the generated contents by the future law amendment. (In Japan, the government already started discussion for the law amendment.)
code: "en", | ||
code: 'en', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess your linter or editor accidentally violated the coding style. (Double quotes are replaced with single quotes, the trailing line breaks of the files are removed, missing trailing commas in the objects...)
Most of them can be automatically fixed with running npx eslint --fix
on the project root.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I just reminded that ESLint might fail to fix the coding style because this repository still uses old ESLint v8.
If ESLint doesn't work properly, you don't have to fix the coding style. I will fix it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I won’t be able to make these changes before 6 PM (UTC+8).
If it’s urgent, feel free to modify them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, it is not an urgent task.
I often post comments in the early morning but feel free to reply after school or any time convenient for you.
(I hear that Japanese teens think they have to reply to the text chats as soon as possible, but is it the same in China? I usually reply after several hours or a day, so you don't have to try to reply immediately either.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I’m one of the few exceptions allowed to use a phone at school
But obviously, I can’t bring my computer to school just for non-academic stuff lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of them can be automatically fixed with running
npx eslint --fix
on the project root.
well it says
ESLint: 9.13.0
ESLint couldn't find an eslint.config.(js|mjs|cjs) file.
From ESLint v9.0.0, the default configuration file is now eslint.config.js.
If you are using a .eslintrc.* file, please follow the migration guide
to update your configuration file to the new format:
https://eslint.org/docs/latest/use/configure/migration-guide
If you still have problems after following the migration guide, please stop by
https://eslint.org/chat/help to chat with the team
should I commit directly or wait for you to make changes to ESLint🤔
Ignore the error raised in GitHub Actions workflow |
I used Google Translate to translate the Japanese text into Chinese for understanding, then rewrote it with my native Chinese knowledge. The English version was grammar-checked using Youdao (possibly AI). |
Co-authored-by: Xicri <[email protected]>
Hmm... then there are legal risks to merging your translations in this PR, unfortunately...
I guess grammar checkers are OK even if they use AI, if the base English texts themselves were translated by you. When grammar checkers or human proofreaders correct grammatical errors, probably they all suggest mostly the same correction results based on the rule of grammar. I guess they are not protected by the copyrights. Disclaimer for the other people who read this comment: I'm not a legal professional and THIS IS NOT A LEGAL ADVICE. |
No, I think you misunderstood. I translated it into Chinese to understand the meaning because I don’t speak Japanese. As a native Chinese speaker, I didn’t use Google Translate text.
However, the English version is debatable (maybe...?) since I used an AI grammar correction tool. |
Hmm... OK, but I think it is still a problem. Once you read the Chinese translation by Google Translate, some of your translations may be similar to Google's, and it is almost impossible to legally guarantee that your translations are not based on Google's, even if you didn't actually. So I'm sorry to say, but I cannot accept your PR unless you remove the translated texts 🙏
Since it is hard for us to expect how the lawmakers of each country make laws for Generative AI in the future, it might be a good idea to avoid such tools if it is not necessary. |
However, your code for i18n should be useful. I'm considering to make /opendata page English only because it is updated a bit frequently and the target visitors of the page are the engineers. |