mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
Keep card and checklist activity after deletion, retain card snapshots for flow reports, and show recorded hour adjustments by their actual author in Time and its PDF/Excel exports. Record whole positions centrally, including optional move reasons and direct REST edits. Append undo/redo checkpoints so blocker intervals and time corrections follow reversals through time. Audit the open time-related requests against existing features. Exact inline activity timestamps requested in #1673 already exist in dateDisplay and the activities template; add a browser regression for that existing behavior. Reuse established locale terminology for the new compact labels. Labels outside English and Finnish are low-confidence glossary combinations for human review; existing translations remain untouched. Validation: 43 focused Node suites pass. Fifteen Chromium scenarios pass across flow analytics, time history and existing REST move coverage, including real chart and Time PDF/Excel exports, undo/redo, retention and access denial. Thanks to ladistrupl, zombah and xet7 ! Fixes #1598, Fixes #1673,
22 lines
1.2 KiB
JavaScript
22 lines
1.2 KiB
JavaScript
'use strict';
|
|
const assert = require('node:assert/strict');
|
|
const fs = require('node:fs');
|
|
const path = require('node:path');
|
|
const dir = path.join(__dirname, '../imports/i18n/data');
|
|
const en = JSON.parse(fs.readFileSync(path.join(dir, 'en.i18n.json')));
|
|
const keys = Object.keys(en).filter(key => key.startsWith('flow-') || [
|
|
'move-reason', 'ask-move-reason', 'time-adjustments', 'time-adjustment-note',
|
|
'board-view-aging-wip', 'board-view-blocker-analysis', 'board-view-monte-carlo',
|
|
'board-view-process-behavior', 'board-view-size-cycle-time',
|
|
].includes(key));
|
|
const tokens = text => [...text.matchAll(/__[A-Za-z0-9_.]+__|%(?:\d+\$)?[A-Za-z%]/g)].map(x => x[0]).sort();
|
|
for (const file of fs.readdirSync(dir).filter(file => file.endsWith('.i18n.json'))) {
|
|
const locale = JSON.parse(fs.readFileSync(path.join(dir, file)));
|
|
assert.deepEqual(Object.keys(locale), Object.keys(en), `${file} key order`);
|
|
for (const key of keys) {
|
|
assert.ok(locale[key]?.trim(), `${file}:${key}`);
|
|
assert.deepEqual(tokens(locale[key]), tokens(en[key]), `${file}:${key} code tokens`);
|
|
}
|
|
}
|
|
console.log('flowAnalyticsTranslations: report strings and placeholders present in every locale');
|