mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-17 22:24:49 +02:00
fix KeepRight warnings showing up as "Unknown" issues (close #8925)
This commit is contained in:
@@ -47,6 +47,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
|
||||
* Handle indoor features like buildings when checking for crossing ways ([#8944])
|
||||
#### :bug: Bugfixes
|
||||
* Fix rendering of KeepRight issues ([#8963])
|
||||
* Fix KeepRight warnings showing up as "Unknown" issues ([#8925])
|
||||
#### :rocket: Presets
|
||||
* Optimize order of values in dropdowns of `access` fields ([#8945])
|
||||
* Use value of `vehicle` tag as placeholder value of `access` fields for `motor_vehicle` and `bicycle`
|
||||
@@ -56,6 +57,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
|
||||
|
||||
[#8774]: https://github.com/openstreetmap/iD/pull/8774
|
||||
[#8811]: https://github.com/openstreetmap/iD/issues/8811
|
||||
[#8925]: https://github.com/openstreetmap/iD/issues/8925
|
||||
[#8927]: https://github.com/openstreetmap/iD/issues/8927
|
||||
[#8944]: https://github.com/openstreetmap/iD/issues/8944
|
||||
[#8945]: https://github.com/openstreetmap/iD/issues/8945
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
|
||||
import { presetManager } from '../presets';
|
||||
import { modeSelect } from '../modes/select';
|
||||
import { t } from '../core/localizer';
|
||||
import { t, localizer } from '../core/localizer';
|
||||
import { utilDisplayName, utilHighlightEntities, utilEntityRoot } from '../util';
|
||||
|
||||
|
||||
@@ -18,11 +18,11 @@ export function uiKeepRightDetails(context) {
|
||||
let replacements = d.replacements || {};
|
||||
replacements.default = unknown; // special key `default` works as a fallback string
|
||||
|
||||
let detail = t.html(`QA.keepRight.errorTypes.${itemType}.description`, replacements);
|
||||
if (detail === unknown.html) {
|
||||
detail = t.html(`QA.keepRight.errorTypes.${parentIssueType}.description`, replacements);
|
||||
if (localizer.hasTextForStringId(`QA.keepRight.errorTypes.${itemType}.title`)) {
|
||||
return t.html(`QA.keepRight.errorTypes.${itemType}.description`, replacements);
|
||||
} else {
|
||||
return t.html(`QA.keepRight.errorTypes.${parentIssueType}.description`, replacements);
|
||||
}
|
||||
return detail;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { svgIcon } from '../svg/icon';
|
||||
import { t } from '../core/localizer';
|
||||
import { t, localizer } from '../core/localizer';
|
||||
|
||||
|
||||
export function uiKeepRightHeader() {
|
||||
@@ -12,11 +12,11 @@ export function uiKeepRightHeader() {
|
||||
let replacements = d.replacements || {};
|
||||
replacements.default = { html: unknown }; // special key `default` works as a fallback string
|
||||
|
||||
let title = t.html(`QA.keepRight.errorTypes.${itemType}.title`, replacements);
|
||||
if (title === unknown) {
|
||||
title = t.html(`QA.keepRight.errorTypes.${parentIssueType}.title`, replacements);
|
||||
if (localizer.hasTextForStringId(`QA.keepRight.errorTypes.${itemType}.title`)) {
|
||||
return t.html(`QA.keepRight.errorTypes.${itemType}.title`, replacements);
|
||||
} else {
|
||||
return t.html(`QA.keepRight.errorTypes.${parentIssueType}.title`, replacements);
|
||||
}
|
||||
return title;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user