Skip to content
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

FR: Translate into Chinese #685

Closed
windily-cloud opened this issue Apr 12, 2023 · 3 comments
Closed

FR: Translate into Chinese #685

windily-cloud opened this issue Apr 12, 2023 · 3 comments
Labels
obsidian Obsidian specific syntax issue or feature resolution/update-made A change has been made that should resolve this issue or request rule suggestion Suggestion to add or edit a rule

Comments

@windily-cloud
Copy link
Contributor

Is Your Feature Request Related to a Problem? Please Describe.

I don't know if anyone is involved in this contribution, if not I can help translate it into Chinese.

I can translate the language of the ui interface into Chinese, which can help Chinese people to use the plugin better, I don't know what your requirements are. I don't intend to translate the documentation, because the workload for this may be rather large.

Describe the Solution You'd Like

You specify where I need to translate (in addition to the documentation) and I will PR after translation

@windily-cloud windily-cloud added the rule suggestion Suggestion to add or edit a rule label Apr 12, 2023
@pjkaufman pjkaufman assigned pjkaufman and unassigned pjkaufman Apr 12, 2023
@pjkaufman
Copy link
Collaborator

Hey @windily-cloud , the list of all keys to be translated and the structure to follow can be found in en.ts. If you don't want to manually copy over the structure and then insert the values you can use npm run translate and select the option for adding all keys for a language.

As for which file to put the translations in, that depends on which version of Chinese you are planning to fill out. We currently have files for zh-cn.ts and zh-tw. There is a comment at the top of each of these files which may give a hint about what version of Chinese each is.

@pjkaufman
Copy link
Collaborator

pjkaufman commented Apr 12, 2023

So if you wanted to translate all keys for zh-cn you would clone the repo, and either manually copy the structure of en.ts to zh-cn.ts and fill out the strings from there or do so via the script that helps setup the actual structure of the language without any need to directly update an existing file.

To use the script:

  • Clone this repo
  • Then run npm ci
  • Once that finishes, run npm run translate
  • You will see the following and want to specify T as that allows translation of all keys in a specific language.
  =========================================================================
  Select a translation mode to use:
  [A]dd a translation value for a specific language.
  [L]ist untranslated keys in the specified language.
  [R]eplace translated value with a new value for the specified key.
  [T]ranslate all untranslated keys in a language one at a time.
  =========================================================================
  • It should then prompt you for the language to translate which would be zh-cn.

From there it should allow you to translate as many keys as you choose.

@pjkaufman
Copy link
Collaborator

I believe this was taken care of by #688 . As such I will close this FR as it should go out this release. I still need to look into potential issues with the translation helper and show that code some love. But that is a separate issue (#689 ).

@pjkaufman pjkaufman added the resolution/update-made A change has been made that should resolve this issue or request label Apr 21, 2023
@pjkaufman pjkaufman moved this from Backlog to Releasing in Obsidian Linter Apr 21, 2023
@pjkaufman pjkaufman added the obsidian Obsidian specific syntax issue or feature label Apr 21, 2023
@pjkaufman pjkaufman moved this from Releasing to Done in Obsidian Linter May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
obsidian Obsidian specific syntax issue or feature resolution/update-made A change has been made that should resolve this issue or request rule suggestion Suggestion to add or edit a rule
Projects
Archived in project
Development

No branches or pull requests

2 participants