Skip to content

Commit e92c124

Browse files
Update to new l10n (#20484)
Following https://github.com/microsoft/vscode-engineering/wiki/Extensions-Localization This onboards vscode-python to the new localization API which enables localization for the web. It's a large PR ... but pretty boring since it's just replacing one syntax with another. Co-authored-by: Tyler Leonhardt <[email protected]>
1 parent 0f4e6ae commit e92c124

39 files changed

+365
-1101
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ env:
1818
# Use the mocha-multi-reporters and send output to both console (spec) and JUnit (mocha-junit-reporter).
1919
# Also enables a reporter which exits the process running the tests if it haven't already.
2020
MOCHA_REPORTER_JUNIT: true
21-
DISABLE_TRANSLATIONS: true
2221

2322
jobs:
2423
setup:

.github/workflows/pr-check.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ env:
1414
ARTIFACT_NAME_VSIX: ms-python-insiders-vsix
1515
VSIX_NAME: ms-python-insiders.vsix
1616
TEST_RESULTS_DIRECTORY: .
17-
DISABLE_TRANSLATIONS: true
1817
# Force a path with spaces and to test extension works in these scenarios
1918
# Unicode characters are causing 2.7 failures so skip that for now.
2019
special-working-directory: './path with spaces'

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ nodeLanguageServer.*/**
4444
dist/**
4545
# translation files
4646
*.xlf
47-
*.nls.*.json
48-
*.i18n.json
47+
package.nls.*.json
48+
l10n/

build/azure-pipeline.pre-release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ 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
24+
l10nSourcePaths: ./src/client
2625
buildSteps:
2726
- task: NodeTool@0
2827
inputs:

build/azure-pipeline.stable.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ 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-
27+
l10nSourcePaths: ./src/client
3128
buildSteps:
3229
- task: NodeTool@0
3330
inputs:

build/webpack/common.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,3 @@ function getListOfExistingModulesInOutDir() {
5252
return files.map((filePath) => `./${filePath.slice(0, -3)}`);
5353
}
5454
exports.getListOfExistingModulesInOutDir = getListOfExistingModulesInOutDir;
55-
function getTranlationsLoader() {
56-
const loaders = [];
57-
if (process.env.DISABLE_TRANSLATIONS !== 'true') {
58-
loaders.push({
59-
loader: 'vscode-nls-dev/lib/webpack-loader',
60-
options: {
61-
base: constants.ExtensionRootDir,
62-
},
63-
});
64-
}
65-
return loaders;
66-
}
67-
exports.getTranlationsLoader = getTranlationsLoader;

build/webpack/webpack.extension.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const config = {
2626
},
2727
module: {
2828
rules: [
29-
...common.getTranlationsLoader(),
3029
{
3130
test: /\.ts$/,
3231
use: [

0 commit comments

Comments
 (0)