Skip to content

Allow English fallback during localization release imports - #1140

Merged
Bill Schnurr (bschnurr) merged 3 commits into
mainfrom
users/bschnurr/allow-untranslated-localization
Nov 9, 2026
Merged

Bill Schnurr (bschnurr) merged 3 commits into
mainfrom
users/bschnurr/allow-untranslated-localization

Conversation

@bschnurr

@bschnurr Bill Schnurr (bschnurr) commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Dependency: microsoft/vscode-common-python-lsp#127

Pin the localization action and both release import resources to 6b4a3573e7e7a9fe1e468e129544432278aec2d6. This allows untranslated strings, including wholly untranslated tables, to retain English rather than fail packaging. Missing/empty/malformed/incomplete locale tables remain errors. Update the documented policy; preserve dev translation branch, Pylance-Eng main, publication defaults, and all build/release settings.

Validation: actual-YAML caller guards, formatting, and Azure preview expansion passed. Shared tests/lint passed; real isort dev import produces all 28 locale files with English fallback. Environments' native pipelines remain disabled; exact YAML expansion was verified through an enabled definition. No release builds queued or publication performed. Merge the shared dependency before this consumer pin update.

GitHub pipeline templates

  • Use microsoft/pylance-eng on GitHub instead of DevDiv/Pylance-Eng in both stable and pre-release template resources, through the existing Github-Pylance service connection.
  • Preserve refs/heads/main, template paths, build steps, localization pins, release settings, and publication defaults. Document service-connection access for template, translation, and shared-tooling resources.
  • Follow the verified isort change: Use GitHub Pylance engineering pipeline templates vscode-isort#793 (test run 15971864 succeeded with publishing disabled and Publish skipped).

Verification

  • Existing executable actual-YAML localization/release guards passed.
  • Exact parsed-YAML comparisons against the pre-change commit confirmed that the template resource is the only release configuration change.
  • All fourteen changed sibling release YAMLs passed formatting; CRLF-aware whitespace checks passed.
  • Both native stable and pre-release Azure definitions expanded successfully with publishExtension: false.
  • Expanded pipeline checks preserved localization import ordering, source scanning, and disabled publishing/validation-stage conditions.

These are preview expansions, not full sibling build runs. No new release builds were queued, no extension was published, and no PR was merged.

Pin submission and release imports to the same reviewed shared revision. Untranslated handbacks no longer block packaging; required locale tables and structural checks remain.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rchiodo

Rich Chiodo (rchiodo) commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🔒 Automated review in progress — Rich Chiodo (@rchiodo) is auto-reviewing this PR.

@rchiodo

Rich Chiodo (rchiodo) commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Reviewed commit: 53585bc5fc37393f1300b3b1bab23f14e29b47f8

Result: ⚠️ partially-verified

Verification details

Verification: Automated verification is best effort. The PR author remains responsible for testing.

Summary: Formatting passed for all three changed YAML files, and executable parsed-YAML checks passed for the workflow and both release callers. The checks confirmed matching localization pins, GitHub template resources, and preserved build/publication settings. Offline dependency preparation succeeded; initial discovery could not access Git metadata in the container. No tests were added, and external localization imports and Azure expansion were not executed, so verification is partial. **Reviewer dependency follow-up (nonblocking):** Suggest a separate PR adding `prettier ^3.0.3` to the official reviewer dependency declarations, using `package.json` as the dependency/version evidence. Do not automatically create that PR. This is reviewer environment maintenance, not a required change to the reviewed PR.

