Skip to content

Commit c389f0f

Browse files
paulacamargo25TylerLeonhardt
authored andcommitted
* 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 <[email protected]>
1 parent dbe87b0 commit c389f0f

File tree

123 files changed

+1377
-1834
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+1377
-1834
lines changed

extensions/positron-python/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ pydevd*.log
4242
nodeLanguageServer/**
4343
nodeLanguageServer.*/**
4444
dist/**
45+
# translation files
46+
*.xlf
47+
*.nls.*.json
48+
*.i18n.json

extensions/positron-python/.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ debug_coverage*/**
4545
images/**/*.gif
4646
images/**/*.png
4747
ipywidgets/**
48+
i18n/**
4849
news/**
4950
node_modules/**
5051
obj/**

extensions/positron-python/build/azure-pipeline.pre-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ resources:
2121
extends:
2222
template: azure-pipelines/extension/pre-release.yml@templates
2323
parameters:
24+
locTsConfigs: $(Build.SourcesDirectory)/tsconfig.json
25+
locBundleDestination: $(Build.SourcesDirectory)/out/client
2426
buildSteps:
2527
- task: NodeTool@0
2628
inputs:

extensions/positron-python/build/azure-pipeline.stable.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ extends:
2424
template: azure-pipelines/extension/stable.yml@templates
2525
parameters:
2626
publishExtension: ${{ parameters.publishExtension }}
27+
28+
locTsConfigs: $(Build.SourcesDirectory)/tsconfig.json
29+
locBundleDestination: $(Build.SourcesDirectory)/out/client
30+
2731
buildSteps:
2832
- task: NodeTool@0
2933
inputs:

extensions/positron-python/build/webpack/webpack.extension.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ const config = {
2626
},
2727
module: {
2828
rules: [
29+
{
30+
loader: 'vscode-nls-dev/lib/webpack-loader',
31+
options: {
32+
base: constants.ExtensionRootDir,
33+
},
34+
},
2935
{
3036
test: /\.ts$/,
3137
use: [

extensions/positron-python/gulpfile.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ const flat = require('flat');
2121
const { argv } = require('yargs');
2222
const os = require('os');
2323
const rmrf = require('rimraf');
24+
const typescript = require('typescript');
25+
26+
const tsProject = ts.createProject('./tsconfig.json', { typescript });
2427

2528
const isCI = process.env.TRAVIS === 'true' || process.env.TF_BUILD !== undefined;
2629

2730
gulp.task('compile', (done) => {
2831
let failed = false;
29-
const tsProject = ts.createProject('tsconfig.json');
3032
tsProject
3133
.src()
3234
.pipe(tsProject())
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Enable localization using vscode-nlsß

0 commit comments

Comments
 (0)