Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused keys and controllers in modules #128

Closed
atipugin opened this issue Feb 4, 2015 · 1 comment
Closed

Unused keys and controllers in modules #128

atipugin opened this issue Feb 4, 2015 · 1 comment

Comments

@atipugin
Copy link
Contributor

atipugin commented Feb 4, 2015

There is a problem with keys in controllers that nested in modules. For example:

$ be i18n-tasks health
Forest (ru) has 99 keys in total. On average, values are 27 characters long, keys have 3.4 segments.
✓ Perfect! No translations are missing.
Unused keys (3) | i18n-tasks v0.7.11
+--------+-----------------------------------+-----------------------------+
| Locale | Key                               | Value                       |
+--------+-----------------------------------+-----------------------------+
|   ru   | projects.campaigns.create.notice  | Кампания успешно создана.   |
|   ru   | projects.campaigns.destroy.notice | Кампания успешно удалена.   |
|   ru   | projects.campaigns.update.notice  | Кампания успешно сохранена. |
+--------+-----------------------------------+-----------------------------+

relative_roots option is set to:

relative_roots:
    - app/views
    - app/controllers

Controllers look like this:

module Projects
  class CampaignsController < BaseController
    # ...

    def create
      @campaign = @project.campaigns.new(campaign_params)
      authorize(@campaign)
      if @campaign.save
        redirect_to project_campaign_path(@project, @campaign),
                    notice: t('.notice')
      else
        render :new
      end
    end

    # ...
end
@atipugin
Copy link
Contributor Author

atipugin commented Feb 4, 2015

Added pull request to solve this issue: #129

@atipugin atipugin closed this as completed Feb 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant