{"id":21539832,"url":"https://github.com/richardvenneman/trestle-mobility","last_synced_at":"2025-07-23T14:34:44.986Z","repository":{"id":34540770,"uuid":"180122031","full_name":"richardvenneman/trestle-mobility","owner":"richardvenneman","description":"🌐 Mobility integration plugin for the Trestle admin framework","archived":false,"fork":false,"pushed_at":"2022-03-16T12:55:39.000Z","size":172,"stargazers_count":9,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-16T18:58:24.966Z","etag":null,"topics":["admin","i18n","mobility","rails","ruby","trestle"],"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/richardvenneman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-08T10:05:36.000Z","updated_at":"2022-03-16T12:55:43.000Z","dependencies_parsed_at":"2022-08-08T01:15:16.565Z","dependency_job_id":null,"html_url":"https://github.com/richardvenneman/trestle-mobility","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/richardvenneman/trestle-mobility","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardvenneman%2Ftrestle-mobility","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardvenneman%2Ftrestle-mobility/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardvenneman%2Ftrestle-mobility/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardvenneman%2Ftrestle-mobility/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/richardvenneman","download_url":"https://codeload.github.com/richardvenneman/trestle-mobility/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/richardvenneman%2Ftrestle-mobility/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266047240,"owners_count":23868708,"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":["admin","i18n","mobility","rails","ruby","trestle"],"created_at":"2024-11-24T04:16:30.744Z","updated_at":"2025-07-23T14:34:44.963Z","avatar_url":"https://github.com/richardvenneman.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trestle Mobility Integration (trestle-mobility)\n\n\u003e [Mobility](https://github.com/shioyama/mobility) integration plugin for the [Trestle admin framework](https://trestle.io)\n\n[![Gem](https://img.shields.io/gem/v/trestle-mobility.svg)](https://rubygems.org/gems/trestle-mobility)\n\n## Features / problems\n\n- Manage Mobility translations with a space-efficient dropdown interface in Trestle\n- Supports text fields, text area's and check boxes\n- Integrates with [DeepL Pro](https://www.deepl.com/pro.html) to automatically translate fields\n\n\u003cimg src=\"/screenshot.png?raw=true\" width=\"529\" height=\"242\" alt=\"Trestle Mobility screenshot\" /\u003e\n\n## Getting started\n\nThese instructions assume you have a working Trestle application. To integrate trestle-mobility, first add it to your application's Gemfile:\n\n```ruby\ngem 'trestle-mobility'\n```\n\nRun `bundle install`, and then run the install generator to set up configuration options.\n\n    $ rails generate trestle:mobility:install\n\n## Usage\n\nTrestle Mobility requires you to enable [Mobility's `locale_accessors` plugin](https://github.com/shioyama/mobility#getset).\n\nAssuming you've setup your models with Mobility's `translates` directives, you can use the `mobility_text_field`, `mobility_text_area` and `mobility_check_box` field types:\n\n```ruby\nTrestle.resource(:posts) do\n  form do |post|\n    mobility_text_field :title\n    mobility_text_field :subtitle\n    mobility_text_area :content\n    mobility_check_box :published\n  end\nend\n```\n\nTrestle Mobility allows you to specify the language that is selected by default:\n\n```ruby\nmobility_text_field :subtitle, selected: \"nl\"\n```\n\nBy default Trestle Mobility uses `I18n.available_locales` to generate the form fields, but you can specify the languages on a per-field basis:\n\n```ruby\nmobility_text_field :title, locales: %w(nl de fr)\n```\n\nQuoting Mobility's README:\n\n\u003e (Note however that Mobility will complain if you have I18n.enforce_available_locales set to true and you try accessing a locale not present in I18n.available_locales; set it to false if you want to allow any locale.)\n\n## DeepL translation\n\n\u003cimg src=\"/screenshot-deepl.png?raw=true\" width=\"410\" height=\"241\" alt=\"Trestle Mobility DeepL integration screenshot\" /\u003e\n\nTrestle Mobility can automatically populate empty field values with translations from other languages. This functionality is powered by the excellent [deepl-rb](https://github.com/wikiti/deepl-rb) gem. To make use of this, add `deepl-rb` to your Gemfile and specify your DeepL Pro API key in your Trestle initializer:\n\n```ruby\nconfig.mobility.deepl_api_key = \"YOUR-API-KEY\"\n```\n\nIt is possible to pass any DeepL API options to the field (check out the [deepl-rb documentation](https://github.com/wikiti/deepl-rb#translate) section on params):\n\n```ruby\nmobility_text_area :content, rows: 14, deepl_query_params: { tag_handling: \"xml\" }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardvenneman%2Ftrestle-mobility","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichardvenneman%2Ftrestle-mobility","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichardvenneman%2Ftrestle-mobility/lists"}