mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Add exceptions to not check for malformities
This commit is contained in:
@@ -15,6 +15,12 @@ const SLACK_CHANNEL = '#' + (nconf.get('TRANSIFEX_SLACK:channel') || 'general');
|
|||||||
const SLACK_USERNAME = 'Transifex';
|
const SLACK_USERNAME = 'Transifex';
|
||||||
const SLACK_EMOJI = ':transifex:';
|
const SLACK_EMOJI = ':transifex:';
|
||||||
|
|
||||||
|
const malformedStringExceptions = {
|
||||||
|
messageDropFood: true,
|
||||||
|
armoireFood: true,
|
||||||
|
feedPet: true
|
||||||
|
}
|
||||||
|
|
||||||
gulp.task('transifex', ['transifex:missingFiles', 'transifex:missingStrings', 'transifex:malformedStrings']);
|
gulp.task('transifex', ['transifex:missingFiles', 'transifex:missingStrings', 'transifex:malformedStrings']);
|
||||||
|
|
||||||
gulp.task('transifex:missingFiles', () => {
|
gulp.task('transifex:missingFiles', () => {
|
||||||
@@ -76,7 +82,7 @@ gulp.task('transifex:malformedStrings', () => {
|
|||||||
if (!translationOccurences) {
|
if (!translationOccurences) {
|
||||||
let malformedString = `${lang} - ${file} - ${key} - ${translationString}`;
|
let malformedString = `${lang} - ${file} - ${key} - ${translationString}`;
|
||||||
stringsWithMalformedInterpolations.push(malformedString);
|
stringsWithMalformedInterpolations.push(malformedString);
|
||||||
} else if (englishOccurences.length !== translationOccurences.length) {
|
} else if (englishOccurences.length !== translationOccurences.length && !malformedStringExceptions[key]) {
|
||||||
let missingInterploationString = `${lang} - ${file} - ${key} - ${translationString}`;
|
let missingInterploationString = `${lang} - ${file} - ${key} - ${translationString}`;
|
||||||
stringsWithIncorrectNumberOfInterpolations.push(missingInterploationString);
|
stringsWithIncorrectNumberOfInterpolations.push(missingInterploationString);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user