-
Notifications
You must be signed in to change notification settings - Fork 687
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
Onboard Localization pipeline #5990
Merged
Merged
Changes from 92 commits
Commits
Show all changes
107 commits
Select commit
Hold shift + click to select a range
2b232a8
Prep for localization
arunchndr b49ec5e
Add package.nls.json and one LOC strings for test sample
Cosifne 3df5a53
Install l10n and l10n-dev
Cosifne 50278d2
Uninstall vscode-nls-dev
Cosifne 4348c51
Add l10n path
Cosifne 569c788
Modify package
Cosifne 88073a4
Update to vscode 1.73
Cosifne 2e946b9
Add one localized target string
Cosifne c64fe45
Add script
Cosifne 8c0f234
Add reverse script
Cosifne 78825e0
Add a stub task
Cosifne 9323f1f
Clean up
Cosifne 973f0d4
Clean up
Cosifne 1ec8dea
Add LOCProject.json
Cosifne 6ef36d7
Add loc.yml
Cosifne b6f77b6
Temp skip the build to verify
Cosifne 55a3fc1
Use script
Cosifne bae68f9
Add back prerequest
Cosifne 594c11a
Checkout build.yml back
Cosifne f4d16fd
Update loc.yml
Cosifne c1e22b8
Merge remote-tracking branch 'upstream/main' into dev/shech/LOC
Cosifne 09cb9b3
Fix :
Cosifne 2ade1ea
Checkout repo
Cosifne 8e596e2
Fix path
Cosifne 23b49bb
Referencing PAT
Cosifne b02e09e
Comment out the pacakge ID
Cosifne d118668
Add lclPacakgeId
Cosifne 8ab3c3f
Add publish build artifacts task
Cosifne 534073b
Comment out task
Cosifne 945da9a
Modity the task
Cosifne 6dadaa5
Use LCL-JUNO-PROD-VSCODECS
Cosifne 78b36a0
Install vscode-l10n
Cosifne 81c021f
Add script
Cosifne 9bc629a
Fix typo
Cosifne 7c8e1d2
Import xlf back to json
Cosifne 5881af6
Also publish l10n file
Cosifne 0e71d9e
Include xlf files in gitignore
Cosifne b5022d7
Part of the script
Cosifne e4c8e86
Install octokit
Cosifne fa58993
Uninstall simple-git
Cosifne 5136b80
Script in progress
Cosifne 5dce89c
Script in progress
Cosifne b03b9e5
Script in progress
Cosifne 0aecf57
Link script to yml
Cosifne 9a2a048
Install gulp
Cosifne e8ef141
Update gulp file
Cosifne 4906917
Update filter
Cosifne 760d1ce
Update task
Cosifne 38f15c2
Update script
Cosifne 43f662a
Remove
Cosifne 72db8ec
Add target branch
Cosifne 3ba4307
Change diff
Cosifne 23b4c04
Modify task
Cosifne 7dd6185
Fix git diff
Cosifne d088094
Add rest of git command
Cosifne 480c2ef
Modify the script
Cosifne ec92c6e
Add GitHub PullRequest Creation
Cosifne e83836d
Add code owner
Cosifne 5a0274c
Install gulp
Cosifne 102922f
Check the existence of pull request
Cosifne 7d17454
Check if PR is open
Cosifne 0d9a2d6
Merge script
Cosifne 5e23b8c
Debug
Cosifne 0bdeb67
Debug
Cosifne 7110559
Modify script
Cosifne 7a115f9
Use path.basename
Cosifne 9f18563
Use a different pool
Cosifne 6ef40c6
Fix style problem
Cosifne 866df37
Use git reset
Cosifne 16a0992
Remote add
Cosifne ad27647
Alias
Cosifne eaa89f4
Polish output
Cosifne df1caad
Remote add with token
Cosifne d214834
Fix syntax
Cosifne e6d6d5c
Try use node 18
Cosifne ee26da7
Put token in client
Cosifne 190aada
Fix style
Cosifne abee860
Remove auth()
Cosifne 7383d10
Change code owner
Cosifne 0afded5
Fix Uri
Cosifne 818d7fa
Fix owner and repo
Cosifne 4812095
Debug
Cosifne 815851c
Fix issue when checking PR
Cosifne ca88888
Clean up
Cosifne 153b4bc
Clean up yml
Cosifne 1d512b5
Add condition to only loc from a branch
Cosifne 4f49bfa
Change package.json
Cosifne ec4aa8d
Change this back to main
Cosifne ce55dae
Clean up
Cosifne 7ccb3ca
Remove unused packages
Cosifne 353c921
Remove unused packages
Cosifne e644a14
Clean up
Cosifne 62833f1
Add bundle.json generation to compile task
Cosifne a42a6d6
Hardcode dotnet and make userName and email optional
Cosifne c7aae3d
Revert back the \u200b changes
Cosifne e6d6a3c
Generated bundle.l10n.json
Cosifne 388d183
Optimize script
Cosifne 1f825a4
Merge remote-tracking branch 'upstream/main' into dev/shech/LOC
Cosifne 1594ec8
Fix the namespace problem after merge
Cosifne e7f63ef
Add the content change for razor
Cosifne 5f73e7e
Use path.sep
Cosifne 063174d
Compare head
Cosifne 265913d
Merge remote-tracking branch 'upstream/main' into dev/shech/LOC
Cosifne 11a6c97
Check if file exist
Cosifne 20ae700
Use log error in vso
Cosifne c0a5c6a
Revert "Check if file exist"
Cosifne 5c9c95e
Update package.json.lock
Cosifne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
trigger: none | ||
pr: none | ||
|
||
parameters: | ||
- name: publishLocalizationFile | ||
type: boolean | ||
default: true | ||
|
||
variables: | ||
# Variable group contains the PAT to LOC | ||
- group: OneLocBuildVariables | ||
|
||
stages: | ||
- stage: LocalizationStage | ||
condition: eq(variables['Build.SourceBranch'], 'refs/heads/main') | ||
jobs: | ||
- job: Localization | ||
pool: | ||
name: NetCore1ESPool-Internal | ||
demands: ImageOverride -equals windows.vs2022preview.amd64 | ||
steps: | ||
- task: NodeTool@0 | ||
displayName: 'Install Node.js 18.x' | ||
inputs: | ||
# Octokit client needs 18.x to have 'fetch' function. | ||
versionSpec: '18.x' | ||
- checkout: self | ||
clean: true | ||
submodules: true | ||
fetchTags: false | ||
fetchDepth: 0 | ||
- pwsh: | | ||
npm install | ||
npm install -g @vscode/l10n-dev | ||
npm install -g gulp | ||
displayName: 'Install tools' | ||
- pwsh: npm run compile | ||
displayName: 'Compile' | ||
- pwsh: npm run l10nDevGenerateLocalizationBundle | ||
displayName: 'Generate bundle.l10.json' | ||
- pwsh: npm run l10nDevGenerateXlf | ||
displayName: 'Generate xlf files from bundle.10n.json' | ||
- task: OneLocBuild@2 | ||
env: | ||
SYSTEM_ACCESSTOKEN: $(System.AccessToken) | ||
inputs: | ||
locProj: loc/LocProject.json | ||
outDir: '$(Build.SourcesDirectory)/loc' | ||
isCreatePrSelected: false | ||
patVariable: $(dn-bot-ceapex-package-r) | ||
packageSourceAuth: patAuth | ||
lclSource: lclFilesfromPackage | ||
LclPackageId: 'LCL-JUNO-PROD-VSCODECS' | ||
- pwsh: npm run l10nDevImportXlf | ||
displayName: 'Import xlf to json.' | ||
- pwsh: gulp 'publish localization content' --userName dotnet-bot --email [email protected] --commitSha $(Build.SourceVersion) --targetRemoteRepo vscode-csharp --baseBranch 'main' --owner dotnet | ||
displayName: 'Create PR in GitHub.' | ||
env: | ||
GitHubPAT: $(BotAccount-dotnet-bot-repo-PAT) | ||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish Localization Files' | ||
inputs: | ||
PathtoPublish: '$(Build.SourcesDirectory)/loc' | ||
PublishLocation: Container | ||
ArtifactName: Loc | ||
condition: ${{ parameters.publishLocalizationFile }} | ||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish l10n file' | ||
inputs: | ||
PathtoPublish: '$(Build.SourcesDirectory)/l10n' | ||
PublishLocation: Container | ||
ArtifactName: l10n | ||
condition: ${{ parameters.publishLocalizationFile }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"Projects": [ | ||
{ | ||
"LanguageSet": "VS_Main_Languages", | ||
"LocItems": [ | ||
{ | ||
"SourceFile": "./loc/vscode-csharp.xlf", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
./loc folder is used to stage all the generated files. |
||
"CopyOption": "LangIDOnName", | ||
"OutputPath": "./loc/" | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub client needs this