Skip to content

Commit

Permalink
Update to new l10n (#20484)
Browse files Browse the repository at this point in the history
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 <me@tylerleonhardt.com>
  • Loading branch information
paulacamargo25 and TylerLeonhardt authored Jan 13, 2023
1 parent 0f4e6ae commit e92c124
Show file tree
Hide file tree
Showing 39 changed files with 365 additions and 1,101 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ env:
# Use the mocha-multi-reporters and send output to both console (spec) and JUnit (mocha-junit-reporter).
# Also enables a reporter which exits the process running the tests if it haven't already.
MOCHA_REPORTER_JUNIT: true
DISABLE_TRANSLATIONS: true

jobs:
setup:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ env:
ARTIFACT_NAME_VSIX: ms-python-insiders-vsix
VSIX_NAME: ms-python-insiders.vsix
TEST_RESULTS_DIRECTORY: .
DISABLE_TRANSLATIONS: true
# Force a path with spaces and to test extension works in these scenarios
# Unicode characters are causing 2.7 failures so skip that for now.
special-working-directory: './path with spaces'
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ nodeLanguageServer.*/**
dist/**
# translation files
*.xlf
*.nls.*.json
*.i18n.json
package.nls.*.json
l10n/
3 changes: 1 addition & 2 deletions build/azure-pipeline.pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ resources:
extends:
template: azure-pipelines/extension/pre-release.yml@templates
parameters:
locTsConfigs: $(Build.SourcesDirectory)/tsconfig.json
locBundleDestination: $(Build.SourcesDirectory)/out/client
l10nSourcePaths: ./src/client
buildSteps:
- task: NodeTool@0
inputs:
Expand Down
5 changes: 1 addition & 4 deletions build/azure-pipeline.stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ extends:
template: azure-pipelines/extension/stable.yml@templates
parameters:
publishExtension: ${{ parameters.publishExtension }}

locTsConfigs: $(Build.SourcesDirectory)/tsconfig.json
locBundleDestination: $(Build.SourcesDirectory)/out/client

l10nSourcePaths: ./src/client
buildSteps:
- task: NodeTool@0
inputs:
Expand Down
13 changes: 0 additions & 13 deletions build/webpack/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,3 @@ function getListOfExistingModulesInOutDir() {
return files.map((filePath) => `./${filePath.slice(0, -3)}`);
}
exports.getListOfExistingModulesInOutDir = getListOfExistingModulesInOutDir;
function getTranlationsLoader() {
const loaders = [];
if (process.env.DISABLE_TRANSLATIONS !== 'true') {
loaders.push({
loader: 'vscode-nls-dev/lib/webpack-loader',
options: {
base: constants.ExtensionRootDir,
},
});
}
return loaders;
}
exports.getTranlationsLoader = getTranlationsLoader;
1 change: 0 additions & 1 deletion build/webpack/webpack.extension.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const config = {
},
module: {
rules: [
...common.getTranlationsLoader(),
{
test: /\.ts$/,
use: [
Expand Down
Loading

0 comments on commit e92c124

Please sign in to comment.