Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
common
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
npm
common
Commits
d67d4f07
Commit
d67d4f07
authored
Nov 23, 2018
by
Vladislav Lagunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Обновлен формат переводов в полях ввода
parent
1fdae3a5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
10 deletions
+20
-10
create-form/index.ts
+2
-2
fields/Suggestions.tsx
+2
-2
fields/TextField.tsx
+1
-1
fields/i18n.po.yml
+0
-5
fields/i18n/index.js
+3
-0
fields/i18n/ru.po
+12
-0
No files found.
create-form/index.ts
View file @
d67d4f07
...
@@ -43,7 +43,7 @@ export type CardProps<T> = {
...
@@ -43,7 +43,7 @@ export type CardProps<T> = {
// Опции для `createForm`
// Опции для `createForm`
export
type
CreateFormOptions
<
T
>
=
{
export
type
CreateFormOptions
<
T
>
=
{
validate
?(
value
:
T
):
any
;
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)
...
@@ -59,7 +59,7 @@ export default function createForm<O extends CreateFormOptions<any>>(options: O)
const
{
dispatch
}
=
self
.
props
;
const
{
dispatch
}
=
self
.
props
;
const
value
=
self
.
props
.
model
.
modified
||
self
.
props
.
model
.
initial
;
const
value
=
self
.
props
.
model
.
modified
||
self
.
props
.
model
.
initial
;
const
error
=
options
.
validate
?
options
.
validate
(
value
)
:
{};
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
onValueChange
=
(
value
,
at
:
ObjectPath
=
[])
=>
dispatch
({
tag
:
'Change'
,
value
,
at
});
const
props_
=
{
const
props_
=
{
...
...
fields/Suggestions.tsx
View file @
d67d4f07
...
@@ -7,7 +7,7 @@ import Modal from '@material-ui/core/Modal';
...
@@ -7,7 +7,7 @@ import Modal from '@material-ui/core/Modal';
import
Paper
from
'@material-ui/core/Paper'
;
import
Paper
from
'@material-ui/core/Paper'
;
import
withStyles
,
{
WithStyles
,
StyleRules
}
from
'@material-ui/core/styles/withStyles'
;
import
withStyles
,
{
WithStyles
,
StyleRules
}
from
'@material-ui/core/styles/withStyles'
;
import
{
StandardProps
}
from
'@material-ui/core'
;
import
{
StandardProps
}
from
'@material-ui/core'
;
import
PendingOverlay
from
'
@bitmaster/components
/PendingOverlay'
;
import
PendingOverlay
from
'
~
/PendingOverlay'
;
import
{
LocaleCtx
,
Gettext
,
withGettext
}
from
'~/gettext'
;
import
{
LocaleCtx
,
Gettext
,
withGettext
}
from
'~/gettext'
;
...
@@ -192,7 +192,7 @@ class Suggestions<A> extends React.Component<Props<A>, State> {
...
@@ -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
// Styles
...
...
fields/TextField.tsx
View file @
d67d4f07
...
@@ -115,7 +115,7 @@ export class TextField extends React.Component<Props, State> {
...
@@ -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 классы
// CSS классы
...
...
fields/i18n.po.yml
deleted
100644 → 0
View file @
1fdae3a5
# 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…"
:
"
Ничего
не
найдено…"
fields/i18n/index.js
0 → 100644
View file @
d67d4f07
export
default
(
function
(
webpackContext
)
{
return
webpackContext
.
keys
().
map
(
webpackContext
);
})(
require
.
context
(
'./'
,
false
,
/.*
\.
po$/
));
fields/i18n/ru.po
0 → 100644
View file @
d67d4f07
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 "Ничего не найдено…"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment