mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Fix localized field hidden despite nonempty subkeys (Closes#10323)
This commit is contained in:
@@ -97,6 +97,15 @@ export function uiField(context, presetField, entityIDs, options) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (field.type === 'localized') {
|
||||
for (let tagKey in _tags) {
|
||||
// matches for field:<code>, where <code> is a BCP 47 locale code
|
||||
let match = tagKey.match(/^(.*):([a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2})?)$/);
|
||||
if (match && match[1] === field.key && match[2]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return _tags[key] !== undefined;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user