forge
Explore
Log in

Don't you dare go Hollow

Rewrite the Turkish comments and doc comments in English

Browse files at this commit

7fec8742a62d2f0ab5a3665d21f2e47a51a89796Ahmet Kaan GümüşParent: a39278e
  • docs
    • rewrite the Turkish comments and doc comments in English
Show full message
📝 docs: rewrite the Turkish comments and doc comments in English

The Rust repo's own language is English; Turkish had leaked in from the
sibling AI services. Translate every comment and doc comment to English
using the code's own vocabulary (şube -> class section, dönem -> term,
sınıf öğretmeni -> homeroom teacher, ortak sınav -> shared exam, karne ->
report card, …). Quoted Turkish letters/words that are themselves the
data under test (the text-fold examples in `text_fold`/`settings`, the
non-ASCII filename sample) are kept.

The README endpoint table is generated from those doc comments, so it is
regenerated. AGENTS.md records the convention going forward: Turkish
survives only where it is the data under test or user-visible content.
AGENTS.mdmodified+3 -0
@@ -72,3 +72,6 @@ live `ls src/` win on conflict.
7272 - Commits are emoji + conventional type. Vocabulary in use: `feat`, `fix`,
7373 `docs`, `test`, `style`, `chore`. Never `refactor` (unused in this repo's
7474 history). `🎨 style` is reserved for `cargo fmt` commits.
75+- Code, comments and commit messages are English. Turkish survives only where
76+ it is the data under test (test fixtures, fold tables) or user-visible
77+ content (product defaults, OpenAPI examples and descriptions).
README.mdmodified+30 -30
@@ -1147,12 +1147,12 @@ window filtering, before paging; negative values are a `400` naming the field.
11471147 |--------|------------------------------------------------------------------|---------|-------------|
11481148 | GET | `/` | no | Same as `/health` |
11491149 | GET | `/academic-years` | teacher | List every academic year, newest first. Requires teacher+. Paged via `?limit=&offset=` (omit `limit` for the full list); returns a `{items, total, limit, offset}` envelope. |
1150-| POST | `/academic-years` | manager | Create an academic year. Requires manager+. Past dates are allowed — years are calendar structure, not schedules. `grade_promotions` is the sınıf-geçme policy the rollover applies. |
1150+| POST | `/academic-years` | manager | Create an academic year. Requires manager+. Past dates are allowed — years are calendar structure, not schedules. `grade_promotions` is the grade-promotion policy the rollover applies. |
11511151 | GET | `/academic-years/{id}` | teacher | Fetch a single academic year by id. Requires teacher+. |
11521152 | PATCH | `/academic-years/{id}` | manager | Update an academic year. Requires manager+. Omitted fields keep their value; `grade_promotions` is replaced as a whole when sent. An archived year is read-only. |
1153-| DELETE | `/academic-years/{id}` | manager | Delete an academic year. Requires manager+. Refused with a 409 while any şube or dönem still links it — move or delete them first. An archived year must be re-opened (`PATCH` is not enough: there is no unarchive here, so the row is only deletable while open) like every other past-structure write. |
1154-| POST | `/academic-years/{id}/archive` | manager | Archive an academic year. Requires manager+. Stamps `archived_at`, and from then on the whole year is past structure: no new şube, no new dönem, no exam inside it, and no edit or delete of the year itself. Idempotent — a second archive answers `200` with the stamp that already stood. There is no unarchive route: the row is deletable only while open. |
1155-| POST | `/academic-years/{id}/rollover` | manager | Carry another year's şubeler into this one. Requires manager+. Each şube of `from_year` whose grade the target year promotes is planted afresh here — same name, mapped grade, and copies of its instances (`ders_saati`, karne policy, teachers) and of every live member, who are also enrolled into the new instances. A grade with no promotion entry stays behind: that is graduation, and `graduated` names it. The target must be empty (a second rollover into it is a 409, which is what makes the command idempotent), open, and different from the source. |
1153+| DELETE | `/academic-years/{id}` | manager | Delete an academic year. Requires manager+. Refused with a 409 while any section or term still links it — move or delete them first. An archived year must be re-opened (`PATCH` is not enough: there is no unarchive here, so the row is only deletable while open) like every other past-structure write. |
1154+| POST | `/academic-years/{id}/archive` | manager | Archive an academic year. Requires manager+. Stamps `archived_at`, and from then on the whole year is past structure: no new section, no new term, no exam inside it, and no edit or delete of the year itself. Idempotent — a second archive answers `200` with the stamp that already stood. There is no unarchive route: the row is deletable only while open. |
1155+| POST | `/academic-years/{id}/rollover` | manager | Carry another year's class sections into this one. Requires manager+. Each section of `from_year` whose grade the target year promotes is planted afresh here — same name, mapped grade, and copies of its instances (`ders_saati`, report-card policy, teachers) and of every live member, who are also enrolled into the new instances. A grade with no promotion entry stays behind: that is graduation, and `graduated` names it. The target must be empty (a second rollover into it is a 409, which is what makes the command idempotent), open, and different from the source. |
11561156 | GET | `/ai/capabilities` | student | The capabilities connected AI services are serving right now, per capability, with the work in flight — a discovery read for an operator or a service deciding what it may ask this bridge to do. |
11571157 | GET | `/ai/certificate` | no | The AI bridge's certificate (PEM + SHA-256 fingerprint) for a service to pin; `404` when the bridge is off. |
11581158 | GET | `/api-docs/openapi.json` | no | Raw OpenAPI 3 spec |
@@ -1168,8 +1168,8 @@ window filtering, before paging; negative values are a `400` naming the field.
11681168 | PATCH | `/appointments/{id}/reschedule` | teacher | Counter-propose another time for a booking, on the same row (the reason and the history stay in one place). Requires teacher+ and ownership of the slot (or manager/admin). |
11691169 | PATCH | `/appointments/{id}/reschedule/accept` | student | Accept the teacher's counter-proposal. The requester's call alone — it is their commitment. Accepting *is* approval at the proposed time, so the double-booking guard runs again for both sides (`409` if the moved time now collides with something else, or has already started — agreeing to a window that began would mint a meeting nobody can cancel). |
11701170 | PATCH | `/appointments/{id}/reschedule/decline` | student | Refuse the teacher's counter-proposal. The requester's call alone, and it **cancels the booking**: the proposal replaced the time that was asked for, so there is nothing left to fall back to — book another slot instead. The slot frees up, and the original request stays readable as `cancelled` with the refused proposal still on it. Declining is a cancel, so it answers to the same deadline: `409` once the meeting's effective window has started. |
1171-| GET | `/attendance/me` | student | The current user's attendance report: event tallies, lesson roll-call tallies, a per-instance breakdown with attendance rates, and the per-dönem devamsızlık. |
1172-| GET | `/attendance/{user}` | teacher | Any user's attendance report. Requires teacher+, or a parent tied to the target student. Managers, admins, and parents see every instance; a teacher sees the event tallies plus only the roll-call blocks — and the devamsızlık days — of the instances they run. |
1171+| GET | `/attendance/me` | student | The current user's attendance report: event tallies, lesson roll-call tallies, a per-instance breakdown with attendance rates, and the per-term absence breakdown. |
1172+| GET | `/attendance/{user}` | teacher | Any user's attendance report. Requires teacher+, or a parent tied to the target student. Managers, admins, and parents see every instance; a teacher sees the event tallies plus only the roll-call blocks — and the absence days — of the instances they run. |
11731173 | POST | `/auth/login` | no | Log in with username + password — no school. Sets a `session` cookie on success: exactly one active membership enters that school right away (`<slug>.<token>` and the full [`UserResponse`], unchanged for single-school clients), several answer a [`SchoolChoiceResponse`] with a `person.<token>` cookie that `POST /auth/school` binds. |
11741174 | POST | `/auth/logout` | no | Log out: revoke the current session (if any) and clear the cookie. Idempotent — no session required; answers `204` either way. |
11751175 | GET | `/auth/me` | student | Return the currently authenticated user. |
@@ -1210,7 +1210,7 @@ window filtering, before paging; negative values are a `400` naming the field.
12101210 | GET | `/chatbot/threads/{id}/messages/{mid}` | student | Poll one turn. The non-SSE fallback for `/stream`, reading the same row — including the projection that presents a long-stale `pending` as `failed`, so the two can never disagree about a turn's state. |
12111211 | GET | `/chatbot/threads/{id}/messages/{mid}/stream` | student | Watch one turn as Server-Sent Events: `delta` chunks of the answer, then a single `done` carrying the finished message, or one `error`. The stream closes after `done`/`error` — one stream per turn, not per thread. |
12121212 | GET | `/classes` | teacher | List every class, newest first. Requires teacher+. `?grade=` narrows to one grade label, matched exactly as written — the label a blueprint is keyed by, so this is the read that shows which sections a `POST /classes/blueprints` pump covered (and `?grade=` on its own lists the sections with no grade at all). An unknown label is an empty page, not a `404`. Paged via `?limit=&offset=` (omit `limit` for the full list); returns a `{items, total, limit, offset}` envelope whose `total` counts every class under the same filter, not just this page. |
1213-| POST | `/classes` | manager | Create a class. Requires manager+ — a class is school structure, not a teacher's own room. `grade` is a free-text label for the year ("9", "10-A"), `year` links the academic year (which is what binds the şube to a karne and to the rollover), `teacher_id` names the homeroom teacher (sınıf öğretmeni, a teacher+ account); all optional. |
1213+| POST | `/classes` | manager | Create a class. Requires manager+ — a class is school structure, not a teacher's own room. `grade` is a free-text label for the year ("9", "10-A"), `year` links the academic year (which is what binds the class to a report card and to the rollover), `teacher_id` names the homeroom teacher (a teacher+ account); all optional. |
12141214 | GET | `/classes/blueprints` | manager | List every grade blueprint, by grade label. Requires manager+. Paged via `?limit=&offset=` (omit `limit` for all of them). |
12151215 | POST | `/classes/blueprints` | manager | Create a grade's course blueprint and stock every class section already at that grade with it. Requires manager+. |
12161216 | GET | `/classes/blueprints/{grade}` | manager | Fetch one grade's blueprint. Requires manager+. |
@@ -1223,8 +1223,8 @@ window filtering, before paging; negative values are a `400` naming the field.
12231223 | PATCH | `/classes/{id}` | manager | Update a class. Requires manager+. Omitted fields keep their value; `grade`, `year` and `teacher_id` are nullable, so an explicit `null` clears them. |
12241224 | DELETE | `/classes/{id}` | manager | Delete a class. Requires manager+. Refused with a 409 while it still holds students or courses — nothing cascades, because dropping the class silently would leave the enrollments it pumped with nothing left to sweep them. |
12251225 | POST | `/classes/{id}/blueprint` | manager | Stock one class section from its grade's blueprint. Requires manager+ — this writes the roster of every course in the template, which is the office's call, not one course owner's. |
1226-| GET | `/classes/{id}/instances` | teacher | List the instances a class carries — each a catalog course as this section teaches it, with its hours, karne policy and teachers — newest first, paged via `?limit=&offset=` (omit `limit` for all of them). Requires teacher+. Returns a `{items, total, limit, offset}` envelope. `POST /instances/{id}` edits one; this is the read that names them. |
1227-| POST | `/classes/{id}/instances` | teacher | Attach a course to a class: this is what **mints the instance** — the class×course row every exam, session, lesson and roster under this class's course now keys on. Requires teacher+ and catalog rights on that course (its creator, or a manager/admin): attaching writes that course's roster for this section, and the weekly hours and karne policy the instance starts with. The class's whole roster is enrolled in one go, and students already enrolled by hand keep their own rows. Attaching the same course twice is a 409. |
1226+| GET | `/classes/{id}/instances` | teacher | List the instances a class carries — each a catalog course as this section teaches it, with its hours, report-card policy and teachers — newest first, paged via `?limit=&offset=` (omit `limit` for all of them). Requires teacher+. Returns a `{items, total, limit, offset}` envelope. `POST /instances/{id}` edits one; this is the read that names them. |
1227+| POST | `/classes/{id}/instances` | teacher | Attach a course to a class: this is what **mints the instance** — the class×course row every exam, session, lesson and roster under this class's course now keys on. Requires teacher+ and catalog rights on that course (its creator, or a manager/admin): attaching writes that course's roster for this section, and the weekly hours and report-card policy the instance starts with. The class's whole roster is enrolled in one go, and students already enrolled by hand keep their own rows. Attaching the same course twice is a 409. |
12281228 | DELETE | `/classes/{id}/instances/{instance}` | teacher | Detach an instance from a class: the instance and everything the class taught under it — exams (with results, questions and images), homework (with submissions and grades), sessions and roll call, the roster it pumped and its teacher links — are swept, and the uploaded files those rows named are unlinked from disk. Requires teacher+ and catalog rights on the course the instance teaches (its creator, or a manager/admin): this is the inverse of attaching. |
12291229 | GET | `/classes/{id}/members` | teacher | List a class's roster, newest first, paged via `?limit=&offset=` (omit `limit` for the whole roster). Requires teacher+. Returns a `{items, total, limit, offset}` envelope. |
12301230 | POST | `/classes/{id}/members` | manager | Put a student in a class. Requires manager+. They are enrolled into every instance the class already carries, in one go, and a student already enrolled by hand keeps the row they have (and it survives their removal from the class). Adding the same student twice is a 409; a student who *left* is added afresh — the roster is a history, and the partial index only holds one live stint per pair. |
@@ -1242,14 +1242,14 @@ window filtering, before paging; negative values are a `400` naming the field.
12421242 | POST | `/course-notes/{id}/rag/reindex` | teacher | Re-index a course note now, without waiting for its next write. |
12431243 | DELETE | `/course-notes/{id}/rag/{output_id}` | teacher | Delete one stored AI output. Requires teacher+ and management rights over the course. Dropping an output does not stop the next note or file change from regenerating one. |
12441244 | GET | `/courses` | student | List the catalog courses visible to the caller: every course for manager+, otherwise the courses they teach somewhere plus the ones they're enrolled in. Paged via `?limit=&offset=` (omit `limit` for the full list); returns a `{items, total, limit, offset}` envelope. |
1245-| POST | `/courses` | teacher | Create a catalog course owned by the current user. Requires the `teacher` role or higher. `kind` picks the flavor — `course` (a regular class, the default), `study` (a supervised study session — etüt), or `club` (a student club — kulüp). A catalog row teaches nobody by itself: a şube attaches it into an instance (`POST /classes/{id}/instances`), and a `study`/`club` is joined school-wide (`POST /courses/{id}/members`). |
1245+| POST | `/courses` | teacher | Create a catalog course owned by the current user. Requires the `teacher` role or higher. `kind` picks the flavor — `course` (a regular class, the default), `study` (a supervised study session), or `club` (a student club). A catalog row teaches nobody by itself: a class section attaches it into an instance (`POST /classes/{id}/instances`), and a `study`/`club` is joined school-wide (`POST /courses/{id}/members`). |
12461246 | GET | `/courses/me` | student | The catalog courses the current user is reached by, paged via `?limit=&offset=` (omit `limit` for all of them); returns a `{items, total, limit, offset}` envelope. |
12471247 | GET | `/courses/{id}` | student | Fetch a single catalog course by id. Visible to the people it reaches — students enrolled in any of its instances, members of the course itself — and to its creator and managers/admins while those accounts are still `teacher`+. |
12481248 | PATCH | `/courses/{id}` | teacher | Update a catalog course. Requires teacher+ and catalog rights — its creator, or a manager/admin. Omitted fields keep their value. |
1249-| DELETE | `/courses/{id}` | teacher | Delete a catalog course. Requires teacher+; only its creator or a manager/admin may delete it. Refused with a 409 while the course is still taught anywhere — detach it from every şube (`DELETE /classes/{id}/instances/{instance}`) and remove its individual members first, so a course that carries teaching is never dropped by accident. Once free, it cascades the instances' exams (with their results, questions, answers, and question images), homework (with submissions, submission files, and grades), sessions and roll call, its individual memberships, its subjects, and the teacher links. It also strikes its id out of every class blueprint that named it — a template holding a course nothing can resolve is a stocking run that skips it and a `PATCH` that refuses the very list the template already holds. |
1250-| GET | `/courses/{id}/members` | teacher | List a club/etüt's members, newest first, paged via `?limit=&offset=` (omit `limit` for the whole list). Requires teacher+ and catalog rights. Returns a `{items, total, limit, offset}` envelope. An instance's roster is `GET /instances/{id}/enrollments`. |
1251-| POST | `/courses/{id}/members` | teacher | Add a user to a club or etüt — the **school-scoped** membership tier. Requires teacher+ and catalog rights (its creator, or a manager/admin). Only students can be added, and only to a `study` (etüt) or `club` (kulüp): a regular ders (`kind` `course`) has no school-wide roster — its students come from the şubeler that teach it, and that join is `POST /instances/{id}/enrollments` (400 here). Idempotent: a pair that already holds a membership is returned as-is. |
1252-| DELETE | `/courses/{id}/members/{user}` | teacher | Remove a user from a club or etüt. Requires teacher+ and catalog rights. Existing exam results and badges are untouched — the membership is a door, not a record of what happened inside. A pair holding no membership is a 404. |
1249+| DELETE | `/courses/{id}` | teacher | Delete a catalog course. Requires teacher+; only its creator or a manager/admin may delete it. Refused with a 409 while the course is still taught anywhere — detach it from every class section (`DELETE /classes/{id}/instances/{instance}`) and remove its individual members first, so a course that carries teaching is never dropped by accident. Once free, it cascades the instances' exams (with their results, questions, answers, and question images), homework (with submissions, submission files, and grades), sessions and roll call, its individual memberships, its subjects, and the teacher links. It also strikes its id out of every class blueprint that named it — a template holding a course nothing can resolve is a stocking run that skips it and a `PATCH` that refuses the very list the template already holds. |
1250+| GET | `/courses/{id}/members` | teacher | List a club/study's members, newest first, paged via `?limit=&offset=` (omit `limit` for the whole list). Requires teacher+ and catalog rights. Returns a `{items, total, limit, offset}` envelope. An instance's roster is `GET /instances/{id}/enrollments`. |
1251+| POST | `/courses/{id}/members` | teacher | Add a user to a club or study — the **school-scoped** membership tier. Requires teacher+ and catalog rights (its creator, or a manager/admin). Only students can be added, and only to a `study` (supervised study) or `club`: a regular course (`kind` `course`) has no school-wide roster — its students come from the class sections that teach it, and that join is `POST /instances/{id}/enrollments` (400 here). Idempotent: a pair that already holds a membership is returned as-is. |
1252+| DELETE | `/courses/{id}/members/{user}` | teacher | Remove a user from a club or study. Requires teacher+ and catalog rights. Existing exam results and badges are untouched — the membership is a door, not a record of what happened inside. A pair holding no membership is a 404. |
12531253 | GET | `/courses/{id}/subjects` | student | List a course's subjects in creation order, paged via `?limit=&offset=` (omit `limit` for all of them). Visible to its creator, to managers/admins, and to anyone the course reaches (a student enrolled in one of its instances, or a member of it). Returns a `{items, total, limit, offset}` envelope. |
12541254 | POST | `/courses/{id}/subjects` | teacher | Create a subject inside a course. Requires teacher+ and catalog rights (its creator, or a manager/admin). Subjects are the curriculum topics of the *catalog* row — every exam of every instance teaching it tags its questions with one of them. |
12551255 | GET | `/events` | student | List all events, newest first. Paged via `?limit=&offset=` (omit `limit` for every event); returns a `{items, total, limit, offset}` envelope. |
@@ -1264,7 +1264,7 @@ window filtering, before paging; negative values are a `400` naming the field.
12641264 | DELETE | `/events/{id}/register/{user}` | teacher | Take a user off the signup list — the register rules mirrored: teacher+, students' seats or your own (another *staff* member's seat only if their account no longer exists), and only while the list is open (the event hasn't started or, ends_at-only, passed). A seat held by a `parent` is freeable by any teacher+ as well: no route lets that account free it itself, so a stranded seat needs a door. Attendance already marked stays recorded. |
12651265 | GET | `/events/{id}/roster` | teacher | The event's expected-attendee roster joined with its attendance marks — the who-came/who-missed report. Resolved live from the audience (today's role holders, current enrollment, the current class roster, the current signup list), so it always reflects the present roster; attendance rows for people no longer in the audience are omitted here (they remain in `GET /events/{id}/attendance`). Requires teacher+. Paged via `?limit=&offset=` (omit `limit` for the whole roster). |
12661266 | GET | `/exams` | student | List the exams visible to the caller: every exam for manager+, otherwise the exams of the instances they teach or are enrolled in — minus other people's drafts (a draft shows only to its instance's managers). Paged via `?limit=&offset=` (omit `limit` for the full list); returns a `{items, total, limit, offset}` envelope. |
1267-| GET | `/exams/{id}` | student | Fetch a single exam by id. Visible to **any instance the exam is addressed to** — its owner's enrolled students and teachers, and, for an announced exam (ortak sınav), each addressed section's alike — plus managers/admins; drafts only show to the managers of an addressed instance (everyone else gets a `404`, as if the exam doesn't exist yet — because it doesn't, officially). |
1267+| GET | `/exams/{id}` | student | Fetch a single exam by id. Visible to **any instance the exam is addressed to** — its owner's enrolled students and teachers, and, for an announced exam (a shared exam), each addressed section's alike — plus managers/admins; drafts only show to the managers of an addressed instance (everyone else gets a `404`, as if the exam doesn't exist yet — because it doesn't, officially). |
12681268 | PATCH | `/exams/{id}` | teacher | Update an exam. Requires teacher+ and management rights over the exam's instance (an assigned teacher, its class's homeroom teacher, or a manager/admin). Omitted fields keep their value; an explicit `null` clears a schedule field; the instance an exam hangs off is not updatable here. The schedule must stay consistent as a whole (see the create endpoint), and `mode` is frozen once anyone has started an attempt — times, duration, `max_attempts`, and `allow_rejoin` stay editable so a running exam can be extended, granted retakes, or have its rejoin door opened live. `draft: false` publishes a draft; `draft: true` re-hides an exam, but only while it has no attempts and no results (`409` otherwise) — students never lose sight of an exam they've already sat or been graded on. |
12691269 | DELETE | `/exams/{id}` | teacher | Delete an exam. Requires teacher+ and management rights over the exam's instance (an assigned teacher, its class's homeroom teacher, or a manager/admin). Cascades the exam's results, attempts, questions, answers, and question + answer images (blobs included). |
12701270 | GET | `/exams/{id}/attempt` | student | The caller's own (latest) attempt: status, deadline, remaining time, and mark once graded — everything a student's live exam screen needs, judged by the server clock. `404` until an attempt is started. |
@@ -1278,8 +1278,8 @@ window filtering, before paging; negative values are a `400` naming the field.
12781278 | GET | `/exams/{id}/attempt/ws` | student | **WebSocket** exam room (students only): state ticks, autosave, finish; entering clears `left_at`, leaving stamps it (see "Taking an exam") |
12791279 | GET | `/exams/{id}/attempts/{user}/answers` | teacher | One student's answer sheet with correctness flags — always the *latest* sitting's answers (a retake starts from a blank sheet). Every row carries the saved answer plus `is_correct` (`null` for text questions — those are the grader's call), and the machine's `auto_score` over the choice questions is attached as a *suggestion*: the final mark stays human, via `POST /exams/{id}/results`. Requires teacher+ and management rights over the exam's instance. |
12801280 | GET | `/exams/{id}/attempts/{user}/answers/{qid}/image` | teacher | One student's drawn-answer bytes, for the grader. Requires teacher+ and management rights over the exam's instance — the `attempt_answers` gate. |
1281-| GET | `/exams/{id}/audience` | student | List the instances an exam is announced to, its owner included — the read behind the announce routes' answer, useful on its own to a client that wants to show where else an exam is sat. Visible to the exam's own audience: an addressed instance's enrolled students, its teachers (or its şube's homeroom teacher), and managers/admins — except drafts, which stay a `404` to everyone but an addressed instance's managers. |
1282-| POST | `/exams/{id}/audience` | teacher | Announce an exam to another instance — the **ortak sınav** write: one exam addressed to a sibling şube, so it and its marks stand in that section's exam list, marks report and karne. Requires teacher+ and management rights over the exam's **owner** instance (an assigned teacher, its şube's homeroom teacher, or a manager/admin) — the target instance's teachers have no say. The target must teach the exam's own catalog course and sit under the same academic year (`400` otherwise), the owner itself is refused (`400`), and an archived target year is a `409`. Announcing a pair that already stands is a no-op answering `200` with the audience unchanged. |
1281+| GET | `/exams/{id}/audience` | student | List the instances an exam is announced to, its owner included — the read behind the announce routes' answer, useful on its own to a client that wants to show where else an exam is sat. Visible to the exam's own audience: an addressed instance's enrolled students, its teachers (or its class section's homeroom teacher), and managers/admins — except drafts, which stay a `404` to everyone but an addressed instance's managers. |
1282+| POST | `/exams/{id}/audience` | teacher | Announce an exam to another instance — the **shared exam** write: one exam addressed to a sibling class section, so it and its marks stand in that section's exam list, marks report and report card. Requires teacher+ and management rights over the exam's **owner** instance (an assigned teacher, its class section's homeroom teacher, or a manager/admin) — the target instance's teachers have no say. The target must teach the exam's own catalog course and sit under the same academic year (`400` otherwise), the owner itself is refused (`400`), and an archived target year is a `409`. Announcing a pair that already stands is a no-op answering `200` with the audience unchanged. |
12831283 | DELETE | `/exams/{id}/audience/{instance}` | teacher | Withdraw an exam from one instance's audience. Requires teacher+ and management rights over the exam's **owner** instance, like the announce itself. The owner's own pair is not withdrawable (`400`) — that is the instance the exam belongs to, and deleting the exam is what ends it; an archived year refuses the withdrawal with the same `409` its other writes answer. A pair that holds no audience row is a `404`. |
12841284 | GET | `/exams/{id}/live` | teacher | A one-shot live snapshot of the exam: who's in, who's still writing (and on which sitting), who walked out of the room (`left_at`), who never showed at all (`absent`, once the window is over), time each student has left, and marks as they land — the roster of every instance the exam is addressed to, so an announced-to section's sitters are here too. Requires teacher+ and management rights over the exam's instance. Poll it to keep a monitor up to date. |
12851285 | GET | `/exams/{id}/questions` | teacher | The exam's question list, `correct` choice ids included — the answer key, paged via `?limit=&offset=` (omit `limit` for the whole list). Requires teacher+ and management rights over the exam's instance. Students read questions through `GET /exams/{id}/attempt/questions`. Returns a `{items, total, limit, offset}` envelope. |
@@ -1297,7 +1297,7 @@ window filtering, before paging; negative values are a `400` naming the field.
12971297 | POST | `/exams/{id}/questions/{qid}/to-bank` | teacher | Save one of this exam's questions into the school-wide bank as a reusable template. Requires teacher+ and management rights over the exam's instance. The caller becomes the template's owner; the question's subject rides along as origin metadata. A full copy — text, points, spec, illustration, and option pictures — lands under a new bank id. Provenance rides both ways: the origin exam is recorded on the template as `source_exam`, and the exam question's `banked_as` is pointed at the new template (a repeat save is allowed and repoints it at the newest one). `from_bank` is left alone — it records the other direction and a save never changes where a question came from. |
12981298 | GET | `/exams/{id}/result` | student | The current user's own result for an exam. Any authenticated user may read their own mark; `404` while ungraded (or when the exam doesn't exist). |
12991299 | GET | `/exams/{id}/results` | teacher | List an exam's results, paged via `?limit=&offset=` (omit `limit` for all of them). Requires teacher+ and management rights over an instance the exam is addressed to — students read only their own via `GET /exams/{id}/result`. Returns a `{items, total, limit, offset}` envelope. |
1300-| POST | `/exams/{id}/results` | teacher | Record (or overwrite) a student's mark for an exam. Requires teacher+ and management rights over **an instance the exam is addressed to** (the announced-to section's teacher grades its own students on an ortak sınav); the target must be a student enrolled in one of them. Only students carry marks; students never grade — and nobody grades themselves. A draft can't be graded (`409`) — a mark would point at an exam its student can't see. |
1300+| POST | `/exams/{id}/results` | teacher | Record (or overwrite) a student's mark for an exam. Requires teacher+ and management rights over **an instance the exam is addressed to** (the announced-to section's teacher grades its own students on a shared exam); the target must be a student enrolled in one of them. Only students carry marks; students never grade — and nobody grades themselves. A draft can't be graded (`409`) — a mark would point at an exam its student can't see. |
13011301 | DELETE | `/exams/{id}/results/{user}` | teacher | Remove a student's result from an exam. Requires teacher+ and management rights over an instance the exam is addressed to. |
13021302 | GET | `/exams/{id}/review/attempts` | student | The caller's own sitting numbers at an exam — every seq that carries answers or a mark, ascending. Own-scoped review view; opens once the teacher enables review and has marked the caller, and closes again (409) while the caller can still sit the exam. |
13031303 | GET | `/exams/{id}/review/attempts/{seq}/answers` | student | One of the caller's own sittings, judged — the `seq`th attempt's answers, drawing refs, correctness flags, and auto-score suggestion. Own-scoped review view; 409 while the caller can still sit the exam, so a retake can't read its own correctness off an earlier seq. |
@@ -1310,8 +1310,8 @@ window filtering, before paging; negative values are a `400` naming the field.
13101310 | GET | `/exams/{id}/students/{user}/marks` | teacher | A student's full mark history at an exam — every sitting's mark, oldest first (the grade-of-record is the latest). Requires teacher+ and management rights over the exam's instance. |
13111311 | GET | `/health` | no | Health probe: the database verdict and the AI bridge, `503` when degraded. |
13121312 | GET | `/homework` | student | List the homework across the caller's instances — their "my homework" view — paged via `?limit=&offset=` (omit `limit` for all of it). Manager+ see every instance's homework; a teacher sees the homework of instances they run; a student sees only the homework they are assigned (whole-roster ones plus any subset that names them, each with its `assigned` narrowed to themselves). Returns a `{items, total, limit, offset}` envelope. |
1313-| GET | `/homework/report/{user}` | teacher | A student's homework report across the instances their şube carries, paged via `?limit=&offset=` (omit `limit` for all of it): one row per homework in their audience — submitted/late/missing state plus the grade once one exists. Statuses and marks, never the submitted files (observers get the report, not the bytes). Requires teacher+, or a parent linked to the target student. Managers, admins, and parents see every instance; a teacher sees only the target's instances they manage. Returns a `{items, total, limit, offset}` envelope. |
1314-| GET | `/homework/{id}` | student | Fetch a single homework by id. Visible to whoever can view its instance (its enrolled students, its teachers, its şube's homeroom teacher, and managers/admins). A student the homework is *not* assigned to gets a 404 — the same no-leak an unseen exam draft gets, so a subset assignment never reveals itself to the students left out of it. To a caller without instance-management rights the `assigned` subset comes back narrowed to their own id: being named is theirs to know, the rest of the roster is not. |
1313+| GET | `/homework/report/{user}` | teacher | A student's homework report across the instances their class section carries, paged via `?limit=&offset=` (omit `limit` for all of it): one row per homework in their audience — submitted/late/missing state plus the grade once one exists. Statuses and marks, never the submitted files (observers get the report, not the bytes). Requires teacher+, or a parent linked to the target student. Managers, admins, and parents see every instance; a teacher sees only the target's instances they manage. Returns a `{items, total, limit, offset}` envelope. |
1314+| GET | `/homework/{id}` | student | Fetch a single homework by id. Visible to whoever can view its instance (its enrolled students, its teachers, its class section's homeroom teacher, and managers/admins). A student the homework is *not* assigned to gets a 404 — the same no-leak an unseen exam draft gets, so a subset assignment never reveals itself to the students left out of it. To a caller without instance-management rights the `assigned` subset comes back narrowed to their own id: being named is theirs to know, the rest of the roster is not. |
13151315 | PATCH | `/homework/{id}` | teacher | Edit a homework's title, description, due date, subject, or assigned subset. Requires teacher+ and management rights over its instance. Omitted fields keep their value; a newly set `due_at` is re-checked against now and a new `subject_id` re-checked against the instance's course. Narrowing `assigned` is refused (409) while it would orphan an existing submission or result. |
13161316 | DELETE | `/homework/{id}` | teacher | Delete a homework and everything under it — submissions, their files, and results — then unlink the file blobs from disk. Requires teacher+ and management rights over its instance. The cascade is one transaction whose homework-row lock keeps a submission from landing under the homework mid-delete; the blob names are collected inside that transaction, before the rows are wiped, and removed after, so a crash in between strands at worst an unreachable file. |
13171317 | GET | `/homework/{id}/result` | student | The caller's own grade for a homework. Any authenticated user may read their own; `404` while ungraded (or when the homework doesn't exist). This is the one read a student graded `missing` *without* ever submitting has — their submission endpoints 404 while nothing is submitted. |
@@ -1339,13 +1339,13 @@ window filtering, before paging; negative values are a `400` naming the field.
13391339 | POST | `/insights/summaries` | manager | Store a batch of ZEKA's student summaries (and their attention items). |
13401340 | POST | `/insights/sweep` | manager | Delete every `zeka_*` row whose retention window has closed. |
13411341 | GET | `/instances/me` | student | The instances the caller may act in or see, paged via `?limit=&offset=` (omit `limit` for all of them), newest first; returns a `{items, total, limit, offset}` envelope. The route a student reads to find the courses their section is being taught, and a teacher the ones they run. |
1342-| GET | `/instances/{id}` | student | Fetch one instance by id. Visible to its enrolled students, its assigned teachers, its şube's homeroom teacher, and managers/admins. |
1343-| PATCH | `/instances/{id}` | teacher | Update one instance's own policy. Requires teacher+ and a right over this instance: manager+, one of its assigned teachers, or its şube's homeroom teacher. Omitted fields keep their value; both are non-clearable. |
1342+| GET | `/instances/{id}` | student | Fetch one instance by id. Visible to its enrolled students, its assigned teachers, its section's homeroom teacher, and managers/admins. |
1343+| PATCH | `/instances/{id}` | teacher | Update one instance's own policy. Requires teacher+ and a right over this instance: manager+, one of its assigned teachers, or its section's homeroom teacher. Omitted fields keep their value; both are non-clearable. |
13441344 | GET | `/instances/{id}/enrollments` | teacher | List this instance's roster, paged via `?limit=&offset=` (omit `limit` for the whole roster). Requires teacher+ and a right over the instance — students see their own instances via `GET /instances/me`. Returns a `{items, total, limit, offset}` envelope. |
1345-| POST | `/instances/{id}/enrollments` | teacher | Enroll a student into this instance (idempotent upsert). Requires teacher+ and a right over the instance. Only students can be enrolled — enrollment is student membership, and it gates sitting exams, being graded, and the roster. The row is hand-placed (`source` `null`), so no şube sweep can take it back. |
1345+| POST | `/instances/{id}/enrollments` | teacher | Enroll a student into this instance (idempotent upsert). Requires teacher+ and a right over the instance. Only students can be enrolled — enrollment is student membership, and it gates sitting exams, being graded, and the roster. The row is hand-placed (`source` `null`), so no section sweep can take it back. |
13461346 | DELETE | `/instances/{id}/enrollments/{user}` | teacher | Unenroll a student from this instance. Requires teacher+ and a right over the instance. Existing exam results are kept (they disappear from the student's marks report until re-enrolled). |
1347-| GET | `/instances/{id}/exams` | student | List one instance's exams, paged via `?limit=&offset=` (omit `limit` for all of them). Visible to the instance's enrolled students, its teachers, its şube's homeroom teacher, and managers/admins — but drafts appear only to the instance's managers. Returns a `{items, total, limit, offset}` envelope. |
1348-| POST | `/instances/{id}/exams` | teacher | Create an exam inside one instance. Requires teacher+ and a right over the instance; the exam's marks count into the instance's average with its kind's weight (`GET /settings`) and into the dönem's karne named by `term`. Omit `mode` for an offline-graded exam nobody can sit; `sync`/`async` take a window (async also `duration_ms`), `open` is sittable anytime with an optional per-attempt `duration_ms`. `max_attempts` (default 1, `0` = unlimited) meters retakes and `allow_rejoin` (default `true`) is the exam-room door — both stay editable while the exam runs. Send `draft: true` to keep the exam private while it's still being written: only the instance's managers see it, and sitting and grading are blocked until it's published (`PATCH` `draft: false`). Only a class-delivered course (`kind` `course`) carries exams. |
1347+| GET | `/instances/{id}/exams` | student | List one instance's exams, paged via `?limit=&offset=` (omit `limit` for all of them). Visible to the instance's enrolled students, its teachers, its section's homeroom teacher, and managers/admins — but drafts appear only to the instance's managers. Returns a `{items, total, limit, offset}` envelope. |
1348+| POST | `/instances/{id}/exams` | teacher | Create an exam inside one instance. Requires teacher+ and a right over the instance; the exam's marks count into the instance's average with its kind's weight (`GET /settings`) and into the term's report card named by `term`. Omit `mode` for an offline-graded exam nobody can sit; `sync`/`async` take a window (async also `duration_ms`), `open` is sittable anytime with an optional per-attempt `duration_ms`. `max_attempts` (default 1, `0` = unlimited) meters retakes and `allow_rejoin` (default `true`) is the exam-room door — both stay editable while the exam runs. Send `draft: true` to keep the exam private while it's still being written: only the instance's managers see it, and sitting and grading are blocked until it's published (`PATCH` `draft: false`). Only a class-delivered course (`kind` `course`) carries exams. |
13491349 | GET | `/instances/{id}/homework` | student | List one instance's homework, newest first, paged via `?limit=&offset=` (omit `limit` for all of it). Visible to the instance's enrolled students, its teachers, and managers/admins — but a student sees only the homework they are assigned (whole-roster ones plus subsets that name them, each with its `assigned` narrowed to themselves). Returns a `{items, total, limit, offset}` envelope. |
13501350 | POST | `/instances/{id}/homework` | teacher | Assign homework inside one instance. Requires teacher+ and a right over the instance. The homework is tagged with one of the catalog course's subjects and given a future `due_at`; `assigned` optionally narrows it to a subset of the enrolled students (omit or empty = the whole roster). |
13511351 | GET | `/instances/{id}/sessions` | student | List one instance's lesson sessions, most recent first, paged via `?limit=&offset=` (omit `limit` for all of them). Visible to the instance's enrolled students, its teachers, and managers/admins. Returns a `{items, total, limit, offset}` envelope. |
@@ -1353,8 +1353,8 @@ window filtering, before paging; negative values are a `400` naming the field.
13531353 | POST | `/instances/{id}/teachers` | manager | Assign a teacher to this instance (idempotent). Manager+ only — staffing is the office's call. The assignee must already hold the `teacher` role or higher; the assignment gives them full management of the instance (exams, sessions, homework, roster, grading) but they keep no catalog rights over the course itself. |
13541354 | DELETE | `/instances/{id}/teachers/{user}` | manager | Unassign a teacher from this instance. Manager+ only. The instance, its exams, sessions, and roster are untouched — the teacher just loses their management rights over it. A user who was never assigned is a 404. |
13551355 | GET | `/limits` | no | Every fixed validation bound the API enforces. Unauthenticated: the registration and login forms need the username and password bounds before a session exists, and none of these values are secrets — they are the same rules a 400 would spell out. |
1356-| GET | `/marks/karne` | student | The current user's karne for one dönem: every instance of their şubeler that counts toward the karne, the `ders_saati`-weighted average across them, and the verdict. An archived dönem serves the snapshot the school froze when it was closed; an open one computes live. |
1357-| GET | `/marks/karne/{user}` | teacher | Any user's karne for one dönem. Requires teacher+, or a parent tied to the target student. A linked parent and manager+ read the whole karne; an exactly-teacher caller sees only the lines of the instances they run, with the dönem average recomputed over those and no verdict (see [`narrow_karne`]). |
1356+| GET | `/marks/karne` | student | The current user's report card for one term: every instance of their sections that counts toward the report card, the `ders_saati`-weighted average across them, and the verdict. An archived term serves the snapshot the school froze when it was closed; an open one computes live. |
1357+| GET | `/marks/karne/{user}` | teacher | Any user's report card for one term. Requires teacher+, or a parent tied to the target student. A linked parent and manager+ read the whole report card; an exactly-teacher caller sees only the lines of the instances they run, with the term average recomputed over those and no verdict (see [`narrow_karne`]). |
13581358 | GET | `/marks/me` | student | The current user's mark report: every instance they sit, with its graded exams, weighted instance averages, and the overall average. |
13591359 | GET | `/marks/{user}` | teacher | Any user's mark report. Requires teacher+, or a parent tied to the target student. Managers, admins, and parents see every instance; a teacher sees only the target's instances they run — the rest of the report (other sections) stays out of reach. |
13601360 | GET | `/meals/attendance/{user}` | teacher | One student's meal-attendance history, newest mark first. Requires teacher+, or a parent linked to them — the caller's own id always passes, like the balance and ledger reads. Narrow to a date range with `?from=&to=` (inclusive `YYYY-MM-DD` bounds on the menu's day, each held to the same real-calendar-day rule the menu's own date is). Paged via `?limit=&offset=`. |
@@ -1465,11 +1465,11 @@ window filtering, before paging; negative values are a `400` naming the field.
14651465 | DELETE | `/subjects/{id}` | teacher | Delete a subject. Requires teacher+ and management rights over its course. Refused with a 409 while any exam question or homework still references it — re-tag or delete those first, so nothing is left pointing at a subject that no longer exists. |
14661466 | GET | `/swagger` | no | Interactive API docs (Swagger UI) |
14671467 | GET | `/terms` | student | List every term, newest first. Any authenticated user — students need the calendar to make sense of their courses. Paged via `?limit=&offset=` (omit `limit` for the full list); returns a `{items, total, limit, offset}` envelope. |
1468-| POST | `/terms` | manager | Create a dönem inside an academic year. Requires manager+. Past dates are allowed — dönemler are calendar structure, not schedules; an *archived* year refuses the new dönem (`409`), because past years take no new structure. |
1468+| POST | `/terms` | manager | Create a term inside an academic year. Requires manager+. Past dates are allowed — terms are calendar structure, not schedules; an *archived* year refuses the new term (`409`), because past years take no new structure. |
14691469 | GET | `/terms/{id}` | student | Fetch a single term by id. |
14701470 | PATCH | `/terms/{id}` | manager | Update a term. Requires manager+. Omitted fields keep their value; the merged range must stay ordered. |
1471-| DELETE | `/terms/{id}` | manager | Delete a dönem. Requires manager+. Refused with a 409 while anything still hangs off it — an exam filed in it, or a karne frozen for it — so a dönem is never dropped out from under marks that name it; move or delete those first. The dönem's own academic year is untouched (that is `DELETE /academic-years/{id}`, which refuses while a dönem still links it). |
1472-| POST | `/terms/{id}/archive` | manager | Archive a dönem. Requires manager+. Archiving **freezes the karnes**: every student with a roster row under the dönem's year gets a snapshot of their report, and from then on `GET /marks/karne` serves that record instead of recomputing — a mark corrected after the fact no longer rewrites what a family holds. An archived dönem takes no edits and no delete; exams may still be created in it while its *year* is open (the archive is a record, not a wall). Idempotent — archiving an already-archived dönem answers `200` with the stamp it already had and never re-freezes. |
1471+| DELETE | `/terms/{id}` | manager | Delete a term. Requires manager+. Refused with a 409 while anything still hangs off it — an exam filed in it, or a report card frozen for it — so a term is never dropped out from under marks that name it; move or delete those first. The term's own academic year is untouched (that is `DELETE /academic-years/{id}`, which refuses while a term still links it). |
1472+| POST | `/terms/{id}/archive` | manager | Archive a term. Requires manager+. Archiving **freezes the report cards**: every student with a roster row under the term's year gets a snapshot of their report, and from then on `GET /marks/karne` serves that record instead of recomputing — a mark corrected after the fact no longer rewrites what a family holds. An archived term takes no edits and no delete; exams may still be created in it while its *year* is open (the archive is a record, not a wall). Idempotent — archiving an already-archived term answers `200` with the stamp it already had and never re-freezes. |
14731473 | POST | `/terms/{id}/unarchive` | manager | Re-open an archived term. Requires manager+. Idempotent the same way as archiving: an already-open term answers `200`. |
14741474 | GET | `/time` | no | Server clock: `{now}` UTC unix-millis, for a frontend to sync against. |
14751475 | GET | `/users` | admin | List every user with their role, newest first. Admin only. Paged: pass `?limit=&offset=` to take a window (omit `limit` for the whole list); the response is a `{items, total, limit, offset}` envelope where `total` counts every user. |
src/ai/insight.rsmodified+2 -2
@@ -89,13 +89,13 @@ pub struct StudentResponse {
8989 }
9090
9191 /// What the backend would ask a service to compute for one class (a course
92-/// as one şube teaches it). Defined for the contract; nothing dispatches it
92+/// as one section teaches it). Defined for the contract; nothing dispatches it
9393 /// yet — see the module docs.
9494 #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
9595 pub struct ClassRequest {
9696 /// The course or class the analysis is about.
9797 pub course_id: String,
98- /// The dönem to read; omitted, the service uses the current one.
98+ /// The term to read; omitted, the service uses the current one.
9999 #[serde(default, skip_serializing_if = "Option::is_none")]
100100 pub term: Option<String>,
101101 /// Length of the attention list.
src/ai/rag_chat.rsmodified+8 -8
@@ -9,7 +9,7 @@
99 //! The service answers *about* a school's course-note corpus, so the request
1010 //! carries both who is asking (so the service can read that person's own data
1111 //! back through the bridge's api reads, as `on_behalf_of`) and the
12-//! `(sınıf, ders)` scope the corpus is routed by. The reply returns the answer
12+//! `(class, course)` scope the corpus is routed by. The reply returns the answer
1313 //! text plus the citations behind it, so the backend can resolve each cited
1414 //! passage to the course-note file it came from.
1515
@@ -20,20 +20,20 @@ use crate::constant::{
2020 AI_RAG_CHAT_CAPABILITY, AI_RAG_CHAT_TIMEOUT_SECS, MAX_RAG_CITATIONS, MAX_RAG_CITATION_PAGES,
2121 };
2222
23-/// One `(sınıf, ders)` pair the question is scoped to.
23+/// One `(class, course)` pair the question is scoped to.
2424 ///
2525 /// The corpus is routed by the **pair**: a grade and a subject list sent
2626 /// separately would cross-product into combinations the asker never named, so
27-/// each pair is one scope the service may retrieve from. `sinif` is optional —
28-/// a question about a subject across every grade names `ders` alone — and
29-/// `ders` is required, since a subject-less scope retrieves nothing.
27+/// each pair is one scope the service may retrieve from. The class is optional —
28+/// a question about a subject across every grade names the course alone — and
29+/// the course is required, since a subject-less scope retrieves nothing.
3030 #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
3131 pub struct RagScopePair {
3232 /// The class/grade the subject is taught in (`"9"`, `"10"`), or omitted to
3333 /// scope the subject across grades.
3434 #[serde(default)]
3535 pub sinif: Option<String>,
36- /// The subject/course name the pair is scoped to (Matematik, Fizik). The
36+ /// The subject/course name the pair is scoped to (Mathematics, Physics). The
3737 /// one field a pair cannot go without.
3838 pub ders: String,
3939 }
@@ -66,7 +66,7 @@ pub struct RagChatRequestPayload {
6666 /// request's copy, so a service may answer on it: a student must not be
6767 /// handed an answer scoped for a manager.
6868 pub asker_role: String,
69- /// The `(sınıf, ders)` pairs the question is scoped to — one entry per pair,
69+ /// The `(class, course)` pairs the question is scoped to — one entry per pair,
7070 /// because the RAG routes corpora by the pair. At most
7171 /// [`MAX_RAG_SCOPE_PAIRS`](crate::constant::MAX_RAG_SCOPE_PAIRS); a request
7272 /// carrying more is refused rather than narrowed.
@@ -434,7 +434,7 @@ mod tests {
434434 );
435435
436436 // The three optional fields default to empty on a minimal service
437- // reply, and a scope pair may omit `sinif`.
437+ // reply, and a scope pair may omit the class.
438438 let bare: RagChatReplyPayload =
439439 serde_json::from_value(json!({ "text": "bilmiyorum", "abstained": true })).unwrap();
440440 assert_eq!(bare.reason, "");
src/constant.rsmodified+17 -17
@@ -63,7 +63,7 @@ pub const MAX_COURSE_NOTE_FILES: usize = 10;
6363
6464 pub const MAX_MESSAGE_SUBJECT_LEN: usize = 200;
6565 pub const MAX_MESSAGE_BODY_LEN: usize = 10_000;
66-/// A message's optional sender-chosen tag ("Etüt", "Sınav", …) — free text,
66+/// A message's optional sender-chosen tag ("Study", "Exam", …) — free text,
6767 /// rendered as a badge by the UI.
6868 pub const MAX_MESSAGE_LABEL_LEN: usize = 50;
6969
@@ -105,8 +105,8 @@ pub const MAX_EXAM_DESCRIPTION_LEN: usize = 2_000;
105105 pub const MAX_COURSE_TITLE_LEN: usize = 200;
106106 pub const MAX_COURSE_DESCRIPTION_LEN: usize = 2_000;
107107
108-/// A class section (şube) is named like a course, but its optional `grade` is
109-/// a free-text label the school picks ("9", "10-A", "anaokulu") — a line of
108+/// A class section is named like a course, but its optional `grade` is
109+/// a free-text label the school picks ("9", "10-A", "kindergarten") — a line of
110110 /// display text, so it is bounded like the other short labels, not like a
111111 /// description.
112112 pub const MAX_CLASS_NAME_LEN: usize = 200;
@@ -130,14 +130,14 @@ pub const MAX_CLASS_GRADE_LEN: usize = 20;
130130 pub const MAX_CLASS_MEMBERS: i64 = 200;
131131 pub const MAX_CLASS_COURSES: i64 = 50;
132132
133-/// Weekly lesson hours of a class×course instance (D8's karne weight). Bounded
133+/// Weekly lesson hours of a class×course instance (D8's report-card weight). Bounded
134134 /// so a typo cannot make one instance dominate the year average.
135135 pub const MIN_DERS_SAATI: i64 = 1;
136136 pub const MAX_DERS_SAATI: i64 = 40;
137137
138-/// The default grade-display bands: the Türkiye 5-point scale (85–100 = 5,
139-/// … 0–44 = 1). Schools edit the list via `PATCH /settings`; the karne verdict
140-/// reads the band labelled `"2"` as the pass boundary.
138+/// The default grade-display bands: the Turkish 5-point scale (85–100 = 5,
139+/// … 0–44 = 1). Schools edit the list via `PATCH /settings`; the report-card
140+/// verdict reads the band labelled `"2"` as the pass boundary.
141141 pub const DEFAULT_GRADE_BANDS: [(i64, &str); 5] =
142142 [(85, "5"), (70, "4"), (55, "3"), (45, "2"), (0, "1")];
143143
@@ -168,7 +168,7 @@ pub const MAX_SESSION_TOPIC_LEN: usize = 200;
168168 /// `PATCH /settings`. An exam's kind decides how heavily it counts into the
169169 /// course average — the defaults all weigh 1 (a plain average) so weighting
170170 /// is opt-in policy, not baked-in opinion. The defaults are the Turkish K12
171-/// classroom's own: yazılı, sözlü, uygulama.
171+/// classroom's own: written, oral, practice.
172172 pub const DEFAULT_EXAM_KINDS: [(&str, i64); 3] = [("yazili", 1), ("sozlu", 1), ("uygulama", 1)];
173173
174174 /// Bounds for the school-editable lists in settings (exam kinds, attendance
@@ -192,7 +192,7 @@ pub const MAX_TERM_NAME_LEN: usize = 100;
192192 /// An academic year is named like a term ("2026-2027").
193193 pub const MAX_ACADEMIC_YEAR_NAME_LEN: usize = 100;
194194
195-/// The per-dönem devamsızlık limits a school may configure; a bound so a typo
195+/// The per-term absence limits a school may configure; a bound so a typo
196196 /// cannot disable the rule or make it absurd.
197197 pub const MAX_ABSENCE_DAYS: i64 = 365;
198198
@@ -248,7 +248,7 @@ pub const MAX_MENU_CAPACITY: i64 = 10_000;
248248 pub const MAX_DIETARY_TAGS: usize = 10;
249249 pub const MAX_DIETARY_NOTE_LEN: usize = 500;
250250
251-/// Money is **minor units** (kuruş) as `i64` everywhere — never a decimal and
251+/// Money is **minor units** as `i64` everywhere — never a decimal and
252252 /// never a float. `MAX_DISH_PRICE_MINOR` caps one dish (10 000 ₺);
253253 /// `MAX_LEDGER_AMOUNT_MINOR` caps one ledger line (100 000 ₺), which is wide
254254 /// enough for a term's prepayment.
@@ -287,8 +287,8 @@ pub const MAX_MEAL_CANCEL_CUTOFF_MINUTES: i64 = 7 * 24 * 60;
287287 /// school sets its hour.
288288 pub const MAX_MEAL_SERVING_MINUTE: i64 = 24 * 60 - 1;
289289
290-/// The only accepted course kinds. `course`: a regular class (ders). `study`:
291-/// a supervised study session (etüt). Behaviorally identical — the kind is a
290+/// The only accepted course kinds. `course`: a regular class. `study`: a
291+/// supervised study session. Behaviorally identical — the kind is a
292292 /// label for the UI, everything else (enrollment, exams, sessions, marks)
293293 /// works the same.
294294 pub const COURSE_KINDS: [&str; 3] = ["course", "study", "club"];
@@ -356,7 +356,7 @@ pub const MAX_FEE_PLAN_ASSIGN_WRITES: usize = 3_000;
356356 /// charge, the refunds under a payment, and every reversal among them. The
357357 /// over-payment cap folds that whole subtree one query per line while holding
358358 /// the process-global payment lock, so an unbounded subtree is an unbounded
359-/// stall for every other payment in the school: 2 000 one-kuruş payments make
359+/// stall for every other payment in the school: 2 000 one-minor-unit payments make
360360 /// the next one issue 2 001 queries with the lock held. Twenty pieces is
361361 /// already a pathological way to settle a single installment.
362362 pub const MAX_LEDGER_APPLIED_LINES: usize = 20;
@@ -596,7 +596,7 @@ pub const AI_RAG_CHAT_TIMEOUT_SECS: u64 = 90;
596596
597597 /// The capability an AI service declares to analyse one student (ZEKA,
598598 /// `hezarfen_zeka`). It is the on-demand half of ZEKA — the service also
599-/// recomputes on its own schedule — and it is what a teacher's "hesapla" is
599+/// recomputes on its own schedule — and it is what a teacher's "calculate" is
600600 /// routed to. The service reads the student's own data back through the
601601 /// bridge's api reads and has the backend write its `zeka_*` rows — no AI
602602 /// service holds a school database credential here (see the storage-surface
@@ -612,7 +612,7 @@ pub const AI_INSIGHT_STUDENT_CAPABILITY: &str = "insight.student";
612612 pub const AI_INSIGHT_STUDENT_TIMEOUT_SECS: u64 = 120;
613613
614614 /// The capability an AI service declares to analyse one class×course (a
615-/// şube's own instance of a course). Declared here so the name exists in one
615+/// section's own instance of a course). Declared here so the name exists in one
616616 /// place, but **no door dispatches it yet**: the request would name a course
617617 /// the service has to enumerate a roster for, and the bridge's read allowlist
618618 /// carries no member listing — that half of the contract is still open
@@ -784,7 +784,7 @@ pub const PODCAST_JOB_STALE_ETA_FACTOR: i64 = 3;
784784 /// a client sees one vocabulary however the job died.
785785 pub const PODCAST_INTERRUPTED_CODE: &str = "interrupted";
786786
787-/// The most `(sınıf, ders)` scope pairs one `rag.chat` request may carry. The
787+/// The most `(class, course)` scope pairs one `rag.chat` request may carry. The
788788 /// corpus is routed by the **pair** — a grade and a subject list sent
789789 /// separately would cross-product into combinations the asker never named — so
790790 /// this is the number of pairs handed to the service in one call, bounding
@@ -1229,7 +1229,7 @@ pub const POMODORO_COUNTED_TODAY_FIELD: &str = "pomodoro_counted_today";
12291229 pub const MIN_COUNTED_POMODORO_MS: i64 = 300_000;
12301230 pub const MAX_COUNTED_POMODORO_PER_DAY: i64 = 16;
12311231 /// A stint's optional student-given label — the student's own name for what
1232-/// the stint is for ("math", "TYT denemesi"), free text rather than a subject
1232+/// the stint is for ("math", "mock exam"), free text rather than a subject
12331233 /// link, bounded like the other short labels.
12341234 pub const MAX_POMODORO_LABEL_LEN: usize = 100;
12351235 /// The staff-side and second student-side totals, same shape and same rules:
src/db/academic_year.rsmodified+8 -8
@@ -2,12 +2,12 @@
22 //! field-scoped PATCH whose `WHERE` re-checks the merged range, and the 0/0
33 //! delete guard.
44 //!
5-//! The year is the top of the academic calendar (D3): a şube belongs to a year
6-//! and a dönem ([`crate::db::term`]) is a grading slice inside it. Its two
7-//! counters are the delete guard — a year that still carries a şube or a dönem
8-//! is refused outright, because dropping it silently would strand the year's
9-//! structure. The rollover that reads and writes the şubeler lives one layer
10-//! up ([`crate::service::academic_year::rollover`]).
5+//! The year is the top of the academic calendar (D3): a section belongs to a
6+//! year and a term ([`crate::db::term`]) is a grading slice inside it. Its two
7+//! counters are the delete guard — a year that still carries a section or a
8+//! term is refused outright, because dropping it silently would strand the
9+//! year's structure. The rollover that reads and writes the sections lives one
10+//! layer up ([`crate::service::academic_year::rollover`]).
1111
1212 use sqlx::types::Json;
1313
@@ -175,7 +175,7 @@ pub async fn archive(db: &Database, id: &AcademicYearId) -> Result<Option<Academ
175175 Ok(written)
176176 }
177177
178-/// Delete the year, but only while no şube and no dönem links it — nothing
178+/// Delete the year, but only while no section and no term links it — nothing
179179 /// here unlinks or cascades. `false` = refused, nothing was written.
180180 ///
181181 /// Both counts are read off the year's own row, so the check and the delete
@@ -205,7 +205,7 @@ pub async fn delete(db: &Database, year: AcademicYear) -> Result<bool, AppError>
205205 }
206206
207207 /// A real academic year for the fixtures of the tables that hang off one: a
208-/// dönem ([`crate::db::term::a_test_term`]) and, through it, every exam. Minted
208+/// term ([`crate::db::term::a_test_term`]) and, through it, every exam. Minted
209209 /// per call — the name is unique — with a creator that is a real `app_user`
210210 /// row, because `creator` is a foreign key.
211211 #[cfg(test)]
src/db/class_course.rsmodified+3 -3
@@ -5,7 +5,7 @@
55 //! [`crate::db::class_pump`].
66 //!
77 //! An instance is the academic anchor now: it carries the weekly hours
8-//! (`ders_saati`), whether it counts toward the karne, the roster counter and
8+//! (`ders_saati`), whether it counts toward the report card, the roster counter
99 //! its own teachers ([`crate::db::class_course_teacher`]). Reads speak the
1010 //! *bare uuid* id of the instance; the (class, course) pair survives as the
1111 //! UNIQUE key the attach gates on.
@@ -82,7 +82,7 @@ pub async fn list_for_class(
8282 }
8383
8484 /// The instances one catalog course is taught in, newest first — the read
85-/// behind "which şubeler run this course".
85+/// behind "which sections run this course".
8686 pub async fn list_for_course(
8787 db: &Database,
8888 course: &CourseId,
@@ -183,7 +183,7 @@ pub async fn read(db: &Database, id: &ClassCourseId) -> Result<Option<ClassCours
183183 }
184184
185185 /// The class this instance belongs to, or `None` when the id names no row —
186-/// the seam every instance-scoped route reads the şube (and, through it, the
186+/// the seam every instance-scoped route reads the section (and, through it, the
187187 /// year) off.
188188 pub async fn class_of(db: &Database, id: &ClassCourseId) -> Result<Option<ClassGroupId>, AppError> {
189189 let row = sqlx::query!(
src/db/class_course_teacher.rsmodified+1 -1
@@ -1,7 +1,7 @@
11 //! The `class_course_teacher` junction: who teaches one instance.
22 //!
33 //! D6 moved teacher assignment off the catalog course and onto the instance —
4-//! two şubeler teaching the same course may legitimately have different
4+//! two sections teaching the same course may legitimately have different
55 //! teachers — so this is the table every instance-membership gate reads
66 //! ([`crate::service::class_course::ensure_instance_teacher`]) and the one the
77 //! demotion sweep strips ([`crate::db::user::set_role_cascade`]).
src/db/class_group.rsmodified+12 -12
@@ -12,7 +12,7 @@ use crate::domain::class_group::{ClassGrade, ClassGroup, ClassGroupId, ClassName
1212 use crate::domain::user::UserId;
1313 use crate::error::{AppError, ValidationError};
1414
15-/// The refusal a şube write naming a year that is not there gets — the mirror
15+/// The refusal a section write naming a year that is not there gets — the mirror
1616 /// of [`crate::domain::term::gone_error`], one layer up the calendar.
1717 fn year_gone() -> AppError {
1818 AppError::Validation(ValidationError::Invalid {
@@ -268,11 +268,11 @@ pub async fn list_for_year(
268268 Ok(classes)
269269 }
270270
271-/// Every class `user` is the homeroom teacher (sınıf öğretmeni) of, newest
272-/// first — the same order [`list_all`] gives, since this is a narrowing of
273-/// that list and not a second one.
271+/// Every class `user` is the homeroom teacher of, newest first — the same
272+/// order [`list_all`] gives, since this is a narrowing of that list and not a
273+/// second one.
274274 ///
275-/// It is the read behind "which şubeler do I run": the homeroom teacher of a
275+/// It is the read behind "which sections do I run": the homeroom teacher of a
276276 /// section may act on every instance of it (D10, the third arm of
277277 /// [`crate::service::class_course::ensure_instance_teacher`]) without being a
278278 /// member of it or assigned to the instance — and without a read like this the
@@ -321,7 +321,7 @@ pub async fn unassign_everywhere(db: &Database, user: &UserId) -> Result<(), App
321321 /// the delete as a `23503`), plus the provenance tags naming it from rows that
322322 /// outlive it — a rollover copy's `source_class_group` and a handed-over
323323 /// enrollment's `source`, both hard foreign keys into this table. Dropping a
324-/// şube takes its own history with it; a row that merely *remembers* the şube
324+/// section takes its own history with it; a row that merely *remembers* the section
325325 /// keeps standing, untagged. An event aimed at the class keeps standing with
326326 /// `audience_class` cleared — the course twin's documented outcome
327327 /// (`db::course::delete`): the roster resolves live, so it simply reads empty.
@@ -363,7 +363,7 @@ pub async fn delete(db: &Database, class: ClassGroup) -> Result<bool, AppError>
363363 )
364364 .execute(&mut *tx)
365365 .await?;
366- // The roster history goes with the şube. The 0/0 guard counts *live*
366+ // The roster history goes with the section. The 0/0 guard counts *live*
367367 // stints, so a class whose last student soft-left passes it with the
368368 // history row still standing — and `class_member.class` is a hard
369369 // foreign key, which would answer the delete below as a `23503`.
@@ -373,11 +373,11 @@ pub async fn delete(db: &Database, class: ClassGroup) -> Result<bool, AppError>
373373 )
374374 .execute(&mut *tx)
375375 .await?;
376- // …and the same key from the *other* side: a stint another şube holds
376+ // …and the same key from the *other* side: a stint another section holds
377377 // remembers where it came from (a rollover copy's `source_class_group`)
378378 // and an enrollment a class wrote remembers which class pumped it
379379 // (its `source`). Both are hard keys into this row, so both would
380- // refuse the delete. The rows outlive the şube and stay; only the tag
380+ // refuse the delete. The rows outlive the section and stay; only the tag
381381 // goes.
382382 sqlx::query!(
383383 r#"UPDATE class_member SET source_class_group = NULL WHERE source_class_group = $1"#,
@@ -442,7 +442,7 @@ mod tests {
442442 UserId::from_key(&id.to_string())
443443 }
444444
445- /// A real academic year: the şube's year link is a foreign key now, and
445+ /// A real academic year: the section's year link is a foreign key now, and
446446 /// the class-count claim it carries is what these tests are about.
447447 async fn a_year(name: &str, db: &Database) -> AcademicYear {
448448 let at = crate::domain::timestamp::Timestamp::from_millis;
@@ -617,7 +617,7 @@ mod tests {
617617 }
618618
619619 /// The bite test for the class half of the academic-year delete guard
620- /// (D3): a year is undeletable while a *şube* links it, on its own
620+ /// (D3): a year is undeletable while a *section* links it, on its own
621621 /// column, and every way that link can end gives the reference back.
622622 /// Claiming into `term_count` instead would pass the first assert and
623623 /// fail the roundtrip through the year's own delete.
@@ -871,7 +871,7 @@ mod tests {
871871 /// none — so the class passes it with the history row still standing, and
872872 /// `class_member.class` (a hard foreign key) is what used to answer this
873873 /// delete, as a `23503` the route turns into a 500. The roster history
874- /// goes with the şube it belongs to.
874+ /// goes with the section it belongs to.
875875 #[tokio::test]
876876 async fn a_soft_left_member_does_not_block_the_delete_and_goes_with_it() {
877877 use crate::db::class_pump::{self, Attached};
src/db/class_member.rsmodified+4 -4
@@ -4,9 +4,9 @@
44 //! [`crate::service::class_member`].
55 //!
66 //! The table is a history: `left_at` NULL is the live stint, and every read
7-//! here filters on it — a student who left the şube holds no seat and appears
8-//! on no roster, while their earlier row survives for the record (and for the
9-//! karne's attribution).
7+//! here filters on it — a student who left the section holds no seat and
8+//! appears on no roster, while their earlier row survives for the record (and
9+//! for the report card's attribution).
1010
1111 use crate::constant::CLASS_MEMBER_TABLE;
1212 use crate::database::Database;
@@ -34,7 +34,7 @@ pub async fn list_for_class(
3434 }
3535
3636 /// The classes one student is currently in, newest stint first — the read
37-/// behind "which class section (şube) am I in". A left stint is history and
37+/// behind "which class section am I in". A left stint is history and
3838 /// does not appear.
3939 pub async fn list_for_user(
4040 db: &Database,
src/db/class_pump.rsmodified+9 -9
@@ -1,7 +1,7 @@
11 //! The pump behind the class layer: one link row changed, and every
22 //! `enrollment` row that link implies reconciled with it, in one transaction.
33 //!
4-//! A class section (şube) has two link tables — `class_member` (a student in
4+//! A class section has two link tables — `class_member` (a student in
55 //! it) and `class_course` (a course attached to it, as that class×course
66 //! *instance*) — and the *product* of the two is the roster it owes: every
77 //! live member is enrolled in every instance the class carries, in real
@@ -387,7 +387,7 @@ pub(crate) async fn add_member(
387387 add_member_sourced(db, class, user, by, None).await
388388 }
389389
390-/// [`add_member`] carrying the stint's *provenance*: the şube the student was
390+/// [`add_member`] carrying the stint's *provenance*: the section the student was
391391 /// copied from, written into `source_class_group` in the same statement as
392392 /// the row. `None` is the hand add — a student someone put here, who came
393393 /// from nowhere (the pump is the only writer of this column, and a rollover
@@ -508,13 +508,13 @@ pub(crate) async fn add_member_sourced(
508508 ///
509509 /// The instance's own id is minted here (v7, so a class's instances list in
510510 /// creation order) and its policy columns take the schema defaults: one weekly
511-/// hour, counted toward the karne, an empty roster. A PATCH on `/instances`
511+/// hour, counted toward the report card, an empty roster. A PATCH on `/instances`
512512 /// changes them afterwards.
513513 ///
514514 /// Two counters ride the write, both in this one transaction: the class's
515515 /// `class_course_count` (claimed by the conditional CTE, so a full or gone
516516 /// class writes nothing) and the *catalog's* `class_course_count` — how many
517-/// şubeler teach this course, which is what [`crate::db::course::delete`]'s
517+/// sections teach this course, which is what [`crate::db::course::delete`]'s
518518 /// guard reads. This is the only insert path into `class_course`; every layer
519519 /// above it (hand attach, blueprint pump, rollover copy) reaches the counter
520520 /// through here.
@@ -583,7 +583,7 @@ pub(crate) async fn attach_course(
583583 Attached::Gone
584584 });
585585 }
586- // The catalog's own counter: how many şubeler teach this course. It is
586+ // The catalog's own counter: how many sections teach this course. It is
587587 // what [`crate::db::course::delete`]'s guard reads — a course a class
588588 // still teaches may not go — and this insert is the only place it can
589589 // be claimed. It is a *count*, not a capacity (D5: nothing is refused
@@ -788,7 +788,7 @@ pub(crate) async fn leave_member(
788788 /// The sweep's rule, and it is the whole rule: **every row the ended stint
789789 /// owned goes, and each instance gets its roster count back**. An enrollment
790790 /// is keyed `(class_course, app_user)` — one row per *instance* — so a student
791-/// in two şubeler that teach the same course holds two rows, one on each
791+/// in two sections that teach the same course holds two rows, one on each
792792 /// section's instance, and the seat they keep is the other section's own row,
793793 /// written when they joined it. Handing this row over to a rival class (the
794794 /// pre-remodel rule, when one school-wide course carried one roster) would
@@ -875,7 +875,7 @@ async fn drop_member(
875875 .collect::<Vec<_>>();
876876 // Every row this class's tag owns goes, and each instance gets its
877877 // roster count back — see the doc above: the student's seat in a
878- // second şube teaching the same course is that şube's *own* row, so
878+ // second section teaching the same course is that section's *own* row, so
879879 // there is no heir to hand this one over to.
880880 for (instance, member) in rows {
881881 release(tx, instance, member).await?;
@@ -969,7 +969,7 @@ pub(crate) async fn detach_course(
969969 .execute(&mut *tx)
970970 .await?;
971971 // …and the catalog's own counter: the course is taught in one fewer
972- // şube from this commit. Same transaction as the delete, so the link
972+ // section from this commit. Same transaction as the delete, so the link
973973 // and its count move together — `course::delete`'s guard reads this,
974974 // and a course whose last instance was just detached is deletable the
975975 // moment this lands. `GREATEST` for the same reason the class counter
@@ -988,7 +988,7 @@ pub(crate) async fn detach_course(
988988
989989 /// The row goes, and the instance's roster count with it. It is the *only*
990990 /// fate for an enrollment a section's exit owns: the roster is per instance
991-/// (D4), so a student who is also in another şube teaching the same course
991+/// (D4), so a student who is also in another section teaching the same course
992992 /// keeps their seat there through that section's own row — see
993993 /// [`drop_member`].
994994 ///
src/db/course.rsmodified+10 -10
@@ -3,7 +3,7 @@
33 //! Listed newest first; deleted with its whole subtree in one guarded cascade.
44 //!
55 //! The catalog is a template since the K12 remodel (D1): the academic work —
6-//! roster, exams, timetable, teachers — lives on the instances a şube attaches,
6+//! roster, exams, timetable, teachers — lives on the instances a section attaches,
77 //! so this row carries only what every instance shares (title, description,
88 //! kind) and two counters. The catalog is Manager+-owned (D6): there is no
99 //! per-teacher ownership list, and the two counters are the delete guard.
@@ -46,7 +46,7 @@ impl CourseRow {
4646 }
4747
4848 /// Mint a catalog course. No term is claimed any more: the catalog is not
49-/// bound to a dönem (exams are, through their instance), and no capacity is
49+/// bound to a term (exams are, through their instance), and no capacity is
5050 /// stored — the roster counter lives on the instance and gates nothing.
5151 pub async fn create(
5252 db: &Database,
@@ -464,12 +464,12 @@ pub(crate) async fn sweep_instance_subtree(
464464 .await?;
465465 // Both directions of the audience table, and each has to go before the
466466 // row it names. The rows *addressed to* this instance (an exam owned by
467- // another instance may be announced here — an ortak sınav) reference the
467+ // another instance may be announced here — a shared exam) reference the
468468 // `class_course` row the caller deletes right after this sweep and would
469469 // otherwise refuse it with a `23503`. The rows *of* the exams this sweep
470470 // deletes reference *those* exams the same way (`exam_audience.exam` is
471471 // `NO ACTION` too), so they block the `DELETE FROM exam` below wherever
472- // they point — an audience of a swept exam in a şube that is *not* being
472+ // they point — an audience of a swept exam in a section that is *not* being
473473 // detached included.
474474 //
475475 // The instance row is held `FOR UPDATE` by the caller from before this
@@ -543,12 +543,12 @@ pub(crate) async fn sweep_instance_subtree(
543543 )
544544 .execute(&mut *tx)
545545 .await?;
546- // The swept exams give their dönem's reference back off the rows this
546+ // The swept exams give their term's reference back off the rows this
547547 // statement removed, per term (the mirror of `Exam::delete`'s
548548 // single-exam release): `db::exam::create` claimed `term.exam_count` for
549- // each of them, and a claim nothing releases leaves the dönem's
549+ // each of them, and a claim nothing releases leaves the term's
550550 // `exam_count = 0` delete guard permanently failing — which takes the
551- // term, and the academic year whose own guard counts its dönems, down
551+ // term, and the academic year whose own guard counts its terms, down
552552 // with it. Fused with the delete for the same reason the two releases
553553 // above are: a concurrent single-exam delete releases its own claim, so a
554554 // count taken before this statement could give one back twice.
@@ -848,7 +848,7 @@ mod tests {
848848 }
849849
850850 /// A catalog course, minted per call. The catalog is a school-wide
851- /// template since the remodel: no dönem to link, no capacity to store.
851+ /// template since the remodel: no term to link, no capacity to store.
852852 async fn a_course(db: &Database) -> Course {
853853 create(
854854 db,
@@ -861,7 +861,7 @@ mod tests {
861861 .unwrap()
862862 }
863863
864- /// A şube, for the tests that need an instance attached to it.
864+ /// A section, for the tests that need an instance attached to it.
865865 async fn a_class(
866866 on: &UserId,
867867 name: &str,
@@ -993,7 +993,7 @@ mod tests {
993993 async fn a_delete_racing_an_attach_never_answers_500() {
994994 let (db, _leases) = crate::database::init_test_db().await;
995995 let manager = a_person(&db, "mgr", "manager").await;
996- // One şube per racer; each round attaches them all into one fresh
996+ // One section per racer; each round attaches them all into one fresh
997997 // catalog course, so the round's delete has six rival claims to meet.
998998 let mut classes = Vec::new();
999999 for seat in 0..6 {
src/db/course_membership.rsmodified+5 -5
@@ -1,6 +1,6 @@
11 //! The `course_membership` table: a student's individual membership in a
2-//! *school-scoped* course (D9) — a kulüp or an etüt, joined directly rather
3-//! than through a şube's instance.
2+//! *school-scoped* course (D9) — a club or a supervised study, joined directly
3+//! rather than through a section's instance.
44 //!
55 //! It is the `enrollment` table's twin minus two things: the instance key (a
66 //! club has no class to belong to) and the roster pump's `source` tag (a
@@ -10,7 +10,7 @@
1010 //!
1111 //! Whether a given course *may* be joined this way is
1212 //! [`crate::service::enrollment::join_activity`]'s decision: a class-delivered
13-//! ders ([`crate::domain::course::CourseKind::is_class_delivered`]) is joined
13+//! course ([`crate::domain::course::CourseKind::is_class_delivered`]) is joined
1414 //! through its instance, never here.
1515
1616 use crate::database::{Database, tx_with_retry, unique_violation};
@@ -174,8 +174,8 @@ pub async fn list_for_course(
174174 .await
175175 }
176176
177-/// Every membership `user` holds, newest first — the "my clubs and etüts"
178-/// read.
177+/// Every membership `user` holds, newest first — the "my clubs and supervised
178+/// studies" read.
179179 pub async fn list_for_user(
180180 db: &Database,
181181 user: &UserId,
src/db/enrollment.rsmodified+7 -7
@@ -42,7 +42,7 @@ enum Verdict {
4242 /// records.
4343 ///
4444 /// `source` is the class the roster pump wrote this row on behalf of, or
45-/// `None` for a hand-placed (seçmeli) enrollment. The two halves of that
45+/// `None` for a hand-placed (elective) enrollment. The two halves of that
4646 /// rule: only a row carrying the key is a class's to take back
4747 /// ([`crate::db::class_pump`]), and a hand unenroll wins permanently.
4848 ///
@@ -260,7 +260,7 @@ pub async fn list_for_exam_audience(
260260 /// behind an event addressed at a course.
261261 ///
262262 /// The two membership tiers again: an enrollment in any of the course's
263-/// instances, or an individual club/etüt membership. Both are existence
263+/// instances, or an individual club/supervised-study membership. Both are existence
264264 /// probes on their own indexes; one entity's audience must not fold a whole
265265 /// roster to answer yes.
266266 pub async fn user_is_in_course(
@@ -289,11 +289,11 @@ pub async fn user_is_in_course(
289289 /// instances' rosters and its own individual memberships.
290290 ///
291291 /// One course's "students" is two populations since D9 split the two tiers: a
292-/// ders reaches them through the instance a şube teaches (enrollment), and a
293-/// club/etüt through the school-scoped membership. A reader that wants the
294-/// course's audience — an event addressed at the course, a who-missed report —
295-/// means both, and deduping in SQL keeps a student who is in two of its
296-/// instances on the list once.
292+/// course reaches them through the instance a section teaches (enrollment), and
293+/// a club or supervised study through the school-scoped membership. A reader
294+/// that wants the course's audience — an event addressed at the course, a
295+/// who-missed report — means both, and deduping in SQL keeps a student who is
296+/// in two of its instances on the list once.
297297 pub async fn list_users_for_course(
298298 db: &Database,
299299 course: &CourseId,
src/db/event.rsmodified+1 -1
@@ -35,7 +35,7 @@ pub async fn includes(db: &Database, event: &Event, user: &User) -> Result<bool,
3535 // The (class, user) pair is the membership row's own key, so the point
3636 // check is one existence probe — and `left_at IS NULL` makes it the
3737 // *live* stint's, the row the partial unique index
38- // `class_member_live_pair` carries: a student who left the şube is
38+ // `class_member_live_pair` carries: a student who left the section is
3939 // history, not audience, and a stale probe would let them be marked
4040 // present at (and counted by) an event their section no longer
4141 // attends.
src/db/exam.rsmodified+13 -13
@@ -35,11 +35,11 @@ pub async fn create(
3535 draft: bool,
3636 ) -> Result<Exam, AppError> {
3737 // A missing parent is refused by the real foreign keys: an instance, a
38- // dönem or a creator that is gone is `SQLSTATE 23503`, and this call
38+ // term or a creator that is gone is `SQLSTATE 23503`, and this call
3939 // site's parent-gone answer is the same `NotFound` the old
4040 // existence-proof touch answered with.
4141 //
42- // The dönem is *claimed* in the same statement as the row (`exam_count`
42+ // The term is *claimed* in the same statement as the row (`exam_count`
4343 // +1, a conditional write on the term row), the shape the old course
4444 // create used against `term.course_count`: the count is what the term's
4545 // own delete guard reads, and claim-and-insert in one CTE means no crash
@@ -47,8 +47,8 @@ pub async fn create(
4747 //
4848 // The owner's `exam_audience` row is written in the same transaction,
4949 // *always*: the audience is what every listing reads through, so an exam
50- // with no audience row would be invisible to its own instance. An ortak
51- // sınav is extra audience rows on this one exam (D2), never a second
50+ // with no audience row would be invisible to its own instance. A shared
51+ // exam is extra audience rows on this one exam (D2), never a second
5252 // shape.
5353 let id = ExamId::generate();
5454 let creator = *creator;
@@ -104,7 +104,7 @@ pub async fn create(
104104 /// future type rustc can check, exactly as
105105 /// [`crate::db::answer_image::upsert_in`] does for the same reason.
106106 ///
107-/// Everything it decides is the closure's own: a claim that matched no dönem
107+/// Everything it decides is the closure's own: a claim that matched no term
108108 /// row is [`crate::domain::term::gone_error`], any other foreign key is the
109109 /// parent-gone `NotFound`, and the audience row is written in the same
110110 /// transaction as the row it names.
@@ -171,7 +171,7 @@ pub(crate) async fn insert_in(
171171 .await;
172172 let exam = match written {
173173 Ok(Some(exam)) => exam,
174- // The conditional claim matched no dönem row: the term is gone.
174+ // The conditional claim matched no term row: the term is gone.
175175 Ok(None) => return Err(crate::domain::term::gone_error()),
176176 Err(err) if foreign_key_violation(&err) => return Err(AppError::NotFound),
177177 Err(err) => return Err(err.into()),
@@ -229,7 +229,7 @@ pub async fn list_all(db: &Database) -> Result<Vec<Exam>, AppError> {
229229 ///
230230 /// It reads through `exam_audience` rather than off `exam.class_course`: the
231231 /// owner's row is always there (the create writes it), so the two agree for
232-/// every exam this instance owns, and the join is what lets an ortak sınav be
232+/// every exam this instance owns, and the join is what lets a shared exam be
233233 /// one exam addressed to several instances (D2) without a second read path.
234234 pub async fn list_for_class_course(
235235 db: &Database,
@@ -258,12 +258,12 @@ pub async fn list_for_class_course(
258258 .await?)
259259 }
260260
261-/// Every exam of every instance in `instances` (one query) — the karne and
261+/// Every exam of every instance in `instances` (one query) — the report card and
262262 /// marks reports' cross-instance read, and the list behind a caller's visible
263263 /// courses.
264264 ///
265265 /// `DISTINCT ON (e.id)` because an exam may be addressed to several instances
266-/// at once (an ortak sınav): the filters ask "is this exam visible here", not
266+/// at once (a shared exam): the filters ask "is this exam visible here", not
267267 /// "how many audiences does it have", so each exam is returned once with its
268268 /// own owner instance.
269269 pub async fn list_for_class_course_courses(
@@ -536,7 +536,7 @@ pub async fn delete(db: &Database, target: Exam) -> Result<Deleted, AppError> {
536536 true,
537537 async move |conn| {
538538 // The row lock every other exam-child writer contends on. The
539- // dönem rides out of the same read: the term's `exam_count` is
539+ // term rides out of the same read: the term's `exam_count` is
540540 // given back in this transaction, and the row that names it is
541541 // the one being deleted.
542542 let locked = sqlx::query!(
@@ -653,7 +653,7 @@ pub async fn delete(db: &Database, target: Exam) -> Result<Deleted, AppError> {
653653 let Some(exam) = deleted else {
654654 return Err(AppError::NotFound);
655655 };
656- // The dönem gets its exam reference back inside the same
656+ // The term gets its exam reference back inside the same
657657 // transaction — the other half of the claim `create` makes.
658658 sqlx::query!(
659659 r#"UPDATE term SET exam_count = GREATEST(exam_count - 1, 0)
@@ -696,7 +696,7 @@ pub(crate) async fn published_exam(db: &Database) -> Exam {
696696 .execute(db)
697697 .await
698698 .unwrap();
699- // The exam hangs off the *instance* and carries the dönem it is graded in
699+ // The exam hangs off the *instance* and carries the term it is graded in
700700 // (both foreign keys): both are real rows, minted per call —
701701 // [`crate::db::course::a_test_instance`] mints the class, the course and
702702 // the link, [`crate::db::term::a_test_term`] the year under the term.
@@ -761,7 +761,7 @@ mod tests {
761761 .execute(&db)
762762 .await
763763 .unwrap();
764- // The exam's parents: a dönem, and an instance of *this*
764+ // The exam's parents: a term, and an instance of *this*
765765 // course. Attaching it is the claim the racing delete
766766 // contends on, so the round where the course is gone refuses
767767 // here — which is the refusal this test wants to see answered.
src/db/exam_answer.rsmodified+1 -1
@@ -312,7 +312,7 @@ mod tests {
312312 let kinds = crate::domain::settings::Settings::defaults()
313313 .get_exam_kinds()
314314 .to_vec();
315- // The instance and the dönem are foreign keys now: real rows the
315+ // The instance and the term are foreign keys now: real rows the
316316 // fixture mints.
317317 let (instance, _course) = crate::db::course::a_test_instance(&db).await;
318318 let term = crate::db::term::a_test_term(&db).await;
src/db/exam_attempt.rsmodified+1 -1
@@ -400,7 +400,7 @@ mod tests {
400400 .execute(db)
401401 .await
402402 .unwrap();
403- // The instance and the dönem are foreign keys now: real rows the
403+ // The instance and the term are foreign keys now: real rows the
404404 // fixture mints.
405405 let (instance, _course) = crate::db::course::a_test_instance(db).await;
406406 let term = crate::db::term::a_test_term(db).await;
src/db/exam_audience.rsmodified+5 -5
@@ -3,9 +3,9 @@
33 //! Every exam is *owned* by exactly one instance — the `class_course` column
44 //! on its own row — and [`crate::db::exam::insert_in`] writes that owner's
55 //! audience row in the same transaction as the exam. The rows beyond it are
6-//! the **ortak sınav**'s (D2): one exam announced to another şube's instance,
6+//! the **shared exam**'s (D2): one exam announced to another section's instance,
77 //! sat and graded once, standing in every addressed instance's marks and
8-//! karne. Every exam read goes through this table
8+//! report card. Every exam read goes through this table
99 //! ([`crate::db::exam::list_for_class_course`] and the marks reports' joins),
1010 //! so the audience set is the single answer to "which instances does this
1111 //! exam belong to" and the owner column is only the join's tie-break.
@@ -27,7 +27,7 @@ use crate::domain::user::UserId;
2727 use crate::error::AppError;
2828
2929 /// One audience row, resolved to what a client needs to name it: the
30-/// instance, the şube it belongs to and the catalog course it teaches.
30+/// instance, the section it belongs to and the catalog course it teaches.
3131 #[derive(Debug, sqlx::FromRow)]
3232 pub struct Audience {
3333 class_course: ClassCourseId,
@@ -41,7 +41,7 @@ impl Audience {
4141 &self.class_course
4242 }
4343
44- /// The şube that instance belongs to.
44+ /// The section that instance belongs to.
4545 pub fn get_class(&self) -> &ClassGroupId {
4646 &self.class
4747 }
@@ -141,7 +141,7 @@ pub async fn list_for_instance(
141141 /// The enrollment predicate the sitting and grading gates ask once one exam
142142 /// can be announced to several instances (D2): for an exam nobody was
143143 /// announced to this is the owner-only check those gates used to run, row for
144-/// row, and for an ortak sınav it admits the addressed sections' students —
144+/// row, and for a shared exam it admits the addressed sections' students —
145145 /// who sit and are graded at their own instance exactly like the owner's.
146146 pub async fn enrolled(db: &Database, exam: &ExamId, user: &UserId) -> Result<bool, AppError> {
147147 Ok(sqlx::query_scalar!(
src/db/exam_question.rsmodified+1 -1
@@ -458,7 +458,7 @@ mod tests {
458458 .await
459459 .unwrap();
460460 let kinds = Settings::defaults().get_exam_kinds().to_vec();
461- // The instance and the dönem are foreign keys now: real rows the
461+ // The instance and the term are foreign keys now: real rows the
462462 // fixture mints, per call.
463463 let (instance, _course) = crate::db::course::a_test_instance(db).await;
464464 let term = crate::db::term::a_test_term(db).await;
src/db/exam_result.rsmodified+14 -14
@@ -207,7 +207,7 @@ pub async fn grade(
207207 /// behind the per-instance block of the marks report.
208208 ///
209209 /// It reads `exam_audience`, not `exam.class_course`: an exam addressed to
210-/// several instances (an ortak sınav) is *each* of their exams, and its marks
210+/// several instances (a shared exam) is *each* of their exams, and its marks
211211 /// count in every one of them, not only in the owner's. The owner's audience
212212 /// row is always written with the exam, so for an exam nobody else was
213213 /// addressed to this is the same set the owner column used to give.
@@ -264,14 +264,14 @@ impl AttributedResult {
264264 }
265265 }
266266
267-/// The user's graded results inside one dönem, each paired with the instance it
268-/// counts under — the karne's input slice (D8: a karne is per dönem, and an
269-/// exam belongs to the dönem it was sat in).
267+/// The user's graded results inside one term, each paired with the instance it
268+/// counts under — the report card's input slice (D8: a report card is per term,
269+/// and an exam belongs to the term it was sat in).
270270 ///
271271 /// A mark comes back once per *queried* instance the exam is addressed to
272-/// (`exam_audience`), not only under its owner: an ortak sınav announced to
272+/// (`exam_audience`), not only under its owner: a shared exam announced to
273273 /// several instances is each of their exams, and this is what puts its mark in
274-/// every one of their karnes. Only the latest sitting per (instance, exam)
274+/// every one of their report cards. Only the latest sitting per (instance, exam)
275275 /// comes back, the grade-of-record the per-instance read folds to as well.
276276 pub async fn list_for_user_in_term(
277277 db: &Database,
@@ -481,23 +481,23 @@ pub(crate) mod tests {
481481 pub(crate) const ORTAK_MARK: i64 = 85;
482482 pub(crate) const OWNER_MARK: i64 = 45;
483483
484- /// The shape the audience attribution is read against: two şubeler, one
484+ /// The shape the audience attribution is read against: two sections, one
485485 /// catalog course and one student who is a live member of both, so the
486- /// karne and the marks report each carry a line for *both* instances.
486+ /// report card and the marks report each carry a line for *both* instances.
487487 pub(crate) struct OrtakExam {
488488 pub student: UserId,
489489 pub term: TermId,
490490 /// The instance both exams were created in — their owner.
491491 pub owner: ClassCourseId,
492- /// The other instance the ortak exam was addressed to.
492+ /// The other instance the shared exam was addressed to.
493493 pub addressed: ClassCourseId,
494494 }
495495
496- /// A year with one dönem, two şubeler of it carrying the same catalog
496+ /// A year with one term, two sections of it carrying the same catalog
497497 /// course, and one student who sits both. Two exams are created in the
498- /// first şube's instance and graded: one owned there but **addressed to
498+ /// first section's instance and graded: one owned there but **addressed to
499499 /// both** (the second `exam_audience` row is written directly, which is
500- /// what a school-wide ortak sınav is), the other addressed to its owner
500+ /// what a school-wide shared exam is), the other addressed to its owner
501501 /// alone.
502502 ///
503503 /// That is what tells the two conclusions apart: read through
@@ -590,7 +590,7 @@ pub(crate) mod tests {
590590 .await
591591 .unwrap();
592592 if addressed_to_both {
593- // The ortak half: the create wrote the owner's audience row,
593+ // The shared-exam half: the create wrote the owner's audience row,
594594 // and the school announces the exam to the second section too.
595595 sqlx::query("INSERT INTO exam_audience (exam, class_course) VALUES ($1, $2)")
596596 .bind(exam.get_id().uuid())
@@ -740,7 +740,7 @@ pub(crate) mod tests {
740740 async fn an_exam(db: &Database, exam: &ExamId, kind: &str) {
741741 // The exam has to be real: a mark is refused on one that isn't. Its
742742 // creator is a real row (idempotently — [`the_two_people`] re-runs it)
743- // and so are its parents: the instance it is taught in and the dönem it
743+ // and so are its parents: the instance it is taught in and the term it
744744 // is graded in, both through the shared fixtures.
745745 let teacher = UserId::from_key(TEACHER);
746746 sqlx::query(
src/db/karne.rsmodified+10 -10
@@ -1,14 +1,14 @@
1-//! The `karne_snapshot` table: the frozen per-student, per-dönem report
1+//! The `karne_snapshot` table: the frozen per-student, per-term report card
22 //! written when a term is archived.
33 //!
4-//! Karne is a *computed* read (D8) — per-instance weighted average, graded
5-//! against the school's bands, then a `ders_saati`-weighted year average. The
6-//! snapshot exists for the moment that computation must stop moving: once a
7-//! dönem is archived, the report is a record of what the school issued, and a
8-//! later correction to a mark must not silently rewrite a karne a family
9-//! already holds. [`crate::service::karne::freeze`] writes the rows;
10-//! [`crate::service::karne::build`] serves the snapshot back for an archived
11-//! term and computes live for an open one.
4+//! A report card is a *computed* read (D8) — per-instance weighted average,
5+//! graded against the school's bands, then a `ders_saati`-weighted year
6+//! average. The snapshot exists for the moment that computation must stop
7+//! moving: once a term is archived, the report is a record of what the school
8+//! issued, and a later correction to a mark must not silently rewrite a report
9+//! card a family already holds. [`crate::service::karne::freeze`] writes the
10+//! rows; [`crate::service::karne::build`] serves the snapshot back for an
11+//! archived term and computes live for an open one.
1212
1313 use sqlx::types::Json;
1414
@@ -47,7 +47,7 @@ pub async fn snapshot(
4747 Ok(())
4848 }
4949
50-/// `user`'s frozen report for `term`, or `None` when that dönem was never
50+/// `user`'s frozen report for `term`, or `None` when that term was never
5151 /// frozen (or they had no roster row to freeze).
5252 pub async fn read_snapshot(
5353 db: &Database,
src/db/term.rsmodified+6 -6
@@ -113,10 +113,10 @@ pub async fn update(
113113 /// refcount, claimed by [`crate::db::exam::create`] *before* it writes the
114114 /// link, so the check and the delete are one conditional write on one record:
115115 /// an exam write racing this either claims first (and the delete is refused)
116-/// or finds the row gone (and is refused itself). A frozen karne
116+/// or finds the row gone (and is refused itself). A frozen report card
117117 /// ([`crate::db::karne`]) has no counter — it is written once per archived
118-/// dönem — so its existence is the `NOT EXISTS` half of the same guard: a
119-/// dönem a family holds a karne for is history, not a calendar entry.
118+/// term — so its existence is the `NOT EXISTS` half of the same guard: a
119+/// term a family holds a report card for is history, not a calendar entry.
120120 ///
121121 /// The referencing foreign keys (`exam.term`, `karne_snapshot.term`, both
122122 /// `NO ACTION`) are the backstop behind the guard, not a second one: while
@@ -127,7 +127,7 @@ pub async fn update(
127127 /// The year is handed its reference back in the *same statement* — a
128128 /// `DELETE … RETURNING year` feeding the decrement, the shape
129129 /// [`crate::db::course::delete`] uses for its classes — so a year whose last
130-/// dönem was just deleted is deletable the moment this lands. The counter
130+/// term was just deleted is deletable the moment this lands. The counter
131131 /// lives on the year row and only this statement may release it: without the
132132 /// release the year's own `term_count = 0` delete guard could never pass
133133 /// again, and a year nobody links would be undeletable forever.
@@ -202,7 +202,7 @@ pub async fn unarchive(db: &Database, term: Term) -> Result<Term, AppError> {
202202 }
203203 }
204204
205-/// A real dönem behind a real academic year — the parent every exam names and
205+/// A real term behind a real academic year — the parent every exam names and
206206 /// the grading slice every term-keyed read scopes to. Minted per call.
207207 #[cfg(test)]
208208 pub(crate) async fn a_test_term(db: &Database) -> TermId {
@@ -313,7 +313,7 @@ mod tests {
313313 /// 500 instead of the 404 or 409 the request owes.
314314 ///
315315 /// The racer is [`crate::db::exam::create`] against this
316- /// dönem: it claims `exam_count` on the term row before it writes the
316+ /// term: it claims `exam_count` on the term row before it writes the
317317 /// link, which is the same record and the same column the guard reads. Both
318318 /// sides are swept across each other sub-millisecond, exactly as in
319319 /// [`crate::db::subject::delete`]'s race test — a whole
src/db/user.rsmodified+2 -2
@@ -469,7 +469,7 @@ pub async fn set_role_cascade(
469469 )
470470 .execute(&mut *tx)
471471 .await?;
472- // The individual club/etüt memberships go with them: a demoted
472+ // The individual club/supervised-study memberships go with them: a demoted
473473 // account may hold no seat in a school-scoped course either, and
474474 // each course gets its membership count back.
475475 sqlx::query!(
@@ -711,7 +711,7 @@ pub async fn set_profile(
711711 "bio",
712712 text(bio.as_ref().map(|n| n.as_ref().map(|x| x.as_str()))),
713713 )
714- // The branş is plain text, not a newtype: the school's own list is
714+ // The subject area is plain text, not a newtype: the school's own list is
715715 // settings data, so its membership check belongs to the write path
716716 // that holds that list (the web layer), not to a row type.
717717 .set(
src/domain/academic_year.rsmodified+5 -6
@@ -1,8 +1,7 @@
1-//! An academic year (eğitim yılı): the container a şube and its dönemler
2-//! belong to. Above [`crate::domain::term::Term`], which is a grading slice
3-//! inside it.
1+//! An academic year: the container a class section and its terms belong to.
2+//! Above [`crate::domain::term::Term`], which is a grading slice inside it.
43 //!
5-//! The year carries the sınıf geçme policy (`grade_promotions`): a mapping
4+//! The year carries the grade-promotion policy (`grade_promotions`): a mapping
65 //! from one grade label to the next, applied by the explicit, idempotent
76 //! rollover command ([`crate::service::academic_year::rollover`]). A grade
87 //! absent from the list is not rolled over — that is how graduation is
@@ -81,7 +80,7 @@ impl AcademicYearName {
8180 }
8281 }
8382
84-/// One sınıf-geçme mapping: a student who finished `from_grade` moves to
83+/// One grade-promotion mapping: a student who finished `from_grade` moves to
8584 /// `to_grade` at rollover.
8685 #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
8786 pub struct GradePromotion {
@@ -187,7 +186,7 @@ impl AcademicYear {
187186 &self.grade_promotions.0
188187 }
189188
190- /// The grade a şube of `grade` rolls into, or `None` when the grade has no
189+ /// The grade a section at `grade` rolls into, or `None` when the grade has no
191190 /// promotion entry (graduation).
192191 pub fn promotion_for(&self, grade: &str) -> Option<&str> {
193192 self.grade_promotions
src/domain/class_blueprint.rsmodified+5 -5
@@ -1,13 +1,13 @@
1-//! A grade's course template: the courses every class section (şube) at one
2-//! grade carries.
1+//! A grade's course template: the courses every class section at one grade
2+//! carries.
33 //!
4-//! A school runs many şube at grade "9" and stocks each of them by hand, one
4+//! A school runs many sections at grade "9" and stocks each of them by hand, one
55 //! attach at a time. A blueprint is that list said once. It is a layer *above*
66 //! [`crate::db::class_pump`], never a replacement for it: applying a
77 //! blueprint calls the same [`crate::service::class_course::attach`] a manager's own call does,
88 //! so the rows it lands are ordinary `class_course` links and ordinary
9-//! `enrollment` rows, and an elective (seçmeli) placed by hand next to them is
10-//! still an individual enrollment nothing here can see.
9+//! `enrollment` rows, and an elective placed by hand next to them is still an
10+//! individual enrollment nothing here can see.
1111 //!
1212 //! This module is the pure shape: the id (the grade label *is* the primary
1313 //! key, so "one blueprint per grade" holds by construction), the row, the
src/domain/class_course.rsmodified+6 -6
@@ -1,11 +1,11 @@
11 //! A course as taught in one class: the academic *instance*.
22 //!
33 //! The anchor of the K12 model. A course in the school catalog is a template;
4-//! attaching it to a şube mints one of these rows, and exams, sessions,
4+//! attaching it to a class section mints one of these rows, and exams, sessions,
55 //! roll-call, homework and enrollments all key on the instance — so two
6-//! şubeler teaching the same course have separate rosters, exams, timetables
7-//! and teachers. The row carries the weekly hours (`ders_saati`, the karne
8-//! weight) and whether it counts toward the karne.
6+//! sections teaching the same course have separate rosters, exams, timetables
7+//! and teachers. The row carries the weekly hours (`ders_saati`, the report-card
8+//! weight) and whether it counts toward the report card.
99 //!
1010 //! The attach/detach workflows live in [`crate::service::class_course`]; the
1111 //! row's reads in [`crate::db::class_course`] — this file is the row shape and
@@ -51,7 +51,7 @@ impl ClassCourseId {
5151 }
5252
5353 /// Weekly lesson hours of an instance: the weight the instance carries in the
54-/// year's karne average, and the count a timetable grid would lay out.
54+/// year's report-card average, and the count a timetable grid would lay out.
5555 #[derive(Debug, Clone, Copy, PartialEq, Eq, sqlx::Type)]
5656 #[sqlx(transparent)]
5757 pub struct DersSaati(i64);
@@ -74,7 +74,7 @@ impl DersSaati {
7474
7575 /// One course taught in one class. `attached_by` is who attached it, `source`
7676 /// the blueprint that placed it (absent for a hand attach). `ders_saati` and
77-/// `counts_toward_karne` are the instance's own policy — what two şubeler
77+/// `counts_toward_karne` are the instance's own policy — what two sections
7878 /// teaching the same catalog course may legitimately differ on.
7979 #[derive(Debug, Clone, sqlx::FromRow)]
8080 pub struct ClassCourse {
src/domain/class_group.rsmodified+6 -6
@@ -1,11 +1,11 @@
1-//! A class section (şube): a named set of students the school manages as one,
2-//! so a course attach enrolls the whole set at once. The membership and the
1+//! A class section: a named set of students the school manages as one, so a
2+//! course attach enrolls the whole set at once. The membership and the
33 //! attachments live in their own tables (`class_member`, `class_course`) and are
44 //! counted on this row — a class may only be deleted at zero on both, the same
55 //! stored guard shape courses and terms use.
66 //!
77 //! A class belongs to an academic year ([`crate::domain::academic_year`]), not
8-//! to a term: the şube keeps the same roster all year and the dönem is a
8+//! to a term: the section keeps the same roster all year and the term is a
99 //! grading slice inside it. It claims a reference on its year before the link
1010 //! is written; the reference is its *own* column
1111 //! ([`crate::constant::ACADEMIC_YEAR_CLASS_COUNT_FIELD`]) rather than the
@@ -65,7 +65,7 @@ impl ClassName {
6565 }
6666
6767 /// The school's own label for the year a class sits in ("9", "10-A",
68-/// "anaokulu"). Free text on purpose — no school's grade ladder is the next
68+/// "kindergarten"). Free text on purpose — no school's grade ladder is the next
6969 /// one's — and optional: a club-shaped class has no grade at all.
7070 #[derive(Debug, Clone, PartialEq, Eq, sqlx::Type)]
7171 #[sqlx(transparent)]
@@ -86,7 +86,7 @@ impl ClassGrade {
8686 /// guard are database-side columns only, so no whole-row save can clobber one
8787 /// (see [`crate::db::cap`]).
8888 ///
89-/// `teacher` is the section's homeroom teacher (sınıf öğretmeni): optional, not
89+/// `teacher` is the section's homeroom teacher: optional, not
9090 /// refcounted, and merely a label pointing at a teacher-or-higher account — the
9191 /// web layer holds that bar, and a demotion sweeps the column
9292 /// ([`crate::db::class_group::unassign_everywhere`]).
@@ -121,7 +121,7 @@ impl ClassGroup {
121121 self.year.as_ref()
122122 }
123123
124- /// The homeroom teacher (sınıf öğretmeni), if one is assigned.
124+ /// The homeroom teacher, if one is assigned.
125125 pub fn get_teacher(&self) -> Option<&UserId> {
126126 self.teacher.as_ref()
127127 }
src/domain/class_member.rsmodified+2 -2
@@ -44,8 +44,8 @@ impl ClassMemberId {
4444 }
4545
4646 /// One student's stint in one class. `added_by` is who put them there;
47-/// `source_class_group` names the şube a rollover copied them from (absent for
48-/// a hand-added member).
47+/// `source_class_group` names the section a rollover copied them from (absent
48+/// for a hand-added member).
4949 #[derive(Debug, Clone, sqlx::FromRow)]
5050 pub struct ClassMember {
5151 pub(crate) id: ClassMemberId,
src/domain/course.rsmodified+7 -7
@@ -63,9 +63,9 @@ impl CourseDescription {
6363 }
6464 }
6565
66-/// A validated course kind: `course` (a regular class — ders), `study` (a
67-/// supervised study session — etüt), or `club` (a student club — kulüp).
68-/// Only `course` is class-delivered (a şube attaches it as an instance);
66+/// A validated course kind: `course` (a regular class), `study` (a supervised
67+/// study session), or `club` (a student club).
68+/// Only `course` is class-delivered (a section attaches it as an instance);
6969 /// `study`/`club` are school-scoped and joined individually.
7070 #[derive(Debug, Clone, PartialEq, Eq, sqlx::Type)]
7171 #[sqlx(transparent)]
@@ -86,9 +86,9 @@ impl CourseKind {
8686 &self.0
8787 }
8888
89- /// Whether a şube attaches this kind as an instance. Only a regular ders
90- /// (`course`) is class-delivered; clubs and etüt are school-scoped and
91- /// joined individually ([`crate::domain::course_membership`]).
89+ /// Whether a section attaches this kind as an instance. Only a regular
90+ /// course (`course`) is class-delivered; clubs and supervised studies are
91+ /// school-scoped and joined individually ([`crate::domain::course_membership`]).
9292 pub fn is_class_delivered(&self) -> bool {
9393 self.0 == "course"
9494 }
@@ -143,7 +143,7 @@ impl Course {
143143 self.class_course_count
144144 }
145145
146- /// How many users hold an individual (club/etüt) membership.
146+ /// How many users hold an individual (club/study) membership.
147147 pub fn get_course_membership_count(&self) -> i64 {
148148 self.course_membership_count
149149 }
src/domain/course_membership.rsmodified+1 -1
@@ -27,7 +27,7 @@ impl CourseMembershipId {
2727 }
2828
2929 /// A user's individual membership in a *school-scoped* course (D9): a club or
30-/// an etüt a student joins directly. A class-delivered course
30+/// a supervised study a student joins directly. A class-delivered course
3131 /// ([`crate::domain::course::CourseKind::is_class_delivered`]) is joined
3232 /// through its instance instead, never here — that gate lives in the service.
3333 #[derive(Debug, Clone, sqlx::FromRow)]
src/domain/event.rsmodified+2 -2
@@ -91,8 +91,8 @@ pub enum EventAudienceKind {
9191 /// A course's enrolled students. Staff running the course are not implied
9292 /// members — a mixed gathering wants a registration or role audience.
9393 Course,
94- /// A class section's (şube) students, read live off `class_member` — the
95- /// same live resolution `Course` and `Role` get, so adding a student to the
94+ /// A class section's students, read live off `class_member` — the same live
95+ /// resolution `Course` and `Role` get, so adding a student to the
9696 /// class puts them on every one of its events' rosters at once. The
9797 /// homeroom teacher is not implied, matching `Course`. A deleted class
9898 /// leaves the event standing with an empty roster, exactly as a deleted
src/domain/meal_ledger.rsmodified+2 -2
@@ -48,7 +48,7 @@
4848 //! nothing in this file reads or writes it. Do not add a no-show penalty
4949 //! here: the seat was reserved and the food was cooked.
5050 //!
51-//! Money is `i64` minor units (kuruş) end to end. No float, no decimal, ever.
51+//! Money is `i64` minor units end to end. No float, no decimal, ever.
5252 //!
5353 //! The ledger row ids are **derived TEXT keys**, not minted uuids — they are
5454 //! the identity the store's uniqueness check enforces (`id TEXT PRIMARY
@@ -185,7 +185,7 @@ impl LedgerAmount {
185185 }
186186 }
187187
188-/// How the money arrived ("cash", "havale", …). Free text: the backend never
188+/// How the money arrived ("cash", "bank transfer", …). Free text: the backend never
189189 /// speaks to a payment gateway and stores no card data, ever.
190190 #[derive(Debug, Clone, PartialEq, Eq, Type)]
191191 #[sqlx(transparent)]
src/domain/menu_dish.rsmodified+4 -4
@@ -1,8 +1,8 @@
11 //! One dish on a published [`Menu`](crate::domain::menu::Menu): what it is,
22 //! what it costs, and which dietary tags it carries.
33 //!
4-//! Money is **minor units** (kuruş) as `i64` — never a float, never a decimal,
5-//! at any layer. `tags` are validated against the school's `dietary_tags`
4+//! Money is **minor units** as `i64` — never a float, never a decimal, at any
5+//! layer. `tags` are validated against the school's `dietary_tags`
66 //! list, the same contract a menu's `slot` has with `meal_slots`.
77 //!
88 //! The queries live in [`crate::db::menu_dish`]; the dish-cap gate in
@@ -87,8 +87,8 @@ impl DishDescription {
8787 }
8888 }
8989
90-/// What one serving costs, in **minor units** (kuruş). Never negative — a
91-/// giveaway dish is `0`, and money that flows the other way is a ledger line.
90+/// What one serving costs, in **minor units**. Never negative — a giveaway
91+/// dish is `0`, and money that flows the other way is a ledger line.
9292 #[derive(Debug, Clone, Copy, PartialEq, Eq, Type)]
9393 #[sqlx(transparent)]
9494 pub struct DishPrice(i64);
src/domain/message.rsmodified+1 -1
@@ -156,7 +156,7 @@ impl MessageBody {
156156 }
157157 }
158158
159-/// A sender-chosen tag ("Etüt", "Sınav", …) the UI renders as a badge.
159+/// A sender-chosen tag ("Study", "Exam", …) the UI renders as a badge.
160160 /// Required-and-bounded here; "no label" is `Option<MessageLabel>` on the row.
161161 #[derive(Debug, Clone, PartialEq, Eq, sqlx::Type)]
162162 #[sqlx(transparent)]
src/domain/payment_ledger.rsmodified+2 -2
@@ -15,8 +15,8 @@
1515 //!
1616 //! so a *negative* balance means the family owes the school. Every amount on a
1717 //! row is stored positive; the sign lives in the `kind`, so a line's meaning
18-//! never depends on how it was read. Money is `i64` minor units (kuruş) end to
19-//! end. No float, no decimal, ever.
18+//! never depends on how it was read. Money is `i64` minor units end to end.
19+//! No float, no decimal, ever.
2020 //!
2121 //! The rules the rest of the code depends on:
2222 //!
src/domain/settings.rsmodified+12 -12
@@ -215,16 +215,16 @@ pub struct Settings {
215215 /// for both deadlines; `None` = no cutoff at all, which is also what an
216216 /// unset column reads as.
217217 pub(crate) meal_cancel_cutoff_minutes: Option<i64>,
218- /// Öğretmen branş lists (D6): the school's subject specialisations a
218+ /// Teacher branch lists (D6): the school's subject specialisations a
219219 /// teacher profile may name. `None`-while-unset; an empty list is legal
220- /// (a school that never configured branş).
220+ /// (a school that never configured one).
221221 pub(crate) branches: Option<Json<Vec<String>>>,
222- /// What an absence may be excused as (raporlu/izinli/…): the vocabulary
223- /// pointed at by an excused roll-call row. `None`-while-unset, like
224- /// `branches`.
222+ /// What an absence may be excused as (with a report / on leave / …): the
223+ /// vocabulary pointed at by an excused roll-call row. `None`-while-unset,
224+ /// like `branches`.
225225 pub(crate) excuse_kinds: Option<Json<Vec<String>>>,
226- /// Devamsızlık policy (D7): the per-dönem excused/unexcused day limits a
227- /// student may exceed. `None` = no limit configured.
226+ /// Absence policy (D7): the per-term excused/unexcused day limits a student
227+ /// may exceed. `None` = no limit configured.
228228 pub(crate) max_excused_absent_days: Option<i64>,
229229 pub(crate) max_unexcused_absent_days: Option<i64>,
230230 /// The school's IANA timezone, used to bucket attendance days. `None`
@@ -439,7 +439,7 @@ impl Settings {
439439 )?;
440440 }
441441
442- // Branş and excuse-kind lists follow the same rules as the kinds and
442+ // Branch and excuse-kind lists follow the same rules as the kinds and
443443 // statuses above, but empty is legal on both — a school that never
444444 // configured either is not forced to invent one.
445445 let branches = if branches.is_empty() {
@@ -580,7 +580,7 @@ impl Settings {
580580 self.meal_cancel_cutoff_minutes
581581 }
582582
583- /// The branş (subject specialisation) vocabulary a teacher profile may
583+ /// The branch (subject specialisation) vocabulary a teacher profile may
584584 /// name; empty while the school never configured one.
585585 pub fn get_branches(&self) -> Vec<String> {
586586 self.branches
@@ -598,12 +598,12 @@ impl Settings {
598598 .unwrap_or_default()
599599 }
600600
601- /// The per-dönem excused-absence day limit; `None` = no limit configured.
601+ /// The per-term excused-absence day limit; `None` = no limit configured.
602602 pub fn get_max_excused_absent_days(&self) -> Option<i64> {
603603 self.max_excused_absent_days
604604 }
605605
606- /// The per-dönem unexcused-absence day limit; `None` = no limit configured.
606+ /// The per-term unexcused-absence day limit; `None` = no limit configured.
607607 pub fn get_max_unexcused_absent_days(&self) -> Option<i64> {
608608 self.max_unexcused_absent_days
609609 }
@@ -717,7 +717,7 @@ mod tests {
717717 let defaults = Settings::defaults();
718718 let rebuilt = Settings::try_new(defaults.params()).unwrap();
719719 assert_eq!(rebuilt.get_exam_kinds(), defaults.get_exam_kinds());
720- // The Türkiye 5-point scale ships by default, so a mark always labels.
720+ // The Turkish 5-point scale ships by default, so a mark always labels.
721721 assert_eq!(defaults.get_grade_bands().len(), DEFAULT_GRADE_BANDS.len());
722722 assert_eq!(defaults.grade_label(90.0), Some("5"));
723723 assert_eq!(defaults.grade_label(0.0), Some("1"));
src/domain/term.rsmodified+1 -1
@@ -93,7 +93,7 @@ impl TermName {
9393 #[derive(Debug, Clone, sqlx::FromRow)]
9494 pub struct Term {
9595 pub(crate) id: TermId,
96- /// The academic year this dönem is a grading slice of.
96+ /// The academic year this term is a grading slice of.
9797 pub(crate) year: AcademicYearId,
9898 pub(crate) name: TermName,
9999 pub(crate) starts_at: Timestamp,
src/domain/user.rsmodified+2 -2
@@ -233,7 +233,7 @@ pub struct User {
233233 // type and size live on the row.
234234 pub(crate) display_name: Option<DisplayName>,
235235 pub(crate) bio: Option<Bio>,
236- /// The staff member's branş (subject area), free text validated against
236+ /// The staff member's branch (subject area), free text validated against
237237 /// the school's own `Settings::get_branches()` list at the web layer —
238238 /// optional like every other profile field, and clearable.
239239 pub(crate) branch: Option<String>,
@@ -328,7 +328,7 @@ impl User {
328328 self.bio.as_ref()
329329 }
330330
331- /// The staff member's branş, as stored (free text; membership in the
331+ /// The staff member's branch, as stored (free text; membership in the
332332 /// school's list is the write path's check, not this read's).
333333 pub fn get_branch(&self) -> Option<&str> {
334334 self.branch.as_deref()
src/lib.rsmodified+2 -2
@@ -120,8 +120,8 @@ fn courses_router(state: &AppState) -> OpenApiRouter<AppState> {
120120 }
121121
122122 /// `/instances` and the three foreign-module route pairs mounted inside it —
123-/// the same split as `/courses`, one anchor down: the instance is what a şube
124-/// teaches, and what exams, sessions and homework hang off. Each child carries
123+/// the same split as `/courses`, one anchor down: the instance is what a class
124+/// section teaches, and what exams, sessions and homework hang off. Each child carries
125125 /// its own module's gate *and*, through the outer one applied here, the course
126126 /// gate (an instance is a course taught somewhere), so either module being off
127127 /// refuses it.
src/service/academic_year.rsmodified+38 -36
@@ -1,7 +1,7 @@
11 //! Academic-year workflows: the archived-year refusal every write against past
22 //! structure pays, the link resolver class/term create pass through, and the
3-//! rollover — the one command that carries a year's şubeler into the next. The
4-//! queries live in [`crate::db::academic_year`].
3+//! rollover — the one command that carries a year's class sections into the
4+//! next. The queries live in [`crate::db::academic_year`].
55
66 use crate::database::Database;
77 use crate::db::academic_year;
@@ -57,8 +57,8 @@ pub async fn create(
5757 /// Turn an optional request-supplied year id into a validated reference —
5858 /// `None` stays `None`, an unknown id is a `400` naming the field, and an
5959 /// *archived* one is the year's `409`. This is the single spot every new link
60-/// to a year passes through: a şube create/update and a dönem create alike,
61-/// so past years take no new structure. The mirror of
60+/// to a year passes through: a class-section create/update and a term create
61+/// alike, so past years take no new structure. The mirror of
6262 /// [`crate::service::term::resolve`], one layer up the calendar.
6363 pub async fn resolve(db: &Database, id: Option<&str>) -> Result<Option<AcademicYearId>, AppError> {
6464 let Some(id) = id else {
@@ -150,9 +150,9 @@ pub async fn delete(db: &Database, target: AcademicYear) -> Result<(), AppError>
150150 }
151151 }
152152
153-/// What one [`rollover`] carried: how many şubeler were planted in the target
154-/// year, how many live students came with them, and the grades that stayed
155-/// behind because the year lists no promotion for them (graduation).
153+/// What one [`rollover`] carried: how many class sections were planted in the
154+/// target year, how many live students came with them, and the grades that
155+/// stayed behind because the year lists no promotion for them (graduation).
156156 #[derive(Debug, Clone)]
157157 pub struct RolloverReport {
158158 pub classes: usize,
@@ -160,35 +160,37 @@ pub struct RolloverReport {
160160 pub graduated: Vec<String>,
161161 }
162162
163-/// Carry `from`'s şubeler into `target`, the explicit year-boundary command.
163+/// Carry `from`'s class sections into `target`, the explicit year-boundary
164+/// command.
164165 ///
165166 /// A grade with **no** promotion entry is not rolled over — that is how
166-/// graduation is expressed — and a şube carrying no grade at all is not
167-/// either: there is nothing to promote it on. Each rolled şube is created
168-/// afresh in the target year with the same name and the mapped grade, then
169-/// gets copies of everything that belongs to the *structure* of the year: its
170-/// instances (same courses, same `ders_saati`, same karne policy, `source`
171-/// left NULL so no blueprint sweep can take a copied link back), each
167+/// graduation is expressed — and a class section carrying no grade at all is
168+/// not either: there is nothing to promote it on. Each rolled class section is
169+/// created afresh in the target year with the same name and the mapped grade,
170+/// then gets copies of everything that belongs to the *structure* of the year:
171+/// its instances (same courses, same `ders_saati`, same report-card policy,
172+/// `source` left NULL so no blueprint sweep can take a copied link back), each
172173 /// instance's assigned teachers, and every **live** member — copied through
173174 /// the pump, which is also what enrolls them into the new instances, and
174-/// tagged `source_class_group` with the şube they were copied out of (the
175-/// provenance §4.9 asks for: the new roster still names the old stint's şube).
176-/// The old year is untouched: it stays the record of what was taught.
175+/// tagged `source_class_group` with the class section they were copied out of
176+/// (the provenance §4.9 asks for: the new roster still names the old stint's
177+/// class section). The old year is untouched: it stays the record of what was
178+/// taught.
177179 ///
178180 /// Refusals: the target year must be empty (a second rollover into it is a
179181 /// `409`, which is also what makes the command idempotent — a re-run is
180182 /// refused, never duplicated), archived (read-only), and distinct from the
181183 /// source. The emptiness check is a pre-flight read, an accepted race in the
182184 /// README's sense: two rollovers racing the same empty target can each plant
183-/// şubeler; the class writes themselves serialize on the year row, so the
184-/// counters stay honest either way.
185+/// class sections; the class writes themselves serialize on the year row, so
186+/// the counters stay honest either way.
185187 ///
186-/// Each şube is carried over on its own: a failure mid-run leaves the
187-/// şubeler already planted in place, and a re-run is refused by the emptiness
188-/// guard — the report says what landed, and the operator resolves the rest by
189-/// hand. One transaction per write, never one across the run: the store owns
190-/// concurrency, and a run-wide transaction would hold the year row for the
191-/// length of the whole school.
188+/// Each class section is carried over on its own: a failure mid-run leaves the
189+/// class sections already planted in place, and a re-run is refused by the
190+/// emptiness guard — the report says what landed, and the operator resolves
191+/// the rest by hand. One transaction per write, never one across the run: the
192+/// store owns concurrency, and a run-wide transaction would hold the year row
193+/// for the length of the whole school.
192194 pub async fn rollover(
193195 db: &Database,
194196 target: &AcademicYearId,
@@ -218,7 +220,7 @@ pub async fn rollover(
218220 };
219221 let Some(mapped) = from_year.promotion_for(grade.as_str()) else {
220222 // No promotion entry: this grade graduated. Reported once per
221- // label, however many şubeler carry it.
223+ // label, however many class sections carry it.
222224 let label = grade.as_str().to_string();
223225 if !report.graduated.contains(&label) {
224226 report.graduated.push(label);
@@ -238,8 +240,8 @@ pub async fn rollover(
238240 let planted_id = planted.get_id().clone();
239241
240242 // The structure first, so the member copy below enrolls the students
241- // into every instance the new şube carries; the pump's member axis is
242- // what pays those enrollments.
243+ // into every instance the new class section carries; the pump's member
244+ // axis is what pays those enrollments.
243245 for instance in
244246 class_course::list_for_class_ids(db, std::slice::from_ref(class.get_id())).await?
245247 {
@@ -247,10 +249,10 @@ pub async fn rollover(
247249 class_course::attach_sourced(db, &planted_id, instance.get_course(), by, None)
248250 .await?;
249251 let Attached::Made(copied) = landed else {
250- // A fresh şube cannot hold the course already, and its caps
251- // cannot be full: anything else here is the store disagreeing
252- // with the read one statement earlier, which is a 500 and not
253- // a partial rollover.
252+ // A fresh class section cannot hold the course already, and
253+ // its caps cannot be full: anything else here is the store
254+ // disagreeing with the read one statement earlier, which is a
255+ // 500 and not a partial rollover.
254256 return Err(AppError::Internal(format!(
255257 "rollover: attaching {} to the new class was refused",
256258 instance.get_course().key()
@@ -272,10 +274,10 @@ pub async fn rollover(
272274 .await?
273275 .0
274276 {
275- // The stint carries where the student came from: the copy names the
276- // şube it was copied out of, so last year's roster is still legible
277- // from the new one (and the tag is written in the same statement as
278- // the stint — see `add_member_sourced`).
277+ // The stint carries where the student came from: the copy names
278+ // the class section it was copied out of, so last year's roster is
279+ // still legible from the new one (and the tag is written in the
280+ // same statement as the stint — see `add_member_sourced`).
279281 match class_pump::add_member_sourced(
280282 db,
281283 &planted_id,
src/service/class_blueprint.rsmodified+2 -2
@@ -372,8 +372,8 @@ pub async fn pump(
372372 /// still show it.
373373 ///
374374 /// Unpaged, like the [`crate::db::class_group::list_for_grade`] it is built on: the set
375-/// is the şube one school runs at one grade, and the caller is asking about
376-/// all of them.
375+/// is the class sections one school runs at one grade, and the caller is
376+/// asking about all of them.
377377 pub async fn status(
378378 db: &Database,
379379 blueprint: &ClassBlueprint,
src/service/class_course.rsmodified+15 -13
@@ -121,8 +121,8 @@ pub async fn read(db: &Database, id: &ClassCourseId) -> Result<Option<ClassCours
121121 }
122122
123123 /// PATCH one instance's own policy: the weekly hours and whether it counts
124-/// toward the karne. Both are non-clearable, so an omitted field keeps the
125-/// stored value.
124+/// toward the report card. Both are non-clearable, so an omitted field keeps
125+/// the stored value.
126126 pub async fn update(
127127 db: &Database,
128128 id: &ClassCourseId,
@@ -133,7 +133,8 @@ pub async fn update(
133133 }
134134
135135 /// The academic year this instance sits under, if any — the seam every
136-/// instance-scoped write reads the archive gate off (instance → şube → year).
136+/// instance-scoped write reads the archive gate off (instance → section →
137+/// year).
137138 pub async fn year_of(
138139 db: &Database,
139140 instance: &ClassCourseId,
@@ -150,8 +151,9 @@ pub async fn year_of(
150151 /// read-only. A pre-flight guard, accepted race (see README concurrency
151152 /// model): a year archived after this read still lets the write through.
152153 ///
153-/// A şube with no year, or one whose year row is gone, passes: a dangling
154-/// link is not this guard's error, and the caller that cares answers it.
154+/// A class section with no year, or one whose year row is gone, passes: a
155+/// dangling link is not this guard's error, and the caller that cares answers
156+/// it.
155157 pub async fn require_open(db: &Database, instance: &ClassCourseId) -> Result<(), AppError> {
156158 if let Some(year) = year_of(db, instance).await? {
157159 crate::service::academic_year::require_open(db, &year).await?;
@@ -216,9 +218,9 @@ pub async fn unassign_teacher(
216218 /// A 403 unless `user` may act on this instance — D10, the one gate every
217219 /// instance-scoped route shares in place of a `class_course_teacher` lookup of
218220 /// its own. It passes when the user is `manager`+ (the office), when they are
219-/// one of the instance's assigned teachers, or when they are the şube's
220-/// homeroom teacher (sınıf öğretmeni) — the three ways a person legitimately
221-/// runs a section's course.
221+/// one of the instance's assigned teachers, or when they are the section's
222+/// homeroom teacher — the three ways a person legitimately runs a section's
223+/// course.
222224 ///
223225 /// A gone instance is a `404`, never a 403: the route the user asked about
224226 /// does not exist.
@@ -321,8 +323,8 @@ mod tests {
321323 );
322324 }
323325
324- /// Two şubeler teaching one catalog course are two instances — that is the
325- /// whole remodel — and each keeps its own roster.
326+ /// Two class sections teaching one catalog course are two instances — that
327+ /// is the whole remodel — and each keeps its own roster.
326328 #[tokio::test]
327329 async fn two_classes_teaching_one_course_keep_their_own_rosters() {
328330 let (db, _leases) = crate::database::init_test_db().await;
@@ -354,8 +356,8 @@ mod tests {
354356 "…and nowhere near 5-B's"
355357 );
356358
357- // Detaching one şube takes its instance and its roster; the other
358- // şube's instance and roster stand.
359+ // Detaching one class section takes its instance and its roster; the
360+ // other section's instance and roster stand.
359361 detach(&db, &fifth_a, &algebra).await.unwrap();
360362 assert_eq!(source_of(first.get_id(), &student, &db).await, None);
361363 assert_eq!(
@@ -505,7 +507,7 @@ mod tests {
505507 );
506508 }
507509
508- /// D10: the instance's own teacher, the şube's homeroom teacher and a
510+ /// D10: the instance's own teacher, the section's homeroom teacher and a
509511 /// manager may act on it; another instance's teacher and a plain student
510512 /// may not. Assignment itself is the office's call and the assignee must
511513 /// hold the teacher bar.
src/service/class_group.rsmodified+1 -1
@@ -56,7 +56,7 @@ pub async fn list_by_ids(db: &Database, ids: &[ClassGroupId]) -> Result<Vec<Clas
5656 }
5757
5858 /// Every class `user` is the homeroom teacher of, newest first — the visible
59-/// set a sınıf öğretmeni reads their own instances through (D10), the read
59+/// set a homeroom teacher reads their own instances through (D10), the read
6060 /// behind `visible_instances` in the web layer.
6161 pub async fn list_for_teacher(db: &Database, user: &UserId) -> Result<Vec<ClassGroup>, AppError> {
6262 class_group::list_for_teacher(db, user).await
src/service/class_member.rsmodified+4 -4
@@ -92,7 +92,7 @@ pub async fn leave(db: &Database, class: &ClassGroupId, user: &UserId) -> Result
9292 }
9393
9494 /// Take `user` out of `class` for good — the hard exit, which deletes the
95-/// stint rather than stamping it. Kept for the şube-transfer rollback path
95+/// stint rather than stamping it. Kept for the section-transfer rollback path
9696 /// alone, where the stint being undone must leave no trace a later read could
9797 /// mistake for history; every route uses [`leave`].
9898 ///
@@ -417,9 +417,9 @@ mod tests {
417417 }
418418
419419 /// D4: a member exit **releases** the rows the leaving section wrote —
420- /// there is no heir to hand one over to. Two şubeler teaching the same
421- /// catalog course hold the student in their *own* instance, each with its
422- /// own row tagged with its own class, so a release may only take the
420+ /// there is no heir to hand one over to. Two class sections teaching the
421+ /// same catalog course hold the student in their *own* instance, each with
422+ /// its own row tagged with its own class, so a release may only take the
423423 /// leaving section's row and count back; the rival's row stands exactly as
424424 /// written. The old rule re-tagged the row with a rival section instead
425425 /// (keeping it on the juncture of a class that no longer held the student),
src/service/course.rsmodified+11 -10
@@ -1,10 +1,11 @@
1-//! Course workflows: the catalog's CRUD — the template a şube attaches, with
2-//! no term, capacity or teacher list of its own any more (D1/D5/D6: staffing
3-//! and roster live on the instances, [`crate::service::class_course`]) — the
4-//! two gates over a catalog row every caller of those routes shares
5-//! ([`can_manage_course`], [`can_view_course`]), and the delete that collects
6-//! the image/homework/note-file blob keys before the guarded cascade sweeps
7-//! those rows. The queries live in [`crate::db::course`].
1+//! Course workflows: the catalog's CRUD — the template a class section
2+//! attaches, with no term, capacity or teacher list of its own any more
3+//! (D1/D5/D6: staffing and roster live on the instances,
4+//! [`crate::service::class_course`]) — the two gates over a catalog row every
5+//! caller of those routes shares ([`can_manage_course`], [`can_view_course`]),
6+//! and the delete that collects the image/homework/note-file blob keys before
7+//! the guarded cascade sweeps those rows. The queries live in
8+//! [`crate::db::course`].
89
910 use crate::database::Database;
1011 use crate::db::course;
@@ -13,7 +14,7 @@ use crate::domain::role::Role;
1314 use crate::domain::user::{User, UserId};
1415 use crate::error::AppError;
1516
16-/// Mint a catalog course. The catalog is not bound to a dönem (D1): exams are,
17+/// Mint a catalog course. The catalog is not bound to a term (D1): exams are,
1718 /// through their instance, and no capacity is stored — the roster counter
1819 /// lives on the instance and gates nothing.
1920 pub async fn create(
@@ -120,8 +121,8 @@ pub async fn update(
120121 /// rows its cascade removed — exactly whose files the web layer may unlink.
121122 #[derive(Debug)]
122123 pub struct DeleteOutcome {
123- /// `false` = refused, nothing was written: a şube still teaches this
124- /// course, or a student still holds an individual membership in it.
124+ /// `false` = refused, nothing was written: a class section still teaches
125+ /// this course, or a student still holds an individual membership in it.
125126 pub deleted: bool,
126127 pub image_files: Vec<String>,
127128 pub answer_image_files: Vec<String>,
src/service/enrollment.rsmodified+10 -10
@@ -1,10 +1,10 @@
11 //! Enrollment workflows: the target-user gates the enroll/unenroll HTTP
22 //! handlers pay (the target must exist and still be a student; unenrolling a
33 //! pair with no row is a 404) wrapped around the instance-keyed write in
4-//! [`crate::db::enrollment`], plus the school-scoped club/etüt membership
5-//! ([`crate::db::course_membership`]) with the one rule that keeps the two
6-//! tiers apart: a class-delivered ders is joined through its instance, never
7-//! directly.
4+//! [`crate::db::enrollment`], plus the school-scoped club/supervised-study
5+//! membership ([`crate::db::course_membership`]) with the one rule that keeps
6+//! the two tiers apart: a class-delivered course is joined through its
7+//! instance, never directly.
88
99 use crate::database::Database;
1010 use crate::db::course_membership;
@@ -65,14 +65,14 @@ pub async fn list_for_class_course(
6565 enrollment::list_for_class_course(db, class_course, limit, offset).await
6666 }
6767
68-/// Join `target` to a school-scoped course — a kulüp or an etüt — on `added_by`
69-/// 's orders.
68+/// Join `target` to a school-scoped course — a club or a supervised study —
69+/// on `added_by`'s orders.
7070 ///
71-/// The one refusal this tier owns: a class-delivered ders
71+/// The one refusal this tier owns: a class-delivered course
7272 /// ([`CourseKind::is_class_delivered`](crate::domain::course::CourseKind::is_class_delivered))
73-/// has no school-wide roster to join — its students come from the şubeler that
74-/// teach it — so a direct join is a `400` naming the course, and the instance's
75-/// enrollment route is where that request belongs.
73+/// has no school-wide roster to join — its students come from the class
74+/// sections that teach it — so a direct join is a `400` naming the course, and
75+/// the instance's enrollment route is where that request belongs.
7676 pub async fn join_activity(
7777 db: &Database,
7878 course: &CourseId,
src/service/exam.rsmodified+34 -33
@@ -1,4 +1,4 @@
1-//! Exam workflows: the create that resolves the exam's instance and dönem,
1+//! Exam workflows: the create that resolves the exam's instance and term,
22 //! the PATCH re-derive — the merge (set / clear / keep per field) re-judged
33 //! against a fresh read every retry round, and the mode-freeze, re-draft, and
44 //! kind gates that guard it — and the delete that collects the image blob keys
@@ -24,22 +24,22 @@ use crate::domain::user::{User, UserId};
2424 use crate::error::{AppError, ValidationError};
2525 use crate::service::exam_attempt::require_open;
2626
27-/// Publish (or draft) an exam on one class×course instance, inside one dönem.
27+/// Publish (or draft) an exam on one class×course instance, inside one term.
2828 ///
2929 /// Two refusals stand in front of the write. The instance's catalog course
30-/// must be class-delivered (`kind = course`): a kulüp or etüt has no exams —
31-/// D9 keeps the two membership tiers apart, and an exam on a club would be a
32-/// roster nothing enrolls into. And the instance's *year* must still be open
33-/// (D8: the dönem is a grading slice inside the year, so the year is what the
34-/// exam's structure belongs to; a dönem archived inside an open year does not
35-/// close exam creation — the archive is a record, not a wall).
30+/// must be class-delivered (`kind = course`): a club or supervised study has
31+/// no exams — D9 keeps the two membership tiers apart, and an exam on a club
32+/// would be a roster nothing enrolls into. And the instance's *year* must
33+/// still be open (D8: the term is a grading slice inside the year, so the year
34+/// is what the exam's structure belongs to; a term archived inside an open
35+/// year does not close exam creation — the archive is a record, not a wall).
3636 ///
37-/// The `term` is the dönem the exam is sat in, and it is required; the store's
37+/// The `term` is the term the exam is sat in, and it is required; the store's
3838 /// create claims it in the same transaction as the row. It must be one of the
39-/// *instance's own year's* dönems: a dönem is a grading slice inside a year, so
39+/// *instance's own year's* terms: a term is a grading slice inside a year, so
4040 /// a term from another year is refused here with a `400` on the field rather
4141 /// than filed — the write would succeed in the store and misfile the exam in
42-/// the karne of a year it is not taught in.
42+/// the report card of a year it is not taught in.
4343 #[expect(
4444 clippy::too_many_arguments,
4545 reason = "mirrors the sibling entities' create(field, field, ..) shape"
@@ -72,12 +72,13 @@ pub async fn create(
7272 reason: "only a ders can carry exams — a club or etüt is joined, not sat",
7373 }));
7474 }
75- // The dönem must be one of the instance's own year's: the year is the
76- // scope a karne is computed over (and a dönem is a grading slice *inside*
77- // it), so an exam filed under another year's dönem would be counted into a
78- // report whose terms it does not belong to — invisible to the year it is
79- // actually taught in and foreign to the one it names. The instance's year
80- // is its şube's, read through the one seam that resolves it.
75+ // The term must be one of the instance's own year's: the year is the
76+ // scope a report card is computed over (and a term is a grading slice
77+ // *inside* it), so an exam filed under another year's term would be
78+ // counted into a report whose terms it does not belong to — invisible to
79+ // the year it is actually taught in and foreign to the one it names. The
80+ // instance's year is its section's, read through the one seam that
81+ // resolves it.
8182 let Some(term_row) = crate::db::term::read(db, term).await? else {
8283 return Err(crate::domain::term::gone_error());
8384 };
@@ -125,9 +126,9 @@ pub async fn list_for_class_course(
125126 exam::list_for_class_course(db, class_course).await
126127 }
127128
128-/// Every exam of every instance in `instances` (one query) — the karne and
129-/// marks reports' cross-instance read, and the list behind a caller's visible
130-/// instances.
129+/// Every exam of every instance in `instances` (one query) — the report-card
130+/// and marks reports' cross-instance read, and the list behind a caller's
131+/// visible instances.
131132 pub async fn list_for_class_course_courses(
132133 db: &Database,
133134 instances: &[ClassCourseId],
@@ -141,12 +142,12 @@ pub async fn list_for_courses(db: &Database, courses: &[CourseId]) -> Result<Vec
141142 exam::list_for_courses(db, courses).await
142143 }
143144
144-// ---- audience: the ortak sınav (D2) ---------------------------------------
145+// ---- audience: the shared exam (D2) ---------------------------------------
145146
146147 /// The exam, or the `404` a gone id deserves — and the caller's right to act
147148 /// on the exam's **owner** instance, or the `403` D10 answers
148149 /// ([`crate::service::class_course::ensure_instance_teacher`]: manager+, an
149-/// assigned teacher, or the şube's homeroom teacher).
150+/// assigned teacher, or the section's homeroom teacher).
150151 ///
151152 /// The audience routes never move the exam, they announce it, so the gate is
152153 /// the owner's and not the target's: the section that runs the exam decides
@@ -159,21 +160,21 @@ async fn managed_exam(db: &Database, user: &User, id: &ExamId) -> Result<Exam, A
159160 Ok(exam)
160161 }
161162
162-/// Announce `exam` to another instance — the ortak sınav write (D2).
163+/// Announce `exam` to another instance — the shared-exam write (D2).
163164 ///
164165 /// The exam stays owned by the instance it was created on; an audience row is
165-/// what makes a second (third, …) şube sit the same sitting and carry the
166-/// mark in its own marks and karne ([`crate::db::exam_result`] reads through
167-/// `exam_audience`). Three rules keep the announcement from filing academic
168-/// work where it cannot be graded:
166+/// what makes a second (third, …) class section sit the same sitting and carry the
167+/// mark in its own marks and report card ([`crate::db::exam_result`] reads
168+/// through `exam_audience`). Three rules keep the announcement from filing
169+/// academic work where it cannot be graded:
169170 ///
170171 /// - the target must teach the **same catalog course** — a mark on an algebra
171172 /// exam standing in a geometry instance's report is a subject that report
172173 /// never taught;
173-/// - both instances must sit under the **same academic year** — a karne is
174-/// computed over one year, so an announcement across years would file the
174+/// - both instances must sit under the **same academic year** — a report card
175+/// is computed over one year, so an announcement across years would file the
175176 /// mark into a year the exam is not taught in (the rule [`create`] already
176-/// applies to the dönem);
177+/// applies to the term);
177178 /// - the target may not be the owner itself: the owner's audience row always
178179 /// exists, and the owner cannot be withdrawn (see [`remove_audience`]) —
179180 /// deleting the exam is what ends it.
@@ -245,7 +246,7 @@ pub async fn add_audience(
245246 /// [`crate::db::exam_audience::remove`]'s boolean carries — never a silent
246247 /// success. The exam's own year must still be open, like every other write
247248 /// against the exam's structure ([`update`] and [`delete`]): withdrawing from
248-/// an archived year's ortak sınav is a `409`, not a silent edit of a past
249+/// an archived year's shared exam is a `409`, not a silent edit of a past
249250 /// year's record. The answer is the audience the exam holds after the call.
250251 pub async fn remove_audience(
251252 db: &Database,
@@ -533,8 +534,8 @@ mod tests {
533534 .unwrap()
534535 }
535536
536- /// An instance of `course` inside a fresh şube of `year` — one side of an
537- /// announcement.
537+ /// An instance of `course` inside a fresh class section of `year` — one
538+ /// side of an announcement.
538539 async fn instance_in(
539540 db: &Database,
540541 manager: &UserId,
src/service/exam_attempt.rsmodified+3 -3
@@ -74,7 +74,7 @@ pub async fn ensure_student_now(user: &UserId, db: &Database) -> Result<(), AppE
7474 }
7575
7676 /// A 403 unless `user` is enrolled in an instance the exam is addressed to —
77-/// its owner, or any sibling it was announced to (an ortak sınav, D2). The
77+/// its owner, or any sibling it was announced to (a shared exam, D2). The
7878 /// same wall the exam room checks at its door, re-applied to the sitting's
7979 /// content paths so an unenrollment mid-exam cuts them too. Finishing stays
8080 /// exempt: like the rejoin lock, submitting what's already saved writes
@@ -126,7 +126,7 @@ pub async fn class_course_of(exam: &Exam, db: &Database) -> Result<ClassCourse,
126126
127127 /// The archived-year refusal every exam write pays: the exam's instance must
128128 /// still sit under an open year. Past years are read-only, and the year — not
129-/// the dönem the exam names — is what the exam's structure belongs to.
129+/// the term the exam names — is what the exam's structure belongs to.
130130 ///
131131 /// The instance read doubles as the dangling-reference check
132132 /// ([`class_course_of`]); the year itself is read by
@@ -460,7 +460,7 @@ mod tests {
460460 .await
461461 .unwrap();
462462 let (class_course, _course) = crate::db::course::a_test_instance(db).await;
463- // A dönem for the exam to be sat in: the year it belongs to is real
463+ // A term for the exam to be sat in: the year it belongs to is real
464464 // (the create claims it), and the shape is the calendar's own.
465465 let manager = crate::db::class_member::tests::fixture_user(db, "manager").await;
466466 let year = crate::db::academic_year::create(
src/service/exam_result.rsmodified+1 -1
@@ -92,7 +92,7 @@ pub async fn grade(
9292 }
9393
9494 // ... and be enrolled in an instance the exam is addressed to — the
95- // owner's or an announced sibling's (an ortak sınav, D2): an addressed
95+ // owner's or an announced sibling's (a shared exam, D2): an addressed
9696 // section's student is graded exactly like the owner's.
9797 if !crate::service::exam::enrolled_anywhere(db, &exam, target).await? {
9898 return Err(AppError::Validation(ValidationError::Invalid {
src/service/homework.rsmodified+3 -3
@@ -176,9 +176,9 @@ pub async fn gate_own_submission(
176176 /// order that matters: a student the homework never named is refused by the
177177 /// audience check with a 404 and never learns the homework exists.
178178 ///
179-/// The gate keys on the homework's instance → its şube → that şube's year
180-/// (D8): a dönem archived inside an open year does not close homework, the
181-/// year does.
179+/// The gate keys on the homework's instance → its class section → that
180+/// section's year (D8): a term archived inside an open year does not close
181+/// homework, the year does.
182182 pub async fn require_open_instance(homework: &Homework, db: &Database) -> Result<(), AppError> {
183183 crate::service::class_course::require_open(db, homework.get_class_course()).await
184184 }
src/service/instance.rsmodified+12 -12
@@ -36,10 +36,10 @@ pub async fn can_manage_instance(
3636 }
3737
3838 /// The instances a caller may see, each with whether they run it: the
39-/// instances their şubeler carry (a student's roster, and a homeroom
39+/// instances their class sections carry (a student's roster, and a homeroom
4040 /// teacher's), the instances they were assigned to teach (a teacher), and —
41-/// for a homeroom teacher — their own şube's. The per-instance answer is the
42-/// same D10 rule every instance-scoped gate applies, computed once for the
41+/// for a homeroom teacher — their own section's. The per-instance answer is
42+/// the same D10 rule every instance-scoped gate applies, computed once for the
4343 /// list.
4444 ///
4545 /// [`crate::web::instances`] serves this set to every caller as
@@ -48,20 +48,20 @@ pub async fn can_manage_instance(
4848 /// question by it, which is why it lives here now.
4949 ///
5050 /// Staff are *not* members of the section they run, so the two ways a teacher
51-/// reaches a şube are read separately and unioned: `class_member` (a student's
52-/// live stint) and the homeroom column (`class_group.teacher`, read through
53-/// [`super::class_group::list_for_teacher`]). Leaving the second out dropped
54-/// every row for a homeroom teacher who was neither enrolled nor assigned —
55-/// even though [`super::class_course::ensure_instance_teacher`] lets them act
56-/// on all of them.
51+/// reaches a class section are read separately and unioned: `class_member` (a
52+/// student's live stint) and the homeroom column (`class_group.teacher`, read
53+/// through [`super::class_group::list_for_teacher`]). Leaving the second out
54+/// dropped every row for a homeroom teacher who was neither enrolled nor
55+/// assigned — even though [`super::class_course::ensure_instance_teacher`]
56+/// lets them act on all of them.
5757 pub async fn visible_instances(
5858 user: &User,
5959 db: &Database,
6060 ) -> Result<Vec<(ClassCourse, bool)>, AppError> {
6161 let mut rows: Vec<(ClassCourse, bool)> = Vec::new();
62- // The şubeler the caller is a live member of, unioned with the ones they
63- // are the homeroom teacher of (an empty second read for a student, and a
64- // cheap one for anyone else — it is keyed on the teacher column).
62+ // The class sections the caller is a live member of, unioned with the ones
63+ // they are the homeroom teacher of (an empty second read for a student,
64+ // and a cheap one for anyone else — it is keyed on the teacher column).
6565 //
6666 // The homeroom half carries the live-`teacher` floor the whole gate does
6767 // (see [`super::class_course::ensure_instance_teacher`]): the column is
src/service/karne.rsmodified+50 -48
@@ -1,20 +1,20 @@
1-//! Karne workflows: the report a student's dönem adds up to, and the freeze
2-//! that turns it into a record when the dönem is archived.
1+//! Report-card workflows: the report a student's term adds up to, and the
2+//! freeze that turns it into a record when the term is archived.
33 //!
4-//! Karne is *computed*, not stored (D8): per instance, the student's marks are
5-//! weighted by their exam kinds' settings weights and averaged; the average
6-//! takes a label from the school's grade bands; and the dönem's own number is
7-//! a single average over the instances, each weighted by its `ders_saati` (the
8-//! karne weight the şube set on the instance). The catalog's `course` row
9-//! contributes only its title — the two şubeler teaching it are their own
10-//! instances and their own karne lines.
4+//! The report card is *computed*, not stored (D8): per instance, the student's
5+//! marks are weighted by their exam kinds' settings weights and averaged; the
6+//! average takes a label from the school's grade bands; and the term's own
7+//! number is a single average over the instances, each weighted by its
8+//! `ders_saati` (the report-card weight the section set on the instance). The
9+//! catalog's `course` row contributes only its title — the two class sections
10+//! teaching it are their own instances and their own report-card lines.
1111 //!
1212 //! A line's marks are the exams *addressed to* its instance
13-//! (`exam_audience`), not only the ones it owns: an ortak sınav announced to
13+//! (`exam_audience`), not only the ones it owns: a shared exam announced to
1414 //! several instances is each of their exams (D2), and its marks are a line of
15-//! every one of their karnes.
15+//! every one of their report cards.
1616 //!
17-//! [`build`] serves a frozen report back once its dönem is archived
17+//! [`build`] serves a frozen report back once its term is archived
1818 //! ([`crate::db::karne`]), and computes live for an open one. [`freeze`] is the
1919 //! write half, called from [`crate::service::term::archive`]: from that moment
2020 //! a later correction to a mark no longer rewrites what a family holds.
@@ -34,11 +34,11 @@ use crate::domain::term::{Term, TermId};
3434 use crate::domain::user::UserId;
3535 use crate::error::AppError;
3636
37-/// One instance's line on a karne: the average of the marks the student holds
38-/// in it this dönem, its band label, and the `ders_saati` it weighs into the
39-/// year average with. `course` is the catalog course's title (what a family
40-/// reads); `class_course` is the instance itself, for anything that must act
41-/// on the line.
37+/// One instance's line on a report card: the average of the marks the student
38+/// holds in it this term, its band label, and the `ders_saati` it weighs into
39+/// the year average with. `course` is the catalog course's title (what a
40+/// family reads); `class_course` is the instance itself, for anything that
41+/// must act on the line.
4242 #[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
4343 pub struct KarneInstance {
4444 pub class_course: String,
@@ -51,9 +51,9 @@ pub struct KarneInstance {
5151 pub band: Option<String>,
5252 }
5353
54-/// A student's karne for one dönem: every instance of their şubeler that
55-/// counts toward the karne, the `ders_saati`-weighted average across them, and
56-/// the verdict.
54+/// A student's report card for one term: every instance of their class
55+/// sections that counts toward the report card, the `ders_saati`-weighted
56+/// average across them, and the verdict.
5757 #[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
5858 pub struct KarneReport {
5959 pub user: String,
@@ -67,9 +67,9 @@ pub struct KarneReport {
6767 pub verdict: Option<String>,
6868 }
6969
70-/// The student's karne for `term`.
70+/// The student's report card for `term`.
7171 ///
72-/// An archived dönem serves its frozen snapshot when one exists — the record
72+/// An archived term serves its frozen snapshot when one exists — the record
7373 /// the school issued, which no later correction may rewrite. A term that was
7474 /// never frozen (or is still open) computes live from the marks standing now,
7575 /// which is what a snapshot-less archive must not silently serve: the caller
@@ -90,15 +90,16 @@ pub async fn build(db: &Database, user: &UserId, term: &TermId) -> Result<KarneR
9090 /// Write (or refresh) a frozen report for every student with a roster row
9191 /// under `term`'s year — the archive half.
9292 ///
93-/// The students are the live rosters of the year's şubeler: an enrollment is
94-/// what puts a student under a şube, and the şube is what binds them to the
95-/// year the dönem is a slice of. Every such student gets exactly one snapshot
96-/// per dönem, computed by the same [`compute`] the live read uses, so the
97-/// frozen report and the served one can never disagree.
93+/// The students are the live rosters of the year's class sections: an
94+/// enrollment is what puts a student under a class section, and the class
95+/// section is what binds them to the year the term is a slice of. Every such
96+/// student gets exactly one snapshot per term, computed by the same [`compute`]
97+/// the live read uses, so the frozen report and the served one can never
98+/// disagree.
9899 ///
99100 /// One snapshot write per student, one transaction each; the run pays a read
100-/// per şube rather than a join, because freeze runs once per archived dönem,
101-/// where the report it fixes is read for years.
101+/// per class section rather than a join, because freeze runs once per archived
102+/// term, where the report it fixes is read for years.
102103 pub async fn freeze(db: &Database, term: &TermId) -> Result<(), AppError> {
103104 let term = crate::service::term::read(db, term)
104105 .await?
@@ -128,14 +129,15 @@ pub async fn freeze(db: &Database, term: &TermId) -> Result<(), AppError> {
128129 Ok(())
129130 }
130131
131-/// The live computation: the student's şubeler in the dönem's year, their
132-/// karne-counting instances, and the marked exams of this dönem inside them —
133-/// each mark under every instance it was addressed to, owner or not.
132+/// The live computation: the student's class sections in the term's year,
133+/// their report-card-counting instances, and the marked exams of this term
134+/// inside them — each mark under every instance it was addressed to, owner or
135+/// not.
134136 async fn compute(db: &Database, user: &UserId, term: &Term) -> Result<KarneReport, AppError> {
135137 let school = crate::service::settings::load(db).await?;
136138
137- // The şubeler the student is live in *this year*: a membership from
138- // another year is history and its marks belong to that year's karne.
139+ // The class sections the student is live in *this year*: a membership from
140+ // another year is history and its marks belong to that year's report card.
139141 let (memberships, _) = crate::db::class_member::list_for_user(db, user, None, 0).await?;
140142 let member_classes: Vec<ClassGroupId> = memberships
141143 .iter()
@@ -157,8 +159,8 @@ async fn compute(db: &Database, user: &UserId, term: &Term) -> Result<KarneRepor
157159 let instance_ids: Vec<crate::domain::class_course::ClassCourseId> =
158160 instances.iter().map(|i| i.get_id().clone()).collect();
159161
160- // The dönem's exams inside those instances, plus this student's marks on
161- // them. An exam another dönem owns is not this karne's to weigh.
162+ // The term's exams inside those instances, plus this student's marks on
163+ // them. An exam another term owns is not this report card's to weigh.
162164 let exams: Vec<crate::domain::exam::Exam> =
163165 crate::db::exam::list_for_class_course_courses(db, &instance_ids)
164166 .await?
@@ -170,8 +172,8 @@ async fn compute(db: &Database, user: &UserId, term: &Term) -> Result<KarneRepor
170172 .map(|exam| (exam.get_id().key(), exam))
171173 .collect();
172174 // Each mark arrives under every instance it counts in: the read resolves
173- // the exam's audience, so an ortak sınav's marks are the karne of every
174- // instance it was announced to, not only of its owner.
175+ // the exam's audience, so a shared exam's marks are the report card of
176+ // every instance it was announced to, not only of its owner.
175177 let results =
176178 crate::db::exam_result::list_for_user_in_term(db, user, term.get_id(), &instance_ids)
177179 .await?;
@@ -202,7 +204,7 @@ async fn compute(db: &Database, user: &UserId, term: &Term) -> Result<KarneRepor
202204 }
203205 let Some(exam) = by_key.get(result.get_exam().key().as_str()) else {
204206 // A mark whose exam left the list between the two reads (or a
205- // dönem's exam that is no longer there): not this line's.
207+ // term's exam that is no longer there): not this line's.
206208 continue;
207209 };
208210 // The kind's current settings weight; an exam keeps a retired
@@ -253,8 +255,8 @@ fn weighted_average(pairs: &[(i64, i64)]) -> Option<f64> {
253255 Some(total as f64 / total_weight as f64)
254256 }
255257
256-/// The single dönem number: each instance's average weighted by its
257-/// `ders_saati`. `None` while no instance has an average — a karne with
258+/// The single term number: each instance's average weighted by its
259+/// `ders_saati`. `None` while no instance has an average — a report card with
258260 /// nothing graded has no verdict to give.
259261 fn ders_saati_average(weighted: &[(f64, i64)]) -> Option<f64> {
260262 let total_weight: i64 = weighted.iter().map(|(_, saati)| saati).sum();
@@ -297,11 +299,11 @@ fn verdict(school: &crate::domain::settings::Settings, average: Option<f64>) ->
297299 mod tests {
298300 use super::*;
299301
300- /// The ortak-sınav rule, read off the karne: an exam addressed to a second
301- /// instance is *that* instance's exam too (D2), so its mark is a line of
302- /// both karnes while an exam addressed to its owner alone stays on the
303- /// owner's line. Read through `exam.class_course` the second line would
304- /// have held no mark at all.
302+ /// The shared-exam rule, read off the report card: an exam addressed to a
303+ /// second instance is *that* instance's exam too (D2), so its mark is a
304+ /// line of both report cards while an exam addressed to its owner alone
305+ /// stays on the owner's line. Read through `exam.class_course` the second
306+ /// line would have held no mark at all.
305307 #[tokio::test]
306308 async fn an_ortak_exam_counts_into_every_instance_it_is_addressed_to() {
307309 let (db, _leases) = crate::database::init_test_db().await;
@@ -318,7 +320,7 @@ mod tests {
318320 .unwrap_or_else(|| panic!("no line for {}", instance.key()))
319321 };
320322
321- // The owner sits both exams; the addressed instance only the ortak
323+ // The owner sits both exams; the addressed instance only the shared
322324 // one. Both kinds are `yazili`, whose default weight is 1.
323325 let owner = line(&fixture.owner);
324326 assert_eq!(
@@ -340,7 +342,7 @@ mod tests {
340342 );
341343 assert_eq!(addressed.band.as_deref(), Some("5"));
342344
343- // Each instance weighs one hour, so the dönem is their plain mean.
345+ // Each instance weighs one hour, so the term is their plain mean.
344346 assert_eq!(report.year_average, Some(75.0));
345347 assert_eq!(
346348 report.verdict.as_deref(),
src/service/payment_ledger.rsmodified+6 -6
@@ -207,12 +207,12 @@ async fn against(
207207 if taken.saturating_add(amount_minor.as_minor()) > target.amount_minor.as_minor() {
208208 // The fold cannot say *why* the room is gone: a reversal is a
209209 // child of the line it undoes and folds in at `+amount` exactly
210- // as a payment does, so a reversed charge reads as full to the
211- // kuruş. The stored answer is the same either way — nothing may
212- // be recorded against it — but "already paid in full" told a
213- // bursar money had arrived when none ever did. The reversal's
214- // id is derived from its target's, so telling the two apart is
215- // one read, taken only on the refusal path.
210+ // as a payment does, so a reversed charge reads as full down to
211+ // the minor unit. The stored answer is the same either way —
212+ // nothing may be recorded against it — but "already paid in full"
213+ // told a bursar money had arrived when none ever did. The
214+ // reversal's id is derived from its target's, so telling the two
215+ // apart is one read, taken only on the refusal path.
216216 if let Some(text) = &reversed {
217217 let reversed_there =
218218 payment_ledger::read(&mut *tx, &PaymentLedgerId::for_reversal(&target.id))
src/service/rag_scope.rsmodified+28 -27
@@ -1,4 +1,4 @@
1-//! The `(sınıf, ders)` scope a RAG question is answered from.
1+//! The `(class, course)` scope a RAG question is answered from.
22 //!
33 //! The RAG corpus is routed by the **pair** — a grade and a subject list sent
44 //! separately would cross-product into combinations the asker never named
@@ -10,7 +10,7 @@
1010 //! The derivation is the school's own visibility rules, not a second copy of
1111 //! them. A student's or a teacher's pairs are the courses their
1212 //! [`super::instance::visible_instances`] teach them — the very set
13-//! `GET /instances/me` serves — and a club/etüt membership
13+//! `GET /instances/me` serves — and a club/supervised-study membership
1414 //! ([`crate::db::course_membership`]) adds its subject with no grade, since a
1515 //! school-scoped course belongs to no section. A parent has no sections of
1616 //! their own, so their scope is their linked children's, read child by child
@@ -36,7 +36,7 @@ use crate::domain::role::Role;
3636 use crate::domain::user::User;
3737 use crate::error::{AppError, ValidationError};
3838
39-/// The `(sınıf, ders)` pairs `user`'s questions may be scoped to, in
39+/// The `(class, course)` pairs `user`'s questions may be scoped to, in
4040 /// first-seen order and deduped — one entry per distinct pair.
4141 ///
4242 /// `role` is the caller's **live** session role, the same value the
@@ -47,10 +47,11 @@ use crate::error::{AppError, ValidationError};
4747 /// sections do not exist.
4848 ///
4949 /// The instance arm reads its rows through [`super::instance::visible_instances`]
50-/// and the two lookup tables (the şubeler the pairs sit in and the titles of
51-/// every course named) in one batch read each — never one query per instance:
52-/// a teacher can be assigned to dozens of sections, and a per-row lookup would
53-/// spend the request's whole budget before the AI service is even called.
50+/// and the two lookup tables (the class sections the pairs sit in and the
51+/// titles of every course named) in one batch read each — never one query per
52+/// instance: a teacher can be assigned to dozens of sections, and a per-row
53+/// lookup would spend the request's whole budget before the AI service is even
54+/// called.
5455 pub async fn for_user(
5556 db: &Database,
5657 user: &User,
@@ -83,16 +84,16 @@ pub async fn for_user(
8384 .map(|(instance, _)| instance),
8485 );
8586 }
86- // The school-scoped courses the asker joined directly (kulüp, etüt).
87- // Every role may hold one — the table's own gate is the student role, so
88- // for staff this read is simply empty.
87+ // The school-scoped courses the asker joined directly (club, supervised
88+ // study). Every role may hold one — the table's own gate is the student
89+ // role, so for staff this read is simply empty.
8990 let memberships =
9091 crate::db::course_membership::list_for_user(db, user.get_id(), None, 0)
9192 .await?
9293 .0;
9394
94- // One batch read per lookup, over every id the two arms named: the
95- // şubeler decide each instance's grade, and the courses carry the titles
95+ // One batch read per lookup, over every id the two arms named: the class
96+ // sections decide each instance's grade, and the courses carry the titles
9697 // every pair is scoped by. Ids repeat freely — a class usually carries
9798 // several instances — and `list_by_ids` answers each row once.
9899 let class_ids: Vec<ClassGroupId> = instances
@@ -111,7 +112,7 @@ pub async fn for_user(
111112 let classes = crate::db::class_group::list_by_ids(db, &class_ids).await?;
112113 let courses = crate::db::course::list_by_ids(db, &course_ids).await?;
113114
114- // Grade labels, keyed by şube. A class with no grade at all (a
115+ // Grade labels, keyed by class section. A class with no grade at all (a
115116 // club-shaped section, and the shape a fixture class carries) simply
116117 // contributes no entry, so its instances scope the subject across every
117118 // grade — the documented meaning of an absent `sinif`.
@@ -164,10 +165,10 @@ pub async fn for_user(
164165 }
165166
166167 /// Append `pair` unless the very same pair is already in the list — a scope is
167-/// a set. Two şubeler at one grade teaching one course are one scope, and a
168-/// course attached to a section while also joined as a club contributes both
169-/// of its pairs; a duplicate would spend one of the cap's slots twice and hand
170-/// the service the same corpus under two entries.
168+/// a set. Two class sections at one grade teaching one course are one scope,
169+/// and a course attached to a section while also joined as a club contributes
170+/// both of its pairs; a duplicate would spend one of the cap's slots twice and
171+/// hand the service the same corpus under two entries.
171172 fn push_pair(
172173 pairs: &mut Vec<RagScopePair>,
173174 seen: &mut HashSet<(Option<String>, String)>,
@@ -203,8 +204,8 @@ mod tests {
203204 .unwrap()
204205 }
205206
206- /// A şube carrying a grade label — the half of every instance pair, since
207- /// `a_class` deliberately has none.
207+ /// A class section carrying a grade label — the half of every instance
208+ /// pair, since `a_class` deliberately has none.
208209 async fn graded_class(db: &Database, name: &str, grade: &str) -> ClassGroupId {
209210 let office = crate::db::class_member::tests::fixture_user(db, "ragscope-office").await;
210211 crate::service::class_group::create(
@@ -221,7 +222,7 @@ mod tests {
221222 .clone()
222223 }
223224
224- /// Attach a catalog course to a şube, answering the instance.
225+ /// Attach a catalog course to a class section, answering the instance.
225226 async fn attach(
226227 db: &Database,
227228 class: &ClassGroupId,
@@ -243,8 +244,8 @@ mod tests {
243244 .unwrap();
244245 }
245246
246- /// A student's pair is the şube's grade plus the course attached to it —
247- /// the same set `GET /instances/me` hands them.
247+ /// A student's pair is the section's grade plus the course attached to
248+ /// it — the same set `GET /instances/me` hands them.
248249 #[tokio::test]
249250 async fn a_students_sections_scope_their_subjects() {
250251 let (db, _leases) = crate::database::init_test_db().await;
@@ -304,8 +305,8 @@ mod tests {
304305 );
305306 }
306307
307- /// A club or etüt is school-scoped: it belongs to no şube, so its subject
308- /// is scoped with no grade at all.
308+ /// A club or supervised study is school-scoped: it belongs to no class
309+ /// section, so its subject is scoped with no grade at all.
309310 #[tokio::test]
310311 async fn a_club_membership_scopes_a_subject_with_no_grade() {
311312 let (db, _leases) = crate::database::init_test_db().await;
@@ -328,9 +329,9 @@ mod tests {
328329 assert_eq!(scope, vec![pair(None, "Satranç")]);
329330 }
330331
331- /// The same pair reached twice is one scope: two şubeler at one grade
332- /// teaching one course are two instances and a single `(sınıf, ders)`,
333- /// which is what the corpus is routed by.
332+ /// The same pair reached twice is one scope: two class sections at one
333+ /// grade teaching one course are two instances and a single
334+ /// `(class, course)`, which is what the corpus is routed by.
334335 #[tokio::test]
335336 async fn a_pair_reached_twice_rides_once() {
336337 let (db, _leases) = crate::database::init_test_db().await;
src/service/settings.rsmodified+11 -10
@@ -51,11 +51,11 @@ pub struct SettingsPatch {
5151 pub dietary_tags: Option<Vec<String>>,
5252 /// Absent keeps the knob; `Some(None)` clears it (no cutoff at all).
5353 pub meal_cancel_cutoff_minutes: Option<Option<i64>>,
54- /// The school's branş list, raw like `dietary_tags` (the workflow's own
55- /// validation step, holding the stored list, decides whether an empty
56- /// list means "keep" or "clear" — see `Settings::try_new`).
54+ /// The school's subject-specialisation list, raw like `dietary_tags` (the
55+ /// workflow's own validation step, holding the stored list, decides whether
56+ /// an empty list means "keep" or "clear" — see `Settings::try_new`).
5757 pub branches: Option<Vec<String>>,
58- /// The devamsızlık excuse kinds, raw like `branches`.
58+ /// The absence excuse kinds, raw like `branches`.
5959 pub excuse_kinds: Option<Vec<String>>,
6060 /// Absent keeps the limit; `Some(None)` clears it (no ceiling).
6161 pub max_excused_absent_days: Option<Option<i64>>,
@@ -177,12 +177,13 @@ pub async fn apply(db: &Database, patch: &SettingsPatch) -> Result<Settings, App
177177 params.meal_cancel_cutoff_minutes = patch
178178 .meal_cancel_cutoff_minutes
179179 .unwrap_or(params.meal_cancel_cutoff_minutes);
180- // The year's shape: the branş and excuse-kind lists ride the same
181- // idiom as `dietary_tags` below — an *absent* field keeps the stored
182- // list, an explicitly submitted one replaces it whole (empty is a
183- // legal list: a school that never configured branş keeps none), and
184- // both are validated by `Settings::try_new` under the stored-list
185- // rules at the end of this merge.
180+ // The year's shape: the subject-specialisation and excuse-kind lists
181+ // ride the same idiom as `dietary_tags` below — an *absent* field
182+ // keeps the stored list, an explicitly submitted one replaces it whole
183+ // (empty is a legal list: a school that never configured subject
184+ // specialisations keeps none), and both are validated by
185+ // `Settings::try_new` under the stored-list rules at the end of this
186+ // merge.
186187 params.branches = patch
187188 .branches
188189 .clone()
src/service/term.rsmodified+12 -11
@@ -1,7 +1,7 @@
11 //! Term workflows: the archived-refusal rule every write against past
2-//! structure pays, the id resolver a request-supplied dönem passes through,
2+//! structure pays, the id resolver a request-supplied term passes through,
33 //! the row-level write gate, the delete's linked-refusal mapping, and the
4-//! archive that freezes every karne inside the dönem. The queries live in
4+//! archive that freezes every report card inside the term. The queries live in
55 //! [`crate::db::term`].
66
77 use crate::database::Database;
@@ -11,7 +11,7 @@ use crate::domain::term::{Term, TermId, TermName, archived_error};
1111 use crate::domain::timestamp::Timestamp;
1212 use crate::error::{AppError, ValidationError};
1313
14-/// Mint a dönem inside an academic year. The year is claimed in the same
14+/// Mint a term inside an academic year. The year is claimed in the same
1515 /// statement as the row (see [`term::create`]): past years take no new
1616 /// structure, which is why the web layer resolves the id through
1717 /// [`crate::service::academic_year::resolve`] first.
@@ -43,7 +43,7 @@ pub async fn list_all(
4343 /// `None` stays `None`, an unknown id is a `400` naming the field, and an
4444 /// *archived* one is a `409 term_archived`. That last refusal lives here
4545 /// rather than in each handler because this is the single spot every
46-/// request-supplied dönem passes through (an exam names one): past years take
46+/// request-supplied term passes through (an exam names one): past years take
4747 /// no new structure.
4848 pub async fn resolve(db: &Database, id: Option<&str>) -> Result<Option<TermId>, AppError> {
4949 let Some(id) = id else {
@@ -107,18 +107,19 @@ pub async fn delete(db: &Database, target: Term) -> Result<(), AppError> {
107107 }
108108 }
109109
110-/// Archive a dönem; idempotent — an already-archived term answers with the
110+/// Archive a term; idempotent — an already-archived term answers with the
111111 /// stamp it already had.
112112 ///
113-/// The archive freezes every student's karne for the dönem first
114-/// ([`crate::service::karne::freeze`]): from the moment the dönem is closed
113+/// The archive freezes every student's report card for the term first
114+/// ([`crate::service::karne::freeze`]): from the moment the term is closed
115115 /// the report is the record the school issued, and a later correction to a
116116 /// mark must not silently rewrite what a family holds. The freeze runs *before*
117117 /// the stamp so a failure leaves nothing archived-but-unfrozen — an archived
118-/// dönem whose snapshot is missing would go on serving live computations, and
119-/// the store's delete guard (which refuses a dönem a karne was frozen for)
120-/// would not see it either. A dönem that is already archived is left alone: a
121-/// second archive must not re-freeze over a record that was already issued.
118+/// term whose snapshot is missing would go on serving live computations, and
119+/// the store's delete guard (which refuses a term a report card was frozen
120+/// for) would not see it either. A term that is already archived is left
121+/// alone: a second archive must not re-freeze over a record that was already
122+/// issued.
122123 pub async fn archive(db: &Database, target: Term) -> Result<Term, AppError> {
123124 if !target.is_archived() {
124125 crate::service::karne::freeze(db, target.get_id()).await?;
src/service/user.rsmodified+3 -2
@@ -173,8 +173,9 @@ pub async fn set_profile(
173173 birth_date: Option<Option<BirthDate>>,
174174 display_name: Option<Option<DisplayName>>,
175175 bio: Option<Option<Bio>>,
176- // The branş, clearable like `bio`; membership in the school's
177- // `Settings::get_branches()` list is the caller's check, not this one's.
176+ // The subject specialisation, clearable like `bio`; membership in the
177+ // school's `Settings::get_branches()` list is the caller's check, not this
178+ // one's.
178179 branch: Option<Option<String>>,
179180 ) -> Result<User, AppError> {
180181 user::set_profile(
src/web/academic_years.rsmodified+22 -20
@@ -1,13 +1,14 @@
1-//! Academic years (eğitim yılı) — the top of the calendar.
1+//! Academic years — the top of the calendar.
22 //!
3-//! A year is the container a şube and its dönemler belong to, and the one that
4-//! carries the sınıf-geçme policy (`grade_promotions`). A grade absent from that
5-//! policy is not carried over by [`rollover`](crate::service::academic_year::rollover)
3+//! A year is the container a class section and its terms belong to, and the one
4+//! that carries the grade-promotion policy (`grade_promotions`). A grade absent
5+//! from that policy is not carried over by
6+//! [`rollover`](crate::service::academic_year::rollover)
67 //! — that is how graduation is expressed — so the command is explicit and
78 //! idempotent rather than automatic at a date.
89 //!
910 //! A year with structure still on it cannot be deleted (`409`), and an archived
10-//! year is read-only: no new şube, no new dönem, no new exam inside it. A
11+//! year is read-only: no new section, no new term, no new exam inside it. A
1112 //! finished year is closed with `POST /{id}/archive` (manager+), idempotently;
1213 //! there is deliberately no unarchive route.
1314
@@ -49,7 +50,7 @@ struct CreateYear {
4950 /// Year end, UTC unix-milliseconds; must be after `starts_at`.
5051 #[schema(example = 1_810_000_000_000_i64)]
5152 ends_at: i64,
52- /// The sınıf-geçme policy: each pair maps a grade label to the label its
53+ /// The grade-promotion policy: each pair maps a grade label to the label its
5354 /// students move to at `POST /academic-years/{id}/rollover`. A grade the
5455 /// list does not name is not rolled over — it graduates. Omit for a year
5556 /// whose rollover is not decided yet.
@@ -67,7 +68,7 @@ struct UpdateYear {
6768 grade_promotions: Option<Vec<PromotionBody>>,
6869 }
6970
70-/// One sınıf-geçme pair off the wire.
71+/// One grade-promotion pair off the wire.
7172 #[derive(Deserialize, Serialize, ToSchema)]
7273 struct PromotionBody {
7374 #[schema(max_length = 20, example = "5")]
@@ -97,10 +98,10 @@ struct YearResponse {
9798 /// Who created it.
9899 creator: String,
99100 grade_promotions: Vec<PromotionBody>,
100- /// How many şubeler sit in this year.
101+ /// How many class sections sit in this year.
101102 #[schema(example = 12)]
102103 class_count: i64,
103- /// How many dönemler it holds.
104+ /// How many terms it holds.
104105 #[schema(example = 2)]
105106 term_count: i64,
106107 }
@@ -128,12 +129,12 @@ impl YearResponse {
128129 }
129130 }
130131
131-/// What one rollover carried: how many şubeler were planted in the target
132-/// year, how many live students came with them, and the grades left behind
133-/// because the year names no promotion for them — the graduating ones.
132+/// What one rollover carried: how many class sections were planted in the
133+/// target year, how many live students came with them, and the grades left
134+/// behind because the year names no promotion for them — the graduating ones.
134135 #[derive(Serialize, ToSchema)]
135136 struct RolloverResponse {
136- /// The year that received the şubeler.
137+ /// The year that received the class sections.
137138 year: String,
138139 #[schema(example = 12)]
139140 classes: usize,
@@ -147,7 +148,7 @@ struct RolloverResponse {
147148
148149 #[derive(Deserialize, ToSchema)]
149150 struct Rollover {
150- /// The year the şubeler come *from* — usually the one that just ended.
151+ /// The year the class sections come *from* — usually the one that just ended.
151152 /// Must be a different, existing year; the target must still be empty.
152153 #[schema(example = "019732e3-7b00-7000-8000-00000000dead")]
153154 from_year: String,
@@ -187,7 +188,7 @@ fn check_range(
187188
188189 /// Create an academic year. Requires manager+. Past dates are allowed — years
189190 /// are calendar structure, not schedules. `grade_promotions` is the
190-/// sınıf-geçme policy the rollover applies.
191+/// grade-promotion policy the rollover applies.
191192 #[utoipa::path(
192193 post,
193194 path = "/",
@@ -322,7 +323,7 @@ async fn update_year(
322323 }
323324
324325 /// Archive an academic year. Requires manager+. Stamps `archived_at`, and from
325-/// then on the whole year is past structure: no new şube, no new dönem, no
326+/// then on the whole year is past structure: no new section, no new term, no
326327 /// exam inside it, and no edit or delete of the year itself. Idempotent — a
327328 /// second archive answers `200` with the stamp that already stood. There is no
328329 /// unarchive route: the row is deletable only while open.
@@ -349,7 +350,7 @@ async fn archive_year(
349350 }
350351
351352 /// Delete an academic year. Requires manager+. Refused with a 409 while any
352-/// şube or dönem still links it — move or delete them first. An archived year
353+/// section or term still links it — move or delete them first. An archived year
353354 /// must be re-opened (`PATCH` is not enough: there is no unarchive here, so
354355 /// the row is only deletable while open) like every other past-structure
355356 /// write.
@@ -378,9 +379,10 @@ async fn delete_year(
378379 Ok(StatusCode::NO_CONTENT)
379380 }
380381
381-/// Carry another year's şubeler into this one. Requires manager+. Each şube of
382-/// `from_year` whose grade the target year promotes is planted afresh here —
383-/// same name, mapped grade, and copies of its instances (`ders_saati`, karne
382+/// Carry another year's class sections into this one. Requires manager+. Each
383+/// section of `from_year` whose grade the target year promotes is planted afresh
384+/// here — same name, mapped grade, and copies of its instances (`ders_saati`,
385+/// report-card
384386 /// policy, teachers) and of every live member, who are also enrolled into the
385387 /// new instances. A grade with no promotion entry stays behind: that is
386388 /// graduation, and `graduated` names it. The target must be empty (a second
src/web/appointments.rsmodified+1 -1
@@ -44,7 +44,7 @@ struct PublishSlots {
4444 #[schema(example = 1_900_000_000_000_i64)]
4545 starts_at: i64,
4646 ends_at: i64,
47- /// Free-text hint shown to requesters ("office hours", "veli görüşmesi").
47+ /// Free-text hint shown to requesters ("office hours", "parent meeting").
4848 #[schema(max_length = 500)]
4949 note: Option<String>,
5050 /// Repeat the same window every week up to and including `until`.
src/web/attendance.rsmodified+21 -21
@@ -1,6 +1,6 @@
11 //! Attendance reports: the event tallies, the lesson roll call per instance,
2-//! and the devamsızlık block a Turkish school actually reads — how many
3-//! *days* a student was away in each dönem, and whether that is over the
2+//! and the absence block a Turkish school actually reads — how many
3+//! *days* a student was away in each term, and whether that is over the
44 //! configured limit.
55 //!
66 //! The day counts are bucketed in the school's timezone
@@ -88,13 +88,13 @@ fn attendance_rate(present: u64, absent: u64, late: u64) -> Option<f64> {
8888 #[derive(Serialize, ToSchema)]
8989 struct CourseAttendance {
9090 /// The instance these tallies belong to (`GET /instances/{id}`) — the
91- /// course as one şube teaches it.
91+ /// course as one class section teaches it.
9292 instance: String,
9393 course: CourseResponse,
9494 counts: StatusCounts,
9595 }
9696
97-/// The configured per-dönem absence limits, or `null` per limit when the
97+/// The configured per-term absence limits, or `null` per limit when the
9898 /// school set none.
9999 #[derive(Serialize, ToSchema)]
100100 struct AbsenceLimits {
@@ -102,7 +102,7 @@ struct AbsenceLimits {
102102 max_unexcused_days: Option<i64>,
103103 }
104104
105-/// One dönem's devamsızlık: how many days the student was away, split the way
105+/// One term's absence: how many days the student was away, split the way
106106 /// a Turkish school splits it.
107107 ///
108108 /// A *day* is a calendar day at the school on which at least one lesson was
@@ -112,14 +112,14 @@ struct AbsenceLimits {
112112 /// neither (its semantics are the school's own).
113113 #[derive(Serialize, ToSchema)]
114114 struct TermAbsence {
115- /// The dönem (`GET /terms/{id}`).
115+ /// The term (`GET /terms/{id}`).
116116 term: String,
117117 name: String,
118118 #[schema(example = 3)]
119119 absent_days: i64,
120120 #[schema(example = 1)]
121121 excused_days: i64,
122- /// The unexcused absence days — the count the mazeretsiz limit watches.
122+ /// The unexcused absence days — the count the unexcused limit watches.
123123 /// Equal to `absent_days`; both are published because a client should not
124124 /// have to know that.
125125 #[schema(example = 3)]
@@ -131,7 +131,7 @@ struct TermAbsence {
131131 }
132132
133133 /// A user's full attendance report: generic events, lesson roll call overall,
134-/// the roll call broken down per instance, and the per-dönem devamsızlık.
134+/// the roll call broken down per instance, and the per-term absence breakdown.
135135 #[derive(Serialize, ToSchema)]
136136 struct AttendanceReport {
137137 /// The user's id.
@@ -144,8 +144,8 @@ struct AttendanceReport {
144144 /// the user has roll-call rows in it — attendance is a historical record,
145145 /// so unenrolling never hides an absence.
146146 courses: Vec<CourseAttendance>,
147- /// The per-dönem absent-day counts, oldest dönem first. A lesson that falls
148- /// in no dönem's range is not counted here (it still counts in the
147+ /// The per-term absent-day counts, oldest term first. A lesson that falls
148+ /// in no term's range is not counted here (it still counts in the
149149 /// tallies).
150150 devamsizlik: Vec<TermAbsence>,
151151 }
@@ -153,7 +153,7 @@ struct AttendanceReport {
153153 /// The school's day boundary as a fixed offset in minutes.
154154 ///
155155 /// The allow-list in [`crate::constant::TIMEZONES`] names zones whose offset
156-/// is constant (Türkiye has run on UTC+3 with no DST since 2016), so the
156+/// is constant (Turkey has run on UTC+3 with no DST since 2016), so the
157157 /// backend buckets days without carrying a timezone database — the same
158158 /// arithmetic the settings module's own list is built on. An unrecognised name
159159 /// falls back to [`crate::constant::DEFAULT_TIMEZONE`]'s offset, which is what
@@ -174,7 +174,7 @@ fn zoned_day(millis: i64, offset_minutes: i32) -> chrono::NaiveDate {
174174 .date_naive()
175175 }
176176
177-/// The dönem an instant falls in: the containing term with the latest start,
177+/// The term an instant falls in: the containing term with the latest start,
178178 /// or `None` when the calendar does not cover it.
179179 fn term_of(instant: i64, terms: &[Term]) -> Option<&Term> {
180180 terms
@@ -187,7 +187,7 @@ fn term_of(instant: i64, terms: &[Term]) -> Option<&Term> {
187187
188188 /// Assemble the report: tally the user's event rows, then their session rows
189189 /// grouped by the (denormalized) instance. A `viewer` narrows the per-instance
190-/// blocks — and the overall session tally, and the devamsızlık — to the
190+/// blocks — and the overall session tally, and the absence block — to the
191191 /// instances that viewer runs (self-reports and manager+ reports pass `None`).
192192 /// Event tallies are school-wide, not course data, so they stay in either case.
193193 async fn build_report(
@@ -267,13 +267,13 @@ async fn build_report(
267267 })
268268 }
269269
270-/// The devamsızlık block: for every dönem the visible rows reach, the count of
270+/// The absence block: for every term the visible rows reach, the count of
271271 /// distinct school-days on which the student was `absent` (unexcused) and on
272272 /// which they were `excused`.
273273 ///
274274 /// The day is the *lesson's* day (`course_session.starts_at`), never when the
275275 /// teacher got round to marking: a roll call taken a week late must not move an
276-/// absence into another dönem. The lessons are read one instance at a time
276+/// absence into another term. The lessons are read one instance at a time
277277 /// (they are the same instances the blocks are built from), and the terms once.
278278 async fn absence_by_term(
279279 rows: &[&SessionAttendance],
@@ -302,7 +302,7 @@ async fn absence_by_term(
302302 let offset = zone_offset_minutes(school.get_timezone());
303303 let (terms, _) = crate::service::term::list_all(db, None, 0).await?;
304304
305- // A day counts once per (dönem, status class), which is what the
305+ // A day counts once per (term, status class), which is what the
306306 // regulation counts.
307307 let mut unexcused: HashSet<(String, chrono::NaiveDate)> = HashSet::new();
308308 let mut excused: HashSet<(String, chrono::NaiveDate)> = HashSet::new();
@@ -320,7 +320,7 @@ async fn absence_by_term(
320320 continue;
321321 };
322322 let Some(term) = term_of(*start, &terms) else {
323- // A lesson outside every dönem's range is not this block's.
323+ // A lesson outside every term's range is not this block's.
324324 continue;
325325 };
326326 let key = term.get_id().key();
@@ -369,8 +369,8 @@ async fn absence_by_term(
369369 }
370370
371371 /// The current user's attendance report: event tallies, lesson roll-call
372-/// tallies, a per-instance breakdown with attendance rates, and the per-dönem
373-/// devamsızlık.
372+/// tallies, a per-instance breakdown with attendance rates, and the per-term
373+/// absence breakdown.
374374 #[utoipa::path(
375375 get,
376376 path = "/me",
@@ -390,7 +390,7 @@ async fn my_report(
390390
391391 /// Any user's attendance report. Requires teacher+, or a parent tied to the
392392 /// target student. Managers, admins, and parents see every instance; a teacher
393-/// sees the event tallies plus only the roll-call blocks — and the devamsızlık
393+/// sees the event tallies plus only the roll-call blocks — and the absence
394394 /// days — of the instances they run.
395395 #[utoipa::path(
396396 get,
@@ -427,7 +427,7 @@ mod tests {
427427 use super::*;
428428
429429 /// The day bucket is the school's day, not UTC's: 22:30 UTC in summer
430- /// İstanbul is already tomorrow. This is the whole reason the timezone is
430+ /// Istanbul is already tomorrow. This is the whole reason the timezone is
431431 /// read off the settings.
432432 #[test]
433433 fn the_day_bucket_follows_the_school_zone() {
src/web/boards.rsmodified+1 -1
@@ -586,7 +586,7 @@ async fn close_board(
586586 #[derive(Deserialize, ToSchema)]
587587 #[serde(tag = "kind", rename_all = "lowercase")]
588588 enum InviteSource {
589- /// Everyone currently in this class section (şube). The homeroom teacher is
589+ /// Everyone currently in this class section. The homeroom teacher is
590590 /// not implied — the field is a label and grants nothing.
591591 Class { class: String },
592592 /// Everyone the course reaches: the union of every instance's roster and
src/web/classes.rsmodified+19 -19
@@ -1,4 +1,4 @@
1-//! Class sections (şube): a named set of students the school moves as one.
1+//! Class sections: a named set of students the school moves as one.
22 //!
33 //! Nothing here is a second kind of membership — adding a student to a class
44 //! enrolls them into every course the class carries, and attaching a course
@@ -65,13 +65,13 @@ struct CreateClass {
6565 #[schema(max_length = 200, example = "9-A")]
6666 name: String,
6767 /// The school's own label for the year this class sits in ("9", "10-A",
68- /// "anaokulu"). Free text; omit (or send `""`) for a class with no grade.
68+ /// "kindergarten"). Free text; omit (or send `""`) for a class with no grade.
6969 #[schema(max_length = 20, example = "9")]
7070 grade: Option<String>,
7171 /// The academic year this class sits in (`GET /academic-years`). Optional;
72- /// a şube with no year takes no exam and is never rolled over.
72+ /// a class with no year takes no exam and is never rolled over.
7373 year: Option<String>,
74- /// The class's homeroom teacher (sınıf öğretmeni) — a teacher, manager or
74+ /// The class's homeroom teacher — a teacher, manager or
7575 /// admin account. Optional; omit (or send `""`) for a class with none.
7676 #[schema(example = "0198f1a2-3b4c-7d5e-8f90-000000000001")]
7777 teacher_id: Option<String>,
@@ -130,7 +130,7 @@ struct ClassResponse {
130130 /// The academic year this class sits in (`GET /academic-years`); `null`
131131 /// when unassigned.
132132 year: Option<String>,
133- /// The class's homeroom teacher (sınıf öğretmeni); `null` when none is
133+ /// The class's homeroom teacher; `null` when none is
134134 /// assigned — as it is for every class after the account was demoted below
135135 /// `teacher`.
136136 teacher: Option<PersonRef>,
@@ -208,7 +208,7 @@ struct ClassMemberResponse {
208208 /// When they left, UTC unix-millis; `null` while the stint is live. Only
209209 /// ever non-null on a history read — every route here lists live rows.
210210 left_at: Option<i64>,
211- /// The şube this member was copied out of by a year rollover, or `null`
211+ /// The class section this member was copied out of by a year rollover, or `null`
212212 /// when a human placed them.
213213 #[schema(example = "0198f1a2-3b4c-7d5e-8f90-000000000001")]
214214 source_class_group: Option<String>,
@@ -240,15 +240,15 @@ struct ClassCourseResponse {
240240 course: String,
241241 /// Who attached it.
242242 attached_by: PersonRef,
243- /// Weekly lesson hours; the instance's weight in the year's karne average.
243+ /// Weekly lesson hours; the instance's weight in the year's report-card average.
244244 #[schema(example = 5)]
245245 ders_saati: i64,
246- /// Whether this instance's marks count toward the karne.
246+ /// Whether this instance's marks count toward the report card.
247247 counts_toward_karne: bool,
248248 /// How many students are enrolled right now.
249249 #[schema(example = 28)]
250250 enrollment_count: i64,
251- /// The staff assigned to run this instance, beyond the şube's homeroom
251+ /// The staff assigned to run this instance, beyond the class's homeroom
252252 /// teacher (who may act on it too).
253253 teachers: Vec<PersonRef>,
254254 }
@@ -295,7 +295,7 @@ fn grade_or_none(text: Option<&str>) -> Result<Option<ClassGrade>, AppError> {
295295 /// The homeroom teacher a request names, as the row itself — an empty string is
296296 /// *no* teacher, exactly like `grade`, so omitting the field and clearing it
297297 /// with `""` land on the same stored row. The named account must exist and hold
298-/// teacher-or-higher: a class's sınıf öğretmeni is staff, and the check is the
298+/// teacher-or-higher: a class's homeroom teacher is staff, and the check is the
299299 /// same shape `add_member` uses for a non-student. The `User` comes back so the
300300 /// caller can name them in the response without a second read.
301301 async fn teacher_or_none(text: Option<&str>, db: &Database) -> Result<Option<User>, AppError> {
@@ -362,9 +362,9 @@ async fn classes_page(
362362
363363 /// Create a class. Requires manager+ — a class is school structure, not a
364364 /// teacher's own room. `grade` is a free-text label for the year ("9", "10-A"),
365-/// `year` links the academic year (which is what binds the şube to a karne and
366-/// to the rollover), `teacher_id` names the homeroom teacher (sınıf öğretmeni,
367-/// a teacher+ account); all optional.
365+/// `year` links the academic year (which is what binds the class to a report
366+/// card and to the rollover), `teacher_id` names the homeroom teacher (a
367+/// teacher+ account); all optional.
368368 ///
369369 /// If a blueprint covers the new class's grade, the class is **stocked from it
370370 /// at once** — the same best-effort pump `POST /classes/{id}/blueprint` runs, so
@@ -901,7 +901,7 @@ async fn remove_member(
901901 /// class×course row every exam, session, lesson and roster under this class's
902902 /// course now keys on. Requires teacher+ and catalog rights on that course
903903 /// (its creator, or a manager/admin): attaching writes that course's roster for
904-/// this section, and the weekly hours and karne policy the instance starts
904+/// this section, and the weekly hours and report-card policy the instance starts
905905 /// with. The class's whole roster is enrolled in one go, and students already
906906 /// enrolled by hand keep their own rows. Attaching the same course twice is a
907907 /// 409.
@@ -955,7 +955,7 @@ async fn attach_course(
955955 }
956956
957957 /// List the instances a class carries — each a catalog course as this section
958-/// teaches it, with its hours, karne policy and teachers — newest first, paged
958+/// teaches it, with its hours, report-card policy and teachers — newest first, paged
959959 /// via `?limit=&offset=` (omit `limit` for all of them). Requires teacher+.
960960 /// Returns a `{items, total, limit, offset}` envelope. `POST /instances/{id}`
961961 /// edits one; this is the read that names them.
@@ -1013,7 +1013,7 @@ async fn list_class_courses(
10131013 /// takes the whole instance, so its roster goes with it: every enrollment on it
10141014 /// is swept, the rows this class pumped and the ones an operator placed by hand
10151015 /// alike — an enrollment cannot outlive the instance it hangs off, and "a hand
1016-/// row survives the şube" is the *member* exit's rule, applied where the
1016+/// row survives the class section" is the *member* exit's rule, applied where the
10171017 /// instance is still standing. An instance that exists but belongs to another
10181018 /// class, or one that is already gone, is a 404.
10191019 #[utoipa::path(
@@ -1222,8 +1222,8 @@ struct BlueprintStatusResponse {
12221222 /// every section is stocked.
12231223 #[schema(example = 12)]
12241224 matched: i64,
1225- /// Every section at the grade, in sync or not. Unpaged: it is the şube one
1226- /// school runs at one grade.
1225+ /// Every section at the grade, in sync or not. Unpaged: the set one school
1226+ /// runs at one grade.
12271227 sections: Vec<SectionStatusResponse>,
12281228 }
12291229
@@ -1580,7 +1580,7 @@ mod tests {
15801580 /// The same nullable rule on the homeroom teacher, plus the bar it holds:
15811581 /// absent and `""` are the same *no teacher* (and never touch the store),
15821582 /// an id naming nobody is a `400`, and so is one naming a student — a
1583- /// class's sınıf öğretmeni is staff.
1583+ /// class's homeroom teacher is staff.
15841584 #[tokio::test]
15851585 async fn an_empty_teacher_is_no_teacher_and_a_student_is_never_one() {
15861586 use crate::domain::role::Role;
src/web/courses.rsmodified+19 -19
@@ -49,21 +49,21 @@ struct CreateCourse {
4949 #[schema(max_length = 2000)]
5050 description: Option<String>,
5151 /// `course` (a regular class — the default), `study` (a supervised study
52- /// session — etüt), or `club` (a student club — kulüp). Only a `course` is
53- /// taught through şube instances (and carries exams, sessions and
54- /// homework); a `study`/`club` is joined school-wide.
52+ /// session), or `club` (a student club). Only a `course` is taught through
53+ /// class-section instances (and carries exams, sessions and homework); a
54+ /// `study`/`club` is joined school-wide.
5555 #[schema(example = "course")]
5656 kind: Option<String>,
5757 }
5858
5959 #[derive(Deserialize, ToSchema)]
6060 struct JoinMember {
61- /// The user to add to the club/etüt.
61+ /// The user to add to the club or study.
6262 #[schema(example = "019732e3-7b00-7000-8000-00000000dead")]
6363 user_id: String,
6464 }
6565
66-/// Public shape of one individual membership in a club or etüt — the
66+/// Public shape of one individual membership in a club or study — the
6767 /// school-scoped tier, distinct from a class instance's roster.
6868 #[derive(Serialize, ToSchema)]
6969 struct MembershipResponse {
@@ -101,7 +101,7 @@ struct UpdateCourse {
101101 title: Option<String>,
102102 #[schema(max_length = 2000)]
103103 description: Option<String>,
104- /// `course`, `study` (etüt), or `club` (kulüp). Omit to keep the current
104+ /// `course`, `study` (supervised study), or `club`. Omit to keep the current
105105 /// kind.
106106 kind: Option<String>,
107107 }
@@ -154,10 +154,10 @@ pub(crate) async fn visible_courses(user: &User, db: &Database) -> Result<Vec<Co
154154
155155 /// Create a catalog course owned by the current user. Requires the `teacher`
156156 /// role or higher. `kind` picks the flavor — `course` (a regular class, the
157-/// default), `study` (a supervised study session — etüt), or `club` (a
158-/// student club — kulüp). A catalog row teaches nobody by itself: a şube
159-/// attaches it into an instance (`POST /classes/{id}/instances`), and a
160-/// `study`/`club` is joined school-wide (`POST /courses/{id}/members`).
157+/// default), `study` (a supervised study session), or `club` (a student
158+/// club). A catalog row teaches nobody by itself: a class section attaches it
159+/// into an instance (`POST /classes/{id}/instances`), and a `study`/`club` is
160+/// joined school-wide (`POST /courses/{id}/members`).
161161 #[utoipa::path(
162162 post,
163163 path = "/",
@@ -232,7 +232,7 @@ async fn list_courses(
232232 /// `{items, total, limit, offset}` envelope.
233233 ///
234234 /// Both membership tiers are here: a student's enrollments in the instances
235-/// their şubeler teach, and an individual club/etüt membership. The
235+/// their class sections teach, and an individual club/study membership. The
236236 /// *instances* themselves are `GET /instances/me`.
237237 #[utoipa::path(
238238 get,
@@ -369,7 +369,7 @@ async fn update_course(
369369
370370 /// Delete a catalog course. Requires teacher+; only its creator or a
371371 /// manager/admin may delete it. Refused with a 409 while the course is still
372-/// taught anywhere — detach it from every şube (`DELETE
372+/// taught anywhere — detach it from every class section (`DELETE
373373 /// /classes/{id}/instances/{instance}`) and remove its individual members
374374 /// first, so a course that carries teaching is never dropped by accident.
375375 /// Once free, it cascades the instances' exams (with their results, questions,
@@ -428,13 +428,13 @@ async fn delete_course(
428428 Ok(StatusCode::NO_CONTENT)
429429 }
430430
431-// ---- club/etüt membership ---------------------------------------------------
431+// ---- club/study membership -------------------------------------------------
432432
433-/// Add a user to a club or etüt — the **school-scoped** membership tier.
433+/// Add a user to a club or study — the **school-scoped** membership tier.
434434 /// Requires teacher+ and catalog rights (its creator, or a manager/admin).
435-/// Only students can be added, and only to a `study` (etüt) or `club`
436-/// (kulüp): a regular ders (`kind` `course`) has no school-wide roster — its
437-/// students come from the şubeler that teach it, and that join is
435+/// Only students can be added, and only to a `study` (supervised study) or
436+/// `club`: a regular course (`kind` `course`) has no school-wide roster — its
437+/// students come from the class sections that teach it, and that join is
438438 /// `POST /instances/{id}/enrollments` (400 here). Idempotent: a pair that
439439 /// already holds a membership is returned as-is.
440440 #[utoipa::path(
@@ -474,7 +474,7 @@ async fn join_member(
474474 Ok(Json(MembershipResponse::new(&membership, &people)))
475475 }
476476
477-/// List a club/etüt's members, newest first, paged via `?limit=&offset=`
477+/// List a club/study's members, newest first, paged via `?limit=&offset=`
478478 /// (omit `limit` for the whole list). Requires teacher+ and catalog rights.
479479 /// Returns a `{items, total, limit, offset}` envelope. An instance's roster
480480 /// is `GET /instances/{id}/enrollments`.
@@ -524,7 +524,7 @@ async fn list_members(
524524 Ok(Json(Page::new(items, total, limit, offset)))
525525 }
526526
527-/// Remove a user from a club or etüt. Requires teacher+ and catalog rights.
527+/// Remove a user from a club or study. Requires teacher+ and catalog rights.
528528 /// Existing exam results and badges are untouched — the membership is a door,
529529 /// not a record of what happened inside. A pair holding no membership is a
530530 /// 404.
src/web/dto.rsmodified+14 -15
@@ -209,10 +209,10 @@ impl UserResponse {
209209 }
210210
211211 /// Public shape of a course — the **catalog** row, the school's template for a
212-/// ders. Shared by `courses` (CRUD) and the reports that embed the course an
213-/// instance teaches. The taught thing is the *instance*
212+/// taught course. Shared by `courses` (CRUD) and the reports that embed the
213+/// course an instance teaches. The taught thing is the *instance*
214214 /// ([`super::instances::InstanceResponse`]): teachers, weekly hours and the
215-/// karne weight live there, per şube.
215+/// report-card weight live there, per class section.
216216 #[derive(Serialize, ToSchema)]
217217 pub struct CourseResponse {
218218 #[schema(example = "019732e3-7b00-7000-8000-00000000dead")]
@@ -223,17 +223,16 @@ pub struct CourseResponse {
223223 #[schema(example = "Algebra")]
224224 pub title: String,
225225 pub description: String,
226- /// `course` (a regular class), `study` (a supervised study session —
227- /// etüt), or `club` (a student club — kulüp). Only a `course` is taught
228- /// through şube instances and carries exams; a `study`/`club` is joined
229- /// school-wide.
226+ /// `course` (a regular class), `study` (a supervised study session), or
227+ /// `club` (a student club). Only a `course` is taught through class-section
228+ /// instances and carries exams; a `study`/`club` is joined school-wide.
230229 #[schema(example = "course")]
231230 pub kind: String,
232- /// How many şube instances teach this course right now — the count the
233- /// delete refusal watches (`0` is what lets the row go).
231+ /// How many class×course instances teach this course right now — the count
232+ /// the delete refusal watches (`0` is what lets the row go).
234233 #[schema(example = 3)]
235234 pub class_course_count: i64,
236- /// How many individual club/etüt memberships the course carries.
235+ /// How many individual club/study memberships the course carries.
237236 #[schema(example = 12)]
238237 pub course_membership_count: i64,
239238 }
@@ -295,8 +294,8 @@ pub struct HomeworkResponse {
295294 #[schema(example = "019732e3-7b00-7000-8000-00000000dead")]
296295 pub id: String,
297296 /// The class×course instance this homework belongs to
298- /// (`GET /instances/{id}`) — the şube's own assignment, not a school-wide
299- /// course's.
297+ /// (`GET /instances/{id}`) — the class section's own assignment, not a
298+ /// school-wide course's.
300299 pub class_course: String,
301300 /// The course subject this homework is tagged with.
302301 pub subject: String,
@@ -386,10 +385,10 @@ pub struct ExamResponse {
386385 pub id: String,
387386 pub creator: String,
388387 /// The class×course instance the exam belongs to (`GET /instances/{id}`) —
389- /// two şubeler teaching the same course sit their own exams.
388+ /// two class sections teaching the same course sit their own exams.
390389 pub class_course: String,
391- /// The dönem the exam is sat in (`GET /terms`); its marks count into that
392- /// dönem's karne.
390+ /// The term the exam is sat in (`GET /terms`); its marks count into that
391+ /// term's report card.
393392 pub term: String,
394393 pub title: String,
395394 pub description: String,
src/web/events.rsmodified+1 -1
@@ -67,7 +67,7 @@ enum AudienceDto {
6767 /// The students currently enrolled in this course (live — enrollment
6868 /// changes move people in and out).
6969 Course { course: String },
70- /// The students currently in this class section (şube) — live, so adding
70+ /// The students currently in this class section — live, so adding
7171 /// or removing a member moves them in and out. The homeroom teacher is not
7272 /// implied. If the class is later deleted the event survives with an empty
7373 /// roster.
src/web/exams/audience.rsmodified+15 -15
@@ -2,13 +2,13 @@ use super::*;
22
33 use crate::domain::class_course::ClassCourseId;
44
5-// ---- audience: the ortak sınav ---------------------------------------------
5+// ---- audience: the shared exam ----------------------------------------------
66 // An exam is owned by the instance it was created on, but it can be announced
77 // to other instances of the same course in the same academic year: one
8-// sitting, one mark, standing in every addressed instance's marks and karne.
8+// sitting, one mark, standing in every addressed instance's marks and report card.
99 // The gate is the owner instance's (a manager+, its assigned teachers, its
10-// şube's homeroom teacher) — the instance that runs the exam decides who else
11-// sits it.
10+// class section's homeroom teacher) — the instance that runs the exam decides
11+// who else sits it.
1212
1313 /// One instance an exam is announced to.
1414 #[derive(Serialize, ToSchema)]
@@ -16,7 +16,7 @@ pub(crate) struct ExamAudienceResponse {
1616 /// The class×course instance the exam is announced to.
1717 #[schema(example = "019732e3-7b00-7000-8000-00000000dead")]
1818 instance: String,
19- /// The şube (class section) that instance belongs to.
19+ /// The class section that instance belongs to.
2020 #[schema(example = "019732e3-7b00-7000-8000-00000000dead")]
2121 class: String,
2222 /// The catalog course that instance teaches — the exam's own course, by
@@ -43,8 +43,8 @@ impl ExamAudienceResponse {
4343 /// pair of questions every exam-level gate asks (D2).
4444 ///
4545 /// A caller *sees* the exam when any addressed instance admits them as a
46-/// viewer (its enrolled students, its teachers, its şube's homeroom teacher,
47-/// manager+), and *acts* on it — grading, the results readers, the live
46+/// viewer (its enrolled students, its teachers, its class section's homeroom
47+/// teacher, manager+), and *acts* on it — grading, the results readers, the live
4848 /// monitor — when they manage one of them. Both are exactly the predicates
4949 /// that instance's own routes apply
5050 /// ([`super::instances::list_instance_exams`], `POST /instances/{id}/exams`),
@@ -81,12 +81,12 @@ pub(crate) struct AddAudience {
8181 instance: String,
8282 }
8383
84-/// Announce an exam to another instance — the **ortak sınav** write: one exam
85-/// addressed to a sibling şube, so it and its marks stand in that section's
86-/// exam list, marks report and karne. Requires teacher+ and management rights
87-/// over the exam's **owner** instance (an assigned teacher, its şube's
88-/// homeroom teacher, or a manager/admin) — the target instance's teachers
89-/// have no say.
84+/// Announce an exam to another instance — the **shared exam** write: one exam
85+/// addressed to a sibling class section, so it and its marks stand in that
86+/// section's exam list, marks report and report card. Requires teacher+ and
87+/// management rights over the exam's **owner** instance (an assigned teacher,
88+/// its class section's homeroom teacher, or a manager/admin) — the target
89+/// instance's teachers have no say.
9090 /// The target must teach the exam's own catalog course and sit under the same
9191 /// academic year (`400` otherwise), the owner itself is refused (`400`), and
9292 /// an archived target year is a `409`. Announcing a pair that already stands
@@ -128,8 +128,8 @@ pub(crate) async fn add_audience(
128128 /// behind the announce routes' answer, useful on its own to a client that
129129 /// wants to show where else an exam is sat. Visible to the exam's own
130130 /// audience: an addressed instance's enrolled students, its teachers (or its
131-/// şube's homeroom teacher), and managers/admins — except drafts, which stay
132-/// a `404` to everyone but an addressed instance's managers.
131+/// class section's homeroom teacher), and managers/admins — except drafts,
132+/// which stay a `404` to everyone but an addressed instance's managers.
133133 #[utoipa::path(
134134 get,
135135 path = "/{id}/audience",
src/web/exams/mod.rsmodified+2 -2
@@ -292,7 +292,7 @@ async fn list_exams(
292292
293293 /// Fetch a single exam by id. Visible to **any instance the exam is addressed
294294 /// to** — its owner's enrolled students and teachers, and, for an announced
295-/// exam (ortak sınav), each addressed section's alike — plus managers/admins;
295+/// exam (a shared exam), each addressed section's alike — plus managers/admins;
296296 /// drafts only show to the managers of an addressed instance (everyone else
297297 /// gets a `404`, as if the exam doesn't exist yet — because it doesn't,
298298 /// officially).
@@ -503,7 +503,7 @@ async fn delete_exam(
503503
504504 /// Record (or overwrite) a student's mark for an exam. Requires teacher+ and
505505 /// management rights over **an instance the exam is addressed to** (the
506-/// announced-to section's teacher grades its own students on an ortak sınav);
506+/// announced-to section's teacher grades its own students on a shared exam);
507507 /// the target must be a student enrolled in one of them. Only students carry
508508 /// marks; students never grade — and nobody
509509 /// grades themselves. A draft can't be graded (`409`) — a mark would point at
src/web/homework.rsmodified+2 -2
@@ -206,7 +206,7 @@ async fn list_homework(
206206 }
207207
208208 /// Fetch a single homework by id. Visible to whoever can view its instance (its
209-/// enrolled students, its teachers, its şube's homeroom teacher, and
209+/// enrolled students, its teachers, its class section's homeroom teacher, and
210210 /// managers/admins). A student the homework is *not* assigned to gets a 404 —
211211 /// the same no-leak an unseen exam draft gets, so a subset assignment never
212212 /// reveals itself to the students left out of it. To a caller without
@@ -1190,7 +1190,7 @@ struct HomeworkReportEntry {
11901190 result: Option<HomeworkResultResponse>,
11911191 }
11921192
1193-/// A student's homework report across the instances their şube carries, paged
1193+/// A student's homework report across the instances their class section carries, paged
11941194 /// via `?limit=&offset=` (omit `limit` for all of it): one row per homework in
11951195 /// their audience — submitted/late/missing state plus the grade once one
11961196 /// exists. Statuses and marks, never the submitted files (observers get the
src/web/insights.rsmodified+2 -2
@@ -124,7 +124,7 @@ struct AcceptedResponse {
124124
125125 #[derive(Deserialize, ToSchema, Default)]
126126 struct ComputeStudentRequest {
127- /// ISO-8601 date to compute from; omit for the dönem's beginning.
127+ /// ISO-8601 date to compute from; omit for the term's beginning.
128128 #[schema(example = "2026-09-01")]
129129 since: Option<String>,
130130 /// Compute only these sections; omit for all of them.
@@ -1076,7 +1076,7 @@ async fn ensure_can_read(caller: &User, target: &UserId, db: &Database) -> Resul
10761076 /// runs are [`service::instance::visible_instances`]'s `manages` half, which
10771077 /// is the same D10 rule every instance-scoped route applies
10781078 /// ([`service::class_course::ensure_instance_teacher`]): an assigned teacher
1079-/// or the şube's homeroom teacher, and nobody else.
1079+/// or the class section's homeroom teacher, and nobody else.
10801080 async fn teacher_reaches(
10811081 db: &Database,
10821082 teacher: &User,
src/web/instances.rsmodified+30 -30
@@ -1,10 +1,10 @@
1-//! The **instance**: one catalog course as taught in one şube — the academic
1+//! The **instance**: one catalog course as taught in one class section — the
22 //! anchor of the K12 model.
33 //!
44 //! Everything a class actually runs hangs off this row: its roster, its
5-//! teachers, its exams, its lessons and its homework. Two şubeler teaching the
5+//! teachers, its exams, its lessons and its homework. Two sections teaching the
66 //! same course are two instances and share none of it. The weekly hours
7-//! (`ders_saati`) and the karne policy (`counts_toward_karne`) are the
7+//! (`ders_saati`) and the report-card policy (`counts_toward_karne`) are the
88 //! instance's own, so two sections may legitimately differ.
99 //!
1010 //! The catalog CRUD stays in [`super::courses`]; the exam, session and
@@ -74,11 +74,11 @@ pub fn homework_routes() -> OpenApiRouter<AppState> {
7474
7575 #[derive(Deserialize, ToSchema)]
7676 struct UpdateInstance {
77- /// Weekly lesson hours: the instance's weight in the year's karne average.
77+ /// Weekly lesson hours: the instance's weight in the year's report-card average.
7878 /// Omit to keep the stored value; at least 1 and at most 40.
7979 #[schema(minimum = 1, maximum = 40, example = 5)]
8080 ders_saati: Option<i64>,
81- /// Whether this instance's marks count into the karne. Omit to keep the
81+ /// Whether this instance's marks count into the report card. Omit to keep the
8282 /// stored value.
8383 counts_toward_karne: Option<bool>,
8484 }
@@ -105,13 +105,13 @@ struct CreateExamInCourse {
105105 #[schema(max_length = 2000)]
106106 description: Option<String>,
107107 /// The assessment form — one of the school's exam kinds (`GET /settings`;
108- /// defaults: `yazili`, `sozlu`, `uygulama`). The kind's
109- /// settings-configured weight decides how heavily the exam counts into the
110- /// instance's average.
108+ /// defaults: `yazili`, `sozlu`, `uygulama` — written, oral, practice). The
109+ /// kind's settings-configured weight decides how heavily the exam counts
110+ /// into the instance's average.
111111 #[schema(max_length = 50, example = "yazili")]
112112 kind: String,
113- /// The dönem the exam is sat in (`GET /terms`). Required, and it must be a
114- /// dönem of this instance's şube's academic year — that is the slice the
113+ /// The term the exam is sat in (`GET /terms`). Required, and it must be a
114+ /// term of this instance's section's academic year — that is the slice the
115115 /// exam's marks are counted into.
116116 #[schema(example = "019732e3-7b00-7000-8000-00000000dead")]
117117 term: String,
@@ -185,26 +185,26 @@ struct CreateSessionInCourse {
185185 ends_at: Option<i64>,
186186 }
187187
188-/// Public shape of one instance: the course as this şube teaches it, with the
188+/// Public shape of one instance: the course as this section teaches it, with the
189189 /// policy that is the instance's own.
190190 #[derive(Serialize, ToSchema)]
191191 pub struct InstanceResponse {
192192 #[schema(example = "019732e3-7b00-7000-8000-00000000dead")]
193193 pub id: String,
194- /// The şube (class section) that teaches it.
194+ /// The class section that teaches it.
195195 pub class: String,
196196 /// The catalog course being taught (`GET /courses/{id}`) — its title lives
197197 /// there, shared by every instance of it.
198198 pub course: String,
199- /// Weekly lesson hours; the instance's weight in the year's karne average.
199+ /// Weekly lesson hours; the instance's weight in the year's report-card average.
200200 #[schema(example = 5)]
201201 pub ders_saati: i64,
202- /// Whether this instance's marks count toward the karne.
202+ /// Whether this instance's marks count toward the report card.
203203 pub counts_toward_karne: bool,
204204 /// How many students are enrolled right now.
205205 #[schema(example = 28)]
206206 pub enrollment_count: i64,
207- /// The staff assigned to run this instance — separate from the şube's
207+ /// The staff assigned to run this instance — separate from the section's
208208 /// homeroom teacher, who may also act here (see `GET /instances/{id}`).
209209 pub teachers: Vec<PersonRef>,
210210 }
@@ -239,9 +239,9 @@ struct EnrollmentResponse {
239239 user: PersonRef,
240240 /// Who enrolled them.
241241 enrolled_by: PersonRef,
242- /// The şube this row was pumped by, or `null` when a human placed it
243- /// directly. A row with a şube on it is *swept* when that şube drops the
244- /// student or detaches the course; a `null` one is nobody's to take back.
242+ /// The section this row was pumped by, or `null` when a human placed it
243+ /// directly. A row with a section on it is *swept* when that section drops
244+ /// the student or detaches the course; a `null` one is nobody's to take back.
245245 #[schema(example = "019732e3-7b00-7000-8000-00000000dead")]
246246 source: Option<String>,
247247 }
@@ -303,7 +303,7 @@ pub(crate) async fn instance_people(
303303 /// the courses their section is being taught, and a teacher the ones they run.
304304 ///
305305 /// The set is exactly
306-/// [`crate::service::instance::visible_instances`]'s — the caller's şubeler (a
306+/// [`crate::service::instance::visible_instances`]'s — the caller's sections (a
307307 /// student's live membership, a homeroom teacher's) unioned with the instances
308308 /// they were assigned to teach, deduped by instance. One rule for what the
309309 /// caller may see, so this list and every instance-scoped gate can never
@@ -352,7 +352,7 @@ async fn my_instances(
352352 }
353353
354354 /// Fetch one instance by id. Visible to its enrolled students, its assigned
355-/// teachers, its şube's homeroom teacher, and managers/admins.
355+/// teachers, its section's homeroom teacher, and managers/admins.
356356 #[utoipa::path(
357357 get,
358358 path = "/{id}",
@@ -384,7 +384,7 @@ async fn get_instance(
384384 }
385385
386386 /// Update one instance's own policy. Requires teacher+ and a right over this
387-/// instance: manager+, one of its assigned teachers, or its şube's homeroom
387+/// instance: manager+, one of its assigned teachers, or its section's homeroom
388388 /// teacher. Omitted fields keep their value; both are non-clearable.
389389 #[utoipa::path(
390390 patch,
@@ -507,7 +507,7 @@ async fn unassign_teacher(
507507 /// Enroll a student into this instance (idempotent upsert). Requires teacher+
508508 /// and a right over the instance. Only students can be enrolled — enrollment is
509509 /// student membership, and it gates sitting exams, being graded, and the
510-/// roster. The row is hand-placed (`source` `null`), so no şube sweep can take
510+/// roster. The row is hand-placed (`source` `null`), so no section sweep can take
511511 /// it back.
512512 #[utoipa::path(
513513 post,
@@ -624,7 +624,7 @@ async fn unenroll(
624624
625625 /// Create an exam inside one instance. Requires teacher+ and a right over the
626626 /// instance; the exam's marks count into the instance's average with its
627-/// kind's weight (`GET /settings`) and into the dönem's karne named by `term`.
627+/// kind's weight (`GET /settings`) and into the term's report card named by `term`.
628628 /// Omit `mode` for an offline-graded exam nobody can sit; `sync`/`async` take
629629 /// a window (async also `duration_ms`), `open` is sittable anytime with an
630630 /// optional per-attempt `duration_ms`. `max_attempts` (default 1, `0` =
@@ -664,7 +664,7 @@ async fn create_exam_in_instance(
664664 let description = ExamDescription::try_new(&req.description.unwrap_or_default())?;
665665 let school = service::settings::load(&st.db).await?;
666666 let kind = ExamKind::try_new(&req.kind, school.get_exam_kinds())?;
667- // The dönem is resolved *without* the archive gate: a dönem archived inside
667+ // The term is resolved *without* the archive gate: a term archived inside
668668 // an open year is a record, not a wall (the year is what
669669 // [`service::exam::create`] refuses). An unknown id is this route's 400.
670670 let Some(term) = service::term::read(&st.db, &TermId::from_key(&req.term)).await? else {
@@ -707,7 +707,7 @@ async fn create_exam_in_instance(
707707
708708 /// List one instance's exams, paged via `?limit=&offset=` (omit `limit` for
709709 /// all of them). Visible to the instance's enrolled students, its teachers,
710-/// its şube's homeroom teacher, and managers/admins — but drafts appear only
710+/// its section's homeroom teacher, and managers/admins — but drafts appear only
711711 /// to the instance's managers. Returns a `{items, total, limit, offset}`
712712 /// envelope.
713713 #[utoipa::path(
@@ -975,9 +975,9 @@ mod tests {
975975 use super::*;
976976 use crate::domain::class_group::ClassGroupId;
977977
978- /// The read path behind `GET /instances/me` is `class_member` → the şubeler
979- /// → their instances. A student enrolled by a şube sees exactly that
980- /// şube's instances, and a second şube teaching the same course is a
978+ /// The read path behind `GET /instances/me` is `class_member` → the sections
979+ /// → their instances. A student enrolled by a section sees exactly that
980+ /// section's instances, and a second section teaching the same course is a
981981 /// different row.
982982 #[tokio::test]
983983 async fn a_member_reads_their_own_sections_instances() {
@@ -1015,7 +1015,7 @@ mod tests {
10151015 /// member read alone left their own instances out of
10161016 /// [`visible_instances`] — while [`can_manage_instance`] let them act on
10171017 /// every one of them. The homeroom column is the second, separate way a
1018- /// teacher reaches a şube, and it has to be unioned in.
1018+ /// teacher reaches a section, and it has to be unioned in.
10191019 #[tokio::test]
10201020 async fn a_homeroom_teacher_sees_their_sections_instances() {
10211021 use crate::domain::class_group::ClassName;
@@ -1060,7 +1060,7 @@ mod tests {
10601060 /// `GET /instances/me` serves [`visible_instances`]' set, so the second arm
10611061 /// of the union — the instances a teacher was *assigned* to teach — has to
10621062 /// surface there even when they are neither enrolled in nor homeroom of
1063- /// the şube. Before the union the route was the member read alone, and a
1063+ /// the section. Before the union the route was the member read alone, and a
10641064 /// teacher's assigned instances were invisible to them.
10651065 #[tokio::test]
10661066 async fn an_assigned_teacher_reads_the_instances_they_teach_once() {
src/web/limits.rsmodified+5 -5
@@ -171,8 +171,8 @@ struct CourseLimits {
171171 max_title_len: usize,
172172 max_description_len: usize,
173173 /// The only accepted `kind` values. Only `course` is taught through class
174- /// instances (exams, sessions, homework); `study` (etüt) and `club` are
175- /// joined school-wide.
174+ /// instances (exams, sessions, homework); `study` (supervised study) and
175+ /// `club` are joined school-wide.
176176 #[schema(example = json!(["course", "study", "club"]))]
177177 kinds: Vec<&'static str>,
178178 max_subject_name_len: usize,
@@ -282,7 +282,7 @@ struct MealLimits {
282282 /// Dietary tags one student's profile may carry, and its kitchen note.
283283 max_dietary_tags: usize,
284284 max_dietary_note_len: usize,
285- /// Money is **minor units** (kuruş) as an integer everywhere — never a
285+ /// Money is **minor units** as an integer everywhere — never a
286286 /// decimal, never a float. These cap one dish and one ledger line.
287287 max_dish_price_minor: i64,
288288 max_ledger_amount_minor: i64,
@@ -309,7 +309,7 @@ struct MealLimits {
309309 }
310310
311311 /// School payments: fee plans, their assignment, and the payment ledger. Money
312-/// is **minor units** (kuruş) as an integer, and one ledger line is capped by
312+/// is **minor units** as an integer, and one ledger line is capped by
313313 /// the same `max_ledger_amount_minor` the meal ledger publishes.
314314 #[derive(Serialize, ToSchema)]
315315 struct PaymentLimits {
@@ -363,7 +363,7 @@ struct ChatbotLimits {
363363 /// chatbot group to bound its input.
364364 #[derive(Serialize, ToSchema)]
365365 struct RagLimits {
366- /// Hard ceiling on the `(sınıf, ders)` scope pairs one ask may carry. The
366+ /// Hard ceiling on the `(class, course)` scope pairs one ask may carry. The
367367 /// corpus is routed by the pair, so this bounds what one question can ask
368368 /// a retrieval to sweep.
369369 max_scope_pairs: usize,
src/web/marks.rsmodified+39 -39
@@ -1,12 +1,12 @@
11 //! Mark reports: the per-instance weighted average a student carries, and the
2-//! karne — the same numbers rolled up per dönem.
2+//! report card — the same numbers rolled up per term.
33 //!
44 //! Both read through the *instance* (`class_course`): a student's marks are
5-//! grouped by the course their şube is taught, so two sections teaching the
5+//! grouped by the course their section is taught, so two sections teaching the
66 //! same catalog course are two lines. A block's marks are the exams *addressed
7-//! to* its instance (`exam_audience`), not only the ones it owns — an ortak
8-//! sınav is each of its audiences' exam, so its mark appears in every one of
9-//! their blocks. The roll-up, the dönem average and the verdict live in
7+//! to* its instance (`exam_audience`), not only the ones it owns — a shared
8+//! exam is each of its audiences' exam, so its mark appears in every one of
9+//! their blocks. The roll-up, the term average and the verdict live in
1010 //! [`crate::service::karne`]; this module is the HTTP shape and the teacher
1111 //! narrowing.
1212
@@ -64,11 +64,11 @@ struct MarkEntry {
6464 graded_by: String,
6565 }
6666
67-/// A student's marks in one instance — one catalog course as one şube teaches
67+/// A student's marks in one instance — one catalog course as one section teaches
6868 /// it.
6969 #[derive(Serialize, ToSchema)]
7070 struct CourseMarks {
71- /// The instance these marks belong to (`GET /instances/{id}`). Two şubeler
71+ /// The instance these marks belong to (`GET /instances/{id}`). Two sections
7272 /// teaching the same course are two blocks.
7373 instance: String,
7474 course: CourseResponse,
@@ -108,11 +108,11 @@ fn weighted_average(pairs: &[(i64, i64)]) -> Option<f64> {
108108 Some(total as f64 / total_weight as f64)
109109 }
110110
111-/// The instances a student's report is built from: the şubeler they are a live
112-/// member of, and the instances those şubeler carry — the same path the karne
113-/// walks, so the two can never disagree about which blocks a student has.
111+/// The instances a student's report is built from: the sections they are a live
112+/// member of, and the instances those sections carry — the same path the report
113+/// card walks, so the two can never disagree about which blocks a student has.
114114 ///
115-/// A hand-placed enrollment outside their şubeler is deliberately not a source
115+/// A hand-placed enrollment outside their sections is deliberately not a source
116116 /// here: a student's academic identity is their section, and adding an
117117 /// instance to it is what the office does with `POST /classes/{id}/instances`.
118118 async fn enrolled_instances(user: &UserId, db: &Database) -> Result<Vec<ClassCourse>, AppError> {
@@ -274,19 +274,19 @@ async fn user_marks(
274274 Ok(Json(build_report(&target, viewer, &st.db).await?))
275275 }
276276
277-/// The `?term=` selector both karne routes share. Omitted, it means the newest
278-/// dönem on the calendar — the one a family is reading about now.
277+/// The `?term=` selector both report-card routes share. Omitted, it means the
278+/// newest term on the calendar — the one a family is reading about now.
279279 #[derive(Deserialize, IntoParams)]
280280 struct KarneQuery {
281- /// The dönem to report on (`GET /terms`). Omit for the newest one.
281+ /// The term to report on (`GET /terms`). Omit for the newest one.
282282 #[param(example = "019732e3-7b00-7000-8000-00000000dead")]
283283 term: Option<String>,
284284 }
285285
286-/// The dönem the request names, resolved *without* the archive gate: an
287-/// archived dönem's karne is exactly what a family asks for, and the service
288-/// serves its frozen snapshot. A dönem that does not exist is a 404, as is an
289-/// empty calendar.
286+/// The term the request names, resolved *without* the archive gate: an
287+/// archived term's report card is exactly what a family asks for, and the
288+/// service serves its frozen snapshot. A term that does not exist is a 404, as
289+/// is an empty calendar.
290290 async fn resolve_term(query: &KarneQuery, db: &Database) -> Result<TermId, AppError> {
291291 match query.term.as_deref() {
292292 Some(id) => Ok(*service::term::read(db, &TermId::from_key(id))
@@ -303,15 +303,15 @@ async fn resolve_term(query: &KarneQuery, db: &Database) -> Result<TermId, AppEr
303303 }
304304 }
305305
306-/// Narrow a karne to the instances `viewer` runs: the lines stay, the dönem
307-/// average is recomputed over them (each weighted by its `ders_saati`, the
308-/// karne's own rule), and the verdict is dropped.
306+/// Narrow a report card to the instances `viewer` runs: the lines stay, the
307+/// term average is recomputed over them (each weighted by its `ders_saati`,
308+/// the report card's own rule), and the verdict is dropped.
309309 ///
310-/// Dropping it is the honest half: the verdict is a whole-karne judgement
311-/// against the school's passing floor, and the floor's rule lives in
312-/// [`crate::service::karne`] — a partially-seen karne states no verdict rather
313-/// than one computed from a subset. A caller who runs every instance in the
314-/// report sees it, because nothing is filtered.
310+/// Dropping it is the honest half: the verdict is a judgement over the whole
311+/// report card against the school's passing floor, and the floor's rule lives
312+/// in [`crate::service::karne`] — a partially-seen report card states no
313+/// verdict rather than one computed from a subset. A caller who runs every
314+/// instance in the report sees it, because nothing is filtered.
315315 async fn narrow_karne(
316316 mut report: KarneReport,
317317 viewer: &User,
@@ -324,7 +324,7 @@ async fn narrow_karne(
324324 kept.push(line);
325325 }
326326 }
327- // Nothing was filtered: the report is the whole karne, verdict included.
327+ // Nothing was filtered: the report is the whole report card, verdict included.
328328 if kept.len() == lines_seen {
329329 report.instances = kept;
330330 return Ok(report);
@@ -343,10 +343,10 @@ async fn narrow_karne(
343343 Ok(report)
344344 }
345345
346-/// The current user's karne for one dönem: every instance of their şubeler that
347-/// counts toward the karne, the `ders_saati`-weighted average across them, and
348-/// the verdict. An archived dönem serves the snapshot the school froze when it
349-/// was closed; an open one computes live.
346+/// The current user's report card for one term: every instance of their
347+/// sections that counts toward the report card, the `ders_saati`-weighted
348+/// average across them, and the verdict. An archived term serves the snapshot
349+/// the school froze when it was closed; an open one computes live.
350350 #[utoipa::path(
351351 get,
352352 path = "/karne",
@@ -370,10 +370,10 @@ async fn my_karne(
370370 ))
371371 }
372372
373-/// Any user's karne for one dönem. Requires teacher+, or a parent tied to the
374-/// target student. A linked parent and manager+ read the whole karne; an
375-/// exactly-teacher caller sees only the lines of the instances they run, with
376-/// the dönem average recomputed over those and no verdict (see
373+/// Any user's report card for one term. Requires teacher+, or a parent tied to
374+/// the target student. A linked parent and manager+ read the whole report card;
375+/// an exactly-teacher caller sees only the lines of the instances they run,
376+/// with the term average recomputed over those and no verdict (see
377377 /// [`narrow_karne`]).
378378 #[utoipa::path(
379379 get,
@@ -413,9 +413,9 @@ async fn user_karne(
413413 mod tests {
414414 use super::*;
415415
416- /// The dönem's own number, each instance weighted by its `ders_saati`: the
417- /// karne's arithmetic, checked here against the report shape this module
418- /// serves.
416+ /// The term's own number, each instance weighted by its `ders_saati`: the
417+ /// report card's arithmetic, checked here against the report shape this
418+ /// module serves.
419419 #[test]
420420 fn the_report_shape_carries_the_instance_it_grouped_by() {
421421 let pairs = [(85, 1), (70, 2)];
@@ -423,7 +423,7 @@ mod tests {
423423 assert_eq!(weighted_average(&[]), None);
424424 }
425425
426- /// The ortak-sınav rule on the marks report: an exam addressed to a second
426+ /// The shared-exam rule on the marks report: an exam addressed to a second
427427 /// instance stands in *its* block too, while the exam addressed to its
428428 /// owner alone stays out of it. Read through `exam.class_course` the second
429429 /// block would have held no results.
src/web/meals.rsmodified+4 -4
@@ -99,7 +99,7 @@ struct CreateDish {
9999 name: String,
100100 #[schema(max_length = 500)]
101101 description: Option<String>,
102- /// Price in **minor units** (kuruş) — `4550` is 45,50 ₺. Integer only:
102+ /// Price in **minor units** — `4550` is 45,50 ₺. Integer only:
103103 /// this API never speaks decimals or floats about money.
104104 #[schema(minimum = 0, maximum = 1000000, example = 4550_i64)]
105105 price_minor: i64,
@@ -129,7 +129,7 @@ struct DishResponse {
129129 #[schema(example = "Mercimek çorbası")]
130130 name: String,
131131 description: Option<String>,
132- /// Minor units (kuruş).
132+ /// Minor units.
133133 price_minor: i64,
134134 tags: Vec<String>,
135135 /// Which of `tags` the **calling user's** own dietary profile flags — the
@@ -1232,7 +1232,7 @@ async fn user_attendance(
12321232 #[derive(Serialize, ToSchema)]
12331233 struct BalanceResponse {
12341234 student: PersonRef,
1235- /// `credits + reversals - charges`, in **minor units** (kuruş). Negative
1235+ /// `credits + reversals - charges`, in **minor units**. Negative
12361236 /// means the student owes the school. Derived on every read, never stored.
12371237 #[schema(example = -4500)]
12381238 balance_minor: i64,
@@ -1428,7 +1428,7 @@ async fn user_ledger(
14281428 struct RecordCredit {
14291429 /// The student the money is for.
14301430 student_id: String,
1431- /// How much came in, **minor units** (kuruş), positive.
1431+ /// How much came in, **minor units**, positive.
14321432 #[schema(minimum = 1, maximum = 10000000, example = 25000)]
14331433 amount_minor: i64,
14341434 /// How it arrived ("cash", "havale", …). Free text — the backend speaks to
src/web/messages.rsmodified+1 -1
@@ -36,7 +36,7 @@ struct SendMessage {
3636 subject: String,
3737 #[schema(example = "I may be 10 minutes late.", max_length = 10000)]
3838 body: Option<String>,
39- /// Optional free-text tag the UI shows as a badge ("Etüt", "Sınav", …).
39+ /// Optional free-text tag the UI shows as a badge ("Study", "Exam", …).
4040 /// Blank counts as absent.
4141 #[schema(example = "Etüt", max_length = 50)]
4242 label: Option<String>,
src/web/mod.rsmodified+1 -1
@@ -474,7 +474,7 @@ mod tests {
474474 crate::service::user::set_role(&db, teacher.get_id(), Role::Teacher)
475475 .await
476476 .unwrap();
477- // The two assignments the undo owes: the şube's homeroom teacher, and
477+ // The two assignments the undo owes: the section's homeroom teacher, and
478478 // a teacher assigned to one of its instances (the catalog's own
479479 // assignment list is gone with D6 — who teaches is per instance).
480480 let assigned = async |db: &Database| {
src/web/payments.rsmodified+6 -6
@@ -59,7 +59,7 @@ pub fn routes() -> OpenApiRouter<AppState> {
5959 /// schedule, and an installment with no date is not part of one.
6060 #[derive(Debug, Deserialize, ToSchema)]
6161 struct InstallmentBody {
62- /// What this installment bills, **minor units** (kuruş), positive. Integer
62+ /// What this installment bills, **minor units**, positive. Integer
6363 /// only: this API never speaks decimals or floats about money.
6464 #[schema(minimum = 1, maximum = 10000000, example = 150000_i64)]
6565 amount_minor: i64,
@@ -115,7 +115,7 @@ struct UpdateFeePlan {
115115
116116 #[derive(Serialize, ToSchema)]
117117 struct InstallmentResponse {
118- /// Minor units (kuruş).
118+ /// Minor units.
119119 amount_minor: i64,
120120 due_at: i64,
121121 }
@@ -556,7 +556,7 @@ async fn require_line(id: &str, db: &Database) -> Result<PaymentLedger, AppError
556556 struct RecordPayment {
557557 /// The charge line this money pays.
558558 charge_id: String,
559- /// How much came in, **minor units** (kuruş), positive. Partial payments
559+ /// How much came in, **minor units**, positive. Partial payments
560560 /// are the norm; together they may not exceed the charge.
561561 #[schema(minimum = 1, maximum = 10000000, example = 50000)]
562562 amount_minor: i64,
@@ -579,7 +579,7 @@ struct RecordPayment {
579579 struct RecordRefund {
580580 /// The payment being handed back.
581581 credit_id: String,
582- /// How much goes back out, **minor units** (kuruş), positive. Partials
582+ /// How much goes back out, **minor units**, positive. Partials
583583 /// allowed, up to what the credit was worth.
584584 #[schema(minimum = 1, maximum = 10000000, example = 50000)]
585585 amount_minor: i64,
@@ -809,7 +809,7 @@ struct StatementEntry {
809809 /// The plan it came from, and its name when the plan still exists.
810810 plan: Option<String>,
811811 plan_name: Option<String>,
812- /// What the installment bills, minor units (kuruş).
812+ /// What the installment bills, minor units.
813813 #[schema(example = 150000)]
814814 amount_minor: i64,
815815 /// When it falls due, unix milliseconds.
@@ -1016,7 +1016,7 @@ async fn user_statement(
10161016 #[derive(Serialize, ToSchema)]
10171017 struct PaymentBalanceResponse {
10181018 student: PersonRef,
1019- /// `credits + reversals - charges - refunds`, in **minor units** (kuruş).
1019+ /// `credits + reversals - charges - refunds`, in **minor units**.
10201020 /// Negative means the family owes the school. Derived on every read, never
10211021 /// stored.
10221022 #[schema(example = -100000)]
src/web/rag.rsmodified+1 -1
@@ -6,7 +6,7 @@
66 //! thread, the payload format, and the last look at the reply before it is
77 //! stored. There are no intent or rule tables, and every thread is private to
88 //! its owner. What differs is the **scope**: every question carries the
9-//! `(sınıf, ders)` pairs the corpus is routed by, derived server-side from the
9+//! `(class, course)` pairs the corpus is routed by, derived server-side from the
1010 //! asker's own memberships ([`crate::service::rag_scope`]) and never from the
1111 //! request body, and every citation the service returns is resolved here to
1212 //! the course-note file that owns the cited document — the `doc_id` only the
src/web/sessions.rsmodified+1 -1
@@ -116,7 +116,7 @@ fn is_live_session_teacher(session: &CourseSession, user: &User) -> bool {
116116
117117 /// Who may take (or amend) a session's roll call: the session's own teacher,
118118 /// or anyone who manages its instance (manager+, one of its teachers, or its
119-/// şube's homeroom teacher) — in both cases only while still `teacher`+.
119+/// section's homeroom teacher) — in both cases only while still `teacher`+.
120120 async fn can_roll_call(
121121 session: &CourseSession,
122122 instance: &ClassCourse,
src/web/settings.rsmodified+9 -9
@@ -107,23 +107,23 @@ struct SettingsResponse {
107107 /// cancelling close. `null` = no cutoff.
108108 #[schema(example = 120)]
109109 meal_cancel_cutoff_minutes: Option<i64>,
110- /// The branş (teaching subject) vocabulary a profile's `branch` may name.
110+ /// The subject-specialisation vocabulary a profile's `branch` may name.
111111 /// Empty = the school keeps no list, and no profile may carry one.
112112 #[schema(max_items = 20, example = json!(["Matematik", "Fizik"]))]
113113 branches: Vec<String>,
114- /// What an absence may be excused as (raporlu/izinli/…). Empty = the
114+ /// What an absence may be excused as ("raporlu", "izinli", …). Empty = the
115115 /// school names no kinds.
116116 #[schema(max_items = 20, example = json!(["raporlu", "izinli"]))]
117117 excuse_kinds: Vec<String>,
118- /// Per-dönem excused-absence day limit; `null` = no limit configured.
118+ /// Per-term excused-absence day limit; `null` = no limit configured.
119119 #[schema(example = 10)]
120120 max_excused_absent_days: Option<i64>,
121- /// Per-dönem unexcused-absence day limit; `null` = no limit configured.
121+ /// Per-term unexcused-absence day limit; `null` = no limit configured.
122122 #[schema(example = 20)]
123123 max_unexcused_absent_days: Option<i64>,
124124 /// The school's IANA timezone; `null` = the deployment default
125125 /// (`Europe/Istanbul`), which is what an unset setting reads as. It is the
126- /// zone the devamsızlık days are bucketed in.
126+ /// zone the absence days are bucketed in.
127127 #[schema(example = "Europe/Istanbul")]
128128 timezone: Option<String>,
129129 }
@@ -226,7 +226,7 @@ struct UpdateSettings {
226226 #[serde(default, deserialize_with = "set_or_clear")]
227227 #[schema(value_type = Option<i64>, example = 120, minimum = 0, maximum = 10_080)]
228228 meal_cancel_cutoff_minutes: Option<Option<i64>>,
229- /// Replaces the whole branş list when present: at most 20 entries, each
229+ /// Replaces the whole subject list when present: at most 20 entries, each
230230 /// 1–50 characters, unique. `[]` means the school keeps no list — and a
231231 /// profile's `branch` may then only be cleared, never set.
232232 #[schema(max_items = 20, example = json!(["Matematik", "Fizik"]))]
@@ -235,18 +235,18 @@ struct UpdateSettings {
235235 /// each 1–50 characters, unique. `[]` clears it.
236236 #[schema(max_items = 20, example = json!(["raporlu", "izinli"]))]
237237 excuse_kinds: Option<Vec<String>>,
238- /// Per-dönem excused-absence day limit, `0`–`365`. Omit to keep the
238+ /// Per-term excused-absence day limit, `0`–`365`. Omit to keep the
239239 /// current value; send `null` for no limit at all.
240240 #[serde(default, deserialize_with = "set_or_clear")]
241241 #[schema(value_type = Option<i64>, example = 10, minimum = 0, maximum = 365)]
242242 max_excused_absent_days: Option<Option<i64>>,
243- /// Per-dönem unexcused-absence day limit, `0`–`365`. Omit to keep the
243+ /// Per-term unexcused-absence day limit, `0`–`365`. Omit to keep the
244244 /// current value; send `null` for no limit at all.
245245 #[serde(default, deserialize_with = "set_or_clear")]
246246 #[schema(value_type = Option<i64>, example = 20, minimum = 0, maximum = 365)]
247247 max_unexcused_absent_days: Option<Option<i64>>,
248248 /// The school's IANA timezone — one of the deployment's allow-list
249- /// (`Europe/Istanbul`, `UTC`), by name. It is the zone the devamsızlık
249+ /// (`Europe/Istanbul`, `UTC`), by name. It is the zone the absence
250250 /// days are bucketed in and the one a menu's serving minute is *not*
251251 /// (that clock is UTC on purpose). Omit to keep the current value; send
252252 /// `null` to fall back to the deployment default.
src/web/terms.rsmodified+19 -19
@@ -27,8 +27,8 @@ pub fn routes() -> OpenApiRouter<AppState> {
2727 struct CreateTerm {
2828 #[schema(example = "1. Dönem", max_length = 100)]
2929 name: String,
30- /// The academic year this dönem is a slice of (`GET /academic-years`).
31- /// Required — a dönem outside a year has no karne to be counted into.
30+ /// The academic year this term is a slice of (`GET /academic-years`).
31+ /// Required — a term outside a year has no report card to be counted into.
3232 #[schema(example = "019732e3-7b00-7000-8000-00000000dead")]
3333 year: String,
3434 /// Term start, UTC unix-milliseconds. May lie in the past — a school
@@ -53,7 +53,7 @@ struct TermResponse {
5353 id: String,
5454 #[schema(example = "1. Dönem")]
5555 name: String,
56- /// The academic year this dönem belongs to (`GET /academic-years/{id}`).
56+ /// The academic year this term belongs to (`GET /academic-years/{id}`).
5757 year: String,
5858 /// Term start, UTC unix-milliseconds.
5959 starts_at: i64,
@@ -76,9 +76,9 @@ impl TermResponse {
7676 }
7777 }
7878
79-/// Create a dönem inside an academic year. Requires manager+. Past dates are
80-/// allowed — dönemler are calendar structure, not schedules; an *archived* year
81-/// refuses the new dönem (`409`), because past years take no new structure.
79+/// Create a term inside an academic year. Requires manager+. Past dates are
80+/// allowed — terms are calendar structure, not schedules; an *archived* year
81+/// refuses the new term (`409`), because past years take no new structure.
8282 #[utoipa::path(
8383 post,
8484 path = "/",
@@ -199,8 +199,8 @@ async fn update_term(
199199 .await?
200200 .ok_or(AppError::NotFound)?;
201201 service::term::require_writable(&term)?;
202- // The year above the dönem is the other half of the read-only rule, and
203- // the half a closed dönem no longer covers: a dönem still open inside an
202+ // The year above the term is the other half of the read-only rule, and
203+ // the half a closed term no longer covers: a term still open inside an
204204 // archived year takes no edit either.
205205 service::academic_year::require_open(&st.db, term.get_year()).await?;
206206 // Pre-flight only: the range check is re-made inside the UPDATE's own
@@ -215,11 +215,11 @@ async fn update_term(
215215 Ok(Json(TermResponse::new(&updated)))
216216 }
217217
218-/// Delete a dönem. Requires manager+. Refused with a 409 while anything still
219-/// hangs off it — an exam filed in it, or a karne frozen for it — so a dönem is
220-/// never dropped out from under marks that name it; move or delete those
221-/// first. The dönem's own academic year is untouched (that is `DELETE
222-/// /academic-years/{id}`, which refuses while a dönem still links it).
218+/// Delete a term. Requires manager+. Refused with a 409 while anything still
219+/// hangs off it — an exam filed in it, or a report card frozen for it — so a
220+/// term is never dropped out from under marks that name it; move or delete
221+/// those first. The term's own academic year is untouched (that is `DELETE
222+/// /academic-years/{id}`, which refuses while a term still links it).
223223 #[utoipa::path(
224224 delete,
225225 path = "/{id}",
@@ -248,13 +248,13 @@ async fn delete_term(
248248 Ok(StatusCode::NO_CONTENT)
249249 }
250250
251-/// Archive a dönem. Requires manager+. Archiving **freezes the karnes**: every
252-/// student with a roster row under the dönem's year gets a snapshot of their
253-/// report, and from then on `GET /marks/karne` serves that record instead of
254-/// recomputing — a mark corrected after the fact no longer rewrites what a
255-/// family holds. An archived dönem takes no edits and no delete; exams may
251+/// Archive a term. Requires manager+. Archiving **freezes the report cards**:
252+/// every student with a roster row under the term's year gets a snapshot of
253+/// their report, and from then on `GET /marks/karne` serves that record instead
254+/// of recomputing — a mark corrected after the fact no longer rewrites what a
255+/// family holds. An archived term takes no edits and no delete; exams may
256256 /// still be created in it while its *year* is open (the archive is a record,
257-/// not a wall). Idempotent — archiving an already-archived dönem answers `200`
257+/// not a wall). Idempotent — archiving an already-archived term answers `200`
258258 /// with the stamp it already had and never re-freezes.
259259 #[utoipa::path(
260260 post,
src/web/users.rsmodified+8 -8
@@ -94,9 +94,9 @@ struct UpdateProfile {
9494 /// Free text under the profile's name.
9595 #[schema(example = "Sınıfın en hızlı pomodorocusu.", max_length = 500)]
9696 bio: Option<String>,
97- /// The teacher's branş (subject): one of the school's `branches` from
97+ /// The teacher's subject specialisation: one of the school's `branches` from
9898 /// `GET /settings`, by name. Omit to keep the current value; send `""` to
99- /// clear it (a school that lists no branş stores none).
99+ /// clear it (a school that lists no subjects stores none).
100100 #[schema(example = "Matematik", max_length = 50)]
101101 branch: Option<String>,
102102 }
@@ -134,11 +134,11 @@ fn merge_field<T>(
134134 }
135135 }
136136
137-/// Resolve the branş a request names. Same shape as [`merge_field`] — absent
137+/// Resolve the `branch` a request names. Same shape as [`merge_field`] — absent
138138 /// is "keep", `""` is an explicit clear — with the one check a free string
139139 /// cannot make: the value must be one the *school* lists (`GET /settings`).
140140 /// The vocabulary is the school's, so nothing else can decide it, and a school
141-/// with no list can only ever have branşes cleared.
141+/// with no list can only ever have its `branch` cleared.
142142 fn merge_branch(
143143 patch: Option<&str>,
144144 allowed: &[String],
@@ -176,7 +176,7 @@ async fn apply_profile(
176176 let birth_date = merge_field(req.birth_date.as_deref(), BirthDate::try_new)?;
177177 let display_name = merge_field(req.display_name.as_deref(), DisplayName::try_new)?;
178178 let bio = merge_field(req.bio.as_deref(), Bio::try_new)?;
179- // Only a request that actually names a branş pays the settings read.
179+ // Only a request that actually names a branch pays the settings read.
180180 let branch = match req.branch {
181181 Some(_) => {
182182 let school = crate::service::settings::load(db).await?;
@@ -842,8 +842,8 @@ struct ProfileResponse {
842842 role: RoleSchema,
843843 #[schema(example = "Sınıfın en hızlı pomodorocusu.")]
844844 bio: Option<String>,
845- /// The teacher's branş, one of the school's `branches` (`GET /settings`);
846- /// `null` when none is set — or when the school lists none.
845+ /// The teacher's subject specialisation, one of the school's `branches`
846+ /// (`GET /settings`); `null` when none is set — or when the school lists none.
847847 #[schema(example = "Matematik")]
848848 branch: Option<String>,
849849 /// Present only once a picture is uploaded; the bytes are at
@@ -907,7 +907,7 @@ struct ProfileCourseRef {
907907 id: String,
908908 #[schema(example = "Matematik")]
909909 title: String,
910- /// `course`, `study` (etüt), or `club` (kulüp).
910+ /// `course`, `study` (supervised study), or `club`.
911911 #[schema(example = "course")]
912912 kind: String,
913913 }