{"id":16681448,"url":"https://github.com/printercu/activemodel_translation","last_synced_at":"2025-04-09T23:05:09.908Z","repository":{"id":17611629,"uuid":"20415685","full_name":"printercu/activemodel_translation","owner":"printercu","description":"Translation helpers for models","archived":false,"fork":false,"pushed_at":"2016-05-29T14:19:57.000Z","size":6,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-23T16:21:33.943Z","etag":null,"topics":["activemodel","activerecord","i18n","ruby","translation"],"latest_commit_sha":null,"homepage":null,"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/printercu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-02T19:01:53.000Z","updated_at":"2020-02-17T01:24:57.000Z","dependencies_parsed_at":"2022-07-26T18:45:06.884Z","dependency_job_id":null,"html_url":"https://github.com/printercu/activemodel_translation","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/printercu%2Factivemodel_translation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/printercu%2Factivemodel_translation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/printercu%2Factivemodel_translation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/printercu%2Factivemodel_translation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/printercu","download_url":"https://codeload.github.com/printercu/activemodel_translation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239073969,"owners_count":19577123,"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":["activemodel","activerecord","i18n","ruby","translation"],"created_at":"2024-10-12T14:04:15.252Z","updated_at":"2025-02-16T00:32:15.344Z","avatar_url":"https://github.com/printercu.png","language":"Ruby","readme":"# ActivemodelTranslation\n\nLazy translations for models.\n\n`::tranlate` method performs translation with fallback similar to resolving errors.\nWith one difference - it uses `strings` scope.\n\n* `activemodel.strings.admin.key`\n* `activemodel.strings.user.key`\n* `strings.key`\n\n`User.model_name.human(plural: true)` returns translated plural model name.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'activemodel_translation'\n\n# or pick a module:\n# gem 'activemodel_translation', require: 'activemodel_translation/helper'\n# gem 'activemodel_translation', require: 'activemodel_translation/plural'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install activemodel_translation\n\n## Usage\n\n```ruby\nclass User \u003c ActiveRecord::Base\n  # lazy translation\n  def title\n    super || self.class.t('.default_title')\n  end\nend\n\n# translated plural model name\nUser.model_name.human_plural\n\n# ru.yml\n# activerecord:\n#   models_plural:\n#     user: Пользователи\n```\n\n## Contributing\n\n1. Fork it ( http://github.com/printercu/activemodel_translation/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprintercu%2Factivemodel_translation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprintercu%2Factivemodel_translation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprintercu%2Factivemodel_translation/lists"}