Update to light style
This commit is contained in:
parent
d23281e1ce
commit
fe9a4b5caf
|
@ -14,13 +14,14 @@ t(:hello, scope: [:my, :messages])
|
||||||
|
|
||||||
t('my.messages.hello', default: "Hello")
|
t('my.messages.hello', default: "Hello")
|
||||||
```
|
```
|
||||||
|
{:.light}
|
||||||
|
|
||||||
### Interpolation
|
### Interpolation
|
||||||
|
|
||||||
```rb
|
```rb
|
||||||
t('hello', name: "John")
|
t('hello', name: "John")
|
||||||
```
|
```
|
||||||
{:.terminal}
|
{:.light}
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
hello: "Hello %{name}"
|
hello: "Hello %{name}"
|
||||||
|
@ -32,7 +33,7 @@ hello: "Hello %{name}"
|
||||||
# from the 'books/index' view
|
# from the 'books/index' view
|
||||||
t('.title')
|
t('.title')
|
||||||
```
|
```
|
||||||
{:.terminal}
|
{:.light}
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
en:
|
en:
|
||||||
|
@ -47,7 +48,7 @@ en:
|
||||||
t(:inbox, count: 1) #=> 'one message'
|
t(:inbox, count: 1) #=> 'one message'
|
||||||
t(:inbox, count: 2) #=> '2 messages'
|
t(:inbox, count: 2) #=> '2 messages'
|
||||||
```
|
```
|
||||||
{:.terminal}
|
{:.light}
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
inbox:
|
inbox:
|
||||||
|
@ -63,7 +64,7 @@ inbox:
|
||||||
l(Time.now)
|
l(Time.now)
|
||||||
l(Time.now, format: :short)
|
l(Time.now, format: :short)
|
||||||
```
|
```
|
||||||
{:.terminal}
|
{:.light}
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
en:
|
en:
|
||||||
|
@ -78,7 +79,7 @@ en:
|
||||||
```rb
|
```rb
|
||||||
l(Date.today)
|
l(Date.today)
|
||||||
```
|
```
|
||||||
{:.terminal}
|
{:.light}
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
en:
|
en:
|
||||||
|
@ -97,7 +98,7 @@ User.model_name.human #=> "User"
|
||||||
Child.model_name.human(count: 2) #=> "Children"
|
Child.model_name.human(count: 2) #=> "Children"
|
||||||
User.human_attribute_for :name #=> "Name"
|
User.human_attribute_for :name #=> "Name"
|
||||||
```
|
```
|
||||||
{:.terminal}
|
{:.light}
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
en:
|
en:
|
||||||
|
@ -119,7 +120,7 @@ en:
|
||||||
```rb
|
```rb
|
||||||
error_messages_for(...)
|
error_messages_for(...)
|
||||||
```
|
```
|
||||||
{:.terminal}
|
{:.light}
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
activerecord:
|
activerecord:
|
||||||
|
@ -192,14 +193,14 @@ number_to_rounded(3.14, precision: 0) #=> "3"
|
||||||
number_to_human(12_000) #=> "12 Thousand"
|
number_to_human(12_000) #=> "12 Thousand"
|
||||||
number_to_human_size(12345) #=> "12.3 kb"
|
number_to_human_size(12345) #=> "12.3 kb"
|
||||||
```
|
```
|
||||||
{:.terminal}
|
{:.light}
|
||||||
|
|
||||||
### Delimited
|
### Delimited
|
||||||
|
|
||||||
```rb
|
```rb
|
||||||
number_to_delimited(n)
|
number_to_delimited(n)
|
||||||
```
|
```
|
||||||
{:.terminal}
|
{:.light}
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
number:
|
number:
|
||||||
|
@ -216,7 +217,7 @@ number:
|
||||||
```rb
|
```rb
|
||||||
number_to_currency(n)
|
number_to_currency(n)
|
||||||
```
|
```
|
||||||
{:.terminal}
|
{:.light}
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
number:
|
number:
|
||||||
|
@ -235,7 +236,7 @@ number:
|
||||||
```rb
|
```rb
|
||||||
number_to_percentage(n)
|
number_to_percentage(n)
|
||||||
```
|
```
|
||||||
{:.terminal}
|
{:.light}
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
number:
|
number:
|
||||||
|
@ -257,7 +258,7 @@ I18n.available_locales
|
||||||
I18n.translate :ok # aka, I18n.t
|
I18n.translate :ok # aka, I18n.t
|
||||||
I18n.localize date # aka, I18n.l
|
I18n.localize date # aka, I18n.l
|
||||||
```
|
```
|
||||||
{:.terminal}
|
{:.light}
|
||||||
|
|
||||||
## Reference
|
## Reference
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue