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

port localization to stable #2962

Merged
merged 7 commits into from
May 5, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/polyglot-notebooks-vscode-insiders/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@
"@typescript-eslint/eslint-plugin": "5.3.0",
"@typescript-eslint/parser": "5.3.0",
"@vscode/vsce": "2.16.0",
"@vscode/l10n-dev": "^0.0.18",
"@vscode/l10n-dev": "0.0.18",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"chai-fs": "2.0.0",
Expand All @@ -841,6 +841,6 @@
"vscode-oniguruma": "1.6.1",
"vscode-textmate": "6.0.0",
"vscode-uri": "3.0.6",
"@vscode/l10n": "^0.0.10"
"@vscode/l10n": "0.0.10"
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

"l10n": "./l10n" needs to be added to package.json like in insiders in order to recognize the strings in l10n\bungle.l10n.json

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

the release branch has that change already

16 changes: 11 additions & 5 deletions src/polyglot-notebooks-vscode/do-version-upgrade.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ try {
& node .\tools\buildSemanticTokenScopes.js
Pop-Location

# copy package.json
Copy-Item -Path "$stableDirectory\package.json" -Destination "$insidersDirectory\package.json"
# copy package.json from insider
colombod marked this conversation as resolved.
Show resolved Hide resolved
Copy-Item -Path "$insidersDirectory\package.json" -Destination "$stableDirectory\package.json"

$insidersPackageJsonContents = (Get-Content "$insidersDirectory\package.json" | Out-String | ConvertFrom-Json)
$stablePackageJsonContents = (Get-Content "$stableDirectory\package.json" | Out-String | ConvertFrom-Json)

$insidersPackageJsonContents.scripts.package += " --pre-release"
$stablePackageJsonContents.scripts.package = $stablePackageJsonContents.scripts.package.Replace("--pre-release","").Trim()
colombod marked this conversation as resolved.
Show resolved Hide resolved

$insidersPackageJsonContents | ConvertTo-Json -depth 100 | Out-File "$insidersDirectory\package.json"
$stablePackageJsonContents | ConvertTo-Json -depth 100 | Out-File "$stableDirectory\package.json"

# copy grammar files
Remove-Item -Path "$stableDirectory\grammars\*"
Expand All @@ -36,6 +36,12 @@ try {
Remove-Item -Path "$stableDirectory\src\*" -Filter "*.ts"
Copy-Item -Path "$insidersDirectory\src\*" -Destination "$stableDirectory\src\" -Filter "*.ts"

# copy localization files
Copy link
Contributor

Choose a reason for hiding this comment

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

Quick question: So if we have this in the script, do we still need the package.nls.*.json files below? Looks like they exist here: https://github.com/dotnet/interactive/tree/main/src/polyglot-notebooks-vscode-insiders

Copy link
Contributor

Choose a reason for hiding this comment

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

package.nls.*.json should override the existing ones to keep in sync with the ones in insiders

Remove-Item -Path "$stableDirectory\*" -Filter "package.nls.*"
Copy-Item -Path "$insidersDirectory\*" -Destination "$stableDirectory\" -Filter "package.nls.*"
Remove-Item -Path "$stableDirectory\l10n\*" -Filter "bundle.l10n.*"
Copy-Item -Path "$insidersDirectory\l10n\*" -Destination "$stableDirectory\l10n\" -Filter "bundle.l10n.*"

# update apis
. "$PSScriptRoot\update-api.ps1" -version $version

Expand Down
8 changes: 8 additions & 0 deletions src/polyglot-notebooks-vscode/l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"VariableGridColumnActions": "Actions",
"VariableGridColumnName": "Name",
"VariableGridColumnValue": "Value",
"VariableGridColumnType": "Type",
"VariableGridColumnKernel": "Kernel",
"VariableGridshareTemplate": "Share value {value-name} from {kernel-name} kernel"
}
Loading