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
63534860
Commit
63534860
authored
Oct 31, 2018
by
Vladislav Lagunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Поддержка формата jed из po-loader
parent
ec8fcce2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
gettext/index.ts
+3
-1
No files found.
gettext/index.ts
View file @
63534860
...
@@ -121,7 +121,9 @@ export function requireTranslations(webpackContext /*: WebpackContext*/): Transl
...
@@ -121,7 +121,9 @@ export function requireTranslations(webpackContext /*: WebpackContext*/): Transl
*/
*/
function
assignData
(
dst
:
Translations
,
...
srcs
:
GettextData
[]):
Translations
{
function
assignData
(
dst
:
Translations
,
...
srcs
:
GettextData
[]):
Translations
{
srcs
.
forEach
(
data
=>
{
srcs
.
forEach
(
data
=>
{
const
locale_
=
data
[
''
].
language
||
data
[
''
].
locale
;
if
(
!
locale_
||
typeof
(
locale_
)
!==
'string'
)
return
;
// @ts-ignore
if
(
'locale_data'
in
data
)
data
=
data
[
'locale_data'
][
'messages'
];
const
locale_
=
data
[
''
].
language
||
data
[
''
].
lang
||
data
[
''
].
locale
;
if
(
!
locale_
||
typeof
(
locale_
)
!==
'string'
)
return
;
const
locale
=
locale_
.
replace
(
/_/g
,
'-'
);
const
locale
=
locale_
.
replace
(
/_/g
,
'-'
);
const
podata
=
data
[
'%podata'
];
const
podata
=
data
[
'%podata'
];
for
(
const
k
of
Object
.
keys
(
data
))
{
for
(
const
k
of
Object
.
keys
(
data
))
{
...
...
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