//! Strings of the task modal: its fields, its sections, the activity sentences and the message of every //! refused write. Each key has an English and a Turkish text in [`t`]; the match is exhaustive, so a //! missing translation does not compile. use super::Lang; /// One variant per phrase of the task modal. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum K { /// The link that closes the modal. Close, /// The label of the title field. Title, /// The label of the description field. Description, /// The hint under the description: plain text, and which links are clickable. DescriptionHint, /// The label of the project field. Project, /// The label of the deadline day field. Deadline, /// The label of the meeting time field. Meeting, /// The hint under the meeting time: the viewer's zone. MeetingHint, /// The button that saves the fields. Save, /// The heading of the assignees section. Assignees, /// The label of the person picker. AssignPick, /// The button that assigns the picked person. Assign, /// The button that removes one assignee. Remove, /// The text when nobody is assigned. NobodyAssigned, /// The button that starts watching the task. Watch, /// The button that stops watching the task. Unwatch, /// The text while the viewer watches the task. Watching, /// The text while the viewer does not watch the task. NotWatching, /// The heading of the subtasks section. Subtasks, /// The text when the task has no subtasks. NoSubtasks, /// The label of the subtask title field. SubtaskTitle, /// The button that creates a subtask. AddSubtask, /// The heading of the parent section. Parent, /// The first entry of the parent picker: a top-level task. NoParent, /// The button that sets the parent. SetParent, /// The heading of the dependencies section. Dependencies, /// The label for tasks this one waits for. BlockedBy, /// The label for tasks waiting for this one. Blocks, /// The text when there are no dependencies. NoLinks, /// The label of the task picker for a dependency. LinkWith, /// The label of the direction picker for a dependency. LinkDirection, /// The direction "waits for". DirBlockedBy, /// The direction "is waited for by". DirBlocks, /// The button that adds a dependency. AddLink, /// The button that removes a dependency. RemoveLink, /// The heading of the comments section. Comments, /// The text when there are no comments. NoComments, /// The label of the comment field. CommentBody, /// The button that posts a comment. PostComment, /// The summary of a comment's editor. EditComment, /// The button that saves an edited comment. SaveComment, /// The button that deletes a comment. DeleteComment, /// The mark after a comment that was edited. Edited, /// The heading of the activity section. Activity, /// The text when there is no activity. NoActivity, /// The link to the next, older page of activity. Older, /// The link that opens the delete confirmation. DeleteTask, /// The question of the delete confirmation. DeleteQuestion, /// The consequence line of the delete confirmation. DeleteConsequence, /// The button that confirms the delete. DeleteYes, /// The notice after a change in the modal. NoticeSaved, /// Activity: the task was created. ActCreated, /// Activity: the task was edited. ActEdited, /// Activity: the task was moved. ActMoved, /// Activity: the task was deleted. ActDeleted, /// Activity: the task was placed at a new spot in its column (Manual sort). ActReordered, /// Activity: an administrator restored the deleted task. ActRestored, /// Activity: someone was assigned. ActAssigned, /// Activity: someone was unassigned. ActUnassigned, /// Activity: the project changed. ActTagChanged, /// Activity: the parent changed. ActParentChanged, /// Activity: a dependency was added. ActLinkAdded, /// Activity: a dependency was removed. ActLinkRemoved, /// Activity: the task was unblocked. ActUnblocked, /// Activity: the deadline was set. ActDeadlineSet, /// Activity: the deadline was cleared. ActDeadlineCleared, /// Activity: the meeting time was set. ActClockSet, /// Activity: the meeting time was cleared. ActClockCleared, /// Activity: watching changed. ActWatchChanged, /// Activity: a comment was added. ActCommentAdded, /// Activity: a comment was edited. ActCommentEdited, /// Activity: a comment was deleted. ActCommentDeleted, /// Activity: a file was added. ActFileAdded, /// Activity: a file was deleted. ActFileDeleted, /// Activity: a reminder was sent. ActReminded, /// Activity: an account changed. ActAccountChanged, /// Activity of a kind this build does not name. ActOther, /// Refused: the description is longer than the limit. DescriptionTooLong, /// Refused: the project does not exist on this board. ErrProject, /// Refused: the deadline is not a day. ErrDeadline, /// Refused: the meeting time is not a clock time. ErrTime, /// Refused: the meeting time needs a day, or does not exist in the viewer's zone. ErrMeeting, /// Refused: the person cannot be assigned. ErrAssignee, /// Refused: a task cannot depend on itself. ErrSelf, /// Refused: the dependency would close a cycle. ErrCycle, /// Refused: the parent is not a top-level task of this board, or the task is not a top-level task. ErrParent, /// Refused: the task has subtasks and so cannot become one. ErrParentHasChildren, /// Refused: the comment is empty or longer than the limit. ErrComment, /// Refused: the subtask title is empty or longer than the limit. ErrSubtaskTitle, /// Refused: the picked task is not on this board. ErrOtherTask, /// Refused: the picked direction is not one of the two. ErrDirection, /// The heading of the files section. Files, /// The text when the task has no files. NoFiles, /// The button that uploads the chosen files. UploadFiles, /// The label of the file input. ChooseFiles, /// The link that opens a file in the viewer. ViewFile, /// The link that saves a file. DownloadFile, /// The button that deletes a file. DeleteFile, /// Refused: a file is larger than the attachment limit. ErrFileTooLarge, /// Refused: the extension of a file is not allowed. ErrFileType, /// Refused: a file name is empty or not valid. ErrFileName, /// Refused: the upload had no file. ErrNoFile, /// Refused: the upload has more files than one request may carry. ErrTooManyFiles, /// Refused: the file could not be stored; nothing was kept. ErrFileStore, /// Refused: the attachment storage of the board is full. ErrFileStorageFull, /// The viewer message for a file that cannot be previewed (refused, or too large to read). ViewerRefused, /// The viewer message for a type with no preview. NoPreview, /// The viewer message when a text file was cut to its first part. ViewerTruncated, /// The viewer message when a sheet was cut to its first rows and columns. ViewerCut, /// The heading of the sheet tabs. Sheets, /// The label of a slide, before its number. SlideLabel, /// The text of a slide with no text. NoSlideText, /// The text of a sheet with no rows. EmptySheet, } /// The text of `key` in `lang`. pub fn t(lang: Lang, key: K) -> &'static str { match (key, lang) { (K::Close, Lang::En) => "Close", (K::Close, Lang::Tr) => "Kapat", (K::Title, Lang::En) => "Title", (K::Title, Lang::Tr) => "Başlık", (K::Description, Lang::En) => "Description", (K::Description, Lang::Tr) => "Açıklama", (K::DescriptionHint, Lang::En) => { "Plain text. Addresses that start with http:// or https:// become links." } (K::DescriptionHint, Lang::Tr) => { "Düz metin. http:// veya https:// ile başlayan adresler bağlantı olur." } (K::Project, Lang::En) => "Project", (K::Project, Lang::Tr) => "Proje", (K::Deadline, Lang::En) => "Deadline", (K::Deadline, Lang::Tr) => "Son tarih", (K::Meeting, Lang::En) => "Meeting time", (K::Meeting, Lang::Tr) => "Toplantı saati", (K::MeetingHint, Lang::En) => "Optional. In your time zone. Needs a deadline day.", (K::MeetingHint, Lang::Tr) => { "İsteğe bağlı. Sizin saat diliminizde. Bir son tarih gerekir." } (K::Save, Lang::En) => "Save", (K::Save, Lang::Tr) => "Kaydet", (K::Assignees, Lang::En) => "Assignees", (K::Assignees, Lang::Tr) => "Atananlar", (K::AssignPick, Lang::En) => "Person", (K::AssignPick, Lang::Tr) => "Kişi", (K::Assign, Lang::En) => "Assign", (K::Assign, Lang::Tr) => "Ata", (K::Remove, Lang::En) => "Remove", (K::Remove, Lang::Tr) => "Çıkar", (K::NobodyAssigned, Lang::En) => "Nobody is assigned.", (K::NobodyAssigned, Lang::Tr) => "Kimse atanmadı.", (K::Watch, Lang::En) => "Watch", (K::Watch, Lang::Tr) => "İzle", (K::Unwatch, Lang::En) => "Stop watching", (K::Unwatch, Lang::Tr) => "İzlemeyi bırak", (K::Watching, Lang::En) => "You are watching this task.", (K::Watching, Lang::Tr) => "Bu görevi izliyorsunuz.", (K::NotWatching, Lang::En) => "You are not watching this task.", (K::NotWatching, Lang::Tr) => "Bu görevi izlemiyorsunuz.", (K::Subtasks, Lang::En) => "Subtasks", (K::Subtasks, Lang::Tr) => "Alt görevler", (K::NoSubtasks, Lang::En) => "No subtasks.", (K::NoSubtasks, Lang::Tr) => "Alt görev yok.", (K::SubtaskTitle, Lang::En) => "New subtask", (K::SubtaskTitle, Lang::Tr) => "Yeni alt görev", (K::AddSubtask, Lang::En) => "Add subtask", (K::AddSubtask, Lang::Tr) => "Alt görev ekle", (K::Parent, Lang::En) => "Parent task", (K::Parent, Lang::Tr) => "Üst görev", (K::NoParent, Lang::En) => "None (top-level task)", (K::NoParent, Lang::Tr) => "Yok (ana görev)", (K::SetParent, Lang::En) => "Set parent", (K::SetParent, Lang::Tr) => "Üst görevi ayarla", (K::Dependencies, Lang::En) => "Dependencies", (K::Dependencies, Lang::Tr) => "Bağımlılıklar", (K::BlockedBy, Lang::En) => "Waits for", (K::BlockedBy, Lang::Tr) => "Bekliyor", (K::Blocks, Lang::En) => "Blocks", (K::Blocks, Lang::Tr) => "Engelliyor", (K::NoLinks, Lang::En) => "No dependencies.", (K::NoLinks, Lang::Tr) => "Bağımlılık yok.", (K::LinkWith, Lang::En) => "Task", (K::LinkWith, Lang::Tr) => "Görev", (K::LinkDirection, Lang::En) => "Direction", (K::LinkDirection, Lang::Tr) => "Yön", (K::DirBlockedBy, Lang::En) => "This task waits for the chosen task", (K::DirBlockedBy, Lang::Tr) => "Bu görev seçilen görevi bekler", (K::DirBlocks, Lang::En) => "This task blocks the chosen task", (K::DirBlocks, Lang::Tr) => "Bu görev seçilen görevi engeller", (K::AddLink, Lang::En) => "Add dependency", (K::AddLink, Lang::Tr) => "Bağımlılık ekle", (K::RemoveLink, Lang::En) => "Remove", (K::RemoveLink, Lang::Tr) => "Kaldır", (K::Comments, Lang::En) => "Comments", (K::Comments, Lang::Tr) => "Yorumlar", (K::NoComments, Lang::En) => "No comments yet.", (K::NoComments, Lang::Tr) => "Henüz yorum yok.", (K::CommentBody, Lang::En) => "Comment", (K::CommentBody, Lang::Tr) => "Yorum", (K::PostComment, Lang::En) => "Post comment", (K::PostComment, Lang::Tr) => "Yorumu gönder", (K::EditComment, Lang::En) => "Edit", (K::EditComment, Lang::Tr) => "Düzenle", (K::SaveComment, Lang::En) => "Save comment", (K::SaveComment, Lang::Tr) => "Yorumu kaydet", (K::DeleteComment, Lang::En) => "Delete comment", (K::DeleteComment, Lang::Tr) => "Yorumu sil", (K::Edited, Lang::En) => "edited", (K::Edited, Lang::Tr) => "düzenlendi", (K::Activity, Lang::En) => "Activity", (K::Activity, Lang::Tr) => "Etkinlik", (K::NoActivity, Lang::En) => "No activity yet.", (K::NoActivity, Lang::Tr) => "Henüz etkinlik yok.", (K::Older, Lang::En) => "Older activity", (K::Older, Lang::Tr) => "Daha eski etkinlik", (K::DeleteTask, Lang::En) => "Delete task", (K::DeleteTask, Lang::Tr) => "Görevi sil", (K::DeleteQuestion, Lang::En) => "Delete this task?", (K::DeleteQuestion, Lang::Tr) => "Bu görev silinsin mi?", (K::DeleteConsequence, Lang::En) => { "Its subtasks and comments go with it. This cannot be undone." } (K::DeleteConsequence, Lang::Tr) => { "Alt görevleri ve yorumları da silinir. Bu geri alınamaz." } (K::DeleteYes, Lang::En) => "Delete the task", (K::DeleteYes, Lang::Tr) => "Görevi sil", (K::NoticeSaved, Lang::En) => "Saved.", (K::NoticeSaved, Lang::Tr) => "Kaydedildi.", (K::ActCreated, Lang::En) => "created the task", (K::ActCreated, Lang::Tr) => "görevi oluşturdu", (K::ActEdited, Lang::En) => "edited the task", (K::ActEdited, Lang::Tr) => "görevi düzenledi", (K::ActMoved, Lang::En) => "moved the task", (K::ActMoved, Lang::Tr) => "görevi taşıdı", (K::ActDeleted, Lang::En) => "deleted the task", (K::ActDeleted, Lang::Tr) => "görevi sildi", (K::ActReordered, Lang::En) => "moved the card within its column", (K::ActReordered, Lang::Tr) => "kartı sütunu içinde taşıdı", (K::ActRestored, Lang::En) => "restored the deleted task", (K::ActRestored, Lang::Tr) => "silinen görevi geri yükledi", (K::ActAssigned, Lang::En) => "assigned someone", (K::ActAssigned, Lang::Tr) => "birini atadı", (K::ActUnassigned, Lang::En) => "removed an assignee", (K::ActUnassigned, Lang::Tr) => "bir atananı çıkardı", (K::ActTagChanged, Lang::En) => "changed the project", (K::ActTagChanged, Lang::Tr) => "projeyi değiştirdi", (K::ActParentChanged, Lang::En) => "changed the parent task", (K::ActParentChanged, Lang::Tr) => "üst görevi değiştirdi", (K::ActLinkAdded, Lang::En) => "added a dependency", (K::ActLinkAdded, Lang::Tr) => "bağımlılık ekledi", (K::ActLinkRemoved, Lang::En) => "removed a dependency", (K::ActLinkRemoved, Lang::Tr) => "bağımlılığı kaldırdı", (K::ActUnblocked, Lang::En) => "was unblocked", (K::ActUnblocked, Lang::Tr) => "engeli kalktı", (K::ActDeadlineSet, Lang::En) => "set the deadline", (K::ActDeadlineSet, Lang::Tr) => "son tarihi ayarladı", (K::ActDeadlineCleared, Lang::En) => "cleared the deadline", (K::ActDeadlineCleared, Lang::Tr) => "son tarihi kaldırdı", (K::ActClockSet, Lang::En) => "set the meeting time", (K::ActClockSet, Lang::Tr) => "toplantı saatini ayarladı", (K::ActClockCleared, Lang::En) => "cleared the meeting time", (K::ActClockCleared, Lang::Tr) => "toplantı saatini kaldırdı", (K::ActWatchChanged, Lang::En) => "changed watching", (K::ActWatchChanged, Lang::Tr) => "izleme durumunu değiştirdi", (K::ActCommentAdded, Lang::En) => "commented", (K::ActCommentAdded, Lang::Tr) => "yorum yaptı", (K::ActCommentEdited, Lang::En) => "edited a comment", (K::ActCommentEdited, Lang::Tr) => "bir yorumu düzenledi", (K::ActCommentDeleted, Lang::En) => "deleted a comment", (K::ActCommentDeleted, Lang::Tr) => "bir yorumu sildi", (K::ActFileAdded, Lang::En) => "added a file", (K::ActFileAdded, Lang::Tr) => "dosya ekledi", (K::ActFileDeleted, Lang::En) => "deleted a file", (K::ActFileDeleted, Lang::Tr) => "bir dosyayı sildi", (K::ActReminded, Lang::En) => "was reminded", (K::ActReminded, Lang::Tr) => "hatırlatıldı", (K::ActAccountChanged, Lang::En) => "changed an account", (K::ActAccountChanged, Lang::Tr) => "bir hesabı değiştirdi", (K::ActOther, Lang::En) => "changed the task", (K::ActOther, Lang::Tr) => "görevi değiştirdi", (K::DescriptionTooLong, Lang::En) => "The description is longer than 20 000 characters.", (K::DescriptionTooLong, Lang::Tr) => "Açıklama 20 000 karakterden uzun.", (K::ErrProject, Lang::En) => "That project does not exist on this board.", (K::ErrProject, Lang::Tr) => "Bu pano üzerinde böyle bir proje yok.", (K::ErrDeadline, Lang::En) => "Use a deadline day such as 2026-10-28, or leave it empty.", (K::ErrDeadline, Lang::Tr) => "2026-10-28 gibi bir gün yazın ya da boş bırakın.", (K::ErrTime, Lang::En) => "Use a meeting time such as 09:30, or leave it empty.", (K::ErrTime, Lang::Tr) => "09:30 gibi bir saat yazın ya da boş bırakın.", (K::ErrMeeting, Lang::En) => { "A meeting time needs a deadline day, and the time must exist in your time zone." } (K::ErrMeeting, Lang::Tr) => { "Toplantı saati için bir son tarih gerekir ve saat sizin saat diliminizde olmalı." } (K::ErrAssignee, Lang::En) => "That person cannot be assigned.", (K::ErrAssignee, Lang::Tr) => "Bu kişi atanamaz.", (K::ErrSelf, Lang::En) => "A task cannot depend on itself.", (K::ErrSelf, Lang::Tr) => "Bir görev kendisine bağımlı olamaz.", (K::ErrCycle, Lang::En) => { "This dependency would make a cycle of tasks waiting for each other." } (K::ErrCycle, Lang::Tr) => { "Bu bağımlılık birbirini bekleyen görevlerden bir döngü oluşturur." } (K::ErrParent, Lang::En) => { "A subtask must sit directly under a top-level task, and the parent must not be a subtask." } (K::ErrParent, Lang::Tr) => { "Bir alt görev doğrudan bir ana göreve bağlanır ve üst görev de bir alt görev olamaz." } (K::ErrParentHasChildren, Lang::En) => "A task with subtasks cannot become a subtask.", (K::ErrParentHasChildren, Lang::Tr) => "Alt görevi olan bir görev, alt görev yapılamaz.", (K::ErrComment, Lang::En) => "Write a comment of 1 to 10 000 characters.", (K::ErrComment, Lang::Tr) => "1 ile 10 000 karakter arasında bir yorum yazın.", (K::ErrSubtaskTitle, Lang::En) => "Enter a subtask title of up to 200 characters.", (K::ErrSubtaskTitle, Lang::Tr) => "En fazla 200 karakterlik bir alt görev başlığı girin.", (K::ErrOtherTask, Lang::En) => "Pick a task from the list.", (K::ErrOtherTask, Lang::Tr) => "Listeden bir görev seçin.", (K::ErrDirection, Lang::En) => "Pick one of the two directions.", (K::ErrDirection, Lang::Tr) => "İki yönden birini seçin.", (K::Files, Lang::En) => "Files", (K::Files, Lang::Tr) => "Dosyalar", (K::NoFiles, Lang::En) => "No files yet.", (K::NoFiles, Lang::Tr) => "Henüz dosya yok.", (K::UploadFiles, Lang::En) => "Upload", (K::UploadFiles, Lang::Tr) => "Yükle", (K::ChooseFiles, Lang::En) => "Choose files", (K::ChooseFiles, Lang::Tr) => "Dosya seç", (K::ViewFile, Lang::En) => "View", (K::ViewFile, Lang::Tr) => "Görüntüle", (K::DownloadFile, Lang::En) => "Download", (K::DownloadFile, Lang::Tr) => "İndir", (K::DeleteFile, Lang::En) => "Delete", (K::DeleteFile, Lang::Tr) => "Sil", (K::ErrFileTooLarge, Lang::En) => "The file is larger than the attachment limit.", (K::ErrFileTooLarge, Lang::Tr) => "Dosya ek boyut sınırından büyük.", (K::ErrFileType, Lang::En) => "This file type is not allowed.", (K::ErrFileType, Lang::Tr) => "Bu dosya türüne izin verilmiyor.", (K::ErrFileName, Lang::En) => "The file name is not valid.", (K::ErrFileName, Lang::Tr) => "Dosya adı geçerli değil.", (K::ErrNoFile, Lang::En) => "Choose a file first.", (K::ErrNoFile, Lang::Tr) => "Önce bir dosya seçin.", (K::ErrTooManyFiles, Lang::En) => "Upload fewer files at once.", (K::ErrTooManyFiles, Lang::Tr) => "Bir seferde daha az dosya yükleyin.", (K::ErrFileStore, Lang::En) => "The file could not be saved. Try again.", (K::ErrFileStore, Lang::Tr) => "Dosya kaydedilemedi. Tekrar deneyin.", (K::ErrFileStorageFull, Lang::En) => { "Attachment storage is full. Remove a file or ask an administrator." } (K::ErrFileStorageFull, Lang::Tr) => { "Ek dosya depolama alanı dolu. Bir dosyayı silin ya da yöneticiye sorun." } (K::ViewerRefused, Lang::En) => "This file cannot be previewed. Download it to open it.", (K::ViewerRefused, Lang::Tr) => "Bu dosya önizlenemiyor. Açmak için indirin.", (K::NoPreview, Lang::En) => "No preview for this type. Download it to open it.", (K::NoPreview, Lang::Tr) => "Bu tür için önizleme yok. Açmak için indirin.", (K::ViewerTruncated, Lang::En) => "Showing the first part of the file.", (K::ViewerTruncated, Lang::Tr) => "Dosyanın ilk kısmı gösteriliyor.", (K::ViewerCut, Lang::En) => "Showing the first rows and columns only.", (K::ViewerCut, Lang::Tr) => "Yalnızca ilk satırlar ve sütunlar gösteriliyor.", (K::Sheets, Lang::En) => "Sheets", (K::Sheets, Lang::Tr) => "Sayfalar", (K::SlideLabel, Lang::En) => "Slide", (K::SlideLabel, Lang::Tr) => "Slayt", (K::NoSlideText, Lang::En) => "This slide has no text.", (K::NoSlideText, Lang::Tr) => "Bu slaytta metin yok.", (K::EmptySheet, Lang::En) => "This sheet is empty.", (K::EmptySheet, Lang::Tr) => "Bu sayfa boş.", } } /// The sentence of one activity row: the kind, in the viewer's language. pub fn activity_kind(lang: Lang, kind: &str) -> &'static str { let key = match kind { "task_created" => K::ActCreated, "task_edited" => K::ActEdited, "task_moved" => K::ActMoved, "task_deleted" => K::ActDeleted, "task_reordered" => K::ActReordered, "task_restored" => K::ActRestored, "assigned" => K::ActAssigned, "unassigned" => K::ActUnassigned, "tag_changed" => K::ActTagChanged, "parent_changed" => K::ActParentChanged, "link_added" => K::ActLinkAdded, "link_removed" => K::ActLinkRemoved, "unblocked" => K::ActUnblocked, "deadline_set" => K::ActDeadlineSet, "deadline_cleared" => K::ActDeadlineCleared, "clock_set" => K::ActClockSet, "clock_cleared" => K::ActClockCleared, "watch_changed" => K::ActWatchChanged, "comment_added" => K::ActCommentAdded, "comment_edited" => K::ActCommentEdited, "comment_deleted" => K::ActCommentDeleted, "file_added" => K::ActFileAdded, "file_deleted" => K::ActFileDeleted, "reminded" => K::ActReminded, "account_changed" => K::ActAccountChanged, _ => K::ActOther, }; t(lang, key) }