Questions tagged [i18n-tasks]

Questions about the i18n-tasks Ruby Gem.

i18n-tasks is a Ruby Gem that helps you find and manage missing and unused translations.

This gem analyses code statically for key usages, such as I18n.t('some.key'), in order to:

  • Report keys that are missing or unused.
  • Pre-fill missing keys, optionally from Google Translate.
  • Remove unused keys.

Thus addressing the two main problems of the i18n gem design:

  • Missing keys only blow up at runtime.
  • Keys no longer in use may accumulate and introduce overhead, without you knowing it.
8 questions
3
votes
1 answer

i18n-tasks cannot route key

My i18n-tasks config file: data: read: # Default: - config/locales/%{locale}.yml # More files: - config/locales/**/*.%{locale}.yml - config/locales/views/*.{locale}.yml - config/locales/models/*.{locale}.yml -…
updater
  • 967
  • 1
  • 12
  • 23
3
votes
2 answers

Config i18n-tasks is missing

I have just find this gem that will potentially save me a huge amount of time. https://github.com/glebm/i18n-tasks I have installed it and start using it, the problem is that I can't find the config/i18n-tasks.yml file, do I have to run some kind…
Petran
  • 7,677
  • 22
  • 65
  • 104
2
votes
1 answer

extract form labels for i18n in rails

Reading up on ActionView::Helpers::FormHelper, I see that it states: The text of label will default to the attribute name unless a translation is found in the current I18n locale (through helpers.label..) or you specify it explicitly. So you…
JohnRDOrazio
  • 1,358
  • 2
  • 15
  • 28
1
vote
2 answers

i18n-tasks custom scanner for enums

I would like to create a custom scanner for i18n-tasks that can detect enums declared as hashes in models. My enum declaration pattern will always be like this: class Conversation < ActiveRecord::Base enum status: { active: 0, archived: 1},…
JohnRDOrazio
  • 1,358
  • 2
  • 15
  • 28
1
vote
1 answer

i18n language files. How to manage missing and unused keys

I have a Rails/Angular webapp. We use two different methods to translate our app: Ruby Globalize i18n with the corresponding yml language files, and angular-translate with the corresponding json language files. Managing language files can be a pain.…
0
votes
1 answer

Is there a way to only run i18n-tasks normalize on certain files?

We have i18n-tasks normalize running as part of a husky git commit hook but since we have added other locales it is now extremely slow to run. Is it possible to pass file paths to i18n-tasks normalize so that only locale files that have changed are…
0
votes
0 answers

What are the correct keys for sub controller

I have a file that is located: app/controllers/api/v1/users/searches_controller.rb This file starts as following: module Api module V1 module Users class SearchesController < ActionController::API And I have this…
0
votes
1 answer

i18n-tasks command error on Rails 3?

I'm building a new Rails application that's using the i18n-tasks gem, but when I run the command i18n-tasks this output is shown: /home/user-pc/.rvm/gems/ruby-1.9.3-p392@product/gems/i18n-tasks-0.5.1/lib/i18n/tasks/plural_keys.rb:3:in…