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

Add localization #18962

Merged
merged 41 commits into from
May 5, 2022
Merged

Add localization #18962

merged 41 commits into from
May 5, 2022

Conversation

paulacamargo25
Copy link

@paulacamargo25 paulacamargo25 commented Apr 20, 2022

Closed #18286

Enable localization in the Python Extension using vscode-nls

The export and import logic of the translations is gonna be managed in vscode-engineering, we just need to specify the locTsConfigs(configuration of the OneLocBuild) and the locBundleDestination path, the path to the build extension.

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking really good. Some comments

build/azure-pipeline.pre-release.yml Outdated Show resolved Hide resolved
build/azure-pipeline.pre-release.yml Outdated Show resolved Hide resolved
build/azure-pipeline.pre-release.yml Outdated Show resolved Hide resolved
build/azure-pipeline.pre-release.yml Outdated Show resolved Hide resolved
build/azure-pipeline.pre-release.yml Outdated Show resolved Hide resolved
build/webpack/webpack.extension.config.js Outdated Show resolved Hide resolved
gulpfile.js Outdated Show resolved Hide resolved
src/client/common/utils/localize.ts Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
src/test/common/experiments/service.unit.test.ts Outdated Show resolved Hide resolved
src/test/common/installer/moduleInstaller.unit.test.ts Outdated Show resolved Hide resolved
src/test/common/installer/productInstaller.unit.test.ts Outdated Show resolved Hide resolved
src/test/common/net/fileDownloader.unit.test.ts Outdated Show resolved Hide resolved
src/test/interpreters/display.unit.test.ts Outdated Show resolved Hide resolved
Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from the localization side. I'd like it if some one of the Python side also reviewed

@TylerLeonhardt
Copy link
Member

@paulacamargo25 once this goes in, can you open an issue on vscode-python to translate more of the extension? I see a lot of stuff untranslated in the package.json.

@paulacamargo25
Copy link
Author

@paulacamargo25 once this goes in, can you open an issue on vscode-python to translate more of the extension? I see a lot of stuff untranslated in the package.json.

Yes, that is true

package.json Outdated
@@ -1860,6 +1862,7 @@
"vscode-languageclient": "8.0.0-next.13",
"vscode-languageserver": "8.0.0-next.9",
"vscode-languageserver-protocol": "3.17.0-next.15",
"vscode-nls": "^5.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to 5.0.1

Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vscode-nls version 5.0.0 had a bug in it on web. The fix for that bug is in 5.0.1 and needs to be updated.

* try new format

* remove nls gulp stuff

* back on main

* maybe use ../../

* try this

* try setting to where bundles are

* try new locBundleDestination

* try another

* try just src

* try

* try root dir
@TylerLeonhardt
Copy link
Member

@paulacamargo25 can you please add i18n/ to the vscodeignore file so that we don't want to include those in the VSIX? We only want *.nls.* files.

@paulacamargo25 paulacamargo25 merged commit 0974f92 into main May 5, 2022
@paulacamargo25 paulacamargo25 deleted the Add-localization branch May 5, 2022 21:40
@TylerLeonhardt TylerLeonhardt added this to the May 2022 milestone May 5, 2022
wesm pushed a commit to posit-dev/positron that referenced this pull request Mar 28, 2024
* Add localization (microsoft/vscode-python#18954)

* Enable localization using nls

* Add i18n files

* Add current translations

* Add export and import scripts

* Fix import translation function

* Clean code

* Update package-lock.json

* Delete i18n files

* Update package-lock.json

* Add news

* Fix package files

* Addd sourcemaps

* Add missing translations

* Remove localize test

* Add paths in pre-release

* Update pipeline

* Update pushStep

* Fix move item step

* Fix pull Steps

* Fix pipeline push and pull

* Fix translations import param

* Fix generate translations task

* Add generate translation task to compile script

* Add generate translations in the build steps

* Change i18n pt-br file name

* Delete package.nls.de.json

* Delete package.nls.pt-br.json

* Move generate translation task to PullStep

* Add nls webpack configuration

* Add nls config in extension.ts

* Try new path in webpack loader

* Test removing nls conf

* Add nls plugin

* Fix translations, remove nls pluging

* Remove unnecessary files

* Clean code

* Fix some comments

* Remove unnecessary packages

* Fix string with format

* Fix localize string

* Fix test in watcher

* Ignore localization files

* Change strings in tests

* Test importing nls in other file

* Fix comment in translations in tests

* Add missing translations

* Remove nls config in all files

* Add location steps in the stable pipeline

* Using new vscode-engineering feature to abstract away gulp (microsoft/vscode-python#19063)

* try new format

* remove nls gulp stuff

* back on main

* maybe use ../../

* try this

* try setting to where bundles are

* try new locBundleDestination

* try another

* try just src

* try

* try root dir

* Add i18n to vscodeignore

* Clean Code

* Remove old translations

* update templates to main

Co-authored-by: Tyler James Leonhardt <me@tylerleonhardt.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up localization w/ VS Code
3 participants