Skip to content

Commit

Permalink
remove any related multilingual keys from templates
Browse files Browse the repository at this point in the history
Resolves osmlab#7236
Resolves osmlab#9260
  • Loading branch information
Dimitar5555 authored Jan 20, 2025
1 parent 1a678c3 commit 658b99c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/file_tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,15 @@ expandTemplates: (cache, loco) => {
tags[osmkey] = tagValue;
} else {
delete tags[osmkey];
// remove any related multilingual keys
const multilingual_keys = ['name', 'alt_name', 'official_name', 'short_name'];
if (multilingual_keys.includes(osmkey)) {
Object.keys(tags).forEach (key => {
if (key.startsWith(osmkey + ':')) {
delete tags[key];
}
});
}
}
});

Expand Down

0 comments on commit 658b99c

Please sign in to comment.