Change:
<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; import { deepClone } from 'vs/base/common/objects'; import { ILocalizedString } from 'vs/platform/action/common/action'; import { localizeManifest } from 'vs/platform/extensionManagement/common/extensionNls'; import { IExtensionManifest, IConfiguration } from 'vs/platform/extensions/common/extensions'; const manifest: IExtensionManifest = { name: 'test', publisher: 'test', version: '1.0.0', engines: { vscode: '*' }, contributes: { commands: [ { command: 'test.command', title: '%test.command.title%', category: '%test.command.category%' }, ], authentication: [ { id: 'test.authentication', label: '%test.authentication.label%', } ], configuration: { // to ensure we test another "title" property title: '%test.configuration.title%', properties: { 'test.configuration': { type: 'string', description: 'not important', } } } } }; suite('Localize Manifest', () => { test('replaces template strings', function () { const localizedManifest = localizeManifest( deepClone(manifest), { 'test.command.title': 'Test Command', 'test.command.category': 'Test Category', 'test.authentication.label': 'Test Authentication', 'test.configuration.title': 'Test Configuration', } ); assert.strictEqual(localizedManifest.contributes?.commands?.[0].title, 'Test Command'); assert.strictEqual(localizedManifest.contributes?.commands?.[0].category, 'Test Category'); assert.strictEqual(localizedManifest.contributes?.authentication?.[0].label, 'Test Authentication'); assert.strictEqual((localizedManifest.contributes?.configuration as IConfiguration).title, 'Test Configuration'); }); test('replaces template strings with fallback if not found in translations', function () { const localizedManifest = localizeManifest( deepClone(manifest), {}, { 'test.command.title': 'Test Command', 'test.command.category': 'Test Category', 'test.authentication.label': 'Test Authentication', 'test.configuration.title': 'Test Configuration', } ); assert.strictEqual(localizedManifest.contributes?.commands?.[0].title, 'Test Command'); assert.strictEqual(localizedManifest.contributes?.commands?.[0].category, 'Test Category'); assert.strictEqual(localizedManifest.contributes?.authentication?.[0].label, 'Test Authentication'); assert.strictEqual((localizedManifest.contributes?.configuration as IConfiguration).title, 'Test Configuration'); }); test('replaces template strings - command title & categories become ILocalizedString', function () { const localizedManifest = localizeManifest( deepClone(manifest), { 'test.command.title': 'Befehl test', 'test.command.category': 'Testkategorie', 'test.authentication.label': 'Testauthentifizierung', 'test.configuration.title': 'Testkonfiguration', }, { 'test.command.title': 'Test Command', 'test.command.category': 'Test Category', 'test.authentication.label': 'Test Authentication', 'test.configuration.title': 'Test Configuration', } ); const title = localizedManifest.contributes?.commands?.[0].title as ILocalizedString; const category = localizedManifest.contributes?.commands?.[0].category as ILocalizedString; assert.strictEqual(title.value, 'Befehl test'); assert.strictEqual(title.original, 'Test Command'); assert.strictEqual(category.value, 'Testkategorie'); assert.strictEqual(category.original, 'Test Category'); // Everything else stays as a string. assert.strictEqual(localizedManifest.contributes?.authentication?.[0].label, 'Testauthentifizierung'); assert.strictEqual((localizedManifest.contributes?.configuration as IConfiguration).title, 'Testkonfiguration'); }); }); </ins>

Discussion:
Testing in Firefox with de-ch (Swiss German) set. Open command palette and search for Remote Repositories commands :bug: The first command has a partly English, partly de-ch line under it ( and in English, seems to be de-ch translated) !
Hmm yeah it should look like this (Desktop screenshot) with the English strings next to the German strings. I think this is a bug in how I'm applying the translations... !
Just found out about these functions on the desktop side: Which seems to go through the manifest and turn some s into s. I followed up with to understand how this works.
This code was originally written by so I would ask him to know how this works.
Not quite, it was originally written by , but I'm happy to try and help. My understanding is that the code is taking a JSON object that looks like this: Together with another JSON object that looks like this: And produces a JSON object that looks like this by substituting all string values of the shape with their corresponding value:
I still see this on firefox: ! The first option's english translation still looks wrong? (tested on )
The first one is still wrong because of so we'll track that there. However, the rest now have the English string underneath which they use to not have, which means this is fixed and verified