You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Update version to 1.1.0 in package.json
- Add v1.1.0 changelog with fixes, additions, and changes
- Update @SInCE tags from TBD to 1.1.0
- Apply code formatting improvements
// Ensure we have exactly the right number of forms.
125
125
if(correctedForms.length<expectedCount){
@@ -128,10 +128,7 @@ function validatePluralForms(forms, originalMsgid, expectedCount, itemId, logger
128
128
issues.push(`insufficient forms (expected ${expectedCount}, got ${correctedForms.length})`);
129
129
130
130
if(verbosityLevel>=2){
131
-
logger.warn(
132
-
`Insufficient plural forms at index ${itemId} for "${originalMsgid.substring(0,50)}...": `+
133
-
`Expected ${expectedCount}, got ${correctedForms.length}. Padding with first form as fallback.`
134
-
);
131
+
logger.warn(`Insufficient plural forms at index ${itemId} for "${originalMsgid.substring(0,50)}...": `+`Expected ${expectedCount}, got ${correctedForms.length}. Padding with first form as fallback.`);
135
132
}
136
133
137
134
while(correctedForms.length<expectedCount){
@@ -143,36 +140,28 @@ function validatePluralForms(forms, originalMsgid, expectedCount, itemId, logger
143
140
issues.push(`excess forms (expected ${expectedCount}, got ${correctedForms.length})`);
144
141
145
142
if(verbosityLevel>=2){
146
-
logger.warn(
147
-
`Too many plural forms at index ${itemId} for "${originalMsgid.substring(0,50)}...": `+
logger.warn(`Too many plural forms at index ${itemId} for "${originalMsgid.substring(0,50)}...": `+`Expected ${expectedCount}, got ${correctedForms.length}. Truncating.`);
issues.push(`incomplete forms (empty at indices [${emptyIndices.join(', ')}])`);
166
158
167
159
if(verbosityLevel>=2){
168
-
logger.warn(
169
-
`Incomplete plural forms at index ${itemId} for "${originalMsgid.substring(0,50)}...": `+
170
-
`Forms at indices [${emptyIndices.join(', ')}] are empty. Filling with first form as fallback.`
171
-
);
160
+
logger.warn(`Incomplete plural forms at index ${itemId} for "${originalMsgid.substring(0,50)}...": `+`Forms at indices [${emptyIndices.join(', ')}] are empty. Filling with first form as fallback.`);
172
161
}
173
162
174
163
// Fill empty forms with the first non-empty form as fallback.
175
-
correctedForms=correctedForms.map(f=>(f&&f.trim()!=='') ? f : fallbackForm);
164
+
correctedForms=correctedForms.map((f)=>(f&&f.trim()!=='' ? f : fallbackForm));
// If this entry expects plural forms, validate the result
294
276
if(batch[batchIndex].msgid_plural){
295
277
if(verbosityLevel>=2){
296
-
logger.warn(
297
-
`Missing plural forms at index ${responseIndex} for "${batch[batchIndex].msgid.substring(0,50)}...": `+
298
-
`Expected ${pluralCount} forms but received singular translation. Using single translation for form 0 only.`
299
-
);
278
+
logger.warn(`Missing plural forms at index ${responseIndex} for "${batch[batchIndex].msgid.substring(0,50)}...": `+`Expected ${pluralCount} forms but received singular translation. Using single translation for form 0 only.`);
0 commit comments