nodejs/node · error
U_UNSUPPORTED_ERROR
U_UNSUPPORTED_ERROR
Error message
Multiple @translate tags cannot be supported.
What it means
While counting @translate comment annotations in resource bundle strings, genrb found more than one @translate tag in the same set of translation comments. ICU resource bundles support @translate as a special comment directive for marking translation status, but only one instance per string is supported. The tool exits the process with U_UNSUPPORTED_ERROR — this is a fatal, non-recoverable error.
Source
Thrown at deps/icu-small/source/tools/genrb/prscmnts.cpp:178
if (U_FAILURE(*status)) {
return 0;
}
int32_t retLen = pattern->split(src, stringArray, MAX_SPLIT_STRINGS, *status);
UnicodeString patternString(patternStrings[option]);
RegexMatcher matcher(patternString, UREGEX_DOTALL, *status);
if (U_FAILURE(*status)) {
return 0;
}
int32_t count = 0;
for(int32_t i=0; i<retLen; i++){
matcher.reset(stringArray[i]);
if(matcher.lookingAt(*status)){
count++;
}
}
if(option == UPC_TRANSLATE && count > 1){
fprintf(stderr, "Multiple @translate tags cannot be supported.\n");
exit(U_UNSUPPORTED_ERROR);
}
return count;
}
U_CFUNC int32_t
getAt(const char16_t* source, int32_t srcLen,
char16_t** dest, int32_t destCapacity,
int32_t index,
UParseCommentsOption option,
UErrorCode* status){
if(status == nullptr || U_FAILURE(*status)){
return 0;
}
UnicodeString stringArray[MAX_SPLIT_STRINGS];
RegexPattern *pattern = RegexPattern::compile(UnicodeString("@"), UREGEX_MULTILINE, *status);View on GitHub (pinned to 1b2de5e052)
Solutions
- Search the resource bundle .txt file for duplicate @translate tags: `grep -n '@translate' <file.txt>`
- Remove all but one @translate tag from each string's comment block
- If using translation management tooling, configure it to overwrite rather than append @translate directives
- Run genrb with validation-only mode first (if available) to detect comment issues before full compilation
Example fix
// before: duplicate @translate tags
greeting {
// @translate
// @translate
"Hello"
}
// after: single @translate tag
greeting {
// @translate
"Hello"
} Defensive patterns
Strategy: validation
Validate before calling
# Check for duplicate @translate tags before running genrb
for f in data/*.txt; do
count=$(grep -c '@translate' "$f" 2>/dev/null || echo 0)
# Check per-string: look for multiple @translate within the same comment block
awk '/@translate/{c++} /^\\s*"/{if(c>1)print FILENAME":"NR": "c" @translate tags"; c=0}' "$f"
done Prevention
- Check for duplicate @translate tags before running genrb
- Configure translation management tools to overwrite rather than append @translate directives
- Establish a convention for @translate placement in resource bundle comments
- Run a pre-build validation script that scans for duplicate comment directives
When it happens
Trigger: A resource bundle .txt file containing a string with multiple @translate directives in its comment block. The regex matcher counts @translate occurrences across the comment string array; if count > 1 with the UPC_TRANSLATE option, the tool exits immediately via exit(U_UNSUPPORTED_ERROR).
Common situations: Merging translation files that each add their own @translate tag; automated tooling that appends @translate without checking for an existing one; copy-pasting a translated string with its comment block that already contains @translate.
Related errors
- Illegal utf-8 sequence at Column: %d\n
- %s: error in command line argument "%s"\n
- %s: Error: don't specify an encoding (-e) when writing to st
- %s: error in command line argument "%s"\n
- %s: cannot combine --writePoolBundle and --usePoolBundle\n
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/744745f0dbc53231.
Report an issue: GitHub.