slim icon indicating copy to clipboard operation
slim copied to clipboard

Suggestion: Improve documenation and visibility for translator plugin

Open DannyBen opened this issue 9 years ago • 1 comments

Hi,

I just started to use slim, and found out about the automatic i18n that can be done with the translator. This is a killer feature for me, and I wish the documentation would be a little more specific and perhaps consider Rails (or maybe add documentation in the slim-rails gem)

I found this related closed ticket and I am still opening a new one here to a) mention that there IS an interest in this plugin, and b) to offer more specific improvements.

I am not talking about a huge change, but this is where I think it could improve:

  1. Add specific instructions on where to require "slim/translator". I guess this is more relevant to Rails, and at first I just added it in the application controller, and only by getting to this ticket I learned I can require it through the gemfile - although I had to dig deeper to realize I need to do it like this: gem 'slim-rails', require: ['slim-rails', 'slim/translator']
  2. Be more specific about what it translates. Is it just static strings? Is there a shortcut way to use it inside dynamic code, like = link_to or other cases?
  3. Be more specific about what can/should be written as a static-string-to-be-translated. I see some confusion about it in some tickets. It should probably mention that we can simply write the string that we would otherwise put inside the t() method (like user.delete_my_account)

DannyBen avatar Dec 15 '15 16:12 DannyBen

yes, please create documentation if you have time!

minad avatar Jan 04 '16 20:01 minad

I am going through the Slim issues. This issue hasn't seen an update for a long time and the translator plugin isn't widely used.

minad avatar Sep 18 '23 10:09 minad