function analyzeSingleTranslation(key, translated, context) {
    const {errors: keyErrors, variables: defines} = parseTranslationString(key);
    const reportInvalidTranslations = !context.isIgnored('ghost/i18n/no-invalid-translations', key);

    // Report key parsing errors only for English translations.
    // I18next is responsible for keeping all other locales in sync.
    if (reportInvalidTranslations && context.file?.locale === 'en') {
        const {line, column} = context.getPositionForText(key, 'key');
        for (const error of keyErrors) {
            context.reportError(error.message, 'ghost/i18n/no-invalid-translations', line, column + error.column);
        }
    }

    if (!translated) {
        return;
    }

    const {errors, variables: used} = parseTranslationString(translated);

    if (reportInvalidTranslations) {
        const {line, column} = context.getPositionForText(key, 'value');
        for (const error of errors) {
            context.reportError(error.message, 'ghost/i18n/no-invalid-translations', line, column + error.column);
        }
    }

    const reportUnusedVariables = !context.isIgnored('ghost/i18n/no-unused-variables', key);
    const reportUndefinedVariables = !context.isIgnored('ghost/i18n/no-undefined-variables', key);

    if (!reportUndefinedVariables && !reportUnusedVariables) {
        return;
    }

    for (const [define, columnInKey] of defines.entries()) {
        // Use delete to remove the variable so `used` will only contain unused variables after this loop
        if (!used.delete(define) && reportUnusedVariables) {
            const rule = 'ghost/i18n/no-unused-variables';
            const file = context.relativeFilePath;
            const {line, column} = context.getPositionForText(key, 'key');
            context.reportError(
                `Translation does not use variable "${define}"`,
                rule,
                line,
                column + columnInKey,
                context.ignoreAll ? ignores => ignoreTranslationError(ignores, rule, file, key) : undefined
            );
        }
    }

    if (!reportUndefinedVariables) {
        return;
    }

    const {line, column} = context.getPositionForText(translated, 'value');
    for (const [unknownVariable, columnInTranslation] of used.entries()) {
        const rule = 'ghost/i18n/no-undefined-variables';
        const file = context.relativeFilePath;
        context.reportError(
            `Translation uses unknown variable "${unknownVariable}"`,
            rule,
            line,
            column + columnInTranslation,
            context.ignoreAll ? ignores => ignoreTranslationError(ignores, rule, file, key) : undefined
        );
    }
}
Reports all errors for a translation pair
@param {string} key the untranslated key to analyze
@param {string} translated the translated value to analyze
@param {LinterContext} context