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

HELP WANTED: Add internationalization (i18n) support to GitLens #577

Open
eamodio opened this issue Dec 6, 2018 · 23 comments · May be fixed by #1937
Open

HELP WANTED: Add internationalization (i18n) support to GitLens #577

eamodio opened this issue Dec 6, 2018 · 23 comments · May be fixed by #1937
Labels
feature New feature or request help wanted Want community input and/or pull request

Comments

@eamodio
Copy link
Member

eamodio commented Dec 6, 2018

Here is a sample extension using the vscode-nls library

@eamodio eamodio added help wanted Want community input and/or pull request feature New feature or request labels Dec 6, 2018
@eamodio eamodio changed the title Add localization support to GitLens Add internationalization (i18n) support to GitLens Feb 10, 2019
@eamodio eamodio mentioned this issue Feb 10, 2019
@axetroy
Copy link

axetroy commented Feb 10, 2019

I have tried to implement i18n with vscode-nls.

Then encountered a lot of difficulties

I found that vscode-nls is not so friendly.

here we go:

1. vscode-nls is not a standalone package

We have to use Transifex as a third-party hosting service that hosts i18n files.

If we need to modify the translation file, we need to log in Transifex and add a collaborator to modify it.

This undoubtedly prevents developers from further contributing to translation.

In order to integrate Transifex

We have to use Gulp, which is not very compatible with the workflow

2. official i18n example documenation not clear

How to write i18n file?

3. vscode-nls API too complicated

What did this function do?

That's all!

This is my experience after trying to use vscode-nls, very bad

I I disapprove follow offcial i18n example to implement i18n.

Here is my solution for easy use:
https://github.com/axetroy/vscode-gpm
https://github.com/shanalikhan/code-settings-sync

@eamodio
Copy link
Member Author

eamodio commented Feb 10, 2019

While I agree that the official i18n sample is seemingly over complicated and the documentation is not very clear, the vscode-nls library which is standalone as far as can see, seems straight forward. I don't see where vscode-nls has any dependency on Transifex -- where is that?

Also will the files that have the localized strings be in the same format in what you are proposing vs vscode-nls?

@eamodio
Copy link
Member Author

eamodio commented Feb 10, 2019

The examples you've posted are full extensions -- what are the pieces (and dependencies if any) that would be brought into GitLens?

@axetroy
Copy link

axetroy commented Feb 10, 2019

vscode-nls does not matter with Transifex.

But the official i18n example uses it. If you use vscode-nls alone, you have to explore it yourself.

The examples I've posted is the solution. not a library.

localized strings format same with official solution

You can see here:

English by default:

https://github.com/axetroy/vscode-gpm/blob/a00147fc2bc0e85296f65dcdf7c09a2dfba60cf1/package.nls.json#L1-L10

Chinese Simplified

https://github.com/axetroy/vscode-gpm/blob/a00147fc2bc0e85296f65dcdf7c09a2dfba60cf1/package.nls.zh-cn.json#L1-L10

@eamodio
Copy link
Member Author

eamodio commented Feb 10, 2019

OK, sounds good -- thanks for the information. FYI, will also need to make sure the solution works well with webpack -- which will likely mean avoiding the use of require to load json files on disk -- instead use readFileSync

@axetroy
Copy link

axetroy commented Feb 10, 2019

@eamodio

Yes, the project must have the translation files.

Add copyPlugin to webpack to copy the translation file to the dist directory.

Because there is too much place to translate.

I suggest that the first stage of the translation of the command / configuration just fine.

@eamodio
Copy link
Member Author

eamodio commented Feb 18, 2019

@axetroy works for me! Thanks again! Looking forward to the PR

@axetroy
Copy link

axetroy commented Feb 19, 2019

@eamodio
Yes. I am working on it.

This will take a lot of time due to a large number of configuration items.

PR is coming soon...

@axetroy axetroy mentioned this issue Feb 20, 2019
8 tasks
@eamodio eamodio mentioned this issue Apr 9, 2019
@eamodio eamodio changed the title Add internationalization (i18n) support to GitLens HELP WANTED: Add internationalization (i18n) support to GitLens Sep 25, 2019
@eamodio eamodio pinned this issue Sep 25, 2019
@chouzz
Copy link

chouzz commented Oct 29, 2020

Actually,there is a more convenient way to implement i18n. Microsoft already has a tool called vscode-nls-dev , this tool automates the extraction of strings to be externalized from TS and JS code. And you can also add localization using Transifex.

@eamodio
Copy link
Member Author

eamodio commented Oct 29, 2020

@chouzz PR is very welcome 😄

@goldst
Copy link

goldst commented Feb 10, 2021

@chouzz are you working on this? If not, I'd take a look.

@ImRodry
Copy link

ImRodry commented Apr 11, 2021

If you do add localization, please do so through Crowdin

@goldst
Copy link

goldst commented Apr 16, 2021

Quick update: I almost finshed a basic i18n system that uses vscode-nls-dev / webpack, but unfortunately I was quite occupied with other things in the last weeks. I hope to finish it next week.

vscode-nls-dev does not necessarily require a localization platform like Transifex (or Crowdin). In the most basic version one could just edit the json files that contain translations, and that is how my PR will work. I suggest that selecting and implementing the usage of a platform should follow in a separate PR.

@ImRodry
Copy link

ImRodry commented Apr 16, 2021

Editing json files directly through a PR is definitely not an ideal option. If you want many users helping out you will need to set up a Crowdin project otherwise the idea will most likely die pretty fast

@goldst
Copy link

goldst commented Apr 16, 2021

@ImRodry Yes, I am not saying that this project shouldn't use Crowdin or something comparable. I wanted to say that it is the second step and therefore should only be done after the first step - implementing vscode-nls-dev - is finished.

@ImRodry
Copy link

ImRodry commented Apr 16, 2021

But I think it should all be put in the same PR since the only thing crowdin needs is a crowdin.yml file on the repo and the rest is handled by the managers of the project on Crowdin itself. The configuration file should also be pretty simple

@pgy866
Copy link

pgy866 commented Nov 12, 2021

非常希望能得到本地化的支持,这个插件非常棒

@erickisos
Copy link

Hey everyone!

Do we have an update on this topic? I'm just looking around, maybe I can help with this!

airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Mar 29, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Mar 29, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Mar 29, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Mar 29, 2022
@airaketa airaketa linked a pull request Mar 29, 2022 that will close this issue
7 tasks
@airaketa
Copy link

airaketa commented Apr 4, 2022

Just FYI, I've made a pull request introducing i18n support. I expect it may take some time until it can be approved and merged.

airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Apr 29, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Apr 29, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Jul 19, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Jul 19, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Jul 20, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Aug 22, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Aug 22, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Aug 22, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Aug 22, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Aug 22, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Aug 22, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Aug 22, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Aug 22, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Aug 23, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Aug 24, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Oct 15, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Oct 15, 2022
airaketa added a commit to airaketa/vscode-gitlens that referenced this issue Oct 15, 2022
@enhongchen
Copy link

@eamodio 我为它等了太久了,有什么能帮忙的吗😂

@eamodio eamodio unpinned this issue Nov 2, 2022
@zWingz
Copy link

zWingz commented Dec 1, 2022

Now can use l10n to support other language
https://github.com/microsoft/vscode-loc

@xujz520
Copy link

xujz520 commented May 10, 2024

Excuse me, how is the progress, looking forward to supporting multiple languages as soon as possible

@Xavier9896
Copy link

I'm also looking forward to support for Chinese!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Want community input and/or pull request
Projects
None yet
Development

Successfully merging a pull request may close this issue.