test: check replaced iff translatable comment
All translatable comments should be replaced, but nothing else.
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
d2ecd03013
commit
793fa8fb52
@ -28,6 +28,17 @@ const COMMENT_TRANSLATIONS = createCommentMap(
|
||||
path.resolve(__dirname, './dictionaries')
|
||||
);
|
||||
|
||||
function getTranslatableComments(dictionariesDir) {
|
||||
const { COMMENTS_TO_TRANSLATE } = require(path.resolve(
|
||||
dictionariesDir,
|
||||
'english',
|
||||
'comments'
|
||||
));
|
||||
return COMMENTS_TO_TRANSLATE.map(({ text }) => text);
|
||||
}
|
||||
|
||||
exports.getTranslatableComments = getTranslatableComments;
|
||||
|
||||
function createCommentMap(dictionariesDir) {
|
||||
// get all the languages for which there are dictionaries.
|
||||
const languages = fs
|
||||
|
Reference in New Issue
Block a user