Update decision-making phase and enhance localization for presence tracking
ci / server (push) Failing after 3m40s
ci / client (push) Successful in 14s

- Marked tasks as complete in the decision-making phase documentation, indicating readiness for implementation.
- Updated the README to reflect the completion status of the decision-making phase.
- Enhanced localization strings to include new presence tracking features, improving user experience.
- Revised the game screen logic to display real-time presence status, including walking states for individuals.
- Added tests to validate the new localization strings and presence functionalities, ensuring robust performance.
This commit is contained in:
Leonid Pershin
2026-08-19 21:00:12 +03:00
parent b135a9caad
commit 5cd5a6d258
21 changed files with 1839 additions and 72 deletions
@@ -29,6 +29,7 @@ describe('t', () => {
expect(t('mapHeadcount', { name: 'Коридор', count: 12 })).toBe('Коридор (12)');
expect(t('mapHeadcountActivity', { name: 'Класс 101', count: 18, activity: 'Математика · 5А' }))
.toBe('Класс 101 (18 · Математика · 5А)');
expect(t('locationWalking', { name: 'Иванов' })).toBe('Иванов (walking)');
});
});
+2
View File
@@ -175,6 +175,7 @@ const ru = {
presenceAt: '{name}',
presenceWalking: 'в пути ({name})',
presenceAway: 'вне школы',
locationWalking: '{name} (в пути)',
timetableTitle: 'Расписание',
timetableClass: 'Класс',
timetableEmpty: 'Нет уроков.',
@@ -372,6 +373,7 @@ const en: Messages = {
presenceAt: '{name}',
presenceWalking: 'walking ({name})',
presenceAway: 'off campus',
locationWalking: '{name} (walking)',
timetableTitle: 'Timetable',
timetableClass: 'Class',
timetableEmpty: 'No lessons.',
+4 -1
View File
@@ -405,7 +405,10 @@ export class GameScreen {
const names = this.presence.people
.filter((person) => person.nodeId === id)
.map((person) => this.directory.get(person.id) ?? person.id);
.map((person) => {
const name = this.directory.get(person.id) ?? person.id;
return person.state === PresenceState.Walking ? t('locationWalking', { name }) : name;
});
names.sort((left, right) => left.localeCompare(right));
return names;
}