Better i18n-tasks config
This commit is contained in:
parent
8db1e7c610
commit
788c7267c6
@ -3,7 +3,7 @@
|
|||||||
# The "main" locale.
|
# The "main" locale.
|
||||||
base_locale: en
|
base_locale: en
|
||||||
## All available locales are inferred from the data by default. Alternatively, specify them explicitly:
|
## All available locales are inferred from the data by default. Alternatively, specify them explicitly:
|
||||||
# locales: [es, fr]
|
locales: [en, fr, pt-BR]
|
||||||
## Reporting locale, default: en. Available: en, ru.
|
## Reporting locale, default: en. Available: en, ru.
|
||||||
# internal_locale: en
|
# internal_locale: en
|
||||||
|
|
||||||
@ -94,9 +94,9 @@ search:
|
|||||||
# deepl_api_key: "48E92789-57A3-466A-9959-1A1A1A1A1A1A"
|
# deepl_api_key: "48E92789-57A3-466A-9959-1A1A1A1A1A1A"
|
||||||
|
|
||||||
## Do not consider these keys missing:
|
## Do not consider these keys missing:
|
||||||
# ignore_missing:
|
ignore_missing:
|
||||||
# - 'errors.messages.{accepted,blank,invalid,too_short,too_long}'
|
- 'errors.messages.{accepted,blank,invalid,too_short,too_long}'
|
||||||
# - '{devise,simple_form}.*'
|
- '{devise,ice_cube,simple_form}.*'
|
||||||
|
|
||||||
## Consider these keys used:
|
## Consider these keys used:
|
||||||
ignore_unused:
|
ignore_unused:
|
||||||
|
@ -85,6 +85,9 @@ pt-BR:
|
|||||||
tags: Tags
|
tags: Tags
|
||||||
reason: Justificativa
|
reason: Justificativa
|
||||||
region:
|
region:
|
||||||
|
region: Estado
|
||||||
|
url: Site
|
||||||
|
code: Code
|
||||||
name_values:
|
name_values:
|
||||||
all: Todos os estados
|
all: Todos os estados
|
||||||
note:
|
note:
|
||||||
|
@ -11,12 +11,14 @@ class I18nTest < ActiveSupport::TestCase
|
|||||||
|
|
||||||
def test_no_missing_keys
|
def test_no_missing_keys
|
||||||
assert_empty @missing_keys,
|
assert_empty @missing_keys,
|
||||||
"Missing #{@missing_keys.leaves.count} i18n keys, run `i18n-tasks missing' to show them"
|
"Missing #{@missing_keys.leaves.count} i18n keys,
|
||||||
|
run `i18n-tasks missing' to show them"
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_no_unused_keys
|
def test_no_unused_keys
|
||||||
assert_empty @unused_keys,
|
assert_empty @unused_keys,
|
||||||
"#{@unused_keys.leaves.count} unused i18n keys, run `i18n-tasks unused' to show them"
|
"#{@unused_keys.leaves.count} unused i18n keys,
|
||||||
|
run `i18n-tasks unused' to show them"
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_files_are_normalized
|
def test_files_are_normalized
|
||||||
@ -29,7 +31,8 @@ class I18nTest < ActiveSupport::TestCase
|
|||||||
|
|
||||||
def test_no_inconsistent_interpolations
|
def test_no_inconsistent_interpolations
|
||||||
inconsistent_interpolations = @i18n.inconsistent_interpolations
|
inconsistent_interpolations = @i18n.inconsistent_interpolations
|
||||||
error_message = "#{inconsistent_interpolations.leaves.count} i18n keys have inconsistent interpolations.\n" \
|
error_message = "#{inconsistent_interpolations.leaves.count} i18n keys
|
||||||
|
have inconsistent interpolations.\n" \
|
||||||
"Please run `i18n-tasks check-consistent-interpolations' to show them"
|
"Please run `i18n-tasks check-consistent-interpolations' to show them"
|
||||||
assert_empty inconsistent_interpolations, error_message
|
assert_empty inconsistent_interpolations, error_message
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user