Skip to content

Commit d38ae33

Browse files
authored
Merge pull request #864 from yukienomiya/fix-swap-script
Fix swap script for translation of the Reference pages
2 parents 369a2e6 + 3d46550 commit d38ae33

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/templates/pages/reference/index.hbs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,24 @@ slug: reference/
120120
// field
121121
$("[aria-labelledby='reference-fields']").children('li').each(function (i) {
122122
var fieldName = $(this).children('.paramname').children('a').text();
123-
$(this).children(':last').html('<p>' + entry[fieldName].description + '</p>');
123+
let descr = '';
124+
var paragraphs = entry[fieldName].description;
125+
for (var i in paragraphs) {
126+
descr += '<p>' + paragraphs[i] + '</p> ';
127+
}
128+
$(this).children('.paramtype').html(descr);
124129
});
125130
// method
126131
$("[aria-labelledby='reference-methods']").children('li').each(function (i) {
127-
var method = $(this).find(':first').children('a').text();
132+
var method = $(this).children('.paramname').children('a').text();
128133
// removes the brackets
129134
var methodName = method.substring(0, method.length - 2);
130-
$(this).find(':last').html('<p>' + entry[methodName].description + '</p>');
135+
let descr = '';
136+
var paragraphs = entry[methodName].description;
137+
for (var i in paragraphs) {
138+
descr += '<p>' + paragraphs[i] + '</p> ';
139+
}
140+
$(this).children('.paramtype').html(descr);
131141
});
132142
}
133143
}

0 commit comments

Comments
 (0)