Skip to content

Commit

Permalink
fix: tramslations
Browse files Browse the repository at this point in the history
  • Loading branch information
zdm committed Feb 14, 2024
1 parent 4e8eaba commit b6b7f33
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/package/localization.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export default class {
// delete invalid translation
if ( message.id === message.translations?.[ 0 ] ) {
console.warn( `Failed translation removed:
[en] message:
${ message.id }
Expand Down Expand Up @@ -240,6 +241,7 @@ ${ message.translations[ 0 ] }
// not translated
else if ( !res.data || res.data === message.id ) {
console.warn( `Cloud translation failed:
[en] message:
${ message.id }
` );
Expand All @@ -251,6 +253,7 @@ ${ message.id }
message.setSingleFormTranslation( res.data );

console.log( `Cloud translation:
[en] message:
${ message.id }
Expand All @@ -274,10 +277,11 @@ ${ res.data }

if ( message.pluralId && translatedMessage.msgid_plural && message.pluralId !== translatedMessage.msgid_plural ) {
console.error( `Plural form conflict found:
message:
[en] message:
${ message.id }
Old plural form:
[en] Old plural form:
${ translatedMessage.msgid_plural }
Mew plural form:
Expand All @@ -292,6 +296,7 @@ Please, check thet plural forms for this message are the same in all your source
// translation memory conflict
if ( messageHash !== translatedMessageHash ) {
console.log( `Translation memory conflict found:
[en] message:
${ message.id }
Expand Down

0 comments on commit b6b7f33

Please sign in to comment.