Revision 60e4da4c
Added by Amir Fefer over 5 years ago
webpack/assets/javascripts/react_app/common/reduxFormI18n.js | ||
---|---|---|
import Validators from 'redux-form-validators';
|
||
import { sprintf, translate as __ } from '../../react_app/common/I18n';
|
||
|
||
Validators.formatMessage = (props) => {
|
||
// reusing existing form strings.
|
||
... | ... | |
const msg = validations[props.id.replace('form.errors.', '')] || props.defaultMessage;
|
||
if (props.values) {
|
||
// eslint-disable-next-line no-undef
|
||
return Jed.sprintf(__(msg), props.values.count);
|
||
return sprintf(msg, props.values.count);
|
||
}
|
||
return __(msg);
|
||
};
|
Also available in: Unified diff
Fixes #17263 - move jed (i18n) to webpack