Add a Touchdown localization pipeline (#15054)

This commit introduces a localization pipeline that submits our
localizable content to Touchdown, the modern localization service we
should have been using the whole time.

The pipeline is scheduled to run after the end of the workday around 6-7
PM Pacific (depending on daylight saving time) if there have been any
code changes on main.

Some of our localizable files were out of spec, so I moved them into the
right places and the right format.
This commit is contained in:
Dustin L. Howett 2021-12-17 17:35:05 -06:00 committed by GitHub
parent f4b0e6372a
commit 239610f1cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 97 additions and 33 deletions

View File

@ -308,6 +308,7 @@ CREATEWINDOWFAILED
cref
critsec
crlf
cron
Crossdevice
CRSEL
crutkas
@ -346,6 +347,7 @@ CXVIRTUALSCREEN
cxxopts
CYSMICON
CYVIRTUALSCREEN
czf
cziplib
Dac
dacl
@ -1384,6 +1386,7 @@ PARENTRELATIVEPARSING
parray
PARTIALCONFIRMATIONDIALOGTITLE
pathcch
Pathto
PAUDIO
pbc
Pbgra
@ -1474,6 +1477,7 @@ printf
prm
proactively
PROCESSKEY
PRODEXT
PRODUCTVERSION
Progman
programdata
@ -1892,6 +1896,7 @@ taskschd
tchar
tcscpy
TCustom
tdbuild
TDevice
tellg
Templated

52
.pipelines/loc/loc.yml Normal file
View File

@ -0,0 +1,52 @@
trigger: none
pr: none
schedules:
- cron: "0 3 * * 2-6" # Run at 03:00 UTC Tuesday through Saturday (After the work day in Pacific, Mon-Fri)
displayName: "Nightly Localization Build"
branches:
include:
- main
always: false # only run if there's code changes!
pool:
vmImage: windows-2019
resources:
repositories:
- repository: self
type: git
ref: master
steps:
- checkout: self
clean: true
submodules: false
fetchDepth: 1 # Don't need a deep checkout for loc files!
persistCredentials: true
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@1
displayName: 'Touchdown Build - 37400, PRODEXT'
inputs:
teamId: 37400
authId: '$(TouchdownApplicationID)'
authKey: '$(TouchdownApplicationKey)'
resourceFilePath: |
**\Resources.resx
**\Resource.resx
**\Resources.resw
outputDirectoryRoot: LocOutput
appendRelativeDir: true
pseudoSetting: Included
# Saving one of these makes it really easy to inspect the loc output...
- powershell: 'tar czf LocOutput.tar.gz LocOutput'
displayName: 'PowerShell Script'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: LocOutput'
inputs:
PathtoPublish: LocOutput.tar.gz
ArtifactName: LocOutput

View File

@ -34,7 +34,7 @@
<ItemGroup>
<Compile Include="..\..\..\codeAnalysis\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Update="GcodePreviewHandlerControl.cs" />
<Compile Update="Resource.Designer.cs">
<Compile Update="Properties\Resource.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resource.resx</DependentUpon>
@ -71,9 +71,9 @@
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resource.resx">
<EmbeddedResource Update="Properties\Resource.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>
</Project>

View File

@ -64,7 +64,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Gcode
if (thumbnail == null)
{
_infoBarAdded = true;
AddTextBoxControl(Resource.GcodeWithoutEmbeddedThumbnails);
AddTextBoxControl(Properties.Resource.GcodeWithoutEmbeddedThumbnails);
}
else
{
@ -212,7 +212,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Gcode
PowerToysTelemetry.Log.WriteEvent(new GcodeFilePreviewError { Message = exception.Message });
Controls.Clear();
_infoBarAdded = true;
AddTextBoxControl(Resource.GcodeNotPreviewedError);
AddTextBoxControl(Properties.Resource.GcodeNotPreviewedError);
base.DoPreview(dataSource);
}
}

View File

