README.md in it-1.0.0 vs README.md in it-2.0.0
- old
+ new
@@ -1,13 +1,12 @@
-[](https://codeclimate.com/github/iGEL/it)
-[](https://travis-ci.org/iGEL/it)
-[](https://coveralls.io/r/iGEL/it)
+[](https://codeclimate.com/github/iGEL/it/maintainability)
+[](https://travis-ci.org/iGEL/it)
+[](https://coveralls.io/r/iGEL/it)
[](http://rubygems.org/gems/it)
[](https://github.com/iGEL/it/issues)
-[](https://gemnasium.com/iGEL/it)
-Tested against Ruby 2.4, 2.3, 2.2, head, and jruby 9.1.10.0 and Rails 5.1, 5.0, and 4.2
+Tested against Ruby 2.7, 2.6, and 2.5 and Rails 6.0 and 5.2
What is **it**?
=============
I18n is baked right into Rails, and it's great. But if you want to place markup or links inside your translated copies, things get a little messy. You need to specify the label of your links separately from the rest of the copy. Writing HTML in your translations is even worse.
@@ -49,18 +48,18 @@
You may have as many links inside your translations as you like, and normal interpolations are possible as well:
```yaml
en:
- copy: "Read the %{guide:Rails I18n guide} for more than %{advises} advises. Fork it at {repo:github}."
+ copy: "Read the %{guide:Rails I18n guide} for more than %{advises} advises. Fork it at %{repo:github}."
```
```erb
<%=it "copy",
guide: It.link("http://guides.rubyonrails.org/i18n.html"),
advices: 100,
- repo: It.link("https://github.com/lifo/docrails/tree/master/railties/guides") %>
+ repo: It.link("https://github.com/rails/rails") %>
```
As you see above, unless the interpolation name is `link` or starts with `link_` or ends with `_link`, you need to call `It.link` to create a link. The advantage of `It.link`: You may specify options like you would with `link_to`:
```erb
@@ -103,10 +102,10 @@
en:
mail_copy: "Do you like %{link:Rails}?"
```
```erb
-https://github.com/lifo/docrails/tree/master/railties/guides
+https://github.com/rails/rails
<%= it "mail_copy", link: It.link("http://www.rubyonrails.org/") %>
Plain mail:
<%= it "mail_copy", link: It.plain("%s[http://www.rubyonrails.org/]") %>
```