Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ecommerce-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
ecommerce-ui
Commits
a3eb363d
Commit
a3eb363d
authored
Apr 16, 2014
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: fixed translation action
parent
2d1e8fe0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
js/erp5_loader.js
js/erp5_loader.js
+11
-7
No files found.
js/erp5_loader.js
View file @
a3eb363d
...
...
@@ -3056,6 +3056,11 @@
// TODO: figure out a way to translate per gadget!
// TODO: figure out if and how to translate meta easily
"
translate
"
:
function
(
obj
,
language
,
init
)
{
console
.
log
(
"
SO???
"
)
console
.
log
(
obj
)
console
.
log
(
language
)
console
.
log
(
init
)
var
class_list
,
lookup
,
new_language
,
...
...
@@ -3063,8 +3068,8 @@
current_language
=
$
.
i18n
.
lng
(),
shortcut
=
function
(
language
)
{
switch
(
language
)
{
case
"
zh-CN
"
:
return
"
flag-
cn
"
;
case
"
fr-FR
"
:
return
"
flag-
fr
"
;
case
"
en-EN
"
:
return
"
flag-en
"
;
}
...
...
@@ -3292,9 +3297,7 @@
**/
// TODO: allow to run multiple mappers eg formItem + tableRow
map
.
element
=
function
(
element
,
wrapper
,
i
)
{
console
.
log
(
element
)
if
(
wrapper
.
child_mapper
)
{
console
.
log
(
"
Child mapper...
"
);
if
(
element
.
scheme
)
{
// NOTE: chaining allows the mapper to make additional async requests!
return
map
[
wrapper
.
child_mapper
]({
...
...
@@ -3318,7 +3321,6 @@
})
.
fail
(
app
.
util
.
error
);
}
console
.
log
(
"
OUT
"
)
return
RSVP
.
resolve
(
wrapper
.
child_constructor
({
"
item
"
:
element
,
"
wrapper
"
:
wrapper
,
...
...
@@ -3403,8 +3405,6 @@
var
quirk_dict
,
section
,
pos
,
label
,
j
,
k
,
field
,
setter
,
record
,
new_item
,
id
,
key
,
obj
,
translation_fields
,
item
;
console
.
log
(
"
HELLO
"
)
console
.
log
(
spec
)
translation_fields
=
"
titletextlabel
"
;
quirk_dict
=
spec
.
wrapper
.
property_dict
;
item
=
spec
.
item
;
...
...
@@ -5033,6 +5033,10 @@
"
gadget
"
:
document
.
getElementById
(
id
)
};
if
(
response
.
gadget
===
null
)
{
return
response
;
}
has_form
=
response
.
gadget
.
getElementsByTagName
(
"
form
"
);
return
util
.
mergeObject
(
{
...
...
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