{"id":13879709,"url":"https://github.com/rootstrap/i18n_linter","last_synced_at":"2025-04-29T17:31:18.581Z","repository":{"id":44860118,"uuid":"157902813","full_name":"rootstrap/i18n_linter","owner":"rootstrap","description":"Rails i18n Linter Gem","archived":false,"fork":false,"pushed_at":"2022-01-21T21:45:29.000Z","size":120,"stargazers_count":44,"open_issues_count":8,"forks_count":2,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-05T18:50:37.217Z","etag":null,"topics":["hacktoberfest","i18n","linter","rails","ruby","rubygem"],"latest_commit_sha":null,"homepage":"https://rootstrap.com","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rootstrap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-16T17:54:19.000Z","updated_at":"2022-03-11T15:37:23.000Z","dependencies_parsed_at":"2022-08-27T22:31:38.253Z","dependency_job_id":null,"html_url":"https://github.com/rootstrap/i18n_linter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Fi18n_linter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Fi18n_linter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Fi18n_linter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootstrap%2Fi18n_linter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootstrap","download_url":"https://codeload.github.com/rootstrap/i18n_linter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251549204,"owners_count":21607367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","i18n","linter","rails","ruby","rubygem"],"created_at":"2024-08-06T08:02:29.841Z","updated_at":"2025-04-29T17:31:18.181Z","avatar_url":"https://github.com/rootstrap.png","language":"Ruby","readme":"# I18nLinter\n\n[![CircleCI](https://circleci.com/gh/rootstrap/i18n_linter/tree/master.svg?style=svg\u0026circle-token=15c1ee79b304665b14e47e04dc7577c715de293c)](https://circleci.com/gh/rootstrap/i18n_linter/tree/master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/50f3ec30e8147c3df712/maintainability)](https://codeclimate.com/repos/5c6b0bbdd561465d35008579/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/50f3ec30e8147c3df712/test_coverage)](https://codeclimate.com/repos/5c6b0bbdd561465d35008579/test_coverage)\n\nInternationalization linter for your Ruby on Rails projects.\n\n## Installation\nAll you have to do is run the following command:\n```bash\n$ gem install i18n_linter\n```\nIf you want to install using `bundler`, add this to the `Gemfile` under the `development` group:\n```ruby\ngem 'i18n_linter', require: false\n```\n\n## Usage\nJust type `i18n_linter` in a Ruby on Rails project's folder and watch the strings that could be internationalized. Note: only strings in ruby files will be reported.\n```\n$ cd my/ruby_on_rails/project\n$ i18n_linter [options]\n```\n\n## Options\nThe available options are:\n```\n-f PATTERN, --files=PATTERN     Pattern to find files, default: -f '**/*.rb'\n-o FILE, --out=FILE,            Write output to a file instead of STDOUT\n```\n\nFor example:\n\n```\n$ i18n_linter -f users_controller.rb\n```\n```\n$ i18n_linter -f app/controllers/**/*.rb -o i18n_linter_output.txt\n```\n\n## Configuration\nThe behavior of I18nLinter can be controlled via the `.i18n_linter.yml` configuration file.\nIt's possible to enable or disable Rules and exclude files from the validations as follows:\n```ruby\nLinter:\n  Include:\n    - '**/*.rb'\n  Exclude:\n    - 'spec/**/*'\nRules:\n  Uppercase:\n    Enabled: true\n  MiddleSpace:\n    Enabled: false\n```\n\n## Example\nImagine a source file sample.rb containing:\n```ruby\nclass UserController \u003c ApplicationController\n  rescue_from ActiveRecord::RecordNotFound, with: :render_not_found\n\n  def show\n    @user = User.find(params[:id])\n  end\n\n  private\n\n  def render_not_found\n    render json: { error: \"Couldn't find the record\" }, status: :not_found\n  end\nend\n```\nI18nLinter will return the following warnings in this file:\n```\n$ i18n_linter -f sample.rb\n\nsample.rb:11:26\n10:    def render_not_found\n11:      render json: { error: \"Couldn't find the record\" }, status: :not_found\n12:    end\n----------------\n```\n\n## Contributing\nBug reports (please use Issues) and pull requests are welcome on GitHub at https://github.com/rootstrap/i18n_linter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Credits\n**I18nLinter** is maintained by [Rootstrap](http://www.rootstrap.com) with the help of our [contributors](https://github.com/rootstrap/i18n_linter/contributors).\n\n[\u003cimg src=\"https://s3-us-west-1.amazonaws.com/rootstrap.com/img/rs.png\" width=\"100\"/\u003e](http://www.rootstrap.com)\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Fi18n_linter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootstrap%2Fi18n_linter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootstrap%2Fi18n_linter/lists"}