2020-02-25 09:20:14 +00:00
|
|
|
// this can go once all certs have been audited.
|
2021-01-31 13:53:27 +00:00
|
|
|
|
|
|
|
// Currently the auditing is going through Crowdin, so once a cert has been 100%
|
|
|
|
// proofread, we can add it in here. That means that translations can come
|
|
|
|
// through from Crowdin whenever they are done, but we don't show them on the
|
|
|
|
// client until we decide the entire cert is ready.
|
|
|
|
|
2021-02-11 12:40:32 +00:00
|
|
|
// NOTE: certificates themselves (.yml files) are not currently being
|
2021-01-31 13:53:27 +00:00
|
|
|
// translated, but when they are they can be included by adding 'certificates'
|
|
|
|
// to the arrays below
|
|
|
|
|
2021-06-15 17:37:52 +00:00
|
|
|
const { auditedCerts } = require('../config/i18n/all-langs');
|
2021-01-31 13:53:27 +00:00
|
|
|
|
2020-02-25 09:20:14 +00:00
|
|
|
function isAuditedCert(lang, cert) {
|
|
|
|
if (!lang || !cert)
|
|
|
|
throw Error('Both arguments must be provided for auditing');
|
2021-01-31 13:53:27 +00:00
|
|
|
return lang === 'english' || auditedCerts[lang].includes(cert);
|
2020-02-25 09:20:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
exports.isAuditedCert = isAuditedCert;
|