mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-21 18:43:23 +00:00
Remove address part if translation matches <.*>
This commit is contained in:
@@ -94,8 +94,12 @@ export function localize(obj) {
|
||||
val = obj.tags && obj.tags[tag],
|
||||
str = t(key, { default: val });
|
||||
|
||||
if (str && str.match(/^<.*>$/) === null) {
|
||||
obj.tags[tag] = str;
|
||||
if (str) {
|
||||
if (str.match(/^<.*>$/) !== null) {
|
||||
delete obj.tags[tag];
|
||||
} else {
|
||||
obj.tags[tag] = str;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user