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 1e44e31 commit 77f336c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/package/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@ export default class {
for ( const message of Object.values( poFile.messages ) ) {
if ( message.isDisabled ) continue;

// delete invalid translation
if ( message.id === message.translations?.[ 0 ] ) {
console.warn( `Failed translation removed:
- [en]: ${ message.id }
- [${ poFile.language }]: ${ message.translations[ 0 ] }
` );

message.setTranslations();
}

// message is fully translated
if ( message.isTranslated && !message.isFuzzy ) {

Expand Down

0 comments on commit 77f336c

Please sign in to comment.