BRM-111: расшифровка букв D/U/W/H/V в «Памяти бренда» #107

Open
peppa-bot wants to merge 1 commits from task/brm-111 into main
5 changed files with 42 additions and 5 deletions

View File

@ -818,5 +818,12 @@
"home.check.channels.post": ": the table should show for each channel the audience, goal, Tatiana's access, whether automatic publishing is possible, limits, fallback and queue. What we don't know yet is marked \"to be clarified\" or \"not confirmed\".",
"letter.steps": "Steps: 1. Save. 2. Approve. 3. Open in mail and send it yourself. 4. Mark as sent.",
"ui.sum.noValueHint": "— click the row and enter a value",
"ui.sum.legend": "“Not entered” means there is no value yet and you need to add it; “sample” means the value is made up for an example and is not your data."
"ui.sum.legend": "“Not entered” means there is no value yet and you need to add it; “sample” means the value is made up for an example and is not your data.",
"ui.facts.legend": "What the letters next to entries mean",
"ui.facts.legend.D": "D — backed by a document",
"ui.facts.legend.U": "U — in Tatiana's own words",
"ui.facts.legend.W": "W — mentioned in the working plan",
"ui.facts.legend.H": "H — a guess, not checked",
"ui.facts.legend.V": "V — needs proof",
"ui.facts.authorship": "check authorship"
}

View File

@ -818,5 +818,12 @@
"home.check.channels.post": ": кестеде әр арна бойынша аудитория, мақсат, Татьянаның қолжетімділігі, автоматты жариялау мүмкіндігі, шектеулер, қосалқы жол және кезек көрініп тұруы керек. Әзірге белгісіз нәрселер «нақтылау керек» немесе «расталмаған» деп белгіленген.",
"letter.steps": "Реті: 1. Сақтау. 2. Мақұлдау. 3. Поштада ашып, өзіңіз жіберу. 4. Жіберілді деп белгілеу.",
"ui.sum.noValueHint": "— жолды басып, мәнді жазыңыз",
"ui.sum.legend": "«Енгізілмеген» — мән әлі жоқ, оны жазу керек; «үлгі» — мән мысал үшін ойдан алынған, бұл сіздің деректеріңіз емес."
"ui.sum.legend": "«Енгізілмеген» — мән әлі жоқ, оны жазу керек; «үлгі» — мән мысал үшін ойдан алынған, бұл сіздің деректеріңіз емес.",
"ui.facts.legend": "Жазбалардағы әріптер нені білдіреді",
"ui.facts.legend.D": "D — құжаты бар",
"ui.facts.legend.U": "U — Татьянаның сөзі бойынша",
"ui.facts.legend.W": "W — жұмыс жоспарында аталған",
"ui.facts.legend.H": "H — болжам, тексерілмеген",
"ui.facts.legend.V": "V — дәлел керек",
"ui.facts.authorship": "авторлығын тексеру керек"
}

View File

@ -818,5 +818,12 @@
"home.check.channels.post": ": в таблице по каждому каналу должны быть видны аудитория, цель, доступ у Татьяны, можно ли публиковать автоматически, ограничения, запасной путь и очередь. Чего мы ещё не знаем, отмечено «нужно уточнить» или «не подтверждено».",
"letter.steps": "Порядок: 1. Сохранить. 2. Одобрить. 3. Открыть в почте и отправить самим. 4. Отметить как отправленное.",
"ui.sum.noValueHint": "— нажмите на строку и впишите значение",
"ui.sum.legend": "«Не внесено» — значения пока нет, его нужно вписать; «образец» — значение придумано для примера, это не ваши данные."
"ui.sum.legend": "«Не внесено» — значения пока нет, его нужно вписать; «образец» — значение придумано для примера, это не ваши данные.",
"ui.facts.legend": "Что значат буквы у записей",
"ui.facts.legend.D": "D — есть документ",
"ui.facts.legend.U": "U — со слов Татьяны",
"ui.facts.legend.W": "W — упомянуто в рабочем плане",
"ui.facts.legend.H": "H — гипотеза, не проверена",
"ui.facts.legend.V": "V — нужно доказательство",
"ui.facts.authorship": "проверить авторство"
}

View File

@ -8,7 +8,8 @@ h1{font-size:20px}h2{font-size:17px;margin-top:24px}table{border-collapse:collap
.q{margin:8px 0}.q input{width:60%}
</style></head><body>
<p><a href="/" data-t="ui.common.home"></a></p>
<h1 data-t="ui.facts.title"></h1><p data-t="ui.facts.intro"></p><p id="err"></p>
<h1 data-t="ui.facts.title"></h1><p data-t="ui.facts.intro"></p>
<h2 data-t="ui.facts.legend"></h2><ul id="legend"><li data-t="ui.facts.legend.D"></li><li data-t="ui.facts.legend.U"></li><li data-t="ui.facts.legend.W"></li><li data-t="ui.facts.legend.H"></li><li data-t="ui.facts.legend.V"></li></ul><p id="err"></p>
<h2 data-t="ui.facts.hQuestions"></h2><p id="qintro"></p><div id="questions"></div>
<h2 data-t="ui.facts.hFacts"></h2><div id="facts"></div>
<h2 data-t="ui.facts.hCases"></h2><div id="cases"></div>
@ -22,7 +23,7 @@ const tag=(c,k)=>`<span class="tag ${c}">${esc(k)}</span>`;
function factRow(f){
const p=f.public,why=p.ok?"":" "+esc(tx("ui.facts.why"))+p.why.map(w=>esc(tx("ui.facts.why."+w))).join(", ");
const tags=(f.claimed?tag("warn",tx("ui.facts.claimed")):"")+tag(p.ok?"ok":"no",tx(p.ok?"ui.facts.public.yes":"ui.facts.public.no"))
+tag("",f.level+": "+tx("ui.facts.level."+f.level))+tag("",tx("ui.facts.check."+f.check))+tag("",tx("ui.facts.perm."+f.permission))
+tag("",tx("ui.facts.legend."+f.level))+(/authorship/.test(f.key)?tag("warn",tx("ui.facts.authorship")):"")+tag("",tx("ui.facts.check."+f.check))+tag("",tx("ui.facts.perm."+f.permission))
+(f.stage?tag("",tx("ui.facts.stage")+": "+tx("ui.facts.stage."+f.stage)):"");
const rev=f.revoked?`<div class="tag no">${esc(fill(tx("ui.facts.revokedAt"),{why:f.revoked.reason}))}</div>`:"";
const btn=f.revoked?`<button data-r="${f.key}" data-a="restore" title="${esc(tx("ui.facts.restore"))}">${esc(tx("ui.facts.restore"))}</button>`

15
test/facts-legend.test.js Normal file
View File

@ -0,0 +1,15 @@
import test from "node:test";
import assert from "node:assert/strict";
import fs from "node:fs";
import { LEVELS } from "../src/facts.js";
// BRM-111: расшифровка букв D/U/W/H/V есть на странице и во всех языках.
test("BRM-111: у каждой буквы есть расшифровка на трёх языках, на странице — легенда", () => {
const html = fs.readFileSync(new URL("../public/facts.html", import.meta.url), "utf8");
for (const l of ["ru", "kk", "en"]) {
const d = JSON.parse(fs.readFileSync(new URL(`../locales/${l}.json`, import.meta.url), "utf8"));
for (const k of LEVELS) assert.ok(d["ui.facts.legend." + k].startsWith(k + " "), l + k);
assert.ok(d["ui.facts.authorship"]);
}
for (const k of LEVELS) assert.ok(html.includes(`data-t="ui.facts.legend.${k}"`));
});