|
| 1 | +// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license. |
| 2 | + |
| 3 | +/** |
| 4 | + * The user-facing sentences of `validate-chart-bindings.ts`'s advisory |
| 5 | + * findings, in every platform locale (`PLATFORM_LOCALE_TAGS`, |
| 6 | + * `@objectstack/spec/system`). The finding mechanism and the locale ladder are |
| 7 | + * `finding-user-text.ts`'s; this file is the rule's own half of it, kept beside |
| 8 | + * the rule so its wording and its translations change together. |
| 9 | + * |
| 10 | + * Who reads these: the person who saved a report in Studio, in their own |
| 11 | + * language, once the save door composes `RuntimeAuthoringIssueSchema.userMessage` |
| 12 | + * from them. So each sentence names the report's chart series entry, what it |
| 13 | + * does (nothing) and the one change that fixes it, in the console's words |
| 14 | + * (report, chart, series, dataset, measure). |
| 15 | + * |
| 16 | + * Both ids are advisory only at a PRESENTATION position, and the publish door |
| 17 | + * reaches exactly one of those: a report chart's `series[]` entry, on a |
| 18 | + * `report` write. The page-chart positions (`page-series`, `page-axis`) are |
| 19 | + * judged on pages, which no per-write snapshot carries, so those findings carry |
| 20 | + * no `userTextParams` and keep the English `message`. At a query position |
| 21 | + * `chart-measure-unknown` is an error, not advice, and carries none either. |
| 22 | + * |
| 23 | + * Each entry reads the `userTextParams` its finding carries, set at the push |
| 24 | + * site in `validate-chart-bindings.ts`: |
| 25 | + * |
| 26 | + * | rule id | params | |
| 27 | + * |---|---| |
| 28 | + * | `chart-measure-unknown` | `report`, `measure`, `dataset` | |
| 29 | + * | `chart-axis-not-selected` | `report`, `measure`, `dataset`, `plotted` (the measure the chart plots) | |
| 30 | + * |
| 31 | + * Names are the API names the rule saw, for the reason |
| 32 | + * `validate-security-posture.user-text.ts` gives. |
| 33 | + * |
| 34 | + * `finding-user-text.dashboards.test.ts` renders every entry from the rule's |
| 35 | + * real findings in every platform locale. |
| 36 | + */ |
| 37 | + |
| 38 | +import type { UserTextCatalog } from './finding-user-text.js'; |
| 39 | +import { CHART_AXIS_NOT_SELECTED, CHART_MEASURE_UNKNOWN } from './validate-chart-bindings.js'; |
| 40 | + |
| 41 | +export const CHART_BINDINGS_USER_TEXT: UserTextCatalog = Object.freeze({ |
| 42 | + [CHART_MEASURE_UNKNOWN]: { |
| 43 | + en: (p) => |
| 44 | + `In report "${p.report}", the chart series entry "${p.measure}" names no measure of dataset "${p.dataset}", ` + |
| 45 | + `so it changes nothing and the series is still drawn. Correct the name to a measure the dataset declares, or ` + |
| 46 | + `remove the entry.`, |
| 47 | + 'zh-Hans': (p) => |
| 48 | + `在报表“${p.report}”中,图表系列条目“${p.measure}”并非数据集“${p.dataset}”的度量,因此不起任何作用,该系列仍会` + |
| 49 | + `照常绘制。请把名称改为该数据集声明的度量,或删除该条目。`, |
| 50 | + 'zh-Hant': (p) => |
| 51 | + `在報表「${p.report}」中,圖表系列項目「${p.measure}」並非資料集「${p.dataset}」的度量,因此不起任何作用,該系列仍會` + |
| 52 | + `照常繪製。請把名稱改為該資料集宣告的度量,或刪除該項目。`, |
| 53 | + es: (p) => |
| 54 | + `En el informe "${p.report}", la entrada de serie del gráfico "${p.measure}" no corresponde a ninguna medida ` + |
| 55 | + `del conjunto de datos "${p.dataset}", por lo que no cambia nada y la serie se sigue dibujando. Corrija el ` + |
| 56 | + `nombre por una medida que declare el conjunto de datos o elimine la entrada.`, |
| 57 | + ar: (p) => |
| 58 | + `في التقرير "${p.report}"، لا يطابق إدخال سلسلة المخطط "${p.measure}" أي مقياس في مجموعة البيانات ` + |
| 59 | + `"${p.dataset}"، لذا لا يغيّر شيئًا وتظل السلسلة مرسومة. صحّح الاسم إلى مقياس تعلنه مجموعة البيانات، أو ` + |
| 60 | + `احذف الإدخال.`, |
| 61 | + fr: (p) => |
| 62 | + `Dans le rapport « ${p.report} », l’entrée de série du graphique « ${p.measure} » ne désigne aucune mesure du ` + |
| 63 | + `jeu de données « ${p.dataset} » : elle ne change donc rien et la série est quand même tracée. Corrigez le nom ` + |
| 64 | + `pour indiquer une mesure déclarée par le jeu de données, ou supprimez l’entrée.`, |
| 65 | + 'pt-BR': (p) => |
| 66 | + `No relatório "${p.report}", a entrada de série do gráfico "${p.measure}" não corresponde a nenhuma medida do ` + |
| 67 | + `conjunto de dados "${p.dataset}"; por isso, não muda nada e a série continua sendo desenhada. Corrija o nome ` + |
| 68 | + `para uma medida declarada pelo conjunto de dados ou remova a entrada.`, |
| 69 | + ru: (p) => |
| 70 | + `В отчёте «${p.report}» элемент ряда диаграммы «${p.measure}» не соответствует ни одной мере набора данных ` + |
| 71 | + `«${p.dataset}», поэтому ничего не меняет, а ряд всё равно строится. Исправьте имя на меру, объявленную в ` + |
| 72 | + `наборе данных, или удалите элемент.`, |
| 73 | + de: (p) => |
| 74 | + `Im Bericht „${p.report}“ nennt der Reiheneintrag „${p.measure}“ des Diagramms keine Kennzahl des Datensatzes ` + |
| 75 | + `„${p.dataset}“. Er bewirkt daher nichts, und die Reihe wird trotzdem gezeichnet. Ändern Sie den Namen in eine ` + |
| 76 | + `Kennzahl, die der Datensatz deklariert, oder entfernen Sie den Eintrag.`, |
| 77 | + ja: (p) => |
| 78 | + `レポート「${p.report}」で、グラフの系列エントリ「${p.measure}」はデータセット「${p.dataset}」のどの指標にも` + |
| 79 | + `当たらないため何も変わらず、系列はそのまま描画されます。名前をデータセットが宣言している指標に修正するか、` + |
| 80 | + `このエントリを削除してください。`, |
| 81 | + ko: (p) => |
| 82 | + `보고서 "${p.report}"에서 차트 계열 항목 "${p.measure}"은(는) 데이터 세트 "${p.dataset}"의 어떤 측정값과도 ` + |
| 83 | + `일치하지 않으므로 아무것도 바뀌지 않으며 계열은 그대로 그려집니다. 이름을 데이터 세트에 선언된 측정값으로 ` + |
| 84 | + `고치거나 항목을 삭제하세요.`, |
| 85 | + }, |
| 86 | + [CHART_AXIS_NOT_SELECTED]: { |
| 87 | + en: (p) => |
| 88 | + `In report "${p.report}", the chart series entry "${p.measure}" names a measure of dataset "${p.dataset}" that ` + |
| 89 | + `the chart does not plot (it plots "${p.plotted}"), so it changes nothing. Point the entry at ` + |
| 90 | + `"${p.plotted}", or remove it.`, |
| 91 | + 'zh-Hans': (p) => |
| 92 | + `在报表“${p.report}”中,图表系列条目“${p.measure}”是数据集“${p.dataset}”的度量,但图表并不绘制它(图表绘制的是` + |
| 93 | + `“${p.plotted}”),因此不起任何作用。请将该条目指向“${p.plotted}”,或将其删除。`, |
| 94 | + 'zh-Hant': (p) => |
| 95 | + `在報表「${p.report}」中,圖表系列項目「${p.measure}」是資料集「${p.dataset}」的度量,但圖表並不繪製它(圖表繪製的是` + |
| 96 | + `「${p.plotted}」),因此不起任何作用。請將該項目指向「${p.plotted}」,或將其刪除。`, |
| 97 | + es: (p) => |
| 98 | + `En el informe "${p.report}", la entrada de serie del gráfico "${p.measure}" es una medida del conjunto de ` + |
| 99 | + `datos "${p.dataset}" que el gráfico no traza (traza "${p.plotted}"), por lo que no cambia nada. Haga que la ` + |
| 100 | + `entrada apunte a "${p.plotted}" o elimínela.`, |
| 101 | + ar: (p) => |
| 102 | + `في التقرير "${p.report}"، يشير إدخال سلسلة المخطط "${p.measure}" إلى مقياس في مجموعة البيانات ` + |
| 103 | + `"${p.dataset}" لا يرسمه المخطط (فهو يرسم "${p.plotted}")، لذا لا يغيّر شيئًا. اجعل الإدخال يشير إلى ` + |
| 104 | + `"${p.plotted}"، أو احذفه.`, |
| 105 | + fr: (p) => |
| 106 | + `Dans le rapport « ${p.report} », l’entrée de série du graphique « ${p.measure} » désigne une mesure du jeu de ` + |
| 107 | + `données « ${p.dataset} » que le graphique ne trace pas (il trace « ${p.plotted} ») : elle ne change donc ` + |
| 108 | + `rien. Faites pointer l’entrée vers « ${p.plotted} », ou supprimez-la.`, |
| 109 | + 'pt-BR': (p) => |
| 110 | + `No relatório "${p.report}", a entrada de série do gráfico "${p.measure}" é uma medida do conjunto de dados ` + |
| 111 | + `"${p.dataset}" que o gráfico não traça (ele traça "${p.plotted}"); por isso, não muda nada. Aponte a entrada ` + |
| 112 | + `para "${p.plotted}" ou remova-a.`, |
| 113 | + ru: (p) => |
| 114 | + `В отчёте «${p.report}» элемент ряда диаграммы «${p.measure}» указывает на меру набора данных ` + |
| 115 | + `«${p.dataset}», которую диаграмма не строит (она строит «${p.plotted}»), поэтому ничего не меняет. Укажите в ` + |
| 116 | + `элементе «${p.plotted}» или удалите его.`, |
| 117 | + de: (p) => |
| 118 | + `Im Bericht „${p.report}“ nennt der Reiheneintrag „${p.measure}“ des Diagramms eine Kennzahl des Datensatzes ` + |
| 119 | + `„${p.dataset}“, die das Diagramm nicht darstellt (es stellt „${p.plotted}“ dar). Er bewirkt daher nichts. ` + |
| 120 | + `Richten Sie den Eintrag auf „${p.plotted}“ aus, oder entfernen Sie ihn.`, |
| 121 | + ja: (p) => |
| 122 | + `レポート「${p.report}」で、グラフの系列エントリ「${p.measure}」はデータセット「${p.dataset}」の指標ですが、` + |
| 123 | + `グラフはこれを描画しない(描画するのは「${p.plotted}」)ため、何も変わりません。エントリを「${p.plotted}」に` + |
| 124 | + `向けるか、削除してください。`, |
| 125 | + ko: (p) => |
| 126 | + `보고서 "${p.report}"에서 차트 계열 항목 "${p.measure}"은(는) 데이터 세트 "${p.dataset}"의 측정값이지만 ` + |
| 127 | + `차트가 이를 그리지 않으므로(차트는 "${p.plotted}"을(를) 그립니다) 아무것도 바뀌지 않습니다. 항목이 ` + |
| 128 | + `"${p.plotted}"을(를) 가리키게 하거나 삭제하세요.`, |
| 129 | + }, |
| 130 | +}); |
0 commit comments