{"record":{"id":"c714d096c7820b63","repo":"bettercap/bettercap","slug":"i18n-postprocess-unmatched-icu-match-with-ke","errorCode":null,"errorMessage":"i18n postprocess: unmatched ICU - ${match} with key: ${key}","messagePattern":"i18n postprocess: unmatched ICU - (.+?) with key: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/ui/ui/vendor.js","lineNumber":52331,"sourceCode":"    // return current result if no replacements specified\n    if (!Object.keys(replacements).length) {\n        return result;\n    }\n    //\n    // Step 2: replace all ICU vars (like \"VAR_PLURAL\")\n    //\n    result = result.replace(PP_ICU_VARS, function (match, start, key, _type, _idx, end) {\n        return replacements.hasOwnProperty(key) ? \"\" + start + replacements[key] + end : match;\n    });\n    //\n    // Step 3: replace all ICU references with corresponding values (like �ICU_EXP_ICU_1�)\n    // in case multiple ICUs have the same placeholder name\n    //\n    result = result.replace(PP_ICUS, function (match, key) {\n        if (replacements.hasOwnProperty(key)) {\n            var list = replacements[key];\n            if (!list.length) {\n                throw new Error(\"i18n postprocess: unmatched ICU - \" + match + \" with key: \" + key);\n            }\n            return list.shift();\n        }\n        return match;\n    });\n    return result;\n}\n/**\n * Translates a translation block marked by `i18nStart` and `i18nEnd`. It inserts the text/ICU nodes\n * into the render tree, moves the placeholder nodes and removes the deleted nodes.\n */\nfunction i18nEnd() {\n    var tView = getTView();\n    ngDevMode && assertDefined(tView, \"tView should be defined\");\n    ngDevMode &&\n        assertEqual(tView.firstTemplatePass, true, \"You should only call i18nEnd on first template pass\");\n    if (tView.firstTemplatePass) {\n        i18nEndFirstPass(tView);","sourceCodeStart":52313,"sourceCodeEnd":52349,"githubUrl":"https://github.com/bettercap/bettercap/blob/8eca2820f3c41d2004434ed5a291d87462caeeb7/modules/ui/ui/vendor.js#L52313-L52349","documentation":"During i18n postprocessing Angular replaces ICU variable placeholders (like VAR_PLURAL) with values from the replacements map. If a key is absent from that map, the placeholder is left raw in the rendered message, indicating the translation ICU expression and the provided replacement values disagree.","triggerScenarios":"Thrown at modules/ui/ui/vendor.js:52331 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure all ICU variables referenced by the translated template are supplied in the replacements object","Re-extract translations after template changes so ICU placeholder names stay in sync","Inspect the translation unit (XLIFF/XTB) for a renamed or missing ICU variable"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8eca2820f3c41d2004434ed5a291d87462caeeb7","analyzedAt":"2026-09-02T12:49:00.712Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T16:17:10.729Z"}