From 86907d8faa70cabeb589e348a204c61ad672cb3b Mon Sep 17 00:00:00 2001 From: sameer1994kiki <983625074@qq.com> Date: Sat, 28 Jul 2018 15:21:36 +0800 Subject: [PATCH 1/2] dkx redux translate --- 03-front-end-libraries/redux.json | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/03-front-end-libraries/redux.json b/03-front-end-libraries/redux.json index 831f8c1..eab5052 100644 --- a/03-front-end-libraries/redux.json +++ b/03-front-end-libraries/redux.json @@ -14,16 +14,16 @@ "challenges": [ { "id": "5a24c314108439a4d403614b", - "title": "Create a Redux Store", + "title": "创建一个 Redux Store", "releasedOn": "December 25, 2017", "description": [ - "Redux is a state management framework that can be used with a number of different web technologies, including React.", - "In Redux, there is a single state object that's responsible for the entire state of your application. This means if you had a React app with ten components, and each component had its own local state, the entire state of your app would be defined by a single state object housed in the Redux store. This is the first important principle to understand when learning Redux: the Redux store is the single source of truth when it comes to application state.", - "This also means that any time any piece of your app wants to update state, it must do so through the Redux store. The unidirectional data flow makes it easier to track state management in your app.", - "
", - "The Redux store is an object which holds and manages application state. There is a method called createStore() on the Redux object, which you use to create the Redux store. This method takes a reducer function as a required argument. The reducer function is covered in a later challenge, and is already defined for you in the code editor. It simply takes state as an argument and returns state.", - "Declare a store variable and assign it to the createStore() method, passing in the reducer as an argument.", - "Note: The code in the editor uses ES6 default argument syntax to initialize this state to hold a value of 5. If you're not familiar with default arguments, you can refer to the ES6 section in the Beta Curriculum which covers this topic." + "Redux是一个状态管理框架,可以与包括React在内的许多不同的Web技术一起使用" + "在Redux中,有一个状态对象负责应用程序的整个状态, 这意味着如果你有一个包含十个组件且每个组件都有自己的本地状态的React项目,那么这个项目的整个状态将通过Redux store 被定义为单个状态对象, 这是学习Redux时要理解的第一个重要原则:Redux存储是应用程序状态的唯一真实来源", + "这也意味着,如果你的应用程序想要更新状态,只能通过Redux store执行,单向数据流可以更轻松地对应用程序中的状态进行监测管理", + + "“Redux store 是一个保存和管理应用程序状态的 state ,你可以Redux对象中的 createStore() 来创建一个 redux store . 此方法将 reducer 函数作为必需参数, reducer 函数将在后面的挑战中介绍,该函数已在代码编辑器中为您定义。它只需将 state 作为参数并返回一个 state 即可", + "声明一个 store 变量并把它分配给 createStore() 方法,然后把 reducer 作为一个参数传入即可", + "注意: 编辑器中的代码使用ES6默认参数语法初始化此状态以保存 5 的值. 如果你不熟悉默认参数,,你可以参考 ES6课程,它里面涵盖了这个内容" ], "files": { "indexjsx": { @@ -35,9 +35,9 @@ " return state;", "}", "", - "// Redux methods are available from a Redux object", - "// For example: Redux.createStore()", - "// Define the store here:", + "// Redux方法可以从Redux对象获得", + "// 例如: Redux.createStore()", + "// 在这里定义一个store:", "", "" ], @@ -47,16 +47,16 @@ }, "tests": [ { - "text": "The redux store exists.", - "testString": "assert(typeof store.getState === 'function', 'The redux store exists.');" + "text": "redux store 已经存在", + "testString": "assert(typeof store.getState === 'function', 'redux store 已经存在');" }, { - "text": "The redux store has a value of 5 for the state.", - "testString": "assert(store.getState()=== 5, 'The redux store has a value of 5 for the state.');" + "text": "redux store的state的值为5", + "testString": "assert(store.getState()=== 5, 'redux store的state的值为5');" } ], "solutions": [ - "const reducer = (state = 5) => {\n return state;\n}\n\n// Redux methods are available from a Redux object\n// For example: Redux.createStore()\n// Define the store here:\n\nconst store = Redux.createStore(reducer);" + "const reducer = (state = 5) => {\n return state;\n}\n\n// Redux方法可以从Redux对象获得\n// 例如: Redux.createStore()\n// 在这里定义一个store:\n\nconst store = Redux.createStore(reducer);" ], "challengeType": 6, "isRequired": false, @@ -64,7 +64,7 @@ }, { "id": "5a24c314108439a4d403614c", - "title": "Get State from the Redux Store", + "title": "从Redux store中获取state", "releasedOn": "December 25, 2017", "description": [ "The Redux store object provides several methods that allow you to interact with it. For example, you can retrieve the current state held in the Redux store object with the getState() method.", @@ -1135,4 +1135,4 @@ "redux": true } ] -} \ No newline at end of file +} From c8200567c6a6bf526dcd9ed345d5c04c3bc3974f Mon Sep 17 00:00:00 2001 From: sameer1994kiki <983625074@qq.com> Date: Sat, 28 Jul 2018 15:57:42 +0800 Subject: [PATCH 2/2] dkx translate redux 1/17 ,my first translation --- 03-front-end-libraries/redux.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/03-front-end-libraries/redux.json b/03-front-end-libraries/redux.json index eab5052..2a62726 100644 --- a/03-front-end-libraries/redux.json +++ b/03-front-end-libraries/redux.json @@ -14,16 +14,16 @@ "challenges": [ { "id": "5a24c314108439a4d403614b", - "title": "创建一个 Redux Store", + "title": "Create a Redux Store", "releasedOn": "December 25, 2017", "description": [ - "Redux是一个状态管理框架,可以与包括React在内的许多不同的Web技术一起使用" - "在Redux中,有一个状态对象负责应用程序的整个状态, 这意味着如果你有一个包含十个组件且每个组件都有自己的本地状态的React项目,那么这个项目的整个状态将通过Redux store 被定义为单个状态对象, 这是学习Redux时要理解的第一个重要原则:Redux存储是应用程序状态的唯一真实来源", - "这也意味着,如果你的应用程序想要更新状态,只能通过Redux store执行,单向数据流可以更轻松地对应用程序中的状态进行监测管理", + "Redux 是一个状态管理框架,可以与包括 React 在内的许多不同的 Web 技术一起使用。", + "在 Redux 中,有一个状态对象负责应用程序的整个状态, 这意味着如果你有一个包含十个组件且每个组件都有自己的本地状态的 React 项目,那么这个项目的整个状态将通过 Redux store 被定义为单个状态对象, 这是学习 Redux 时要理解的第一个重要原则:Redux 存储是应用程序状态的唯一真实来源。", + "这也意味着,如果你的应用程序想要更新状态,只能通过 Redux store 执行,单向数据流可以更轻松地对应用程序中的状态进行监测管理。", - "“Redux store 是一个保存和管理应用程序状态的 state ,你可以Redux对象中的 createStore() 来创建一个 redux store . 此方法将 reducer 函数作为必需参数, reducer 函数将在后面的挑战中介绍,该函数已在代码编辑器中为您定义。它只需将 state 作为参数并返回一个 state 即可", - "声明一个 store 变量并把它分配给 createStore() 方法,然后把 reducer 作为一个参数传入即可", - "注意: 编辑器中的代码使用ES6默认参数语法初始化此状态以保存 5 的值. 如果你不熟悉默认参数,,你可以参考 ES6课程,它里面涵盖了这个内容" + "Redux store 是一个保存和管理应用程序状态的 state,你可以使用Redux对象中的 createStore() 来创建一个 redux store,此方法将 reducer 函数作为必需参数,reducer 函数将在后面的挑战中介绍,该函数已在代码编辑器中为您定义,它只需将 state 作为参数并返回一个 state 即可。", + "声明一个 store 变量并把它分配给 createStore() 方法,然后把 reducer 作为一个参数传入即可。", + "注意: 编辑器中的代码使用ES6默认参数语法初始化 state 以保存 5 的值, 如果你不熟悉默认参数,你可以参考ES6全部课程,它里面涵盖了这个内容。" ], "files": { "indexjsx": { @@ -35,9 +35,9 @@ " return state;", "}", "", - "// Redux方法可以从Redux对象获得", + "// Redux 方法可以从 Redux 对象获得", "// 例如: Redux.createStore()", - "// 在这里定义一个store:", + "// 在这里定义一个 store :", "", "" ], @@ -51,12 +51,12 @@ "testString": "assert(typeof store.getState === 'function', 'redux store 已经存在');" }, { - "text": "redux store的state的值为5", - "testString": "assert(store.getState()=== 5, 'redux store的state的值为5');" + "text": "redux store 的 state 的值为 5", + "testString": "assert(store.getState()=== 5, 'redux store 的 state 的值为 5');" } ], "solutions": [ - "const reducer = (state = 5) => {\n return state;\n}\n\n// Redux方法可以从Redux对象获得\n// 例如: Redux.createStore()\n// 在这里定义一个store:\n\nconst store = Redux.createStore(reducer);" + "const reducer = (state = 5) => {\n return state;\n}\n\n// Redux 方法可以从 Redux 对象获得\n// 例如: Redux.createStore()\n// 在这里定义一个 store:\n\nconst store = Redux.createStore(reducer);" ], "challengeType": 6, "isRequired": false, @@ -64,7 +64,7 @@ }, { "id": "5a24c314108439a4d403614c", - "title": "从Redux store中获取state", + "title": "Get State from the Redux Store", "releasedOn": "December 25, 2017", "description": [ "The Redux store object provides several methods that allow you to interact with it. For example, you can retrieve the current state held in the Redux store object with the getState() method.",