{"id":16239706,"url":"https://github.com/jalkoby/tt","last_synced_at":"2025-03-19T16:31:34.236Z","repository":{"id":26351694,"uuid":"29800656","full_name":"jalkoby/tt","owner":"jalkoby","description":"Dos-T – an opinionated I18n helper(for those who don't want to waste time on translation)","archived":false,"fork":false,"pushed_at":"2024-08-30T11:40:21.000Z","size":62,"stargazers_count":49,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-28T19:53:13.649Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jalkoby.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-25T03:06:04.000Z","updated_at":"2024-08-30T11:40:22.000Z","dependencies_parsed_at":"2024-10-27T21:23:26.409Z","dependency_job_id":"f4dc78e5-dab1-46a7-8fb1-0b450ecc4755","html_url":"https://github.com/jalkoby/tt","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalkoby%2Ftt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalkoby%2Ftt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalkoby%2Ftt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalkoby%2Ftt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jalkoby","download_url":"https://codeload.github.com/jalkoby/tt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244006260,"owners_count":20382441,"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":[],"created_at":"2024-10-10T13:44:46.444Z","updated_at":"2025-03-19T16:31:33.980Z","avatar_url":"https://github.com/jalkoby.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dos-T\n\n[![Build Status](https://travis-ci.org/jalkoby/tt.svg?branch=master)](https://travis-ci.org/jalkoby/tt)\n[![Gem Version](https://badge.fury.io/rb/t_t.svg)](https://badge.fury.io/rb/t_t)\n\nDos-T introduces a translation convention for a ruby web application (with a focus on the rails flow). The library is based on the next ideas:\n- focus on a every day issues\n- reduce amount of duplications inside translation files\n- easy to use from day one \u0026 minimum to write (nobody likes to write a long and obvious method names)\n- have a clear defaults\n\n## Usage\n\nDos-T adds an extra helper method `tt` into your controllers, mailers \u0026 views. The best way to explain all features\nis to look at [Cheatsheet](./cheatsheet.md). The below is shown a brief overview:\n\n```Haml\n# en:\n#   actions:\n#     base:\n#       add: \"Add a new %{r}\"\n#   attributes:\n#     user:\n#       name: \"Name\"\n#       email: \"Email\"\n#       role: \"Role\"\n#   common:\n#     actions: \"Actions\"\n#     confirm: \"Are you sure?\"\n#     edit: \"Edit\"\n#     delete: \"Delete\"\n#   enums:\n#     user:\n#       role:\n#         a: \"Admin\"\n#         g: \"Guest\"\n#         m: \"Manager\"\n#   models:\n#     user:\n#       one: \"User\"\n#       other: \"Users\"\n\n# app/views/users/index.haml\n%h2= tt.rs :user\n\n%table\n  %thead\n    %th= tt.attr :name\n    %th= tt.attr :email\n    %th= tt.attr :role\n    %th= tt.c :actions\n\n  %tbody\n    - @users.each do |user|\n      %tr\n        %td= user.name\n        %td= user.email\n        %td= tt.enum :role, user.role\n        %td\n          = link_to tt.c(:edit), edit_user_path(user)\n          = link_to tt.c(:delete), user_path(user), method: :delete, confirm: tt.c(:confirm)\n\n= link_to tt.a(:add), new_user_path\n```\n\nThe result will be the next:\n```Haml\n%h2 Users\n\n%table\n  %thead\n    %th Name\n    %th Email\n    %th Role\n    %th Actions\n\n  %tbody\n    - @users.each do |user|\n      %tr\n        %td= user.name\n        %td= user.email\n        %td= { 'a' =\u003e 'Admin', 'g' =\u003e 'Guest', 'm' =\u003e 'Manager' }[user.role]\n        %td\n          = link_to 'Edit', edit_user_path(user)\n          = link_to 'Delete', user_path(user), method: :delete, confirm: 'Are you sure?'\n\n= link_to 'Add a new user', new_user_path\n```\n\n## Additional features\n\n#### [The action factory](./docs/action_factory.md)\n\n#### [Synchronisation of a translation files](./docs/synchronisation.md)\n\n## Setup\n\nJust add `gem \"t_t\"` into your Gemfile and run `bundle`.\n\n## Requirements\n\nDos-T is tested against Ruby 1.9.3+ \u0026 JRuby(1.9+ compatible). If your application uses Ruby on Rails the framework version should be 3.2+\n\n## Changelog\n- 1.3.1\n  - Add csv export in tt:m task\n- 1.3.0\n  - Allow specify a custom mark for locale file synchonization\n- 1.2.2\n  - Fix rails 5 integration\n- 1.2.0\n  - Deprecate TT::Translator in favour of TT::Base \u0026 TT::Rails\n  - Introduce a real-time watcher for [translation file synchronisation](./docs/synchronisation.md)\n- 1.1.0:\n  - Added [the action factory](./docs/action_factory.md)\n  - Improve #attr, #r, #rs methods to make them more compatible with ActiveModel methods\n  - Fix a documentation mismatching\n- 1.0.1\n  - fix the activerecord integration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjalkoby%2Ftt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjalkoby%2Ftt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjalkoby%2Ftt/lists"}