Gruntfuggly / todo-tree

Use ripgrep to find TODO tags and display the results in a tree view
Other
1.4k stars 135 forks source link

[feature] Add support for localization with vscode-loc installed. #755

Open hwhsu1231 opened 1 year ago

hwhsu1231 commented 1 year ago

Feature Request

There is a VSCode Localization Extension provided by Microsoft, vscode-loc.

According to: https://github.com/microsoft/vscode-loc/issues/894#issuecomment-1160994995

It seems that we should ask particular extensions to support its localization.

Can this extension support the localization with the vscode-loc installed?

Gruntfuggly commented 1 year ago

The extension already supports localization as long as somebody provides the translations. There is already a zh-cn translation file kindly provided by a user, but I don't have the time or language skills to do any myself.

hwhsu1231 commented 1 year ago

@Gruntfuggly

So suppose that I want to add a "Traditional Chinese (Taiwan)" localization. All I need to do is:

  1. Copy and paste a package.nls.json and rename to package.nls.zh-tw.json.
  2. Add some translations in package.nls.zh-tw.json.
  3. Create a PR to submit the change.

Right?

Gruntfuggly commented 1 year ago

Pretty much - if you want to give it a go, I can package up a test version of the extension so you can try it out.

hwhsu1231 commented 1 year ago

@Gruntfuggly

In fact, I've already started to working on the package.nls.zh-tw.json in my forked repo:

After completing the translations, all I need to do is to submit a PR to the upstream, right?

hwhsu1231 commented 1 year ago

@Gruntfuggly

I noticed that some translation entries in zh-cn are missing when I was translating zh-tw. I think it might be because package.nls.zh-cn.json wasn't updated in sync when updating package.nls.json, right? If that's the case, could you please try to keep all the package.nls.XXX.json files updated in sync in the future?

hwhsu1231 commented 1 year ago

@Gruntfuggly - I've submitted a PR to add zh-tw translations (#756). Please take a look.