Revision control
Copy as Markdown
name: 'Firefox: reference string linter'
permissions: read-all
on:
push:
branches:
- main
paths-ignore:
- 'focus-ios/**'
pull_request:
branches:
- main
paths-ignore:
- 'focus-ios/**'
workflow_dispatch:
jobs:
check:
runs-on: xcode-27
strategy:
matrix:
xcode: ["27.1"]
python-version: ["3.12"]
node-version: ["24"]
steps:
- name: Clone code repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
path: "code_repo"
- name: Clone l10n repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
repository: "mozilla-l10n/firefoxios-l10n"
path: "l10n_repo"
- name: Select Xcode ${{ matrix.xcode }}
run: |
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: ${{ matrix.python-version }}
- name: Install l10n dependencies
run: |
pip install -r l10n_repo/.github/scripts/requirements.txt
- name: Run bootstrap script
run: |
cd code_repo
sh ./bootstrap.sh
- name: Extract strings
run: |
start_folder="$PWD"
# Clone localization tools
git clone https://github.com/mozilla-mobile/LocalizationTools --depth 1
# Extract strings
cd LocalizationTools
swift run LocalizationTools --export --project-path "${start_folder}/code_repo/firefox-ios/Client.xcodeproj" --l10n-project-path "${start_folder}/l10n_repo" --locale en-US
- name: Check reference locale
run: |
(cd code_repo && moz-xliff-lint --path ../l10n_repo/en-US --config .github/l10n/linter_config_ios.json)
- name: Store reference artifact
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: firefox-xliff-file
path: l10n_repo/en-US/*.xliff
if-no-files-found: ignore