From 5e75d3cd0a71f156b388e6d038f722a3dfc57b8c Mon Sep 17 00:00:00 2001 From: jasonych99 Date: 2016年11月12日 17:40:34 +0100 Subject: [PATCH 01/13] add react-intl to webpack & package.json --- client/npm-shrinkwrap.json | 30 ++++++++++++++++++++++++++++ client/package.json | 2 ++ client/webpack.client.base.config.js | 1 + 3 files changed, 33 insertions(+) diff --git a/client/npm-shrinkwrap.json b/client/npm-shrinkwrap.json index 9db0f9cbd..3f85d44c5 100644 --- a/client/npm-shrinkwrap.json +++ b/client/npm-shrinkwrap.json @@ -3179,6 +3179,31 @@ "from": "interpret@>=0.6.4 <0.7.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-0.6.6.tgz" }, + "intl": { + "version": "1.2.5", + "from": "intl@>=1.2.5 <2.0.0", + "resolved": "https://registry.npmjs.org/intl/-/intl-1.2.5.tgz" + }, + "intl-format-cache": { + "version": "2.0.5", + "from": "intl-format-cache@>=2.0.5 <3.0.0", + "resolved": "https://registry.npmjs.org/intl-format-cache/-/intl-format-cache-2.0.5.tgz" + }, + "intl-messageformat": { + "version": "1.3.0", + "from": "intl-messageformat@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-1.3.0.tgz" + }, + "intl-messageformat-parser": { + "version": "1.2.0", + "from": "intl-messageformat-parser@1.2.0", + "resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-1.2.0.tgz" + }, + "intl-relativeformat": { + "version": "1.3.0", + "from": "intl-relativeformat@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/intl-relativeformat/-/intl-relativeformat-1.3.0.tgz" + }, "invariant": { "version": "2.2.2", "from": "invariant@>=2.2.0 <3.0.0", @@ -4646,6 +4671,11 @@ "from": "react-dom@>=15.4.1 <16.0.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-15.4.1.tgz" }, + "react-intl": { + "version": "2.2.2", + "from": "react-intl@>=2.1.5 <3.0.0", + "resolved": "https://registry.npmjs.org/react-intl/-/react-intl-2.2.2.tgz" + }, "react-on-rails": { "version": "6.2.1", "from": "react-on-rails@>=6.2.1 <7.0.0", diff --git a/client/package.json b/client/package.json index 253b253c0..b525a0cc6 100644 --- a/client/package.json +++ b/client/package.json @@ -62,6 +62,7 @@ "file-loader": "^0.9.0", "immutable": "^3.8.1", "imports-loader": "^0.6.5", + "intl": "^1.2.5", "jquery": "^3.1.1", "jquery-ujs": "^1.2.2", "loader-utils": "^0.2.16", @@ -74,6 +75,7 @@ "react-addons-css-transition-group": "^15.4.1", "react-bootstrap": "^0.30.7", "react-dom": "^15.4.1", + "react-intl": "^2.2.2", "react-on-rails": "^6.2.1", "react-redux": "^4.4.6", "react-router": "^3.0.0", diff --git a/client/webpack.client.base.config.js b/client/webpack.client.base.config.js index 6d29af922..444a1cabe 100644 --- a/client/webpack.client.base.config.js +++ b/client/webpack.client.base.config.js @@ -38,6 +38,7 @@ module.exports = { 'react-on-rails', 'react-router-redux', 'redux-thunk', + 'react-intl', ], // This will contain the app entry points defined by webpack.hot.config and webpack.rails.config From 5b5d1156b15ce1d2dbf6655972968251ccb65fba Mon Sep 17 00:00:00 2001 From: jasonych99 Date: 2016年11月12日 17:20:03 +0100 Subject: [PATCH 02/13] add rails locale files --- config/locales/de.yml | 23 +++++++++++++++++++++ config/locales/en.yml | 44 ++++++++++++++++++++-------------------- config/locales/ja.yml | 23 +++++++++++++++++++++ config/locales/zh-CN.yml | 23 +++++++++++++++++++++ config/locales/zh-TW.yml | 23 +++++++++++++++++++++ 5 files changed, 114 insertions(+), 22 deletions(-) create mode 100644 config/locales/de.yml create mode 100644 config/locales/ja.yml create mode 100644 config/locales/zh-CN.yml create mode 100644 config/locales/zh-TW.yml diff --git a/config/locales/de.yml b/config/locales/de.yml new file mode 100644 index 000000000..3dffb5a7d --- /dev/null +++ b/config/locales/de.yml @@ -0,0 +1,23 @@ +de: + type: "Deutsch" + comments: "Kommentare " + loading: "Laden..." + description: + force_refrech: "Erzwingt die Aktualisierung aller Kommentare." + support_markdown: "Der Text unterstützt Github Flavored Markdown." + delete_rule: "Kommentare, die aelter als 24 Stunden sind, werden gelöscht." + submit_rule: "Der Name wird beibehalten. Der Text wird während des Postens zurücksetzt." + see_action_cable: "So sehen Action Cable sofort aktualisieren zwei Browser, öffnen Sie zwei Browser und senden Sie einen Kommentar!" + form: + horizontal: "Horizontale Form" + stacked: "Gestapelte Form" + inline: "Inline Form" + input: + name: + label: "Name" + placeholder: "Dein Name" + text: + label: "Text" + placeholder: "Sagen Sie etwas mit markdown..." + saving: "Speichern" + post: "Schicken" diff --git a/config/locales/en.yml b/config/locales/en.yml index f1d42ae52..9ff110cc4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,23 +1,23 @@ -# Files in the config/locales directory are used for internationalization -# and are automatically loaded by Rails. If you want to use locales other -# than English, add the necessary files in this directory. -# -# To use the locales, use `I18n.t`: -# -# I18n.t "hello" -# -# In views, this is aliased to just `t`: -# -# <%= t("hello") %> -# -# To use a different locale, set it with `I18n.locale`: -# -# I18n.locale = :es -# -# This would use the information in config/locales/es.yml. -# -# To learn more, please read the Rails Internationalization guide -# available at http://guides.rubyonrails.org/i18n.html. - en: - hello: "Hello world" + type: "English" + comments: "Comments " + loading: "Loading..." + description: + force_refrech: "Force Refresh of All Comments." + support_markdown: "Text supports Github Flavored Markdown." + delete_rule: "Comments older than 24 hours are deleted." + submit_rule: "Name is preserved. Text is reset, between submits." + see_action_cable: "To see Action Cable instantly update two browsers, open two browsers and submit a comment!" + form: + horizontal: "Horizontal Form" + stacked: "Stacked Form" + inline: "Inline Form" + input: + name: + label: "Name" + placeholder: "Your Name" + text: + label: "Text" + placeholder: "Say something using markdown..." + saving: "Saving" + post: "Post" diff --git a/config/locales/ja.yml b/config/locales/ja.yml new file mode 100644 index 000000000..17c3b350f --- /dev/null +++ b/config/locales/ja.yml @@ -0,0 +1,23 @@ +ja: + type: "日本語" + comments: "コメント " + loading: "読み込んでいます..." + description: + force_refrech: "すべてのコメントを強制的にリフレッシュします。" + support_markdown: "テキストは Github Flavored Markdown をサポートしています。" + delete_rule: "コメントは24時間後削除されます。" + submit_rule: "送信の間に名前は保存され、テキストがリセットされます。" + see_action_cable: "Action Cableが即座に2つのブラウザを更新することを確認するには、2つのブラウザを開いてコメントを送信してください!" + form: + horizontal: "水平フォーム" + stacked: "積み上げフォーム" + inline: "インラインフォーム" + input: + name: + label: "名前" + placeholder: "あなたの名前" + text: + label: "本文" + placeholder: "何かが Markdown を使用して言います..." + saving: "保存" + post: "サブミット" diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml new file mode 100644 index 000000000..e5222edbb --- /dev/null +++ b/config/locales/zh-CN.yml @@ -0,0 +1,23 @@ +zh-CN: + type: "简体中文" + comments: "评论 " + loading: "载入中..." + description: + force_refrech: "强制更新所有评论。" + support_markdown: "支援 Github Flavored Markdown。" + delete_rule: "评论于24小时后移除。" + submit_rule: "送出评论后, 名字保留并清除内容。" + see_action_cable: "要查看 Action Cable 立即更新两个浏览器,打开两个浏览器并提交评论!" + form: + horizontal: "水平格式" + stacked: "堆叠格式" + inline: "内嵌格式" + input: + name: + label: "名字" + placeholder: "你的名字" + text: + label: "内容" + placeholder: "使用markdown说些什么..." + saving: "储存" + post: "发表" diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml new file mode 100644 index 000000000..3c93fcf9d --- /dev/null +++ b/config/locales/zh-TW.yml @@ -0,0 +1,23 @@ +zh-TW: + type: "正體中文" + comments: "評論 " + loading: "載入中..." + description: + force_refrech: "強制更新所有評論。" + support_markdown: "支援 Github Flavored Markdown。" + delete_rule: "評論於24小時後移除。" + submit_rule: "送出評論後, 名字保留並清除內容。" + see_action_cable: "要查看 Action Cable 立即更新兩個瀏覽器,打開兩個瀏覽器並提交評論!" + form: + horizontal: "水平格式" + stacked: "堆疊格式" + inline: "內嵌格式" + input: + name: + label: "名字" + placeholder: "你的名字" + text: + label: "內容" + placeholder: "使用markdown說些什麼..." + saving: "儲存" + post: "發表" From 8f57f7ca8ddaa081c97a9e04648040905d000e95 Mon Sep 17 00:00:00 2001 From: jasonych99 Date: 2016年12月26日 23:39:21 +0100 Subject: [PATCH 03/13] setup for ReactOnRails + react-intl: automatically generating javascript translation files from rails locales --- Gemfile | 2 +- Gemfile.lock | 5 ++--- config/application.rb | 7 +++++++ config/initializers/react_on_rails.rb | 6 ++++++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 338c45e1d..c8fe71e07 100644 --- a/Gemfile +++ b/Gemfile @@ -38,7 +38,7 @@ gem "sdoc", group: :doc # Use Rails Html Sanitizer for HTML sanitization gem "rails-html-sanitizer" -gem "react_on_rails", "~> 6.1" +gem "react_on_rails", "~> 6.4" # See https://github.com/sstephenson/execjs#readme for more supported runtimes # mini_racer is probably faster than therubyracer diff --git a/Gemfile.lock b/Gemfile.lock index 233be69f4..9e493a4c1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -199,11 +199,10 @@ GEM rb-inotify (0.9.7) ffi (>= 0.5.0) rdoc (4.3.0) - react_on_rails (6.1.2) + react_on_rails (6.4.0) addressable connection_pool execjs (~> 2.5) - foreman rails (>= 3.2) rainbow (~> 2.1) redis (3.3.0) @@ -330,7 +329,7 @@ DEPENDENCIES rails rails-html-sanitizer rainbow - react_on_rails (~> 6.1) + react_on_rails (~> 6.4) redis rspec-rails (~> 3) rspec-retry diff --git a/config/application.rb b/config/application.rb index c0d8ea141..b9c48830a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -12,5 +12,12 @@ class Application < Rails::Application # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. config.action_cable.allowed_request_origins = [Rails.application.secrets.action_cable_url] + + ################################################################################ + # ReactOnRails will convert rails locales to javascript files for react-intl. + ################################################################################ + config.after_initialize do + ReactOnRails::LocalesToJs.new + end end end diff --git a/config/initializers/react_on_rails.rb b/config/initializers/react_on_rails.rb index 4d3adeec8..b704cd189 100644 --- a/config/initializers/react_on_rails.rb +++ b/config/initializers/react_on_rails.rb @@ -66,6 +66,12 @@ config.server_renderer_pool_size = 1 # increase if you're on JRuby config.server_renderer_timeout = 20 # seconds + ################################################################################ + # I18N OPTIONS + ################################################################################ + # Replace the following line to the location where you keep translation.js & default.js. + config.i18n_dir = Rails.root.join("client", "app", "libs", "i18n") + ################################################################################ # MISCELLANEOUS OPTIONS ################################################################################ From 8913f8478686e303af9b56edcbe5ab51252f08b0 Mon Sep 17 00:00:00 2001 From: jasonych99 Date: 2016年12月27日 09:48:51 +0100 Subject: [PATCH 04/13] set libs/i18n folder --- .gitignore | 4 ++++ client/.eslintignore | 3 +++ client/app/libs/i18n/selectLanguage.jsx | 13 +++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 client/app/libs/i18n/selectLanguage.jsx diff --git a/.gitignore b/.gitignore index 93c476de7..3c81b6a1f 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,7 @@ vendor/ruby .idea spec/examples.txt + +# Ignore i18n-js +client/app/libs/i18n/translations.js +client/app/libs/i18n/default.js diff --git a/client/.eslintignore b/client/.eslintignore index 3c3629e64..369ecb079 100644 --- a/client/.eslintignore +++ b/client/.eslintignore @@ -1 +1,4 @@ node_modules + +app/libs/i18n/translations.js +app/libs/i18n/default.js diff --git a/client/app/libs/i18n/selectLanguage.jsx b/client/app/libs/i18n/selectLanguage.jsx new file mode 100644 index 000000000..4c9f9e979 --- /dev/null +++ b/client/app/libs/i18n/selectLanguage.jsx @@ -0,0 +1,13 @@ +import React from 'react'; + +const SelectLanguage = (onChange, locale = defaultLocale) => ( + +); + +export { SelectLanguage }; From 1e5df80a58e1c2f93c49f0b5b542264d19a93f83 Mon Sep 17 00:00:00 2001 From: jasonych99 Date: 2016年12月10日 11:10:53 +0100 Subject: [PATCH 05/13] add locale to Redux --- .../bundles/comments/actions/commentsActionCreators.js | 7 +++++++ .../app/bundles/comments/constants/commentsConstants.js | 2 ++ client/app/bundles/comments/reducers/commentsReducer.js | 9 ++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/client/app/bundles/comments/actions/commentsActionCreators.js b/client/app/bundles/comments/actions/commentsActionCreators.js index b02788a2d..418a8675b 100644 --- a/client/app/bundles/comments/actions/commentsActionCreators.js +++ b/client/app/bundles/comments/actions/commentsActionCreators.js @@ -71,3 +71,10 @@ export function submitComment(comment) { ); }; } + +export function setLocale(locale) { + return { + type: actionTypes.SET_LOCALE, + locale, + }; +} diff --git a/client/app/bundles/comments/constants/commentsConstants.js b/client/app/bundles/comments/constants/commentsConstants.js index 03749319a..8cad3e601 100644 --- a/client/app/bundles/comments/constants/commentsConstants.js +++ b/client/app/bundles/comments/constants/commentsConstants.js @@ -7,3 +7,5 @@ export const MESSAGE_RECEIVED = 'MESSAGE_RECEIVED'; export const SET_IS_FETCHING = 'SET_IS_FETCHING'; export const SET_IS_SAVING = 'SET_IS_SAVING'; + +export const SET_LOCALE = 'SET_LOCALE'; diff --git a/client/app/bundles/comments/reducers/commentsReducer.js b/client/app/bundles/comments/reducers/commentsReducer.js index 91cbc5a62..e6bb784fd 100644 --- a/client/app/bundles/comments/reducers/commentsReducer.js +++ b/client/app/bundles/comments/reducers/commentsReducer.js @@ -10,10 +10,11 @@ export const $$initialState = Immutable.fromJS({ submitCommentError: null, isFetching: false, isSaving: false, + locale: null, }); export default function commentsReducer($$state = $$initialState, action = null) { - const { type, comment, comments, error } = action; + const { type, comment, comments, error, locale } = action; switch (type) { @@ -75,6 +76,12 @@ export default function commentsReducer($$state = $$initialState, action = null) }); } + case actionTypes.SET_LOCALE: { + return $$state.merge({ + locale, + }); + } + default: { return $$state; } From 8e4d23014f1c8857194cffd46c664a6aaeafcbfc Mon Sep 17 00:00:00 2001 From: jasonych99 Date: 2016年12月10日 11:12:54 +0100 Subject: [PATCH 06/13] add i18n functionality to view(Flux framework) --- .../components/CommentBox/CommentBox.jsx | 37 ++++++------ .../CommentBox/CommentForm/CommentForm.jsx | 59 +++++++++++-------- .../containers/NonRouterCommentsContainer.jsx | 14 ++++- .../containers/RouterCommentsContainer.jsx | 14 ++++- .../comments/startup/clientRegistration.jsx | 9 +++ 5 files changed, 90 insertions(+), 43 deletions(-) diff --git a/client/app/bundles/comments/components/CommentBox/CommentBox.jsx b/client/app/bundles/comments/components/CommentBox/CommentBox.jsx index 5d8b54b48..af2ac6694 100644 --- a/client/app/bundles/comments/components/CommentBox/CommentBox.jsx +++ b/client/app/bundles/comments/components/CommentBox/CommentBox.jsx @@ -1,13 +1,15 @@ import BaseComponent from 'libs/components/BaseComponent'; import React, { PropTypes } from 'react'; - +import { FormattedMessage, injectIntl, intlShape } from 'react-intl'; import CommentForm from './CommentForm/CommentForm'; import CommentList, { CommentPropTypes } from './CommentList/CommentList'; import css from './CommentBox.scss'; import Immutable from 'immutable'; import ActionCable from 'actioncable'; +import { SelectLanguage } from 'libs/i18n/selectLanguage'; +import { defaultMessages, defaultLocale } from 'libs/i18n/default'; -export default class CommentBox extends BaseComponent { +class CommentBox extends BaseComponent { static propTypes = { pollInterval: PropTypes.number.isRequired, actions: PropTypes.shape({ @@ -19,6 +21,7 @@ export default class CommentBox extends BaseComponent { submitCommentError: React.PropTypes.string, $$comments: React.PropTypes.arrayOf(CommentPropTypes), }).isRequired, + intl: intlShape.isRequired, }; constructor() { @@ -61,37 +64,35 @@ export default class CommentBox extends BaseComponent { } render() { - const { actions, data } = this.props; + const { actions, data, intl } = this.props; + const { formatMessage } = intl; const cssTransitionGroupClassNames = { enter: css.elementEnter, enterActive: css.elementEnterActive, leave: css.elementLeave, leaveActive: css.elementLeaveActive, }; + const locale = data.get('locale') || defaultLocale; return (

- Comments {data.get('isFetching') && 'Loading...'} + {formatMessage(defaultMessages.comments)} + {data.get('isFetching') && formatMessage(defaultMessages.loading)}

+ { SelectLanguage(actions.setLocale, locale) }
  • {data.get('isFetching') &&
    || - + }
  • -
  • - Text supports Github Flavored Markdown. -
  • -
  • - Comments older than 24 hours are deleted. -
  • -
  • - Name is preserved. Text is reset, between submits. -
  • -
  • - To see Action Cable instantly update two browsers, open two browsers and submit a comment! -
  • +
  • {formatMessage(defaultMessages.descriptionSupportMarkdown)}
  • +
  • {formatMessage(defaultMessages.descriptionDeleteRule)}
  • +
  • {formatMessage(defaultMessages.descriptionSubmitRule)}
  • +
  • {formatMessage(defaultMessages.descriptionSeeActionCable)}

- Name + {formatMessage(defaultMessages.inputNameLabel)} - Text + {formatMessage(defaultMessages.inputTextLabel)} - {this.props.isSaving ? 'Saving...' : 'Post'} + {this.props.isSaving + ? `${formatMessage(defaultMessages.inputSaving)}...` + : formatMessage(defaultMessages.inputPost)} @@ -177,15 +181,16 @@ export default class CommentForm extends BaseComponent { } formStacked() { + const { formatMessage } = this.props.intl; return (

- Name + {formatMessage(defaultMessages.inputNameLabel)} - Text + {formatMessage(defaultMessages.inputTextLabel)} - {this.props.isSaving ? 'Saving...' : 'Post'} + {this.props.isSaving + ? `${formatMessage(defaultMessages.inputSaving)}...` + : formatMessage(defaultMessages.inputPost)} @@ -224,17 +231,18 @@ export default class CommentForm extends BaseComponent { // Head up! We have some CSS modules going on here with the className props below. formInline() { + const { formatMessage } = this.props.intl; return (

- Name + {formatMessage(defaultMessages.inputNameLabel)} - Text + {formatMessage(defaultMessages.inputTextLabel)} - {this.props.isSaving ? 'Saving...' : 'Post'} + {this.props.isSaving + ? `${formatMessage(defaultMessages.inputSaving)}...` + : formatMessage(defaultMessages.inputPost)}
@@ -284,7 +294,7 @@ export default class CommentForm extends BaseComponent { }, []); return ( - + Your comment was not saved!
    {errorElements} @@ -310,6 +320,7 @@ export default class CommentForm extends BaseComponent { } const { cssTransitionGroupClassNames } = this.props; + const { formatMessage } = this.props.intl; // For animation with ReactCSSTransitionGroup // https://facebook.github.io/react/docs/animation.html @@ -325,13 +336,15 @@ export default class CommentForm extends BaseComponent { {this.errorWarning()} -
); } } + +export default injectIntl(CommentForm); diff --git a/client/app/bundles/comments/containers/NonRouterCommentsContainer.jsx b/client/app/bundles/comments/containers/NonRouterCommentsContainer.jsx index 97d2e24c1..72c753ff2 100644 --- a/client/app/bundles/comments/containers/NonRouterCommentsContainer.jsx +++ b/client/app/bundles/comments/containers/NonRouterCommentsContainer.jsx @@ -6,6 +6,13 @@ import BaseComponent from 'libs/components/BaseComponent'; import CommentScreen from '../components/CommentScreen/CommentScreen'; import * as commentsActionCreators from '../actions/commentsActionCreators'; +import { IntlProvider } from 'react-intl'; +import { translations } from 'libs/i18n/translations'; +import { defaultLocale } from 'libs/i18n/default'; + +// polyfill for server-side rendering, required by react-intl +import Intl from 'intl'; +global.Intl = Intl; function select(state) { // Which part of the Redux global state does our component want to receive as props? @@ -21,8 +28,13 @@ class NonRouterCommentsContainer extends BaseComponent { render() { const { dispatch, data } = this.props; const actions = bindActionCreators(commentsActionCreators, dispatch); + const locale = data.get('locale') || defaultLocale; + const messages = translations[locale]; + return ( - + + + ); } } diff --git a/client/app/bundles/comments/containers/RouterCommentsContainer.jsx b/client/app/bundles/comments/containers/RouterCommentsContainer.jsx index d7828df20..86e8e06aa 100644 --- a/client/app/bundles/comments/containers/RouterCommentsContainer.jsx +++ b/client/app/bundles/comments/containers/RouterCommentsContainer.jsx @@ -3,9 +3,15 @@ import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import BaseComponent from 'libs/components/BaseComponent'; - +import { IntlProvider } from 'react-intl'; import CommentScreen from '../components/CommentScreen/CommentScreen'; import * as commentsActionCreators from '../actions/commentsActionCreators'; +import { translations } from 'libs/i18n/translations'; +import { defaultLocale } from 'libs/i18n/default'; + +// polyfill for server-side rendering, required by react-intl +import Intl from 'intl'; +global.Intl = Intl; function select(state) { // Which part of the Redux global state does our component want to receive as props? @@ -25,9 +31,13 @@ class RouterCommentsContainer extends BaseComponent { const { dispatch, data } = this.props; const actions = bindActionCreators(commentsActionCreators, dispatch); const locationState = this.props.location.state; + const locale = data.get('locale') || defaultLocale; + const messages = translations[locale]; return ( - + + + ); } } diff --git a/client/app/bundles/comments/startup/clientRegistration.jsx b/client/app/bundles/comments/startup/clientRegistration.jsx index c39cfdb9c..9b09e9e24 100644 --- a/client/app/bundles/comments/startup/clientRegistration.jsx +++ b/client/app/bundles/comments/startup/clientRegistration.jsx @@ -7,6 +7,15 @@ import routerCommentsStore from '../store/routerCommentsStore'; import commentsStore from '../store/commentsStore'; import NavigationBarApp from './NavigationBarApp'; +import { addLocaleData } from 'react-intl'; +import en from 'react-intl/locale-data/en'; +import de from 'react-intl/locale-data/de'; +import ja from 'react-intl/locale-data/ja'; +import zh from 'react-intl/locale-data/zh'; + +// Initizalize all locales for react-intl. +addLocaleData([...en, ...de, ...ja, ...zh]); + ReactOnRails.setOptions({ traceTurbolinks: TRACE_TURBOLINKS, // eslint-disable-line no-undef }); From 70bdf0c24f5a6ea7287e978fb66b2ee5a747ede2 Mon Sep 17 00:00:00 2001 From: jasonych99 Date: 2016年12月10日 11:12:00 +0100 Subject: [PATCH 07/13] add i18n functionality to view(non-Flux framework) --- .../SimpleCommentScreen.jsx | 62 ++++++++++++++++--- 1 file changed, 52 insertions(+), 10 deletions(-) diff --git a/client/app/bundles/comments/components/SimpleCommentScreen/SimpleCommentScreen.jsx b/client/app/bundles/comments/components/SimpleCommentScreen/SimpleCommentScreen.jsx index 39e83108c..95d716e27 100644 --- a/client/app/bundles/comments/components/SimpleCommentScreen/SimpleCommentScreen.jsx +++ b/client/app/bundles/comments/components/SimpleCommentScreen/SimpleCommentScreen.jsx @@ -3,16 +3,52 @@ import Immutable from 'immutable'; import _ from 'lodash'; import React from 'react'; import ReactOnRails from 'react-on-rails'; - +import { IntlProvider, injectIntl, intlShape } from 'react-intl'; import BaseComponent from 'libs/components/BaseComponent'; import CommentForm from '../CommentBox/CommentForm/CommentForm'; import CommentList from '../CommentBox/CommentList/CommentList'; import css from './SimpleCommentScreen.scss'; +import { SelectLanguage } from 'libs/i18n/selectLanguage'; +import { defaultMessages, defaultLocale } from 'libs/i18n/default'; +import { translations } from 'libs/i18n/translations'; + +export default class I18nWrapper extends BaseComponent { + constructor(props) { + super(props); + + this.state = { + locale: defaultLocale, + }; + + _.bindAll(this, 'handleSetLocale'); + } + + handleSetLocale(locale) { + this.setState({ locale: locale }); + } + + render() { + const { locale } = this.state; + const messages = translations[locale]; + const InjectedSimpleCommentScreen = injectIntl(SimpleCommentScreen); + + return ( + + + + ); + } +} + +class SimpleCommentScreen extends BaseComponent { + constructor(props) { + super(props); -export default class SimpleCommentScreen extends BaseComponent { - constructor(props, context) { - super(props, context); this.state = { $$comments: Immutable.fromJS([]), isSaving: false, @@ -67,6 +103,8 @@ export default class SimpleCommentScreen extends BaseComponent { } render() { + const { handleSetLocale, locale, intl } = this.props; + const { formatMessage } = intl; const cssTransitionGroupClassNames = { enter: css.elementEnter, enterActive: css.elementEnterActive, @@ -75,12 +113,16 @@ export default class SimpleCommentScreen extends BaseComponent { }; return ( -
-

Comments

-

- Text take Github Flavored Markdown. Comments older than 24 hours are deleted.
- Name is preserved. Text is reset, between submits. -

+
+

+ {formatMessage(defaultMessages.comments)} +

+ { SelectLanguage(handleSetLocale, locale) } +
    +
  • {formatMessage(defaultMessages.descriptionSupportMarkdown)}
  • +
  • {formatMessage(defaultMessages.descriptionDeleteRule)}
  • +
  • {formatMessage(defaultMessages.descriptionSubmitRule)}
  • +
Date: 2017年1月13日 22:11:37 +0100 Subject: [PATCH 08/13] update Action Cable in CommentBox --- .../bundles/comments/components/CommentBox/CommentBox.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/app/bundles/comments/components/CommentBox/CommentBox.jsx b/client/app/bundles/comments/components/CommentBox/CommentBox.jsx index af2ac6694..bf3cd4bbf 100644 --- a/client/app/bundles/comments/components/CommentBox/CommentBox.jsx +++ b/client/app/bundles/comments/components/CommentBox/CommentBox.jsx @@ -29,13 +29,14 @@ class CommentBox extends BaseComponent { _.bindAll(this, [ 'refreshComments', ]); + this.cable = null; } subscribeChannel() { const { messageReceived } = this.props.actions; const protocol = window.location.protocol === "https:" ? "wss://" : "ws://" - const cable = ActionCable.createConsumer(protocol+window.location.hostname+":"+window.location.port+"/cable"); - cable.subscriptions.create({channel: "CommentsChannel"}, { + this.cable = ActionCable.createConsumer(protocol+window.location.hostname+":"+window.location.port+"/cable"); + this.cable.subscriptions.create({channel: "CommentsChannel"}, { connected: () => { console.log("connected") }, @@ -55,7 +56,7 @@ class CommentBox extends BaseComponent { } componentWillUnmount() { - App.cable.subscriptions.remove({ channel: "CommentsChannel" }); + this.cable.subscriptions.remove({ channel: "CommentsChannel" }); } refreshComments() { From e36156593b95903ec683fe7bff235191a19c715e Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Wed, 1 Feb 2017 17:58:39 -1000 Subject: [PATCH 09/13] Update README.md --- README.md | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1800ebf9a..d0b78b94b 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,32 @@ [![Codeship Build Status](https://codeship.com/projects/287b26d0-0c05-0133-7a33-02e67aca5f06/status?branch=master)](https://app.codeship.com/projects/90975) [![Build Status](https://travis-ci.org/shakacode/react-webpack-rails-tutorial.svg?branch=code_coverage-linting)](https://travis-ci.org/shakacode/react-webpack-rails-tutorial) [![Dependency Status](https://gemnasium.com/shakacode/react-webpack-rails-tutorial.svg)](https://gemnasium.com/shakacode/react-webpack-rails-tutorial) [![Code Climate](https://codeclimate.com/github/shakacode/react-webpack-rails-tutorial/badges/gpa.svg)](https://codeclimate.com/github/shakacode/react-webpack-rails-tutorial) [![Coverage Status](https://coveralls.io/repos/shakacode/react-webpack-rails-tutorial/badge.svg?branch=master&service=github)](https://coveralls.io/github/shakacode/react-webpack-rails-tutorial?branch=master) -Aloha from Justin Gordon ([bio](http://www.railsonmaui.com/about)) and the [ShakaCode](http://www.shakacode.com) Team! We're actively looking for new projects. If you like this project and **React on Rails**, please consider contacting me at [justin@shakacode.com](mailto:justin@shakacode.com) if we could potentially help you in any way. Besides consulting on bigger projects, [ShakaCode](http://www.shakacode.com) is doing Skype plus Slack/Github based coaching for React on Rails. See our blog post [Can ShakaCode Help You?](https://blog.shakacode.com/can-shakacode-help-you-4a5b1e5a8a63#.jex6tg9w9) for more information. +Aloha from Justin Gordon ([bio](http://www.railsonmaui.com/about)) and the [ShakaCode](http://www.shakacode.com) Team! We're actively looking for new projects involving React, React-Native, and Rails. Please [contact me](mailto:justin@shakacode.com) if we could potentially help you in any way. Besides consulting on bigger projects, [ShakaCode](http://www.shakacode.com) is doing ScreenHero plus Slack/Github based coaching for React on Rails. See our blog post [Can ShakaCode Help You?](https://blog.shakacode.com/can-shakacode-help-you-4a5b1e5a8a63#.jex6tg9w9) for more information. -We're offering a free half-hour project consultation, on anything from React on Rails to any aspect of web application development for both consumer and enterprise products. In addition to React.js and Rails, we're doing react-native iOS and Android apps! +I'm offering a free half-hour project consultation, on anything from React on Rails to any aspect of web application development for both consumer and enterprise products. In addition to React.js and Rails, we're doing React-Native iOS and Android apps! -Your support keeps this project going. +Whether you have a new project or need help on an existing project, feel free to contact me directly at [justin@shakacode.com](mailto:justin@shakacode.com) and thanks in advance for any referrals! + +Your support keeps this project going! (Want to become a contributor? [Contact us](mailto:contact@shakacode.com) for an Slack team invite! Also, see ["easy" issues](https://github.com/shakacode/react_on_rails/labels/easy) and [issues for the full tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/issues?q=is%3Aissue+is%3Aopen+label%3Aeasy).) +# ShakaCode Community +Please [Subscribe](https://app.mailerlite.com/webforms/landing/l1d9x5) to keep in touch with Justin Gordon and [ShakaCode](http://www.shakacode.com/). I intend to send a monthly summary including announcements of new releases of bootstrap-loader and React on Rails and of our latest [blog articles](https://blog.shakacode.com) and tutorials. Subscribers will also have access to **exclusive content**, including tips and examples. + +[![2017年01月31日_14-16-56](https://cloud.githubusercontent.com/assets/1118459/22490211/f7a70418-e7bf-11e6-9bef-b3ccd715dbf8.png)](https://app.mailerlite.com/webforms/landing/l1d9x5) + +* **Slack Room**: [Contact us](mailto:contact@shakacode.com) for an invite to the ShakaCode Slack room! +* **[forum.shakacode.com](https://forum.shakacode.com)**: Post your questions +* **[@ShakaCode on Twitter](https://twitter.com/shakacode)** + +## React on Rails Info +**[React on Rails](https://github.com/shakacode/react_on_rails)** is ShakaCode's flagship product. We want to make sure you're aware of it! + +### Testimonials +From Joel Hooks, Co-Founder, Chief Nerd at [egghead.io](https://egghead.io/), January 30, 2017: +![2017年01月30日_11-33-59](https://cloud.githubusercontent.com/assets/1118459/22443635/b3549fb4-e6e3-11e6-8ea2-6f589dc93ed3.png) + +For more testimonials, see [Live Projects](https://github.com/shakacode/react_on_rails/blob/master/PROJECTS.md) and [Kudos](https://github.com/shakacode/react_on_rails/blob/master/KUDOS.md). # Videos @@ -238,8 +257,18 @@ If you would like to know more about ShakaCode, please read [Who Is ShakaCode](h Please visit [our forums!](http://forum.shakacode.com). We've got a [category dedicated to react_on_rails](http://forum.shakacode.com/c/rails/reactonrails). -If you're looking for consulting on a project using React and Rails, email us at [contact@shakacode.com](mailto:contact@shakacode.com)! See our blog post [Can ShakaCode Help You?](https://blog.shakacode.com/can-shakacode-help-you-4a5b1e5a8a63#.jex6tg9w9) for more information on how we can help. - You can also join our slack room for some free advice. Email us for an invite. We're looking for great developers that want to work with Rails + React (and react-native!) with a remote-first, distributed, worldwide team, for our own products, client work, and open source. [More info here](http://www.shakacode.com/about/index.html#work-with-us). + +--- + +Aloha from Justin Gordon ([bio](http://www.railsonmaui.com/about)) and the [ShakaCode](http://www.shakacode.com) Team! We're actively looking for new projects involving React, React-Native, and Rails. Please contact me at [justin@shakacode.com](mailto:justin@shakacode.com) if we could potentially help you in any way. Besides consulting on bigger projects, [ShakaCode](http://www.shakacode.com) is doing Skype plus Slack/Github based coaching for React on Rails. See our blog post [Can ShakaCode Help You?](https://blog.shakacode.com/can-shakacode-help-you-4a5b1e5a8a63#.jex6tg9w9) for more information. + +We're offering a free half-hour project consultation, on anything from React on Rails to any aspect of web application development for both consumer and enterprise products. In addition to React.js and Rails, we're doing React-Native iOS and Android apps! + +Whether you have a new project or need help on an existing project, feel free to contact me directly at [justin@shakacode.com](mailto:justin@shakacode.com) and thanks in advance for any referrals! + +Your support keeps this project going. + + From 8a5a7ae33f848046d451bc3fc0e68c8d4d084cea Mon Sep 17 00:00:00 2001 From: jasonych99 Date: Wed, 8 Feb 2017 21:51:21 +0100 Subject: [PATCH 10/13] update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4e92b4763..f86c0923d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,8 +29,8 @@ install: - npm install npm@latest -g - npm --version - npm install - - npm run build:client && npm run build:server - rake db:setup + - npm run build:client && npm run build:server # Tip: No need to run xvfb if running headless testing. However, we're going to start with # Poltergeist and switch to selenium if a test fails. From bf6721dee5407e384d04b06b566a40554160bba4 Mon Sep 17 00:00:00 2001 From: jasonych99 Date: Thu, 9 Feb 2017 20:10:58 +0100 Subject: [PATCH 11/13] update README.md for i18n demoed functionality --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index d0b78b94b..62b39e88d 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ You can see this tutorial live here: [http://reactrails.com/](http://reactrails. - Enabling the use of npm modules and [Babel](https://babeljs.io/) with a Rails application using [Webpack](https://webpack.github.io/). - Easily enable retrofitting such a JS framework into an existing Rails app. You don't need a brand new single page app! - Example setting up Ruby and JavaScript linting in a real project, with corresponding CI rake tasks. +- Enabling the i18n functionality with [react-intl](https://github.com/yahoo/react-intl). ### Technologies involved From e00693456cdf7b827b908495e783596b6321ee1e Mon Sep 17 00:00:00 2001 From: jasonych99 Date: 2017年2月15日 15:13:44 +0100 Subject: [PATCH 12/13] use rake react_on_rails:locale to generate js locale files --- .travis.yml | 3 ++- Procfile.dev | 2 +- Procfile.hot | 2 +- Procfile.spec | 2 +- Procfile.static | 2 +- Procfile.static.trace | 2 +- config/application.rb | 7 ------- 7 files changed, 7 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index f86c0923d..dcbeb15ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,8 +29,9 @@ install: - npm install npm@latest -g - npm --version - npm install + - rake react_on_rails:locale + - cd client && npm run build:test - rake db:setup - - npm run build:client && npm run build:server # Tip: No need to run xvfb if running headless testing. However, we're going to start with # Poltergeist and switch to selenium if a test fails. diff --git a/Procfile.dev b/Procfile.dev index 0404e3c1b..669571946 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -7,7 +7,7 @@ rails: REACT_ON_RAILS_ENV=HOT rails s -b 0.0.0.0 # Run the hot reload server for client development -hot-assets: sh -c 'rm app/assets/webpack/* || true && HOT_RAILS_PORT=3500 npm run hot-assets' +hot-assets: sh -c 'rm app/assets/webpack/* || true && bundle exec rake react_on_rails:locale && HOT_RAILS_PORT=3500 npm run hot-assets' # Render static client assets rails-static-client-assets: sh -c 'npm run build:dev:client' diff --git a/Procfile.hot b/Procfile.hot index fe4dd92e1..2e6c49324 100644 --- a/Procfile.hot +++ b/Procfile.hot @@ -6,7 +6,7 @@ rails: REACT_ON_RAILS_ENV=HOT rails s -b 0.0.0.0 # Run the hot reload server for client development -hot-assets: sh -c 'rm app/assets/webpack/* || true && HOT_RAILS_PORT=3500 npm run hot-assets' +hot-assets: sh -c 'rm app/assets/webpack/* || true && bundle exec rake react_on_rails:locale && HOT_RAILS_PORT=3500 npm run hot-assets' # Keep the JS fresh for server rendering. Remove if not server rendering rails-server-assets: sh -c 'npm run build:dev:server' diff --git a/Procfile.spec b/Procfile.spec index d26f93be4..7fad064e6 100644 --- a/Procfile.spec +++ b/Procfile.spec @@ -3,7 +3,7 @@ # in rails_helper.rb. # Build client assets, watching for changes. -rails-client-assets: sh -c 'npm run build:dev:client' +rails-client-assets: sh -c 'bundle exec rake react_on_rails:locale && npm run build:dev:client' # Build server assets, watching for changes. Remove if not server rendering. rails-server-assets: sh -c 'npm run build:dev:server' diff --git a/Procfile.static b/Procfile.static index f3508d4bc..ac635a72a 100644 --- a/Procfile.static +++ b/Procfile.static @@ -2,7 +2,7 @@ rails: REACT_ON_RAILS_ENV= rails s -b 0.0.0.0 # Build client assets, watching for changes. -rails-client-assets: rm app/assets/webpack/* || true && npm run build:dev:client +rails-client-assets: rm app/assets/webpack/* || true && bundle exec rake react_on_rails:locale && npm run build:dev:client # Build server assets, watching for changes. Remove if not server rendering. rails-server-assets: npm run build:dev:server diff --git a/Procfile.static.trace b/Procfile.static.trace index c4b58a753..d73acfe5f 100644 --- a/Procfile.static.trace +++ b/Procfile.static.trace @@ -2,7 +2,7 @@ rails: TRACE_REACT_ON_RAILS=TRUE rails s -b 0.0.0.0 # Build client assets, watching for changes. -rails-client-assets: npm run build:dev:client +rails-client-assets: bundle exec rake react_on_rails:locale && npm run build:dev:client # Build server assets, watching for changes. Remove if not server rendering. rails-server-assets: npm run build:dev:server diff --git a/config/application.rb b/config/application.rb index b9c48830a..c0d8ea141 100644 --- a/config/application.rb +++ b/config/application.rb @@ -12,12 +12,5 @@ class Application < Rails::Application # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. config.action_cable.allowed_request_origins = [Rails.application.secrets.action_cable_url] - - ################################################################################ - # ReactOnRails will convert rails locales to javascript files for react-intl. - ################################################################################ - config.after_initialize do - ReactOnRails::LocalesToJs.new - end end end From 0af167125b18f6b695af4c9205103441eb889617 Mon Sep 17 00:00:00 2001 From: jasonych99 Date: Wed, 1 Mar 2017 12:24:28 +0100 Subject: [PATCH 13/13] react_on_rails 6.7.1 --- Gemfile | 2 +- Gemfile.lock | 94 ++++++++++++++++++++++++++-------------------------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/Gemfile b/Gemfile index c8fe71e07..8a6a9d8ea 100644 --- a/Gemfile +++ b/Gemfile @@ -38,7 +38,7 @@ gem "sdoc", group: :doc # Use Rails Html Sanitizer for HTML sanitization gem "rails-html-sanitizer" -gem "react_on_rails", "~> 6.4" +gem "react_on_rails", "~> 6.7.1" # See https://github.com/sstephenson/execjs#readme for more supported runtimes # mini_racer is probably faster than therubyracer diff --git a/Gemfile.lock b/Gemfile.lock index 9e493a4c1..251d1bb5a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,39 +1,39 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.0.0.1) - actionpack (= 5.0.0.1) + actioncable (5.0.1) + actionpack (= 5.0.1) nio4r (~> 1.2) websocket-driver (~> 0.6.1) - actionmailer (5.0.0.1) - actionpack (= 5.0.0.1) - actionview (= 5.0.0.1) - activejob (= 5.0.0.1) + actionmailer (5.0.1) + actionpack (= 5.0.1) + actionview (= 5.0.1) + activejob (= 5.0.1) mail (~> 2.5,>= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.0.0.1) - actionview (= 5.0.0.1) - activesupport (= 5.0.0.1) + actionpack (5.0.1) + actionview (= 5.0.1) + activesupport (= 5.0.1) rack (~> 2.0) rack-test (~> 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0,>= 1.0.2) - actionview (5.0.0.1) - activesupport (= 5.0.0.1) + actionview (5.0.1) + activesupport (= 5.0.1) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0,>= 1.0.2) - activejob (5.0.0.1) - activesupport (= 5.0.0.1) + activejob (5.0.1) + activesupport (= 5.0.1) globalid (>= 0.3.6) - activemodel (5.0.0.1) - activesupport (= 5.0.0.1) - activerecord (5.0.0.1) - activemodel (= 5.0.0.1) - activesupport (= 5.0.0.1) + activemodel (5.0.1) + activesupport (= 5.0.1) + activerecord (5.0.1) + activemodel (= 5.0.1) + activesupport (= 5.0.1) arel (~> 7.0) - activesupport (5.0.0.1) + activesupport (5.0.1) concurrent-ruby (~> 1.0,>= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) @@ -50,7 +50,7 @@ GEM binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) brakeman (3.4.1) - builder (3.2.2) + builder (3.2.3) bundler-audit (0.5.0) bundler (~> 1.2) thor (~> 0.18) @@ -82,7 +82,7 @@ GEM coffee-script-source execjs coffee-script-source (1.10.0) - concurrent-ruby (1.0.2) + concurrent-ruby (1.0.5) connection_pool (2.2.1) coveralls (0.8.15) json (>= 1.8, < 3) @@ -109,7 +109,7 @@ GEM railties (>= 3.0.0) globalid (0.3.7) activesupport (>= 4.1.0) - i18n (0.7.0) + i18n (0.8.1) interception (0.5) io-like (0.3.0) jbuilder (2.6.0) @@ -134,10 +134,10 @@ GEM mini_portile2 (2.1.0) mini_racer (0.1.7) libv8 (~> 5.3) - minitest (5.9.1) + minitest (5.10.1) multi_json (1.12.1) nio4r (1.2.1) - nokogiri (1.6.8.1) + nokogiri (1.7.0.1) mini_portile2 (~> 2.1.0) parser (2.3.2.0) ast (~> 2.2) @@ -165,41 +165,41 @@ GEM pry-stack_explorer (0.4.9.2) binding_of_caller (>= 0.7) pry (>= 0.9.11) - public_suffix (2.0.4) + public_suffix (2.0.5) puma (3.6.2) rack (2.0.1) rack-test (0.6.3) rack (>= 1.0) - rails (5.0.0.1) - actioncable (= 5.0.0.1) - actionmailer (= 5.0.0.1) - actionpack (= 5.0.0.1) - actionview (= 5.0.0.1) - activejob (= 5.0.0.1) - activemodel (= 5.0.0.1) - activerecord (= 5.0.0.1) - activesupport (= 5.0.0.1) + rails (5.0.1) + actioncable (= 5.0.1) + actionmailer (= 5.0.1) + actionpack (= 5.0.1) + actionview (= 5.0.1) + activejob (= 5.0.1) + activemodel (= 5.0.1) + activerecord (= 5.0.1) + activesupport (= 5.0.1) bundler (>= 1.3.0, < 2.0) - railties (= 5.0.0.1) + railties (= 5.0.1) sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.1) + rails-dom-testing (2.0.2) activesupport (>= 4.2.0, < 6.0) - nokogiri (~> 1.6.0) + nokogiri (~> 1.6) rails-html-sanitizer (1.0.3) loofah (~> 2.0) - railties (5.0.0.1) - actionpack (= 5.0.0.1) - activesupport (= 5.0.0.1) + railties (5.0.1) + actionpack (= 5.0.1) + activesupport (= 5.0.1) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rainbow (2.1.0) + rainbow (2.2.1) rake (11.3.0) rb-fsevent (0.9.8) rb-inotify (0.9.7) ffi (>= 0.5.0) rdoc (4.3.0) - react_on_rails (6.4.0) + react_on_rails (6.7.1) addressable connection_pool execjs (~> 2.5) @@ -264,7 +264,7 @@ GEM activesupport (>= 4.2) spring-commands-rspec (1.0.4) spring (>= 0.9.1) - sprockets (3.7.0) + sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.2.0) @@ -273,8 +273,8 @@ GEM sprockets (>= 3.0.0) term-ansicolor (1.4.0) tins (~> 1.0) - thor (0.19.1) - thread_safe (0.3.5) + thor (0.19.4) + thread_safe (0.3.6) tilt (2.0.5) tins (1.12.0) tzinfo (1.2.2) @@ -288,7 +288,7 @@ GEM debug_inspector railties (>= 5.0) websocket (1.2.3) - websocket-driver (0.6.4) + websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) xpath (2.0.0) @@ -329,7 +329,7 @@ DEPENDENCIES rails rails-html-sanitizer rainbow - react_on_rails (~> 6.4) + react_on_rails (~> 6.7.1) redis rspec-rails (~> 3) rspec-retry

AltStyle によって変換されたページ (->オリジナル) /