From bb56047ee296b64bb961a93639818dbe4e1a16b2 Mon Sep 17 00:00:00 2001 From: Roddy Munro Date: Mon, 25 Mar 2024 04:48:44 -0300 Subject: [PATCH] Add SwiftPolyglot to validate localizations (#2011) * Add step to validate translations on PRs without errors * Move workflow * Get specific release of SwiftPolyglot --- .github/workflows/validate_translations.yml | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/validate_translations.yml diff --git a/.github/workflows/validate_translations.yml b/.github/workflows/validate_translations.yml new file mode 100644 index 00000000..eaac1e3a --- /dev/null +++ b/.github/workflows/validate_translations.yml @@ -0,0 +1,35 @@ +name: Validate Translations + +on: + pull_request: + types: [synchronize, opened, reopened, labeled, unlabeled, edited] + +jobs: + main: + name: Validate Translations + runs-on: macOS-latest + steps: + - name: git checkout + uses: actions/checkout@v3 + + - name: ruby versions + run: | + ruby --version + gem --version + bundler --version + + - name: ruby setup + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.3 + bundler-cache: true + + # additional steps here, if needed + + - name: Clone SwiftPolyglot + run: git clone https://github.com/appdecostudio/SwiftPolyglot.git --branch 0.2.0 + + - name: Build and Run SwiftPolyglot + run: | + swift build --package-path ./SwiftPolyglot --configuration release + swift run --package-path ./SwiftPolyglot swiftpolyglot "en,eu,be,ca,zh-Hans,zh-Hant,nl,en-GB,fr,de,it,ja,ko,nb,pl,pt-BR,es,tr,uk" \ No newline at end of file