mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-25 01:24:05 +02:00
fix KeepRight warnings showing up as "Unknown" issues (close #8925)
This commit is contained in:
@@ -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