Skip to content

Commit

Permalink
fix: tramslations
Browse files Browse the repository at this point in the history
  • Loading branch information
zdm committed Feb 13, 2024
1 parent 91d6a5b commit bc0bd59
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions lib/package/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,22 @@ export default class {
}

// not translated
if ( !res.data || res.data === message.id ) continue;
else if ( !res.data || res.data === message.id ) {
console.warn( `Cloud translation API error:`, res + "" );

message.isFuzzy = true;
message.setTranslations( [ res.data ] );
continue;
}

console.log( `Cloud translation [${ poFile.language }]:
// translated from clous
else {
message.isFuzzy = true;
message.setTranslations( [ res.data ] );

console.log( `Cloud translation [${ poFile.language }]:
- ${ message.id }
- ${ res.data }
` );
}
}
}
}
Expand Down

0 comments on commit bc0bd59

Please sign in to comment.