diff --git a/data/core.yaml b/data/core.yaml index 046cd9d45..101440de6 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -239,6 +239,7 @@ en: inspector: no_documentation_combination: There is no documentation available for this tag combination no_documentation_key: There is no documentation available for this key + documentation_redirect: This documentation has been redirected to a new page show_more: Show More view_on_osm: View on openstreetmap.org all_fields: All fields diff --git a/dist/locales/en.json b/dist/locales/en.json index 00168a838..1b7ce6e40 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -293,6 +293,7 @@ "inspector": { "no_documentation_combination": "There is no documentation available for this tag combination", "no_documentation_key": "There is no documentation available for this key", + "documentation_redirect": "This documentation has been redirected to a new page", "show_more": "Show More", "view_on_osm": "View on openstreetmap.org", "all_fields": "All fields", diff --git a/modules/ui/tag_reference.js b/modules/ui/tag_reference.js index 3efa40954..5dae8d878 100644 --- a/modules/ui/tag_reference.js +++ b/modules/ui/tag_reference.js @@ -54,7 +54,8 @@ export function uiTagReference(tag) { body.html(''); - if (!docs || !docs.description) { + + if (!docs || !docs.title) { if (param.hasOwnProperty('value')) { load(_.omit(param, 'value')); // retry with key only } else { @@ -64,6 +65,7 @@ export function uiTagReference(tag) { return; } + if (docs.image && docs.image.thumb_url_prefix) { body .append('img') @@ -77,7 +79,7 @@ export function uiTagReference(tag) { body .append('p') - .text(docs.description); + .text(docs.description || t('inspector.documentation_redirect')); body .append('a')