fix: use Deal terminology in todos
This commit is contained in:
parent
3a1920d104
commit
c8b8045da1
|
|
@ -78,7 +78,7 @@
|
|||
var workspaceRoot = workspaceFromProps(props || {});
|
||||
return workspaceRoot
|
||||
? { mode: 'workspace', workspaceRoot: workspaceRoot, label: workspaceRoot }
|
||||
: { mode: 'global', workspaceRoot: '', label: 'All workspaces' };
|
||||
: { mode: 'global', workspaceRoot: '', label: 'All Deals' };
|
||||
}
|
||||
|
||||
function now() {
|
||||
|
|
@ -360,7 +360,7 @@
|
|||
function renderWorkspaceFilterOptions() {
|
||||
if (scope.mode !== 'global') return;
|
||||
workspaceFilterEl.innerHTML = '';
|
||||
workspaceFilterEl.appendChild(option('', tr('ui.allWorkspaces', null, 'All workspaces')));
|
||||
workspaceFilterEl.appendChild(option('', tr('ui.allWorkspaces', null, 'All Deals')));
|
||||
workspaceFilterEl.appendChild(option('__unassigned__', tr('ui.unassigned', null, 'Unassigned')));
|
||||
workspaceRoots().forEach(function (workspace) {
|
||||
workspaceFilterEl.appendChild(option(workspace, workspace));
|
||||
|
|
@ -540,8 +540,8 @@
|
|||
el('label', { className: 'todo-field' }, [tr('ui.field.reminderDate', null, 'Reminder date'), reminderDateInput]),
|
||||
el('label', { className: 'todo-field' }, [tr('ui.field.reminderTime', null, 'Reminder time'), reminderTimeInput])
|
||||
];
|
||||
if (workspaceInput) fields.push(el('label', { className: 'todo-field' }, [tr('ui.field.workspace', null, 'Workspace'), workspaceInput]));
|
||||
else fields.push(el('div', { className: 'todo-field', textContent: tr('ui.workspaceValue', { workspace: scope.workspaceRoot }, 'Workspace: ' + scope.workspaceRoot) }));
|
||||
if (workspaceInput) fields.push(el('label', { className: 'todo-field' }, [tr('ui.field.workspace', null, 'Deal'), workspaceInput]));
|
||||
else fields.push(el('div', { className: 'todo-field', textContent: tr('ui.workspaceValue', { workspace: scope.workspaceRoot }, 'Deal: ' + scope.workspaceRoot) }));
|
||||
|
||||
modalHost.innerHTML = '';
|
||||
if (typeof modalHost.removeAttribute === 'function') modalHost.removeAttribute('hidden');
|
||||
|
|
@ -636,7 +636,7 @@
|
|||
visible.forEach(function (todo) {
|
||||
var actionButtons = [];
|
||||
if (scope.mode === 'global' && todo.workspaceRootPath) {
|
||||
actionButtons.push(el('button', { className: 'todo-btn', type: 'button', 'data-todo-action': 'open-workspace', textContent: tr('ui.openWorkspace', null, 'Open workspace'), onClick: function () { openWorkspace(todo); } }));
|
||||
actionButtons.push(el('button', { className: 'todo-btn', type: 'button', 'data-todo-action': 'open-workspace', textContent: tr('ui.openWorkspace', null, 'Open Deal'), onClick: function () { openWorkspace(todo); } }));
|
||||
}
|
||||
if (todo.status === 'open') {
|
||||
actionButtons.push(el('button', { className: 'todo-btn', type: 'button', 'data-todo-action': 'mark-done', textContent: tr('ui.status.done', null, 'Done'), onClick: function () { setTodoStatus(todo, 'done'); } }));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"manifest.name": "Todos",
|
||||
"manifest.description": "Global and workspace todo tracking with due and reminder metadata.",
|
||||
"manifest.description": "Global and Deal-scoped todo tracking with due and reminder metadata.",
|
||||
"contributions.views.verstak.todo.view.title": "Todos",
|
||||
"contributions.sidebarItems.verstak.todo.sidebar.title": "Todos",
|
||||
"contributions.workspaceItems.verstak.todo.workspace.title": "Todos",
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"ui.sort.updated": "Sort by updated",
|
||||
"ui.search": "Search todos",
|
||||
"ui.add": "Add Todo",
|
||||
"ui.allWorkspaces": "All workspaces",
|
||||
"ui.allWorkspaces": "All Deals",
|
||||
"ui.unassigned": "Unassigned",
|
||||
"ui.saveError": "Could not save tasks. Please try again.",
|
||||
"ui.loadError": "Could not load tasks. Please try again.",
|
||||
|
|
@ -40,8 +40,8 @@
|
|||
"ui.reminderTimePlaceholder": "14:30",
|
||||
"ui.reminderTimeInvalid": "Enter a valid reminder time (HH:MM)",
|
||||
"ui.reminderDateRequired": "Choose a reminder date before setting its time",
|
||||
"ui.field.workspace": "Workspace",
|
||||
"ui.workspaceValue": "Workspace: {workspace}",
|
||||
"ui.field.workspace": "Deal",
|
||||
"ui.workspaceValue": "Deal: {workspace}",
|
||||
"ui.edit": "Edit Todo",
|
||||
"ui.cancel": "Cancel",
|
||||
"ui.saveChanges": "Save changes",
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
"ui.reminderDateValue": "Reminder date {date}",
|
||||
"ui.noMatches": "No todos match the current filters.",
|
||||
"ui.empty": "No todos yet.",
|
||||
"ui.openWorkspace": "Open workspace",
|
||||
"ui.openWorkspace": "Open Deal",
|
||||
"ui.reopen": "Reopen",
|
||||
"ui.createJournal": "Create Journal Entry",
|
||||
"ui.editAction": "Edit",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"manifest.name": "Задачи",
|
||||
"manifest.description": "Общие задачи и задачи рабочих пространств со сроками и напоминаниями.",
|
||||
"manifest.description": "Общие задачи и задачи Дел со сроками и напоминаниями.",
|
||||
"contributions.views.verstak.todo.view.title": "Задачи",
|
||||
"contributions.sidebarItems.verstak.todo.sidebar.title": "Задачи",
|
||||
"contributions.workspaceItems.verstak.todo.workspace.title": "Задачи",
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
"ui.sort.updated": "Сортировать по обновлению",
|
||||
"ui.search": "Поиск задач",
|
||||
"ui.add": "Добавить задачу",
|
||||
"ui.allWorkspaces": "Все рабочие пространства",
|
||||
"ui.allWorkspaces": "Все Дела",
|
||||
"ui.unassigned": "Не назначено",
|
||||
"ui.saveError": "Не удалось сохранить задачи. Повторите попытку.",
|
||||
"ui.loadError": "Не удалось загрузить задачи. Повторите попытку.",
|
||||
|
|
@ -40,8 +40,8 @@
|
|||
"ui.reminderTimePlaceholder": "14:30",
|
||||
"ui.reminderTimeInvalid": "Введите корректное время напоминания (ЧЧ:ММ)",
|
||||
"ui.reminderDateRequired": "Сначала выберите дату напоминания",
|
||||
"ui.field.workspace": "Рабочее пространство",
|
||||
"ui.workspaceValue": "Рабочее пространство: {workspace}",
|
||||
"ui.field.workspace": "Дело",
|
||||
"ui.workspaceValue": "Дело: {workspace}",
|
||||
"ui.edit": "Изменить задачу",
|
||||
"ui.cancel": "Отмена",
|
||||
"ui.saveChanges": "Сохранить изменения",
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
"ui.reminderDateValue": "Дата напоминания: {date}",
|
||||
"ui.noMatches": "Нет задач, соответствующих фильтрам.",
|
||||
"ui.empty": "Задач пока нет.",
|
||||
"ui.openWorkspace": "Открыть рабочее пространство",
|
||||
"ui.openWorkspace": "Открыть Дело",
|
||||
"ui.reopen": "Открыть снова",
|
||||
"ui.createJournal": "Создать запись журнала",
|
||||
"ui.editAction": "Изменить",
|
||||
|
|
|
|||
|
|
@ -261,6 +261,13 @@ async function mountWithApi(apiState, props, emittedEvents = [], document = make
|
|||
if (!container.textContent.includes('Задачи · Project') || !container.textContent.includes('Просрочено')) {
|
||||
throw new Error('Todo view did not update to Russian without remounting');
|
||||
}
|
||||
byData(container, 'data-todo-action', 'add').click();
|
||||
if (!container.textContent.includes('Дело: Project')) {
|
||||
throw new Error('Todo editor did not use Deal terminology in Russian');
|
||||
}
|
||||
const cancelModal = walk(container, (node) => node.tagName === 'BUTTON' && node.textContent === 'Отмена' && !node.getAttribute('data-todo-action'));
|
||||
if (!cancelModal) throw new Error('Todo editor cancel action was not rendered in Russian');
|
||||
cancelModal.click();
|
||||
if ((apiState.settings['todos:global'] || []).length !== 1) throw new Error('locale change lost Todo state');
|
||||
apiState.setLocale('en');
|
||||
|
||||
|
|
@ -322,6 +329,9 @@ async function mountWithApi(apiState, props, emittedEvents = [], document = make
|
|||
if (!globalView.container.textContent.includes('Prepare project review updated') || !globalView.container.textContent.includes('Client follow-up')) {
|
||||
throw new Error('global Todo view did not aggregate workspace todos');
|
||||
}
|
||||
if (!globalView.container.textContent.includes('All Deals')) {
|
||||
throw new Error('global Todo filter did not use Deal terminology');
|
||||
}
|
||||
const workspaceFilter = byData(globalView.container, 'data-todo-filter', 'workspace');
|
||||
workspaceFilter.value = 'ClientA';
|
||||
workspaceFilter.dispatchEvent('change');
|
||||
|
|
|
|||
Loading…
Reference in New Issue