From fe9a4b5caf2d1630f8a0dce69b3a1c982a0949e1 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Thu, 16 Apr 2015 20:47:09 +0800 Subject: [PATCH] Update to light style --- rails-i18n.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/rails-i18n.md b/rails-i18n.md index 5190a466d..0350feb5b 100644 --- a/rails-i18n.md +++ b/rails-i18n.md @@ -14,13 +14,14 @@ t(:hello, scope: [:my, :messages]) t('my.messages.hello', default: "Hello") ``` +{:.light} ### Interpolation ```rb t('hello', name: "John") ``` -{:.terminal} +{:.light} ```yml hello: "Hello %{name}" @@ -32,7 +33,7 @@ hello: "Hello %{name}" # from the 'books/index' view t('.title') ``` -{:.terminal} +{:.light} ```yml en: @@ -47,7 +48,7 @@ en: t(:inbox, count: 1) #=> 'one message' t(:inbox, count: 2) #=> '2 messages' ``` -{:.terminal} +{:.light} ```yml inbox: @@ -63,7 +64,7 @@ inbox: l(Time.now) l(Time.now, format: :short) ``` -{:.terminal} +{:.light} ```yml en: @@ -78,7 +79,7 @@ en: ```rb l(Date.today) ``` -{:.terminal} +{:.light} ```yml en: @@ -97,7 +98,7 @@ User.model_name.human #=> "User" Child.model_name.human(count: 2) #=> "Children" User.human_attribute_for :name #=> "Name" ``` -{:.terminal} +{:.light} ```yml en: @@ -119,7 +120,7 @@ en: ```rb error_messages_for(...) ``` -{:.terminal} +{:.light} ```yml activerecord: @@ -192,14 +193,14 @@ number_to_rounded(3.14, precision: 0) #=> "3" number_to_human(12_000) #=> "12 Thousand" number_to_human_size(12345) #=> "12.3 kb" ``` -{:.terminal} +{:.light} ### Delimited ```rb number_to_delimited(n) ``` -{:.terminal} +{:.light} ```yml number: @@ -216,7 +217,7 @@ number: ```rb number_to_currency(n) ``` -{:.terminal} +{:.light} ```yml number: @@ -235,7 +236,7 @@ number: ```rb number_to_percentage(n) ``` -{:.terminal} +{:.light} ```yml number: @@ -257,7 +258,7 @@ I18n.available_locales I18n.translate :ok # aka, I18n.t I18n.localize date # aka, I18n.l ``` -{:.terminal} +{:.light} ## Reference