File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ plugin.getProblem = function(problem, cb) {
137
137
' sampleTestCase' ,
138
138
' enableRunCode' ,
139
139
' metaData' ,
140
+ ' translatedContent' ,
140
141
' discussCategoryId' ,
141
142
' }' ,
142
143
'}'
@@ -156,7 +157,11 @@ plugin.getProblem = function(problem, cb) {
156
157
157
158
problem . totalAC = JSON . parse ( q . stats ) . totalAccepted ;
158
159
problem . totalSubmit = JSON . parse ( q . stats ) . totalSubmission ;
159
- problem . desc = he . decode ( cheerio . load ( q . content ) . root ( ) . text ( ) ) ;
160
+ if ( ! q . translatedContent ) {
161
+ problem . desc = he . decode ( cheerio . load ( q . content ) . root ( ) . text ( ) ) ;
162
+ } else {
163
+ problem . desc = he . decode ( cheerio . load ( q . translatedContent ) . root ( ) . text ( ) ) ;
164
+ }
160
165
problem . templates = JSON . parse ( q . codeDefinition ) ;
161
166
problem . testcase = q . sampleTestCase ;
162
167
problem . testable = q . enableRunCode ;
You can’t perform that action at this time.
0 commit comments