Commit d67d4f07 by Vladislav Lagunov

Обновлен формат переводов в полях ввода

parent 1fdae3a5
......@@ -43,7 +43,7 @@ export type CardProps<T> = {
// Опции для `createForm`
export type CreateFormOptions<T> = {
validate?(value: T): any;
disabled?(value: T): any;
disabled?(value: T, instance): any;
};
......@@ -59,7 +59,7 @@ export default function createForm<O extends CreateFormOptions<any>>(options: O)
const { dispatch } = self.props;
const value = self.props.model.modified || self.props.model.initial;
const error = options.validate ? options.validate(value) : {};
const disabled = options.disabled ? options.disabled(value) : {};
const disabled = options.disabled ? options.disabled(value, self) : {};
const onValueChange = (value, at: ObjectPath=[]) => dispatch({ tag: 'Change', value, at });
const props_ = {
......
......@@ -7,7 +7,7 @@ import Modal from '@material-ui/core/Modal';
import Paper from '@material-ui/core/Paper';
import withStyles, { WithStyles, StyleRules } from '@material-ui/core/styles/withStyles';
import { StandardProps } from '@material-ui/core';
import PendingOverlay from '@bitmaster/components/PendingOverlay';
import PendingOverlay from '~/PendingOverlay';
import { LocaleCtx, Gettext, withGettext } from '~/gettext';
......@@ -192,7 +192,7 @@ class Suggestions<A> extends React.Component<Props<A>, State> {
}
}
export default withStyles(styles)(withGettext(require('./i18n.po.yml'))(Suggestions));
export default withStyles(styles)(withGettext(require('./i18n'))(Suggestions));
// Styles
......
......@@ -115,7 +115,7 @@ export class TextField extends React.Component<Props, State> {
}
}
export default withGettext(require('./i18n.po.yml'))(TextField);
export default withGettext(require('./i18n'))(TextField);
// CSS классы
......
# https://git.bitmaster.ru/npm/common/tree/master/gettext#%D0%A4%D0%BE%D1%80%D0%BC%D0%B0%D1%82-poyml
- "":
locale: "ru-RU"
"Fill out this field": "Заполните это поле"
"Nothing found…": "Ничего не найдено…"
export default (function (webpackContext) {
return webpackContext.keys().map(webpackContext);
})(require.context('./', false, /.*\.po$/));
msgid ""
msgstr ""
"Language: ru_RU\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "Fill out this field"
msgstr "Заполните это поле"
msgid "Nothing found…"
msgstr "Ничего не найдено…"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment