File tree Expand file tree Collapse file tree 4 files changed +5191
-1203
lines changed
Expand file tree Collapse file tree 4 files changed +5191
-1203
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Angular. Vue. React. Vanilla JavaScript. All of these tools can be used to creat
1212
1313<!-- cspell:disable-next-line -->
1414
15- by [ Paul Halliday] ( https:: //developer.school )
15+ by [ Paul Halliday] ( https://developer.school )
1616
1717### [ Creating Ionic Applications with StencilJS] ( https://www.joshmorony.com/creating-ionic-applications-with-stencil-js/ ) - [ Free Preview] ( https://cdn2.hubspot.net/hubfs/3776657/PREVIEW-Creating-Ionic-Apps-with-StencilJS.pdf )
1818
Original file line number Diff line number Diff line change @@ -51,15 +51,19 @@ const apply = async () => {
5151 // return;
5252 // }
5353
54- const response = await translate ( {
55- free_api : true ,
56- text : translateText ,
57- source_lang : DeeplConfig . fromLanguage ,
58- target_lang : DeeplConfig . toLanguage ,
59- auth_key : process . env . DEEPLAUTHKEY ,
60- } ) ;
61- const translated = response . data . translations [ 0 ] . text ;
62- translatedNow [ translateText ] = translated ;
54+ try {
55+ const response = await translate ( {
56+ free_api : true ,
57+ text : translateText ,
58+ source_lang : DeeplConfig . fromLanguage ,
59+ target_lang : DeeplConfig . toLanguage ,
60+ auth_key : process . env . DEEPLAUTHKEY ,
61+ } ) ;
62+ const translated = response . data . translations [ 0 ] . text ;
63+ translatedNow [ translateText ] = translated ;
64+ } catch ( e ) {
65+ translatedNow [ translateText ] = translateText ;
66+ }
6367
6468 // ob[translateType.translateTargetKey] = ob[translateType.translateTargetKey] + `\n\n自動翻訳: ${translated}`;
6569 }
You can’t perform that action at this time.
0 commit comments