From 142b738a301931221201e432c0de031e53dab5f7 Mon Sep 17 00:00:00 2001 From: vershwal Date: Sat, 17 Mar 2018 01:07:56 +0530 Subject: [PATCH] Hint text for Remove and Undo button. --- data/core.yaml | 2 ++ dist/locales/en.json | 4 +++- modules/ui/field.js | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/data/core.yaml b/data/core.yaml index 02a27f103..178db1db2 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -1,6 +1,8 @@ en: icons: information: info + remove: remove + undo: undo modes: add_area: title: Area diff --git a/dist/locales/en.json b/dist/locales/en.json index 0c2ec269f..58d9818c9 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -1,7 +1,9 @@ { "en": { "icons": { - "information": "info" + "information": "info", + "remove": "remove", + "undo": "undo" }, "modes": { "add_area": { diff --git a/modules/ui/field.js b/modules/ui/field.js index 756ab095e..47533b572 100644 --- a/modules/ui/field.js +++ b/modules/ui/field.js @@ -9,6 +9,7 @@ import { select as d3_select } from 'd3-selection'; +import { t } from '../util/locale'; import { textDirection } from '../util/locale'; import { svgIcon } from '../svg'; import { uiFieldHelp } from './field_help'; @@ -114,6 +115,7 @@ export function uiField(context, presetField, entity, options) { wrap .append('button') .attr('class', 'remove-icon') + .attr('title', t('icons.remove')) .attr('tabindex', -1) .call(svgIcon('#operation-delete')); } @@ -122,6 +124,7 @@ export function uiField(context, presetField, entity, options) { wrap .append('button') .attr('class', 'modified-icon') + .attr('title', t('icons.undo')) .attr('tabindex', -1) .call( (textDirection === 'rtl') ? svgIcon('#icon-redo') : svgIcon('#icon-undo')