Test runs: 3 passed, 1 failed, 1 not run

  • ⚠️ Not run | External localization-import tests and Azure template expansion
  • ❌ Failed | unrelated to this PR | Dependency and test discovery | printf 'Sandbox profile: %s\n' "${AUTOMATION_SANDBOX_PROFILE:-unset}"; git status --short; git log -5 --oneline; git diff HEAD^ HEAD --stat; node --version; npm --version; python --version; python -c "import importlib.util; print('PyYAML available:', importlib.util.find_spec('yaml') is not None)"; node -e "for (const p of ['prettier','yaml','js-yaml']) { try { console.log(p + ': ' + require.resolve(p)); } catch { console.log(p + ': unavailable'); } }"; git ls-files 'build/test' 'src/test/*' '.github/test'; git grep -n -i -E 'localization|pullLocalization|azure-devdiv' -- build .github src/test package.json README.md
  • ✅ Passed | Changed YAML formatting | node ./node_modules/prettier/bin/prettier.cjs --check .github/workflows/localization.yml build/azure-devdiv-pipeline.stable.yml build/azure-devdiv-pipeline.pre-release.yml
  • ✅ Passed | Offline dependency preparation | npm ci --offline --ignore-scripts
  • ✅ Passed | Actual-YAML workflow and release caller contracts | python - <<'PY'
    from pathlib import Path
    import yaml

PIN = '6b4a3573e7e7a9fe1e468e129544432278aec2d6'
workflow = yaml.load(Path('.github/workflows/localization.yml').read_text(), Loader=yaml.BaseLoader)
assert workflow == {
'name': 'Localization',
'on': {'workflow_dispatch': '', 'push': {'branches': ['main'], 'paths': ['package.json', 'package.nls.json', 'src/**/*.ts', '.github/workflows/localization.yml']}},
'permissions': {'contents': 'read'},
'concurrency': {'group': 'localization-${{ github.ref }}', 'cancel-in-progress': 'false'},
'jobs': {'localization': {
'if': "github.repository == 'microsoft/vscode-python-debugger'", 'runs-on': 'ubuntu-latest', 'timeout-minutes': '20',
'steps': [{'uses': 'microsoft/vscode-common-python-lsp/.github/actions/localization@' + PIN,
'with': {'app-id': '${{ vars.PYTHON_LOCALIZATION_APP_ID }}', 'private-key': '${{ secrets.PYTHON_LOCALIZATION_PRIVATE_KEY }}'}}]
}}
}, 'workflow differs from expected caller contract'
print('PASS workflow: pinned action, triggers, credentials wiring, read-only permissions, serialized execution')

