Make Russian website copy clearer and more natural
This commit is contained in:
1 parent
ad8e2d1438
commit
eb04ce3e48
9 files changed
+91
-92
No files matched your search
+26
-26
@@ -115,7 +115,7 @@
|
||||
</nav>
|
||||
|
||||
<section id="reportsSection" aria-labelledby="reportsTab">
|
||||
<p class="muted">На каждый заход нужен отдельный отчёт. Для осмотра прикрепите скриншот перед подготовкой сообщения. Для других отчётов он не нужен.</p>
|
||||
<p class="muted">На каждый заход нужен отдельный отчёт. Перед подготовкой отчёта об осмотре прикрепите скриншот. Для других отчётов он не нужен.</p>
|
||||
<fieldset class="mode-options"><legend>Вид расчёта</legend><div class="tabs">
|
||||
<label class="mode-option"><input type="radio" name="calculator_mode" value="coaching" data-mode="coaching" checked>Прокачка ЛУ/ЗУ</label>
|
||||
<label class="mode-option"><input type="radio" name="calculator_mode" value="training" data-mode="training">Тренировка</label>
|
||||
@@ -167,14 +167,14 @@
|
||||
<label>ID кота<input name="character_id" type="number" min="1"></label>
|
||||
<div class="wide identity-tools"><button type="button" id="resolveIdentity">Найти имя или ID</button><span class="muted" id="identityStatus"></span></div>
|
||||
<label>Место<select name="place"><option>дупло</option><option>расщелина</option></select></label>
|
||||
<label>Количество осмотров<input name="inspections" type="number" min="0" value="0"></label>
|
||||
<label>Число осмотров<input name="inspections" type="number" min="0" value="0"></label>
|
||||
<label class="wide">Ресурсы, по одному на строку: +количество название<br>
|
||||
<div class="quick-actions"><button type="button" id="noResourcesBtn" class="quick-btn">Без ресурсов</button></div>
|
||||
<textarea name="resources" placeholder="+2 вьюнок +1 паук"></textarea></label>
|
||||
</div>
|
||||
|
||||
<div id="goal" class="grid mode hidden">
|
||||
<p class="wide muted">Чтобы узнать, сколько осталось до цели, укажите текущие и нужные баллы, а также длительность захода. Заполнять отчёт не нужно.</p>
|
||||
<p class="wide muted">Укажите, сколько баллов у вас уже есть, сколько должно быть в итоге и сколько минут длится заход. Отчёт не нужен.</p>
|
||||
<label>Текущие баллы<input name="current_points" type="number" min="0" step="0.01" value="0"></label>
|
||||
<label>Целевые баллы<input name="target_points" type="number" min="0" step="0.01" value="25"></label>
|
||||
<label>Минут в одном заходе<input name="minutes_per_session" type="number" min="1" value="20"></label>
|
||||
@@ -184,7 +184,7 @@
|
||||
</div>
|
||||
|
||||
<div id="points" class="grid mode hidden">
|
||||
<p class="wide muted">Выберите занятие и укажите его условия, чтобы посчитать баллы. Заполнять отчёт не нужно.</p>
|
||||
<p class="wide muted">Выберите занятие и заполните поля для него. Отчёт не нужен.</p>
|
||||
<label>Занятие<select name="activity" id="pointsActivity"><option value="coaching">Прокачка ЛУ/ЗУ</option><option value="training">Тренировка</option><option value="inspection">Осмотр</option></select></label>
|
||||
<div id="pointsCoaching" class="wide grid">
|
||||
<label>Навык<select name="skill"><option>ЛУ</option><option>ЗУ</option></select></label>
|
||||
@@ -194,7 +194,7 @@
|
||||
<label class="points-extra hidden">Бельчонок 2<select name="kitten_status"><option value="самостоятельно">самостоятельный</option><option value="несамостоятельно">несамостоятельный</option></select></label>
|
||||
<label class="points-extra hidden">Бельчонок 3<select name="kitten_status"><option value="самостоятельно">самостоятельный</option><option value="несамостоятельно">несамостоятельный</option></select></label>
|
||||
</div>
|
||||
<div id="pointsInspection" class="wide grid hidden"><label>Место<select name="place"><option>дупло</option><option>расщелина</option></select></label><label>Количество осмотров<input name="inspections" type="number" min="0" value="0"></label><label class="wide">Ресурсы, по одному на строку: +количество название<textarea name="resources" placeholder="+2 вьюнок +1 паук"></textarea></label></div>
|
||||
<div id="pointsInspection" class="wide grid hidden"><label>Место<select name="place"><option>дупло</option><option>расщелина</option></select></label><label>Число осмотров<input name="inspections" type="number" min="0" value="0"></label><label class="wide">Ресурсы, по одному на строку: +количество название<textarea name="resources" placeholder="+2 вьюнок +1 паук"></textarea></label></div>
|
||||
<p id="pointsTraining" class="wide muted hidden">За тренировку бельчонок получает 25 баллов.</p>
|
||||
</div>
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
<button type="button" id="saveProfileBtn">Сохранить профиль</button>
|
||||
<button type="button" id="clearProfileBtn" class="muted" style="background:transparent;border-color:#bdb6ad;">Очистить</button>
|
||||
</div>
|
||||
<p class="muted">Имя и ID из профиля будут подставляться в новые отчёты.</p>
|
||||
<p class="muted">Калькулятор подставит имя и ID из профиля в новые отчёты.</p>
|
||||
</div>
|
||||
|
||||
<dialog id="confirmDialog" aria-labelledby="confirmTitle">
|
||||
@@ -232,7 +232,7 @@
|
||||
</section>
|
||||
<section id="sentReportsSection" class="hidden" aria-labelledby="sentReportsTab">
|
||||
<h2>Найти отчёты по ID кота</h2>
|
||||
<p class="muted">Покажем последние 100 отправленных отчётов, где кот указан участником.</p>
|
||||
<p class="muted">Покажем до 100 последних отправленных отчётов, где этот кот указан как участник.</p>
|
||||
<form id="sentReportsForm" class="panel">
|
||||
<div class="grid">
|
||||
<label>ID кота<input id="sentReportsCharacterId" name="character_id" type="text" inputmode="numeric" pattern="[0-9]+" required></label>
|
||||
@@ -247,7 +247,7 @@
|
||||
<section id="applicationsSection" class="hidden" aria-labelledby="applicationsTab">
|
||||
<div id="applicationWorkspace">
|
||||
<h2>Новая заявка</h2>
|
||||
<p class="muted application-intro">Заполните форму, и администратор получит заявку. Готовить форумную отпись не нужно.</p>
|
||||
<p class="muted application-intro">Отправьте заявку через эту форму, и её получит администратор. Писать на форуме не нужно.</p>
|
||||
<div class="application-types" role="group" aria-label="Тип заявки">
|
||||
<button class="application-type" type="button" aria-pressed="true" data-application-type="feather_donation">Пожертвовать перо отряду</button>
|
||||
<button class="application-type" type="button" aria-pressed="false" data-application-type="kitten">Хочу стать бельчонком</button>
|
||||
@@ -259,10 +259,10 @@
|
||||
<label>Имя кота<input name="name" required></label>
|
||||
<label>ID кота<input name="character_id" type="number" min="1" inputmode="numeric" required></label>
|
||||
<label id="applicationVkField" class="wide hidden">Ссылка на страницу VK <span class="muted">(необязательно)</span><input name="vk_link" type="text" inputmode="url" placeholder="vk.com/id… или vk.ru/id…"></label>
|
||||
<section id="applicationKittenFields" class="wide hidden"><label>Скриншот активности<span class="upload"><strong>Выберите изображение</strong><span>PNG, JPEG или WebP до 15 МБ</span><input class="application-screenshots" type="file" accept="image/png,image/jpeg,image/webp" multiple></span></label><ul class="files"></ul></section>
|
||||
<section id="applicationCuratorFields" class="wide hidden"><label>Скриншот ЛУ с дробью<span class="upload"><strong>Прикрепите скриншот ЛУ с дробью</strong><span>PNG, JPEG или WebP; нужен хотя бы один файл</span><input class="application-screenshots" type="file" accept="image/png,image/jpeg,image/webp" multiple></span></label><ul class="files"></ul></section>
|
||||
<section id="applicationFlyingFields" class="wide hidden"><label>Уже сдавали практику?<select name="practiced_before"><option value="no">Нет, не сдавал(-а)</option><option value="yes">Да, сдавал(-а)</option></select></label><label id="applicationPracticeLink" class="hidden">Ссылка на комментарий с прошлой практики<input name="practice_review_link" type="url" placeholder="https://catwar.su/… или https://vk.com/…"></label></section>
|
||||
<section id="applicationFeatherFields" class="wide"><h2>Перья для казны</h2><p class="muted">Укажите количество и цвет перьев, а также откуда они получены.</p><div id="applicationFeathers"></div><button id="applicationAddFeather" type="button">Добавить перо</button></section>
|
||||
<section id="applicationKittenFields" class="wide hidden"><label>Скриншот активности<span class="upload"><strong>Прикрепите хотя бы один скриншот</strong><span>PNG, JPEG или WebP до 15 МБ на файл</span><input class="application-screenshots" type="file" accept="image/png,image/jpeg,image/webp" multiple></span></label><ul class="files"></ul></section>
|
||||
<section id="applicationCuratorFields" class="wide hidden"><label>Скриншот ЛУ с дробью<span class="upload"><strong>Прикрепите хотя бы один скриншот</strong><span>PNG, JPEG или WebP до 15 МБ на файл</span><input class="application-screenshots" type="file" accept="image/png,image/jpeg,image/webp" multiple></span></label><ul class="files"></ul></section>
|
||||
<section id="applicationFlyingFields" class="wide hidden"><label>Уже сдавали практику?<select name="practiced_before"><option value="no">Нет, не сдавал(-а)</option><option value="yes">Да, сдавал(-а)</option></select></label><label id="applicationPracticeLink" class="hidden">Ссылка на комментарий с прошлой практики (обязательно)<input name="practice_review_link" type="url" placeholder="https://catwar.su/… или https://vk.com/…"></label></section>
|
||||
<section id="applicationFeatherFields" class="wide"><h2>Перья для казны</h2><p class="muted">Укажите, сколько перьев, какого они цвета и откуда.</p><div id="applicationFeathers"></div><button id="applicationAddFeather" type="button">Добавить перо</button></section>
|
||||
</div>
|
||||
<p id="applicationError" class="error" role="alert"></p>
|
||||
<div class="actions"><button class="primary" id="applicationSubmit" type="submit">Отправить заявку</button></div>
|
||||
@@ -273,7 +273,7 @@
|
||||
<section id="identitySection" class="hidden" aria-labelledby="identityTab">
|
||||
<div id="identityWorkspace">
|
||||
<h2>Изменить имя кота</h2>
|
||||
<p class="muted">Введите ID кота, чьё имя уже сохранено. Проверьте текущее имя и укажите новое.</p>
|
||||
<p class="muted">Введите ID кота, чтобы найти его сохранённое имя. Проверьте имя и введите новое.</p>
|
||||
<form id="renameIdentityForm" class="panel">
|
||||
<div class="grid">
|
||||
<label>ID кота<input id="renameIdentityId" name="character_id" type="number" min="1" inputmode="numeric" required></label>
|
||||
@@ -294,8 +294,8 @@
|
||||
</main>
|
||||
<dialog id="identityDialog" aria-label="Уточнить имя или ID кота" aria-describedby="identityDialogText">
|
||||
<p id="identityDialogText" role="status"></p>
|
||||
<label id="identityMissingLabel" for="identityMissingValue">Имя или ID, которого не хватает<input id="identityMissingValue" autofocus></label>
|
||||
<p class="muted">Эти имя и ID будут использованы только в текущем расчёте.</p>
|
||||
<label id="identityMissingLabel" for="identityMissingValue">Введите имя или ID кота<input id="identityMissingValue" autofocus></label>
|
||||
<p class="muted">Калькулятор подставит имя и ID только в этот расчёт.</p>
|
||||
<button type="button" id="saveIdentity">Добавить имя и ID</button>
|
||||
<button type="button" id="closeIdentityDialog">Понятно</button>
|
||||
</dialog>
|
||||
@@ -368,13 +368,13 @@
|
||||
fields.forEach(field => { field.disabled = mode !== 'coaching'; });
|
||||
statusHelp.textContent = document.querySelector('#coaching [name="skill"]').value === 'ЛУ'
|
||||
? 'Для ЛУ можно указать не более одного несамостоятельного котёнка.'
|
||||
: 'Укажите самостоятельность каждого котёнка отдельно.';
|
||||
: 'Отметьте для каждого котёнка, самостоятельный он или нет.';
|
||||
}
|
||||
// Returns a user-facing validation error when kitten statuses conflict.
|
||||
function validateStatusRules() {
|
||||
const fields = statusFields();
|
||||
const skill = document.querySelector('#coaching [name="skill"]').value;
|
||||
if (skill === 'ЛУ' && fields.filter(field => field.value === 'несамостоятельно').length > 1) return 'Для ЛУ допускается только один несамостоятельный котёнок.';
|
||||
if (skill === 'ЛУ' && fields.filter(field => field.value === 'несамостоятельно').length > 1) return 'Для ЛУ можно указать не более одного несамостоятельного котёнка.';
|
||||
return '';
|
||||
}
|
||||
// Switches the visible calculator panel and disables fields in hidden panels.
|
||||
@@ -445,7 +445,7 @@
|
||||
(fields.extra_kittens || []).forEach(item => addExtraKitten({name: item[0], id: item[1], independence: item[2]}));
|
||||
updateStatusRules();
|
||||
bulkStatus.textContent = data.status === 'complete'
|
||||
? 'Данные распознаны. Проверьте поля и нажмите «Подготовить сообщение».'
|
||||
? 'Проверьте заполненные поля и нажмите «Подготовить сообщение».'
|
||||
: `Нужно уточнить:\n${(data.questions || []).join('\n')}`;
|
||||
} catch (err) { bulkStatus.textContent = err.message; }
|
||||
});
|
||||
@@ -460,7 +460,7 @@
|
||||
if (data.status === 'found') {
|
||||
setField('inspection', 'character_name', data.name);
|
||||
setField('inspection', 'character_id', data.character_id);
|
||||
identityStatus.textContent = 'Имя и ID найдены, поля заполнены.';
|
||||
identityStatus.textContent = 'Калькулятор подставил имя и ID.';
|
||||
} else {
|
||||
identityDialogText.textContent = data.message;
|
||||
const missing = name ? 'ID кота' : 'Имя кота';
|
||||
@@ -485,7 +485,7 @@
|
||||
const data = await response.json();
|
||||
if (!response.ok) throw new Error(data.error || 'Не удалось сохранить имя и ID');
|
||||
setField('inspection', 'character_name', data.name); setField('inspection', 'character_id', data.character_id);
|
||||
identityDialog.close(); identityStatus.textContent = 'Имя и ID добавлены в текущий расчёт.';
|
||||
identityDialog.close(); identityStatus.textContent = 'Имя и ID добавлены в этот расчёт.';
|
||||
} catch (err) { identityDialogText.textContent = err.message; }
|
||||
finally { saveButton.disabled = false; }
|
||||
});
|
||||
@@ -506,7 +506,7 @@
|
||||
data.inspections = Number(document.querySelector('#pointsInspection [name="inspections"]').value);
|
||||
data.resources = document.querySelector('#pointsInspection [name="resources"]').value.split('\n').map(line => line.trim()).filter(Boolean).map(line => {
|
||||
const match = line.match(/^\+\s*(\d+)\s+(.+)$/);
|
||||
if (!match) throw new Error('Ресурс укажите так: +2 вьюнок.');
|
||||
if (!match) throw new Error('Укажите ресурс так: +2 вьюнок.');
|
||||
return [match[2].trim(), Number(match[1])];
|
||||
});
|
||||
}
|
||||
@@ -519,7 +519,7 @@
|
||||
if (mode === 'inspection') {
|
||||
data.resources = (data.resources || '').split('\n').map(line => line.trim()).filter(Boolean).map(line => {
|
||||
const match = line.match(/^\+\s*(\d+)\s+(.+)$/);
|
||||
if (!match) throw new Error('Ресурс укажите так: +2 вьюнок.');
|
||||
if (!match) throw new Error('Укажите ресурс так: +2 вьюнок.');
|
||||
return [match[2].trim(), Number(match[1])];
|
||||
});
|
||||
}
|
||||
@@ -698,7 +698,7 @@
|
||||
sentReportsResults.replaceChildren();
|
||||
const characterId = sentReportsCharacterId.value.trim();
|
||||
if (!/^[0-9]+$/.test(characterId) || Number(characterId) <= 0) {
|
||||
sentReportsError.textContent = 'Укажите положительный ID кота.';
|
||||
sentReportsError.textContent = 'Введите ID кота: целое число больше нуля.';
|
||||
return;
|
||||
}
|
||||
sentReportsSubmit.disabled = true;
|
||||
@@ -708,7 +708,7 @@
|
||||
const data = await response.json();
|
||||
if (!response.ok) throw new Error(data.error || 'Не удалось загрузить отчёты.');
|
||||
const items = data.items || [];
|
||||
sentReportsStatus.textContent = items.length ? `Найдено отчётов: ${items.length}${items.length === data.limit ? ' (показаны последние 100)' : ''}.` : 'Для этого ID кота отчётов пока нет.';
|
||||
sentReportsStatus.textContent = items.length ? `Найдено отчётов: ${items.length}${items.length === data.limit ? ' (показаны последние 100)' : ''}.` : 'Этот кот пока не указан ни в одном отправленном отчёте.';
|
||||
items.forEach(item => {
|
||||
const article = document.createElement('article');
|
||||
article.className = 'saved-report';
|
||||
@@ -781,7 +781,7 @@
|
||||
function addApplicationFeather(values = {}) {
|
||||
const row = document.createElement('div');
|
||||
row.className = 'feather';
|
||||
row.innerHTML = '<label>Количество<input data-application-field="amount" type="number" min="1" inputmode="numeric" required></label><label>Цвет<input data-application-field="color" placeholder="например, синие" required></label><label>Источник добычи<input data-application-field="source" placeholder="личные запасы, осмотр дупла…" required></label><button class="remove" type="button">Убрать</button>';
|
||||
row.innerHTML = '<label>Количество<input data-application-field="amount" type="number" min="1" inputmode="numeric" required></label><label>Цвет<input data-application-field="color" placeholder="например, синие" required></label><label>Откуда перья<input data-application-field="source" placeholder="личные запасы, осмотр дупла…" required></label><button class="remove" type="button">Убрать</button>';
|
||||
Object.entries(values).forEach(([name, value]) => { const field = row.querySelector(`[data-application-field="${name}"]`); if (field) field.value = value; });
|
||||
row.querySelector('.remove').addEventListener('click', () => row.remove());
|
||||
applicationFeathers.append(row);
|
||||
@@ -849,7 +849,7 @@
|
||||
const response = await fetch('/api/applications', {method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify(payload)});
|
||||
const data = await response.json();
|
||||
if (!response.ok) throw new Error(data.error || 'Не удалось отправить заявку');
|
||||
applicationSuccess.textContent = `Заявка №${data.id} отправлена на рассмотрение.`;
|
||||
applicationSuccess.textContent = `Заявка №${data.id} отправлена. Её рассмотрит администратор.`;
|
||||
applicationSuccess.classList.remove('hidden');
|
||||
applicationForm.reset();
|
||||
applicationFeathers.replaceChildren();
|
||||
|
||||
Reference in new issue
Block a user