jenseng / react-i18nliner

translate="yes" all the things
MIT License
45 stars 15 forks source link

dummy placeholders #2

Closed jenseng closed 9 years ago

jenseng commented 9 years ago

right now react-i18nliner doesn't play nicely with i18nliner-js' JsProcessor or the i18n-js runtime, because it generates I18n.t calls with placeholders that have no corresponding values. strictly speaking there are values, but not in the I18n.t arguments, they are props of the <I18n.ComponentInterpolator>

a quick fix that would obviate the need for changing i18nliner-js or i18n-js would be to simply have dummy placeholder values that put the placeholder right back, e.g. user="%{user}". long term though it'd be great if i18nliner-js/i18n-js supported it (e.g. translateWithoutInterpolation, or change lookup to support a string-instead-of-key and make it extractable)