You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to log a warning if an Interpolation value contains parsed values with no corresponding prop passed. It would be especially awesome if this could tie in with the i18n instance's debug setting. Basically I want to easily discover missing props
e.g.
{
"interpolateSample": "you can interpolate {{value}} or {{component}} via interpolate component!"
}
import React from 'react';
import { translate, Interpolate } from 'react-i18next';
function TranslatableView(props) {
const { t } = props;
let interpolateComponent = <strong>a interpolated component</strong>;
return (
<div>
<Interpolate i18nKey='ns:interpolateSample' stupid='"some string"' dumpTypo={interpolateComponent} />
</div>
)
}
Any thoughts on this?
The text was updated successfully, but these errors were encountered:
so using the i18n.services.logger.log (warn or error) is easy. If you like you might provide a PR...else i will look into this for future release...just not got the time right now.
Is there a way to log a warning if an Interpolation value contains parsed values with no corresponding prop passed. It would be especially awesome if this could tie in with the i18n instance's
debug
setting. Basically I want to easily discover missing propse.g.
Any thoughts on this?
The text was updated successfully, but these errors were encountered: