Skip to content

Commit

Permalink
Enable EN missing strings check
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni committed May 11, 2024
1 parent 6596de8 commit 4eb6abd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/check-i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,5 @@ jobs:
yarn i18n:extract --throws
git diff --exit-code
- name: Check for missing strings in English YML
run: |
bundle exec i18n-tasks add-missing -l en
git diff --exit-code
- name: Check that all required locale files exist
run: bundle exec rake repo:check_locales_files
13 changes: 6 additions & 7 deletions spec/locales/i18n_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@

describe 'I18n' do
# Copied from $(bundle exec i18n-tasks gem-path)/templates/rspec/i18n_spec.rb
describe I18n do
describe 'i18n-tasks' do
let(:i18n) { I18n::Tasks::BaseTask.new }
let(:missing_keys) { i18n.missing_keys }
let(:missing_keys_en) { i18n.missing_keys(locale: 'en') }
let(:unused_keys) { i18n.unused_keys }
let(:inconsistent_interpolations) { i18n.inconsistent_interpolations }

# Fails because only EN files are currently enforced
# it 'does not have missing keys' do
# expect(missing_keys).to be_empty,
# "Missing #{missing_keys.leaves.count} i18n keys, run `i18n-tasks missing' to show them"
# end
it 'does not have missing keys in English' do

Check failure on line 14 in spec/locales/i18n_spec.rb

View workflow job for this annotation

GitHub Actions / test (.ruby-version)

I18n i18n-tasks does not have missing keys in English Failure/Error: let(:missing_keys_en) { i18n.missing_keys(locale: 'en') } ArgumentError: unknown keyword: :locale
expect(missing_keys_en).to be_empty,
"Missing #{missing_keys_en.leaves.count} i18n keys, run `i18n-tasks missing' to show them"
end

it 'does not have unused keys' do
expect(unused_keys).to be_empty,
Expand Down

0 comments on commit 4eb6abd

Please sign in to comment.