i18n-tasks
i18n-tasks copied to clipboard
setup of ignore_missing only for non base_locale locales
I would like setup following:
- I have 3 user interfaces in my app: Admin, Teacher, Client
- Admin and Teacher is English only
- Client is multiple languages
I would like to run "i18n-tasks missing" so that:
- for "en" locale it tooks everything into the consideration (all interfaces have to be English)
- for other locales ("de", "es", etc...) it ignores missing with following setup:
ignore_missing:
- 'admin.*'
- 'admin_mailer.*'
- 'teacher.*'
- 'teacher_mailer.*'
I don't need translations of admin* and teacher* in other then English language.
Thank you very much for any hint how to automate this task.
Or is it possible to exclude a complete translation file?
We need to ignore a specific language for pluralization.
i.e. Vietnamese doesn't have a concept of one
en:
errors:
record_count:
one: there is one record
other: there are %{count} records
In VI or ID we don't have one
. i18n-tasks missing
always complains about the one key missing from VI or ID.yml files.
I believe this is supported as follows:
ignore_missing:
de:
- 'admin.*'
- 'admin_mailer.*'
- 'teacher.*'
- 'teacher_mailer.*'
es:
- 'admin.*'
- 'admin_mailer.*'
- 'teacher.*'
- 'teacher_mailer.*'
...
And if they're all the same, you should be able to use YAML inheritance, something like:
ignore_missing:
defaults: &DEFAULT_IGNORES
- 'admin.*'
- 'admin_mailer.*'
- 'teacher.*'
- 'teacher_mailer.*'
es:
<<: *DEFAULT_IGNORES
de:
<<: *DEFAULT_IGNORES
...
How to ignore folders that includes "olds" (e.g. app/views/items/old/index.html.erb) ?
SOLVED
exclude:
- "*/old/*.html.erb"