This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
me@home ~ $ translate | |
Usage: translate SOURCE_LANG TARGET_LANG TEXT... | |
me@home ~ $ translate de en Bank | |
bank | |
bench | |
seat | |
pew | |
settle | |
form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var ControlledInput = (function() { | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
return React.createClass({ | |
displayName: "ControlledInput", | |
getInitialState: function getInitialState() { | |
return { value: this.props.value }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Before: | |
// All interpolations are provided directly as props. | |
<Translate content="greeting" firstName="Peter" /> | |
// After: | |
// Interpolations are provided via the new `with` prop. | |
<Translate content="greeting" with={{ firstName: "Peter" }} /> |