Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Langpack Source update with fix for hashed strings #24400

Merged
merged 8 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
25 changes: 24 additions & 1 deletion build/lib/i18n.js

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions build/lib/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import * as fancyLog from 'fancy-log';
import * as ansiColors from 'ansi-colors';
import * as iconv from '@vscode/iconv-lite-umd';
import { l10nJsonFormat, getL10nXlf, l10nJsonDetails, getL10nFilesFromXlf, getL10nJson } from '@vscode/l10n-dev';
import { aliasStrings } from './vscodeLocStringAlias'; // {{SQL CARBON EDIT}} - Needed to store aliased strings.

function log(message: any, ...rest: any[]): void {
fancyLog(ansiColors.green('[i18n]'), message, ...rest);
Expand Down Expand Up @@ -904,6 +905,28 @@ export function createI18nFile(name: string, messages: any): File { // {{SQL CAR
'Do not edit this file. It is machine generated.'
];
for (const key of Object.keys(messages)) {
// {{SQL CARBON EDIT}} - Temporarily used to handle aliased ids from vscode-translations-export - https://github.com/microsoft/azuredatastudio/issues/24411
let areaList = messages['contents'];
if (name.startsWith('extensions/') && key.startsWith('contents') && areaList) {
for (const areaKey of Object.keys(areaList)) {
let stringList = messages['contents'][areaKey];
for (const stringKey of Object.keys(stringList)) {
let shortName = name.substring(11); //remove 'extensions/' (size 11) from name to get extension name by itself.
let keyAlias = aliasStrings as StringMap<StringMap<string>>
// '++CODE++' comes from @vscode/l10n-dev/dist/main.js#L358 which replaces any id that is the same as the string message.
if (stringKey.startsWith('++CODE++') && keyAlias[shortName]) {
Charles-Gagnon marked this conversation as resolved.
Show resolved Hide resolved
let shortBundleKey = stringKey.substring(8); //remove '++CODE++' (size 8) and only use hash to lookup.
let aliasKey = keyAlias[shortName][shortBundleKey];
if (aliasKey) {
let originalMessage = messages['contents'][areaKey][stringKey];
messages['contents'][areaKey][stringKey] = undefined;
messages['contents'][areaKey][aliasKey] = originalMessage;
}
}
}
}
}
// {{SQL CARBON EDIT}} - End
result[key] = messages[key];
}

Expand Down
324 changes: 324 additions & 0 deletions build/lib/vscodeLocStringAlias.js

Large diffs are not rendered by default.

321 changes: 321 additions & 0 deletions build/lib/vscodeLocStringAlias.ts

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions i18n/ads-language-pack-de/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
All notable changes to the "ads-language-pack-de" language pack will be documented in this file.

## [Released]
* September 14, 2023 - Release for Azure Data Studio 1.46
* July 10, 2023 - Release for Azure Data Studio 1.45
* May 8, 2023 - Release for Azure Data Studio 1.44
* March 30, 2023 - Release for Azure Data Studio 1.43
Expand Down
208 changes: 110 additions & 98 deletions i18n/ads-language-pack-de/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ads-language-pack-de",
"displayName": "German Language Pack for Azure Data Studio",
"description": "Language pack extension for German",
"version": "1.45.0",
"version": "1.46.0",
"publisher": "Microsoft",
"repository": {
"type": "git",
Expand All @@ -11,7 +11,7 @@
"license": "SEE SOURCE EULA LICENSE IN LICENSE.txt",
"engines": {
"vscode": "*",
"azdata": "^1.45.0"
"azdata": "^1.46.0"
},
"icon": "languagepack.png",
"categories": [
Expand All @@ -31,6 +31,114 @@
"id": "vscode",
"path": "./translations/main.i18n.json"
},
{
"id": "vscode.git",
"path": "./translations/extensions/vscode.git.i18n.json"
},
{
"id": "Microsoft.admin-tool-ext-win",
"path": "./translations/extensions/Microsoft.admin-tool-ext-win.i18n.json"
},
{
"id": "Microsoft.agent",
"path": "./translations/extensions/Microsoft.agent.i18n.json"
},
{
"id": "Microsoft.arc",
"path": "./translations/extensions/Microsoft.arc.i18n.json"
},
{
"id": "Microsoft.asde-deployment",
"path": "./translations/extensions/Microsoft.asde-deployment.i18n.json"
},
{
"id": "Microsoft.azcli",
"path": "./translations/extensions/Microsoft.azcli.i18n.json"
},
{
"id": "Microsoft.azurecore",
"path": "./translations/extensions/Microsoft.azurecore.i18n.json"
},
{
"id": "Microsoft.azuremonitor",
"path": "./translations/extensions/Microsoft.azuremonitor.i18n.json"
},
{
"id": "Microsoft.cms",
"path": "./translations/extensions/Microsoft.cms.i18n.json"
},
{
"id": "Microsoft.dacpac",
"path": "./translations/extensions/Microsoft.dacpac.i18n.json"
},
{
"id": "Microsoft.data-workspace",
"path": "./translations/extensions/Microsoft.data-workspace.i18n.json"
},
{
"id": "Microsoft.datavirtualization",
"path": "./translations/extensions/Microsoft.datavirtualization.i18n.json"
},
{
"id": "Microsoft.import",
"path": "./translations/extensions/Microsoft.import.i18n.json"
},
{
"id": "Microsoft.kusto",
"path": "./translations/extensions/Microsoft.kusto.i18n.json"
},
{
"id": "Microsoft.machine-learning",
"path": "./translations/extensions/Microsoft.machine-learning.i18n.json"
},
{
"id": "Microsoft.mssql",
"path": "./translations/extensions/Microsoft.mssql.i18n.json"
},
{
"id": "Microsoft.notebook",
"path": "./translations/extensions/Microsoft.notebook.i18n.json"
},
{
"id": "Microsoft.profiler",
"path": "./translations/extensions/Microsoft.profiler.i18n.json"
},
{
"id": "Microsoft.query-history",
"path": "./translations/extensions/Microsoft.query-history.i18n.json"
},
{
"id": "Microsoft.query-store",
"path": "./translations/extensions/Microsoft.query-store.i18n.json"
},
{
"id": "Microsoft.resource-deployment",
"path": "./translations/extensions/Microsoft.resource-deployment.i18n.json"
},
{
"id": "Microsoft.schema-compare",
"path": "./translations/extensions/Microsoft.schema-compare.i18n.json"
},
{
"id": "Microsoft.server-report",
"path": "./translations/extensions/Microsoft.server-report.i18n.json"
},
{
"id": "Microsoft.sql-assessment",
"path": "./translations/extensions/Microsoft.sql-assessment.i18n.json"
},
{
"id": "Microsoft.sql-database-projects",
"path": "./translations/extensions/Microsoft.sql-database-projects.i18n.json"
},
{
"id": "Microsoft.sql-migration",
"path": "./translations/extensions/Microsoft.sql-migration.i18n.json"
},
{
"id": "ms-mssql.sql-bindings-vscode",
"path": "./translations/extensions/ms-mssql.sql-bindings-vscode.i18n.json"
},
{
"id": "vscode.bat",
"path": "./translations/extensions/vscode.bat.i18n.json"
Expand All @@ -51,10 +159,6 @@
"id": "vscode.git-base",
"path": "./translations/extensions/vscode.git-base.i18n.json"
},
{
"id": "vscode.git",
"path": "./translations/extensions/vscode.git.i18n.json"
},
{
"id": "vscode.github-authentication",
"path": "./translations/extensions/vscode.github-authentication.i18n.json"
Expand Down Expand Up @@ -174,98 +278,6 @@
{
"id": "vscode.yaml",
"path": "./translations/extensions/vscode.yaml.i18n.json"
},
{
"id": "Microsoft.admin-tool-ext-win",
"path": "./translations/extensions/admin-tool-ext-win.i18n.json"
},
{
"id": "Microsoft.agent",
"path": "./translations/extensions/agent.i18n.json"
},
{
"id": "Microsoft.arc",
"path": "./translations/extensions/arc.i18n.json"
},
{
"id": "Microsoft.asde-deployment",
"path": "./translations/extensions/asde-deployment.i18n.json"
},
{
"id": "Microsoft.azcli",
"path": "./translations/extensions/azcli.i18n.json"
},
{
"id": "Microsoft.azurecore",
"path": "./translations/extensions/azurecore.i18n.json"
},
{
"id": "Microsoft.cms",
"path": "./translations/extensions/cms.i18n.json"
},
{
"id": "Microsoft.dacpac",
"path": "./translations/extensions/dacpac.i18n.json"
},
{
"id": "Microsoft.data-workspace",
"path": "./translations/extensions/data-workspace.i18n.json"
},
{
"id": "Microsoft.import",
"path": "./translations/extensions/import.i18n.json"
},
{
"id": "Microsoft.kusto",
"path": "./translations/extensions/kusto.i18n.json"
},
{
"id": "Microsoft.machine-learning",
"path": "./translations/extensions/machine-learning.i18n.json"
},
{
"id": "Microsoft.mssql",
"path": "./translations/extensions/mssql.i18n.json"
},
{
"id": "Microsoft.notebook",
"path": "./translations/extensions/notebook.i18n.json"
},
{
"id": "Microsoft.profiler",
"path": "./translations/extensions/profiler.i18n.json"
},
{
"id": "Microsoft.query-history",
"path": "./translations/extensions/query-history.i18n.json"
},
{
"id": "Microsoft.resource-deployment",
"path": "./translations/extensions/resource-deployment.i18n.json"
},
{
"id": "Microsoft.schema-compare",
"path": "./translations/extensions/schema-compare.i18n.json"
},
{
"id": "Microsoft.server-report",
"path": "./translations/extensions/server-report.i18n.json"
},
{
"id": "Microsoft.sql-assessment",
"path": "./translations/extensions/sql-assessment.i18n.json"
},
{
"id": "Microsoft.sql-database-projects",
"path": "./translations/extensions/sql-database-projects.i18n.json"
},
{
"id": "Microsoft.sql-migration",
"path": "./translations/extensions/sql-migration.i18n.json"
},
{
"id": "Microsoft.xml-language-features",
"path": "./translations/extensions/xml-language-features.i18n.json"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"": [
"--------------------------------------------------------------------------------------------",
"Copyright (c) Microsoft Corporation. All rights reserved.",
"Licensed under the Source EULA. See License.txt in the project root for license information.",
"--------------------------------------------------------------------------------------------",
"Do not edit this file. It is machine generated."
],
"version": "1.0.0",
"contents": {
"dist/main": {
"adminToolExtWin.noOENode": "Der Objekt-Explorer-Knoten konnte nicht aus dem connectionContext ermittelt werden: {0}",
"adminToolExtWin.ssmsMinError": "Fehler beim Aufruf von SsmsMin mit den Argumenten \"{0}\": {1}",
"adminToolExtWin.launchingDialogStatus": "Das Dialogfeld wird gestartet...",
"adminToolExtWin.noConnectionContextForGsw": "Für \"handleLaunchSsmsMinPropertiesDialogCommand\" wurde kein ConnectionContext angegeben.",
"adminToolExtWin.noConnectionContextForProp": "Für \"handleLaunchSsmsMinPropertiesDialogCommand\" wurde kein ConnectionContext angegeben.",
"adminToolExtWin.noConnectionProfile": "Über den connectionContext wurde kein connectionProfile angegeben: {0}"
},
"package": {
"adminToolExtWin.description": "Hiermit werden Azure Data Studio zusätzliche Windows-spezifische Funktionen hinzugefügt.",
"adminToolExtWin.displayName": "Datenbankverwaltungstool-Erweiterungen für Windows",
"adminToolExtWin.launchGswMenuItem": "Skripts generieren...",
"adminToolExtWin.propertiesMenuItem": "Properties (Admin Tools)"
}
}
}
Loading