From 0fdfdb627774cfe3c053a658ab80b84f4f96260d Mon Sep 17 00:00:00 2001 From: papeh Date: Wed, 18 Oct 2023 10:21:15 -0500 Subject: [PATCH] fix l10n.proj (#1291) * Point to the correct Palaso.en.xlf * Update NuGet package name * Remove extra generated lines before each run to prevent infinite linear growth --- .github/workflows/l10n-packaging.yml | 2 +- .github/workflows/l10n-source.yml | 4 ++-- l10n/README.md | 8 ++++---- l10n/crowdin.yml | 3 ++- l10n/l10n.proj | 18 +++++++++++++++--- l10n/l10ns.nuspec | 2 +- 6 files changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/l10n-packaging.yml b/.github/workflows/l10n-packaging.yml index 6e89947da..8559fecbe 100644 --- a/.github/workflows/l10n-packaging.yml +++ b/.github/workflows/l10n-packaging.yml @@ -40,7 +40,7 @@ jobs: - name: Download localizations working-directory: ./l10n - run: crowdin download --all -T ${{ secrets.CROWDIN_PAT }} -i ${{ secrets.CROWDIN_PROJECT_ID }} + 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" diff --git a/.github/workflows/l10n-source.yml b/.github/workflows/l10n-source.yml index f9ad8502d..f72b07512 100644 --- a/.github/workflows/l10n-source.yml +++ b/.github/workflows/l10n-source.yml @@ -43,7 +43,7 @@ jobs: - name: Download Palaso.en.xlf source file # new strings will be merged into the existing file working-directory: ./l10n - run: crowdin download sources -T ${{ secrets.CROWDIN_PAT }} -i ${{ secrets.CROWDIN_PROJECT_ID }} + run: crowdin download sources -T ${{ secrets.CROWDIN_PAT }} - name: Update l10n strings env: @@ -52,4 +52,4 @@ jobs: - name: Upload Palaso.en.xlf source file working-directory: ./l10n - run: crowdin upload sources -T ${{ secrets.CROWDIN_PAT }} -i ${{ secrets.CROWDIN_PROJECT_ID }} + run: crowdin upload sources -T ${{ secrets.CROWDIN_PAT }} diff --git a/l10n/README.md b/l10n/README.md index ad6e7efef..1341c1b54 100644 --- a/l10n/README.md +++ b/l10n/README.md @@ -2,7 +2,7 @@ ### Using localizations in a project -1. Add a Nuget dependency on libpalaso.l10ns to the project where you initialize the L10nSharp `LocalizationManager` +1. Add a Nuget dependency on SIL.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 (automatic) @@ -18,9 +18,9 @@ See `../.github/workflows/l10n-source.yml` It can also be run manually as follows (requires the [Crowdin CLI](https://crowdin.github.io/crowdin-cli/)): ``` -crowdin download sources -i CROWDIN_PROJECT_ID -T CROWDIN_ACCESS_TOKEN +crowdin download sources -T CROWDIN_ACCESS_TOKEN msbuild l10n.proj /t:UpdateCrowdin -crowdin upload sources -i CROWDIN_PROJECT_ID -T CROWDIN_ACCESS_TOKEN +crowdin upload sources -T CROWDIN_ACCESS_TOKEN ``` ### Building a NuGet package with the latest translations @@ -30,7 +30,7 @@ This process is run by a github action whenever a version tag is pushed and manu It can also be run manually as follows (requires the [Crowdin CLI](https://crowdin.github.io/crowdin-cli/)): ``` -crowdin download --all -i CROWDIN_PROJECT_ID -T CROWDIN_ACCESS_TOKEN +crowdin download --all -T CROWDIN_ACCESS_TOKEN msbuild l10n.proj /t:PackageL10ns nuget push -ApiKey TheSilNugetApiKey SIL.libpalaso.l10n.nupkg ``` \ No newline at end of file diff --git a/l10n/crowdin.yml b/l10n/crowdin.yml index 340e78e33..9d1ce641f 100644 --- a/l10n/crowdin.yml +++ b/l10n/crowdin.yml @@ -1,4 +1,5 @@ -base_path : "." +project_id: 393909 +base_path: "." preserve_hierarchy: true files: [ diff --git a/l10n/l10n.proj b/l10n/l10n.proj index dd3be9108..71b5d298c 100644 --- a/l10n/l10n.proj +++ b/l10n/l10n.proj @@ -7,8 +7,12 @@ $(GitVersion_NuGetVersion) Jason Naylor SIL International - true - false + true + false @@ -16,6 +20,7 @@ All + @@ -33,8 +38,15 @@ + + + - + diff --git a/l10n/l10ns.nuspec b/l10n/l10ns.nuspec index 2d45cb117..4781fb730 100644 --- a/l10n/l10ns.nuspec +++ b/l10n/l10ns.nuspec @@ -8,7 +8,7 @@ Jason Naylor MIT https://github.com/sillsdev/libpalaso - Copyright © 2010-2020 SIL International + Copyright © 2010-2023 SIL International