-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added localization code to pipeline and created one LocProject json f…
…or Settings
- Loading branch information
1 parent
5c1713f
commit d5eceb3
Showing
4 changed files
with
69 additions
and
0 deletions.
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,41 @@ | ||
@echo off | ||
|
||
cd /D "%~dp0" | ||
|
||
echo Preparing localization build... | ||
|
||
setlocal | ||
|
||
rem In this sample, the repo root is identical to the script directory path. Adjust the value of the RepoRoot variable accordingly based on your environment. | ||
rem Again, ensure the RepoRoot variable is set to the real repo root location, otherwise the localization toolset wouldn't work as intended. | ||
rem Note that the resolved %~dp0 ends with \. | ||
set RepoRoot=%~dp0..\ | ||
set OutDir=%RepoRoot%out | ||
set NUGET_PACKAGES=%RepoRoot%packages | ||
set LocalizationXLocPkgVer=2.0.0 | ||
|
||
nuget install Localization.XLoc -Version %LocalizationXLocPkgVer% -OutputDirectory "%NUGET_PACKAGES%" -NonInteractive -Verbosity detailed | ||
if "%errorlevel%" neq "0" ( | ||
exit /b %errorlevel% | ||
) | ||
|
||
nuget install LSBuild.XLoc -OutputDirectory "%NUGET_PACKAGES%" -NonInteractive -Verbosity detailed | ||
if "%errorlevel%" neq "0" ( | ||
exit /b %errorlevel% | ||
) | ||
|
||
nuget install Localization.Languages -OutputDirectory "%NUGET_PACKAGES%" -NonInteractive -Verbosity detailed | ||
if "%errorlevel%" neq "0" ( | ||
exit /b %errorlevel% | ||
) | ||
|
||
echo Running localization build... | ||
|
||
set XLocPath=%NUGET_PACKAGES%\Localization.XLoc.%LocalizationXLocPkgVer% | ||
set LocProject=%RepoRoot%src\core\Microsoft.PowerToys.Settings.UI\LocProject.json | ||
|
||
dotnet "%XLocPath%\tools\netcore\Microsoft.Localization.XLoc.dll" /f "%LocProject%" | ||
|
||
echo Localization build finished with exit code '%errorlevel%'. | ||
|
||
exit /b %errorlevel% |
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 |
---|---|---|
|
@@ -21,6 +21,7 @@ package_sources: | |
feeds: | ||
'Nuget': 'https://api.nuget.org/v3/index.json' | ||
'PipelineBuildSupplement': 'https://msazure.pkgs.visualstudio.com/_packaging/PipelineBuildSupplement/nuget/v3/index.json' | ||
'Toolset': 'ttps://msazure.pkgs.visualstudio.com/_packaging/Toolset/nuget/v3/index.json' | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
arjunbalgovind
Author
Contributor
|
||
|
||
restore: | ||
commands: | ||
|
@@ -37,6 +38,15 @@ restore: | |
|
||
build: | ||
commands: | ||
- !!buildcommand | ||
name: 'Localization Build' | ||
command: '.pipelines\build-localization.cmd' | ||
artifacts: | ||
- from: 'out\loc' | ||
to: 'loc' | ||
include: | ||
- '**/*' | ||
|
||
- !!buildcommand | ||
name: 'Build Power Toys' | ||
command: '.pipelines\build.cmd' | ||
|
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": "Windows10_Languages", | ||
"LocItems": [ | ||
{ | ||
"SourceFile": "src\\core\\Microsoft.PowerToys.Settings.UI\\Strings\\en-us\\Resources.resw", | ||
"CopyOption": "LangIDOnPath", | ||
"OutputPath": "src\\core\\Microsoft.PowerToys.Settings.UI\\Strings" | ||
} | ||
] | ||
} | ||
] | ||
} |
this says ttps, not https