remove line number from warnings

This commit is contained in:
Matteias Collet 2020-08-16 07:42:37 +02:00
parent 6cb3392222
commit e8288f6525
3 changed files with 11 additions and 11 deletions

View file

@ -1,4 +1,4 @@
name: Pull Request
name: Build
on:
push:

View file

@ -52,8 +52,8 @@ translations.forEach((t) => {
const value = getNestedProperty(t.values, p);
if (value == null || typeof value !== 'string') {
console.warn(`${t.lang} is missing a translation at '${p}'`);
console.warn(
`::warning file=compare_translations.js,line=55,col=6::${t.lang} is missing a translation at '${p}'`,
console.log(
`::warning file=compare_translations.js::${t.lang} is missing a translation at '${p}'`,
);
}
});

View file

@ -103,8 +103,8 @@ const validateXML = (xmlString) => {
console.warn(
`Missing title translation for code '${codeTitle.textContent}' and locale ${localeIdentifiers[j]}`,
);
console.warn(
`::warning file=inject_codes.js,line=107,col=10::Missing title translation for code '${codeTitle.textContent}' and locale ${localeIdentifiers[j]}`,
console.log(
`::warning file=inject_codes.js::Missing title translation for code '${codeTitle.textContent}' and locale ${localeIdentifiers[j]}`,
);
}
@ -118,8 +118,8 @@ const validateXML = (xmlString) => {
console.warn(
`Missing description translation for code '${codeTitle.textContent}' and locale ${localeIdentifiers[j]}`,
);
console.warn(
`::warning file=inject_codes.js,line=122,col=10::Missing description translation for code '${codeTitle.textContent}' and locale ${localeIdentifiers[j]}`,
console.log(
`::warning file=inject_codes.js::Missing description translation for code '${codeTitle.textContent}' and locale ${localeIdentifiers[j]}`,
);
}
@ -136,8 +136,8 @@ const validateXML = (xmlString) => {
console.warn(
`Missing source on code '${codeTitle.textContent}' for version ${CODE_VERSIONS[j]}`,
);
console.warn(
`::warning file=inject_codes.js,line=140,col=10::Missing source on code '${codeTitle.textContent}' for version ${CODE_VERSIONS[j]}`,
console.log(
`::warning file=inject_codes.js::Missing source on code '${codeTitle.textContent}' for version ${CODE_VERSIONS[j]}`,
);
}
@ -168,8 +168,8 @@ const readTextNode = (node, identifier, lang = null, fallbackLang = null) => {
const codeTitle = node.querySelector(`title[lang='en-US']`);
console.warn(`No translation found for code '${codeTitle.textContent}' for locale ${lang}`);
console.warn(
`::warning file=inject_codes.js,line=172,col=6::No translation found for code '${codeTitle.textContent}' for locale ${lang}`,
console.log(
`::warning file=inject_codes.js::No translation found for code '${codeTitle.textContent}' for locale ${lang}`,
);
if (!fallbackLang) throw new Error(`No localized ${identifier} found on ${node.textContent}`);