-
Notifications
You must be signed in to change notification settings - Fork 86
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
Translation settings fields to chinese #688
Conversation
Thanks for letting me know. I will have to check what is up with Edit: 2. Is working as expected as the styles.css does not need generating. It is located under |
The build error is because the following line needs to be updated: obsidian-linter/src/lang/helpers.ts Line 26 in 5c020db
It needs to be import zhCN from './locale/zh';
Edit: We probably want to leave the file names as they were and just account for the issue in the translation helper. |
The issue here seems to have been that it was in the map differently from the name of the file because the file language was listed as I am going to try to remove any other scenarios like that if possible. |
This looks good to me. I will take a look at the actual displaying of the values when I get a chance. Once that happens I will go ahead and merge this. |
Thanks for taking the time to translate this! |
Compared to your efforts, this work of mine is really very insignificant. I've already posted articles in China promoting linter and they all think it works very well. Before linter had i18n, there were already translations by directly modifying the main.js file. Thanks again for your efforts !!!! |
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 tested it out and it works. I noticed one bug in the settings page around language text, so I am putting in a fix for that, but I wanted to check that YAML and Debug are supposed to be in the heading names for the tabs. If so, I will merge this translation in.
// tab.ts | ||
'general': '通用设置', | ||
'custom': '自定义设置', | ||
'yaml': 'YAML设置', |
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.
Is YAML supposed to be here?
'footnote': '内容设置', | ||
'spacing': '间距设置', | ||
'paste': '粘贴设置', | ||
'debug': 'Debug设置', |
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.
Is debug supposed to be here?
It works with the following language selected: |
I have yet to hear back on the 2 headings, but I will go ahead and merge this PR and a subsequent PR can be created if either of the 2 headers should not have the English name present. |
I have encountered several issues while using the commands you provided:
npm ci
, I need to executenpm run
build to generate the translation-helper file.npm run translate
and select zh-cn, the corresponding translation doesn't get updated in the corresponding zh-cn file.As a result, I opted to directly translate the en.ts file. I encountered some changes during the debugging process, so I'd appreciate it if you could help me address those. I'm sorry for the delay in translation as I've been very busy recently.
Lastly, having a developer like you for Obsidian is truly an honor. I also feel lucky to be able to use linter plugin.