react-i18nliner
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -44,11 +44,12 @@ var subjector = require('../test_utils/subjector'); | ||
var subject = Subject({ | ||
string: 'Hi %{user}, create %{count} new accounts', | ||
string: 'Hi %{user} (%{user_id}), create %{count} new accounts', | ||
wrappers: {}, | ||
user: "Jane", | ||
user_id: 0, | ||
count: <input /> | ||
}, ["$1"]); | ||
expect(removeNoise(subject.getDOMNode().innerHTML)).toEqual( | ||
'Hi Jane, create <input> new accounts' | ||
'Hi Jane (0), create <input> new accounts' | ||
); | ||
}); | ||
}); |
@@ -106,5 +106,6 @@ var React = require('react'); | ||
invariant( | ||
child = this.props[token], | ||
this.props.hasOwnProperty(token), | ||
`<ComponentInterpolator> expected '${token}' placeholder value, none found` | ||
); | ||
child = this.props[token]; | ||
child = child.type ? cloneWithProps(child, {key: tokens.length}) : child; | ||
@@ -111,0 +112,0 @@ children.push(child); |
@@ -7,3 +7,3 @@ var fs = require("fs"); | ||
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); | ||
} | ||
}; | ||
@@ -10,0 +10,0 @@ var getTranslatePattern = function(config) { |
{ | ||
"name": "react-i18nliner", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "i18n made simple", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
34947
632