@ -4,9 +4,9 @@
"LanguageSet": "Azure_Languages",
"LocItems": [
{
"SourceFile": "src\\modules\\previewpane\\GcodePreviewHandler\\Resource.resx",
"SourceFile": "src\\modules\\previewpane\\GcodePreviewHandler\\Properties\\Resource.resx",
"CopyOption": "LangIDOnName",
"OutputPath": "src\\modules\\previewpane\\GcodePreviewHandler"
"OutputPath": "src\\modules\\previewpane\\GcodePreviewHandler\\Properties"
}
]
}

View File

@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace Microsoft.PowerToys.PreviewHandler.Gcode {
namespace Microsoft.PowerToys.PreviewHandler.Gcode.Properties {
using System;
@ -39,7 +39,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Gcode {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.PowerToys.PreviewHandler.Gcode.Resource", typeof(Resource).Assembly);
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.PowerToys.PreviewHandler.Gcode.Properties.Resource", typeof(Resource).Assembly);
resourceMan = temp;
}
return resourceMan;

View File

@ -4,9 +4,9 @@
"LanguageSet": "Azure_Languages",
"LocItems": [
{
"SourceFile": "src\\modules\\previewpane\\SvgPreviewHandler\\Resource.resx",
"SourceFile": "src\\modules\\previewpane\\SvgPreviewHandler\\Properties\\Resource.resx",
"CopyOption": "LangIDOnName",
"OutputPath": "src\\modules\\previewpane\\SvgPreviewHandler"
"OutputPath": "src\\modules\\previewpane\\SvgPreviewHandler\\Properties"
}
]
}

View File

@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace Microsoft.PowerToys.PreviewHandler.Svg {
namespace Microsoft.PowerToys.PreviewHandler.Svg.Properties {
using System;
@ -39,7 +39,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Svg {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.PowerToys.PreviewHandler.Svg.Resource", typeof(Resource).Assembly);
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.PowerToys.PreviewHandler.Svg.Properties.Resource", typeof(Resource).Assembly);
resourceMan = temp;
}
return resourceMan;

View File

@ -87,7 +87,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Svg
if (blocked)
{
_infoBarAdded = true;
AddTextBoxControl(Resource.BlockedElementInfoText);
AddTextBoxControl(Properties.Resource.BlockedElementInfoText);
}
AddBrowserControl(svgData);
@ -172,7 +172,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Svg
PowerToysTelemetry.Log.WriteEvent(new SvgFilePreviewError { Message = exception.Message });
Controls.Clear();
_infoBarAdded = true;
AddTextBoxControl(Resource.SvgNotPreviewedError);
AddTextBoxControl(Properties.Resource.SvgNotPreviewedError);
base.DoPreview(dataSource);
}
}

View File

@ -34,7 +34,7 @@
<ItemGroup>
<Compile Include="..\..\..\codeAnalysis\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Update="Resource.Designer.cs">
<Compile Update="Properties\Resource.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resource.resx</DependentUpon>
@ -61,4 +61,11 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>
<ItemGroup>
<EmbeddedResource Update="Properties\Resource.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="de-DE" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="de-DE" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="es-ES" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="es-ES" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="fr-FR" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="fr-FR" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="hu-HU" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="hu-HU" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="it-IT" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="it-IT" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="ja-JP" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="ja-JP" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="ko-KR" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="ko-KR" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="nl-NL" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="nl-NL" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="pl-PL" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="pl-PL" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="pt-BR" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="pt-BR" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="pt-PT" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="pt-PT" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="ru-RU" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="ru-RU" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="sv-SE" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="sv-SE" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="tr-TR" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="tr-TR" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="zh-CN" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="zh-CN" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="zh-TW" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<LCX SchemaVersion="6.0" Name="S:\src\modules\previewpane\SvgPreviewHandler\Properties\Resource.resx" PsrId="211" FileType="1" SrcCul="en-US" TgtCul="zh-TW" xmlns="http://schemas.microsoft.com/locstudio/2006/6/lcx">
<OwnedComments>
<Cmt Name="Dev" />
<Cmt Name="LcxAdmin" />