This commit is contained in:
windingwind 2024-06-09 14:48:25 +08:00
parent bd2539d3f2
commit f6e3f318cc

View File

@ -72,6 +72,11 @@ function _getString(
return localStringWithPrefix; return localStringWithPrefix;
} }
if (branch && pattern.attributes) { if (branch && pattern.attributes) {
for (const attr of pattern.attributes) {
if (attr.name === branch) {
return attr.value;
}
}
return pattern.attributes[branch] || localStringWithPrefix; return pattern.attributes[branch] || localStringWithPrefix;
} else { } else {
return pattern.value || localStringWithPrefix; return pattern.value || localStringWithPrefix;