From 6c3ef9bcf5ddc94dcd075fa437085b95d0a51318 Mon Sep 17 00:00:00 2001 From: uu59 Date: Fri, 6 Jun 2014 14:28:18 +0900 Subject: [PATCH] Move code fragment to i18n yaml --- app/views/tutorials/chapter2.html.haml | 16 ---------------- config/locales/translation_en.yml | 14 +++++++++++++- config/locales/translation_ja.yml | 12 ++++++++++++ 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/app/views/tutorials/chapter2.html.haml b/app/views/tutorials/chapter2.html.haml index 217d80c..e219e69 100644 --- a/app/views/tutorials/chapter2.html.haml +++ b/app/views/tutorials/chapter2.html.haml @@ -3,24 +3,8 @@ %p.clearfix = link_to "<< " << t('tutorials.chapter1.page_title'), tutorials_chapter1_path, class: "pull-left" -%pre - 2014-06-05 14:43:14 +0900 [info]: adding source type="http" - 2014-06-05 14:43:14 +0900 [info]: adding match pattern="debug.*" type="stdout" - :markdown #{t('.lesson_markdown')} -%pre - :escaped - - type http - port 8888 - - - - type stdout - - - %p.clearfix = link_to "<< " << t('tutorials.chapter1.page_title'), tutorials_chapter1_path, class: "pull-left" diff --git a/config/locales/translation_en.yml b/config/locales/translation_en.yml index 85e0ea0..1249118 100644 --- a/config/locales/translation_en.yml +++ b/config/locales/translation_en.yml @@ -127,7 +127,10 @@ en: <<: *tutorials_common page_title: "Chapter 2 | in_http and out_stdout" lesson_markdown: | - You can see the log as above when fluentd started. + You can see the log when fluentd started. + + 2014-06-05 14:43:14 +0900 [info]: adding source type="http" + 2014-06-05 14:43:14 +0900 [info]: adding match pattern="debug.*" type="stdout" Line 1 enable http plugin that allows to receive HTTP requests. @@ -135,6 +138,15 @@ en: These settings are defined as following fluent.conf: + + type http + port 8888 + + + + type stdout + + messages: need_restart: need to restart fluentd-ui please_sign_in: Sign in diff --git a/config/locales/translation_ja.yml b/config/locales/translation_ja.yml index e6277f9..67f835e 100644 --- a/config/locales/translation_ja.yml +++ b/config/locales/translation_ja.yml @@ -129,12 +129,24 @@ ja: lesson_markdown: | fluentdの起動時にこのようなログがあるかと思います。 + 2014-06-05 14:43:14 +0900 [info]: adding source type="http" + 2014-06-05 14:43:14 +0900 [info]: adding match pattern="debug.*" type="stdout" + この1行目でhttpが有効化されています。これでHTTPリクエストを受け付けるようになります。 2行目でstdoutが有効化されています。受け取ったデータのうち、タグが`debug.*`にマッチするものはstdoutへと渡されます。 この2つはfluent.confでそれぞれ次のように設定されています。 + + type http + port 8888 + + + + type stdout + + messages: need_restart: fluentd-uiの再起動が必要です please_sign_in: ログイン