Skip to content

Commit

Permalink
Add Actions for check i18n (mastodon#16285)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykzts authored May 22, 2021
1 parent 92a9fcf commit 1db2833
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 30 deletions.
21 changes: 0 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,24 +216,6 @@ jobs:
name: Run jest
command: yarn test:jest

check-i18n:
<<: *defaults
steps:
- *attach_workspace
- *install_system_dependencies
- run:
name: Check locale file normalization
command: bundle exec i18n-tasks check-normalized
- run:
name: Check for unused strings
command: bundle exec i18n-tasks unused -l en
- run:
name: Check for wrong string interpolations
command: bundle exec i18n-tasks check-consistent-interpolations
- run:
name: Check that all required locale files exist
command: bundle exec rake repo:check_locales_files

workflows:
version: 2
build-and-test:
Expand Down Expand Up @@ -271,6 +253,3 @@ workflows:
- test-webui:
requires:
- install
- check-i18n:
requires:
- install-ruby2.7
34 changes: 34 additions & 0 deletions .github/workflows/check-i18n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Chack i18n

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
RAILS_ENV: test

jobs:
check-i18n:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libicu-dev libidn11-dev libprotobuf-dev protobuf-compiler
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Check locale file normalization
run: bundle exec i18n-tasks check-normalized
- name: Check for unused strings
run: bundle exec i18n-tasks unused -l en
- name: Check for wrong string interpolations
run: bundle exec i18n-tasks check-consistent-interpolations
- name: Check that all required locale files exist
run: bundle exec rake repo:check_locales_files
Loading

0 comments on commit 1db2833

Please sign in to comment.