resources = {'repositories': [
{'repository': 'templates', 'type': 'github', 'name': 'microsoft/pylance-eng', 'ref': 'refs/heads/main', 'endpoint': 'Github-Pylance'},
{'repository': 'translations', 'type': 'github', 'name': 'microsoft/vscode-python-extensions-loc', 'ref': 'refs/heads/dev', 'endpoint': 'Github-Pylance'},
{'repository': 'localizationTools', 'type': 'github', 'name': 'microsoft/vscode-common-python-lsp', 'ref': PIN, 'endpoint': 'Github-Pylance'}
]}
variables = [{'name': k, 'value': v} for k, v in [
('TeamName', 'VSCode-python-debugger'), ('VsixName', 'python-debugger.vsix'),
('NPM_CONFIG_REGISTRY', 'https://packagefeedproxy.microsoft.io/npm/'),
('PIP_PROXY_INDEX_URL', 'https://packagefeedproxy.microsoft.io/pypi/simple/')
]]
platforms = [{'name': 'Linux', 'vsceTarget': ''}] + [
{'name': name, 'packageArch': arch, 'vsceTarget': target}
for name, arch, target in [('Linux', 'arm64', 'linux-arm64'), ('Linux', 'arm', 'linux-armhf'),
('Linux', 'x64', 'linux-x64'), ('MacOS', 'arm64', 'darwin-arm64'), ('MacOS', 'x64', 'darwin-x64'),
('Windows', 'arm', 'win32-arm64'), ('Windows', 'x64', 'win32-x64')]
]
for channel in ['stable', 'pre-release']:
path = Path(f'build/azure-devdiv-pipeline.{channel}.yml')
actual = yaml.safe_load(path.read_text())
steps = [{'script': 'npm run ci:msft', 'displayName': 'Install NPM dependencies'}]
for command, label in [('python -m pip install -U pip', 'Upgrade pip'), ('python -m pip install wheel', 'Install wheel'),
('python -m pip install nox', 'Install nox'), ('python -m nox --session install_bundled_libs', 'Install Python dependencies')]:
steps.append({'script': command, 'displayName': label, 'env': {'PIP_INDEX_URL': '$(PIP_PROXY_INDEX_URL)'}})
steps += [
{'script': 'python ./build/update_ext_version.py ' + ('--release ' if channel == 'stable' else '') + '--for-publishing', 'displayName': 'Update build number'},
{'pwsh': 'Copy-Item -Path "pre-built/" -Destination "." -Recurse -Force', 'displayName': 'Copy pre-built files'},
{'script': 'npm run package', 'displayName': 'Build extension'}
]
ext_params = {'buildPlatforms': '${{ parameters.buildPlatforms }}', 'buildSteps': '${{ parameters.buildSteps }}',
'standardizedVersioning': True, 'customNPMRegistry': '$(NPM_CONFIG_REGISTRY)', 'publishExtension': '${{ parameters.publishExtension }}',
'teamName': '$(TeamName)', 'ghCreateTag': True, 'ghCreateRelease': True, 'ghReleaseAddChangeLog': True,
'sourceAnalysisPool': 'VSEng-MicroBuildVSStable', 'pullLocalization': True}
expected = {'pr': 'none', 'resources': resources, 'variables': variables,
'parameters': [{'name': 'publishExtension', 'displayName': '🚀 Publish Extension', 'type': 'boolean', 'default': True},
{'name': 'buildPlatforms', 'type': 'object', 'default': platforms},
{'name': 'buildSteps', 'type': 'stepList', 'default': steps}],
'extends': {'template': f'azure-pipelines/extension/{channel}.yml@templates', 'parameters': ext_params}}
if channel == 'stable':
expected.update(name='Publish Release', trigger={'branches': {'include': ['release/
']}})
ext_params['validationNotifyUsers'] = 'plseng@microsoft.com'
else:
expected.update(trigger='none', schedules=[{'cron': '0 10 * * 1-5', 'displayName': 'Nightly Pre-Release Schedule',
'always': False, 'branches': {'include': ['main']}}])
assert actual == expected, f'{path}: unexpected release configuration'
print(f'PASS {path}: exact parsed caller contract (all resources, pins, triggers, build steps/platforms, template arguments, publication defaults)')
print('3 actual-YAML caller contracts passed; external templates/actions were not executed')
PY

⚠️ External localization-import tests and Azure template expansion diagnostic output
The localization action/importer and release templates reside in external repositories, not this checkout. The offline container could not reproduce translation imports, service-connection authorization, or Azure expansion. PR-reported results were not independently executed; no releases or publications were triggered.
❌ Dependency and test discovery diagnostic output
Sandbox profile: generic
fatal: not a git repository (or any parent up to mount point /)
v24.19.0
11.17.0
Python 3.13.17
PyYAML available: True
prettier: unavailable
yaml: unavailable
js-yaml: unavailable
[container exit=128]
Metadata evidence: package.json declares prettier ^3.0.3 in devDependencies; package-lock.json is checked in. Subsequent setup `npm ci --offline --ignore-scripts` succeeded, and formatting passed. Git metadata remained unavailable; read-only repository tools supplied source inspection.

@rchiodo Rich Chiodo (rchiodo) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved via Review Center.

@rchiodo Rich Chiodo (rchiodo) added the review-auto:approved Automated review: no blocking findings (approval posted). label Nov 7, 2026
Switch both release resources to microsoft/pylance-eng through Github-Pylance while preserving release settings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bschnurr
Bill Schnurr (bschnurr) merged commit 21ee30d into main Nov 9, 2026
16 checks passed
@bschnurr
Bill Schnurr (bschnurr) deleted the users/bschnurr/allow-untranslated-localization branch November 9, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debt Code quality issues review-auto:approved Automated review: no blocking findings (approval posted).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants