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

Check the localizations into the project nightly #16835

Merged
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
34261dd
okay just try it
DHowett May 17, 2023
b723aaf
okay just try it ii
DHowett May 17, 2023
a69f569
okay just try it iii
DHowett May 17, 2023
e544692
foo bar baz
DHowett May 17, 2023
f719185
baz far fozz
DHowett May 17, 2023
db0fb14
Try to normalize line endings....... ffs
DHowett May 19, 2023
e745011
Merge remote-tracking branch 'origin/main' into dev/duhowett/what-if-…
DHowett Mar 6, 2024
a545a2e
Well let's just try it
DHowett Mar 6, 2024
26a90b1
I always get something wrong
DHowett Mar 6, 2024
852354a
Yeah i'm using tar for this what of it
DHowett Mar 6, 2024
88bddb7
Okay i hate it too
DHowett Mar 6, 2024
3ba5838
idk i guess no base then?
DHowett Mar 6, 2024
77cb4c3
Foo
DHowett Mar 6, 2024
7f7a73d
Actually, don't edit the CascadiaPackage resources
DHowett Mar 6, 2024
1135e66
skip spellcheck for all non-en-us resources
DHowett Mar 6, 2024
f639909
Set loc target to true
DHowett Mar 6, 2024
f0168ad
Spellbot consvc
DHowett Mar 6, 2024
083b052
No longer must we fetch localizations during release builds!
DHowett Mar 6, 2024
18967d1
Revert "Actually, don't edit the CascadiaPackage resources"
DHowett Mar 6, 2024
c7a2ec1
On second thought...
DHowett Mar 6, 2024
b40f738
Try to fix CRLF I guess
DHowett Mar 7, 2024
f067b54
ffs try the branch thing
DHowett Mar 7, 2024
914ac8c
OH I SEE, THE DOCS JUST LIE
DHowett Mar 7, 2024
ae8c38f
Context Menu Merge: fully standardize XML writing
DHowett Mar 7, 2024
a3b99e3
Propagate the en-us context menu changes
DHowett Mar 7, 2024
e00f944
restore normlacy, speelboot
DHowett Mar 7, 2024
806c6f9
Maybe the only en-us change was ContextMenu; in that case, we actuall…
DHowett Mar 7, 2024
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
1 change: 1 addition & 0 deletions .github/actions/spelling/allow/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ changelog
clickable
clig
CMMI
consvc
copyable
Counterintuitively
CtrlDToClose
Expand Down
1 change: 1 addition & 0 deletions .github/actions/spelling/excludes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,4 @@
^tools/ReleaseEngineering/ServicingPipeline\.ps1$
^XamlStyler\.json$
ignore$
Resources/(?!en)
61 changes: 53 additions & 8 deletions build/pipelines/daily-loc-submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ schedules:
- main
always: false # only run if there's code changes!


parameters:
- name: targetBranch
type: string
default: "automated/loc-update"

pool:
vmImage: windows-2019

Expand Down Expand Up @@ -38,6 +44,12 @@ steps:
persistCredentials: true
path: s/Terminal.Internal

- pwsh: |-
Install-Module PSGitHub -Scope CurrentUser -Force
git config --local user.email "consvc@microsoft.com"
git config --local user.name "Console Service Bot"
displayName: Prepare git submission environment

- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@1
displayName: 'Touchdown Build - 7105, PRODEXT'
inputs:
Expand All @@ -51,13 +63,46 @@ steps:
outputDirectoryRoot: LocOutput
appendRelativeDir: true
pseudoSetting: Included
localizationTarget: true

# Saving one of these makes it really easy to inspect the loc output...
- powershell: 'tar czf LocOutput.tar.gz LocOutput'
displayName: 'Archive Loc Output for Submission'
- pwsh: |-
Remove-Item -EA:Ignore -R -Force LocOutput\Terminal.Internal
$Files = Get-ChildItem LocOutput -R -Include 'ContextMenu.resw','Resources.resw' | ? FullName -Like '*en-US\*\*.resw'
$Files | % { Move-Item -Verbose $_.Directory $_.Directory.Parent.Parent -EA:Ignore }
Get-ChildItem LocOutput -R -Filter '*.resw' | % {
((Get-Content $_.FullName) -join "`r`n") + "`r`n" | Set-Content -NoNewline $_.FullName
}
& tar.exe -c -f LocOutputMunged.tar -C LocOutput .
& tar.exe -x -v -f LocOutputMunged.tar
rm LocOutputMunged.tar
rm -r -fo LocOutput
& ./build/scripts/Copy-ContextMenuResourcesToCascadiaPackage.ps1
displayName: Move Loc files to the right places

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: LocOutput'
inputs:
PathtoPublish: LocOutput.tar.gz
ArtifactName: LocOutput
- pwsh: |-
git add **/*.resw
git reset HEAD **/en-US/*.resw # Don't check in automated changes to en-US files; too noisy
git status
git diff --quiet --cached --exit-code
If ($LASTEXITCODE -Ne 0) {
$Now = Get-Date
git commit -m "Localization Updates - $Now"
git push origin HEAD:refs/heads/${{parameters.targetBranch}} -f
Write-Host "##vso[task.setvariable variable=ChangesPushedToRepo]1"
} Else {
Write-Host "##vso[task.setvariable variable=ChangesPushedToRepo]0"
}
displayName: git commit and push

- pwsh: |-
Import-Module PSGitHub
$PSDefaultParameterValues['*GitHub*:Owner'] = "microsoft"
$PSDefaultParameterValues['*GitHub*:RepositoryName'] = "terminal"
$PSDefaultParameterValues['*GitHub*:Token'] = ("$(GithubPullRequestToken)" | ConvertTo-SecureString -AsPlainText -Force)
$existingPr = Get-GitHubPullRequest -HeadBranch "${{parameters.targetBranch}}"
If ($null -Eq $existingPr) {
$Now = Get-Date
New-GitHubPullRequest -Head "${{parameters.targetBranch}}" -Title "Localization Updates - $Now"
Copy link
Member Author

Choose a reason for hiding this comment

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

This cmdlet supports a base branch, but I couldn't get it to work properly in CI. So, I gave up. It always targets main now.

}
displayName: Publish pull request
condition: and(eq(variables['ChangesPushedToRepo'], '1'), succeeded())
4 changes: 0 additions & 4 deletions build/pipelines/templates-v2/pipeline-full-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ stages:
packageListDownload: e82d490c-af86-4733-9dc4-07b772033204
versionListDownload: ${{ parameters.terminalInternalPackageVersion }}

- template: ./steps-fetch-and-prepare-localizations.yml
parameters:
includePseudoLoc: true

- ${{ if eq(parameters.buildWPF, true) }}:
# Add an Any CPU build flavor for the WPF control bits
- template: ./job-build-project.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ extends:
packageListDownload: e82d490c-af86-4733-9dc4-07b772033204
versionListDownload: ${{ parameters.terminalInternalPackageVersion }}

- template: ./build/pipelines/templates-v2/steps-fetch-and-prepare-localizations.yml@self
parameters:
includePseudoLoc: true

- ${{ if eq(parameters.buildWPF, true) }}:
# Add an Any CPU build flavor for the WPF control bits
- template: ./build/pipelines/templates-v2/job-build-project.yml@self
Expand Down

This file was deleted.

Loading