Use localized placeholder for expected date filter format

This commit is contained in:
Quincy Morgan
2020-10-15 16:52:03 -04:00
parent 1c0892281d
commit 730e16c1cf
3 changed files with 8 additions and 4 deletions

View File

@@ -2312,6 +2312,8 @@ en:
west: "W"
coordinate: "{coordinate}{direction}"
coordinate_pair: "{latitude}, {longitude}"
# translate the letters but leave the format the same
year_month_day: "YYYY-MM-DD"
wikidata:
identifier: "Identifier"
label: "Label"

View File

@@ -2858,7 +2858,8 @@
"east": "E",
"west": "W",
"coordinate": "{coordinate}{direction}",
"coordinate_pair": "{latitude}, {longitude}"
"coordinate_pair": "{latitude}, {longitude}",
"year_month_day": "YYYY-MM-DD"
},
"wikidata": {
"identifier": "Identifier",

View File

@@ -5,6 +5,7 @@ import {
import { t } from '../../core/localizer';
import { uiTooltip } from '../tooltip';
import { uiSection } from '../section';
import { utilGetSetValue } from '../../util';
export function uiSectionPhotoOverlays(context) {
@@ -214,9 +215,9 @@ export function uiSectionPhotoOverlays(context) {
.append('input')
.attr('type', 'date')
.attr('class', 'list-item-input')
.attr('placeholder', 'dd/mm/yyyy')
.property('value', function(d) {
return context.photos().dateFilterValue(d);
.attr('placeholder', t('units.year_month_day'))
.each(function(d) {
utilGetSetValue(d3_select(this), context.photos().dateFilterValue(d) || '');
})
.on('change', function(d3_event, d) {
var value = d3_select(this).property('value');