diff --git a/.github/workflows/l10n-packaging.yml b/.github/workflows/l10n-packaging.yml index a84ce4e86..000e03a96 100644 --- a/.github/workflows/l10n-packaging.yml +++ b/.github/workflows/l10n-packaging.yml @@ -10,26 +10,26 @@ concurrency: jobs: - build: + package-l10n: strategy: fail-fast: false runs-on: windows-2019 steps: - name: Checkout - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: fetch-depth: 0 # Install the .NET Core workload - name: Install .NET Core - uses: actions/setup-dotnet@51f68377c181a79065c61bd492bd49be4575c439 + 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@ab534842b4bdf384b8aaf93765dc6f721d9f5fab + uses: microsoft/setup-msbuild@1ff57057b5cfdc39105cd07a01d78e9b0ea0c14c # v1.3.1 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true # So the PATH can be set by this step diff --git a/.github/workflows/l10n-source.yml b/.github/workflows/l10n-source.yml index f9b128611..8ac2288a3 100644 --- a/.github/workflows/l10n-source.yml +++ b/.github/workflows/l10n-source.yml @@ -12,26 +12,26 @@ concurrency: jobs: - build: + extract-and-upload-strings: strategy: fail-fast: false runs-on: windows-2019 steps: - name: Checkout - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 with: fetch-depth: 0 # Install the .NET Core workload - name: Install .NET Core - uses: actions/setup-dotnet@51f68377c181a79065c61bd492bd49be4575c439 + 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@ab534842b4bdf384b8aaf93765dc6f721d9f5fab + uses: microsoft/setup-msbuild@1ff57057b5cfdc39105cd07a01d78e9b0ea0c14c # v1.3.1 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true # So the PATH can be set by this step diff --git a/README.md b/README.md index ded74d229..ffe3686cf 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,10 @@ Further instructions at https://github.com/sillsdev/libpalaso/wiki/Developing-wi - Send a pull request (). Specify destination branch if not `master`. +### Localization + +Palaso is localized with [L10NSharp](https://github.com/sillsdev/l10nsharp). Palaso-specific documentation is under `l10n/README.md`. + ## API Policy The palaso library follows semantic versioning. For APIs this means: diff --git a/l10n/README.md b/l10n/README.md index c30a5adc2..9888d6d35 100644 --- a/l10n/README.md +++ b/l10n/README.md @@ -2,18 +2,16 @@ ### Using localizations in a project -Do the following: - 1. Add a Nuget dependency on libpalaso.l10ns to the project where you initialize the L10nSharp `LocalizationManager` 2. Add a build step to copy the Palaso.%langcode%.xlf files to the correct folder in your project -### Updating Crowdin with source string changes - UPLOAD TO CROWDIN NOT YET ENABLED - -All the strings that are internationalized in all of the libpalaso projects are uploaded to Crowdin in Palaso.en.xlf +### Updating Crowdin with source string changes (automatic) -A Github action runs when commits are merged into master which uses the L10nSharp tool ExtractXliff to get any updates to the source strings resulting in a new Palaso.en.xlf file. +On each commit to `master`, a GitHub Action runs to +- Extract all internationalized strings from all libpalaso projects to `../DistFiles/Palaso.en.xlf` +- Upload Palaso.en.xlf to [Crowdin](https://crowdin.com/project/sil-common-libraries) -Then the Crowdin cli is used to update that file in Crowdin based on the crowdin.yml file. +See `../.github/workflows/l10n-source.yml` It can also be run manually as follows: ``` @@ -21,8 +19,10 @@ msbuild l10n.proj /t:UpdateCrowdin crowdin upload sources -i CROWDIN_PROJECT_ID -T CROWDIN_ACCESS_TOKEN ``` -### Building Nuget package with the latest translations +### Building a NuGet package with the latest translations + This process is run manually from a github action whenever a package with updated translations is needed +(See `../.github/workflows/l10n-packaging.yml`) It can also be run manually on a developer machine as follows: ```