-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement and Document Localization (#326)
* Copy l10n.proj etc. from Palaso * Update packages and fix paths * Remove .tmx files, ignore .xlf files * Update a l10n ID (to match identical strings) and a comment * Include GitHub Actions workflows in the solution and rename `dotnet` GHA to `ci+cd` for clarity * Exclude a flaky test on the platform that takes more time * Remove some dead code
- Loading branch information
Showing
17 changed files
with
281 additions
and
3,154 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "Build, Test and Pack" | ||
name: "Build, Test, and Pack" | ||
|
||
on: | ||
push: | ||
|
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,55 @@ | ||
|
||
name: Package latest l10ns | ||
|
||
on: | ||
push: | ||
tags: [ v* ] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-package-l10ns | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
package-l10n: | ||
strategy: | ||
fail-fast: false | ||
runs-on: windows-2019 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Install the .NET Core workload | ||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 | ||
with: | ||
dotnet-version: 5.0.x | ||
|
||
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | ||
- name: Setup MSBuild.exe (Windows OS) | ||
uses: microsoft/setup-msbuild@1ff57057b5cfdc39105cd07a01d78e9b0ea0c14c # v1.3.1 | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # So the PATH can be set by this step | ||
|
||
- name: Install Crowdin cli | ||
run: npm i -g @crowdin/cli | ||
|
||
- name: Download localizations | ||
working-directory: ./l10n | ||
run: crowdin download --all -T ${{ secrets.CROWDIN_PAT }} | ||
|
||
- name: Restore packages | ||
run: msbuild l10n/l10n.proj /t:restore /p:Configuration=Release /p:Platform="Any CPU" | ||
|
||
- name: Build Nuget package of localizations | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # So gitversion can set environment vars during the build | ||
run: msbuild l10n/l10n.proj /t:PackageL10ns /p:Configuration=Release /p:Platform="Any CPU" | ||
|
||
- name: Publish Nuget package | ||
working-directory: ./l10n | ||
run: dotnet nuget push *.nupkg --api-key ${{ secrets.SILLSDEV_PUBLISH_NUGET_ORG }} --source https://api.nuget.org/v3/index.json |
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,55 @@ | ||
|
||
name: Update l10n Source Strings | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-update-l10n | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
extract-and-upload-strings: | ||
strategy: | ||
fail-fast: false | ||
runs-on: windows-2019 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Install the .NET Core workload | ||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 | ||
with: | ||
dotnet-version: 5.0.x | ||
|
||
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | ||
- name: Setup MSBuild.exe (Windows OS) | ||
uses: microsoft/setup-msbuild@1ff57057b5cfdc39105cd07a01d78e9b0ea0c14c # v1.3.1 | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # So the PATH can be set by this step | ||
|
||
- name: Install Crowdin cli | ||
run: npm i -g @crowdin/cli | ||
|
||
- name: Download Chorus.en.xlf source file # new strings will be merged into the existing file | ||
working-directory: ./l10n | ||
run: crowdin download sources -T ${{ secrets.CROWDIN_PAT }} | ||
|
||
- name: Restore packages | ||
run: msbuild l10n/l10n.proj /t:restore /p:Configuration=Release /p:Platform="Any CPU" | ||
|
||
- name: Update l10n strings | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # So gitversion can set environment vars during the build | ||
run: msbuild l10n/l10n.proj /t:UpdateCrowdin /p:Configuration=Release /p:Platform="Any CPU" | ||
|
||
- name: Upload Chorus.en.xlf source file | ||
working-directory: ./l10n | ||
run: crowdin upload sources -T ${{ secrets.CROWDIN_PAT }} |
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 |
---|---|---|
@@ -1,45 +1,33 @@ | ||
NuGet.exe | ||
nuget.exe | ||
CopyToWeSay.bat | ||
output/ | ||
obj/ | ||
_Resharper* | ||
Debug/ | ||
DebugMono/ | ||
Release/ | ||
ReleaseMono/ | ||
_ReSharper.Chorus VS2008/ | ||
.idea/ | ||
.vs/ | ||
*.files | ||
*.mdb | ||
*.nupkg | ||
*.orig | ||
*.pidb | ||
*.resources | ||
*.suo | ||
*.user | ||
CopyToWeSayDev.bat | ||
lib/Palaso.TestUtilities.pdb | ||
*.userprefs | ||
*.xlf | ||
*~ | ||
*.pidb | ||
Mercurial/ | ||
mercurial/ | ||
*ReSharper* | ||
build/old | ||
launchSettings.json | ||
lib/$(Configuration) | ||
*.nupkg | ||
*.resources | ||
*.userprefs | ||
.vs/ | ||
src/Chorus.Tests/bin/* | ||
src/ChorusMerge.Tests/bin/* | ||
src/SampleApp/bin/* | ||
CopyTo Dev WeSay.bat | ||
MercurialExtensions/ | ||
test-results | ||
*.mdb | ||
src/LibChorusTests/test-results/LibChorus.Tests.csproj.test-cache | ||
**.orig | ||
CopyTo*WeSay*.bat | ||
Download/ | ||
L10NSharp.dll | ||
launchSettings.json | ||
lib/$(Configuration) | ||
lib/Chorus_Help.chm | ||
Mercurial/ | ||
mercurial/ | ||
MercurialExtensions/ | ||
NuGet.exe | ||
nuget.exe | ||
obj/ | ||
output/ | ||
packages/ | ||
.idea/ | ||
.vs/ | ||
riderModule.iml | ||
/bin/ | ||
src/LibChorus/icu4c.readme.txt | ||
*.files | ||
test-results |
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
Oops, something went wrong.