diff --git a/data/core.yaml b/data/core.yaml index 65889192a..db06b8ab9 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -434,8 +434,6 @@ en: best_imagery: Best known imagery source for this location switch: Switch back to this background custom: Custom - custom_button: Edit custom background - custom_prompt: "Enter a tile URL template. Valid tokens are:\n - {zoom} or {z}, {x}, {y} for Z/X/Y tile scheme\n - {-y} or {ty} for flipped TMS-style Y coordinates\n - {u} for quadtile scheme\n - {switch:a,b,c} for DNS server multiplexing\n\nExample:\n{example}" overlays: Overlays imagery_source_faq: Imagery Info / Report a Problem reset: reset @@ -514,6 +512,11 @@ en: full: description: Full Fill tooltip: "Areas are drawn fully filled." + settings: + custom_background: + tooltip: Edit custom background + heading: Custom Background Settings + instructions: "Enter a tile URL template. Valid tokens are:\n - {zoom} or {z}, {x}, {y} for Z/X/Y tile scheme\n - {-y} or {ty} for flipped TMS-style Y coordinates\n - {u} for quadtile scheme\n - {switch:a,b,c} for DNS server multiplexing\n\nExample:\n{example}" restore: heading: You have unsaved changes description: "Do you wish to restore unsaved changes from a previous editing session?" diff --git a/dist/locales/en.json b/dist/locales/en.json index ca31f31d8..dced16854 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -529,8 +529,6 @@ "best_imagery": "Best known imagery source for this location", "switch": "Switch back to this background", "custom": "Custom", - "custom_button": "Edit custom background", - "custom_prompt": "Enter a tile URL template. Valid tokens are:\n - {zoom} or {z}, {x}, {y} for Z/X/Y tile scheme\n - {-y} or {ty} for flipped TMS-style Y coordinates\n - {u} for quadtile scheme\n - {switch:a,b,c} for DNS server multiplexing\n\nExample:\n{example}", "overlays": "Overlays", "imagery_source_faq": "Imagery Info / Report a Problem", "reset": "reset", @@ -632,6 +630,13 @@ "tooltip": "Areas are drawn fully filled." } }, + "settings": { + "custom_background": { + "tooltip": "Edit custom background", + "heading": "Custom Background Settings", + "instructions": "Enter a tile URL template. Valid tokens are:\n - {zoom} or {z}, {x}, {y} for Z/X/Y tile scheme\n - {-y} or {ty} for flipped TMS-style Y coordinates\n - {u} for quadtile scheme\n - {switch:a,b,c} for DNS server multiplexing\n\nExample:\n{example}" + } + }, "restore": { "heading": "You have unsaved changes", "description": "Do you wish to restore unsaved changes from a previous editing session?", diff --git a/modules/ui/background.js b/modules/ui/background.js index ea33ef94f..513ba8cc0 100644 --- a/modules/ui/background.js +++ b/modules/ui/background.js @@ -148,7 +148,7 @@ export function uiBackground(context) { .append('button') .attr('class', 'layer-browse') .call(tooltip() - .title(t('background.custom_button')) + .title(t('settings.custom_background.tooltip')) .placement((textDirection === 'rtl') ? 'right' : 'left') ) .on('click', editCustom) diff --git a/modules/ui/settings/custom_background.js b/modules/ui/settings/custom_background.js index 9e9f51478..09b2955c4 100644 --- a/modules/ui/settings/custom_background.js +++ b/modules/ui/settings/custom_background.js @@ -20,12 +20,16 @@ export function uiSettingsCustomBackground(context) { introModal .append('div') .attr('class','modal-section cf') - .append('h3').text(t('background.custom_heading')); + .append('h3') + .text(t('settings.custom_background.heading')); introModal .append('div') .attr('class','modal-section') - .append('p').text(t('background.custom_prompt', { example: example })) + .append('pre') + .text(t('settings.custom_background.instructions', { example: example })); + + introModal .append('textarea'); @@ -40,7 +44,6 @@ export function uiSettingsCustomBackground(context) { .append('div') .attr('class', 'modal-section'); - var cancelButton = buttonWrap .append('button') .attr('class', 'button-cancel')