File tree 1 file changed +8
-3
lines changed 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ plugin.getProblem = function(problem, cb) {
137
137
' sampleTestCase' ,
138
138
' enableRunCode' ,
139
139
' metaData' ,
140
- ' discussCategoryId ' ,
140
+ ' translatedContent ' ,
141
141
' }' ,
142
142
'}'
143
143
] . join ( '\n' ) ,
@@ -156,12 +156,17 @@ plugin.getProblem = function(problem, cb) {
156
156
157
157
problem . totalAC = JSON . parse ( q . stats ) . totalAccepted ;
158
158
problem . totalSubmit = JSON . parse ( q . stats ) . totalSubmission ;
159
- problem . desc = he . decode ( cheerio . load ( q . content ) . root ( ) . text ( ) ) ;
159
+ if ( ! q . translatedContent ) {
160
+ problem . desc = he . decode ( cheerio . load ( q . content ) . root ( ) . text ( ) ) ;
161
+ } else {
162
+ problem . desc = he . decode ( cheerio . load ( q . translatedContent ) . root ( ) . text ( ) ) ;
163
+ }
160
164
problem . templates = JSON . parse ( q . codeDefinition ) ;
161
165
problem . testcase = q . sampleTestCase ;
162
166
problem . testable = q . enableRunCode ;
163
167
problem . templateMeta = JSON . parse ( q . metaData ) ;
164
- problem . discuss = q . discussCategoryId ;
168
+ // @si -yao: seems below property is never used.
169
+ //problem.discuss = q.discussCategoryId;
165
170
166
171
return cb ( null , problem ) ;
167
172
} ) ;
You can’t perform that action at this time.
0 commit comments