Tahinli/forge
public0 watching
★ 0
| 1 | //! Strings for the issue, label, milestone and edit-history pages. Sentences that carry values |
| 2 | //! have a helper below the `t` match, which returns a `String`. |
| 3 | |
| 4 | use super::Lang; |
| 5 | |
| 6 | #[allow(dead_code)] |
| 7 | #[derive(Clone, Copy, Debug, PartialEq, Eq)] |
| 8 | pub enum K { |
| 9 | // Shared labels and buttons. |
| 10 | CouldNotSave, |
| 11 | GoBack, |
| 12 | Issues, |
| 13 | Labels, |
| 14 | Milestones, |
| 15 | Pinned, |
| 16 | Comment, |
| 17 | Edit, |
| 18 | Delete, |
| 19 | Title, |
| 20 | Description, |
| 21 | Cancel, |
| 22 | Name, |
| 23 | Color, |
| 24 | Reason, |
| 25 | None, |
| 26 | Open, |
| 27 | Closed, |
| 28 | Search, |
| 29 | Sort, |
| 30 | Unknown, |
| 31 | System, |
| 32 | Edited, |
| 33 | EditedBy, |
| 34 | Raw, |
| 35 | |
| 36 | // Pin box and sidebar pin. |
| 37 | IssuePages, |
| 38 | PinIssue, |
| 39 | UnpinIssue, |
| 40 | PinnedTopNote, |
| 41 | NotPinned, |
| 42 | PinnedIssues, |
| 43 | |
| 44 | // Lock reasons: the lowercase reader text, then the select options. |
| 45 | LockOffTopic, |
| 46 | LockTooHeated, |
| 47 | LockResolved, |
| 48 | LockSpam, |
| 49 | OptOffTopic, |
| 50 | OptTooHeated, |
| 51 | OptResolved, |
| 52 | OptSpam, |
| 53 | ConversationLocked, |
| 54 | ArchivedIssuesReadOnly, |
| 55 | LogIn, |
| 56 | LogInLink, |
| 57 | ToComment, |
| 58 | |
| 59 | // Timeline events. |
| 60 | ClosedCompleted, |
| 61 | ClosedNotPlanned, |
| 62 | ClosedThis, |
| 63 | ReopenedThis, |
| 64 | ReferencedThis, |
| 65 | LockedConversation, |
| 66 | UnlockedConversation, |
| 67 | PinnedThisIssue, |
| 68 | UnpinnedThisIssue, |
| 69 | MergedCommit, |
| 70 | PushedNewCommits, |
| 71 | DeletedHeadBranch, |
| 72 | InCommit, |
| 73 | ReviewDismissedPrefix, |
| 74 | |
| 75 | // Item byline and edit forms. |
| 76 | OpenedThis, |
| 77 | StateClosedNotPlanned, |
| 78 | SaveChanges, |
| 79 | EditComment, |
| 80 | SaveComment, |
| 81 | |
| 82 | // Reviews and reactions. |
| 83 | ApprovedChanges, |
| 84 | RequestedChanges, |
| 85 | Reviewed, |
| 86 | ApprovedDismissed, |
| 87 | RequestedDismissed, |
| 88 | ReviewedDismissed, |
| 89 | DismissedPrefix, |
| 90 | AddReaction, |
| 91 | NoDescription, |
| 92 | |
| 93 | // Sidebar boxes. |
| 94 | NoRepoLabels, |
| 95 | SaveLabels, |
| 96 | NoneYet, |
| 97 | Assignees, |
| 98 | CommaUsernames, |
| 99 | SaveAssignees, |
| 100 | NoOneAssigned, |
| 101 | MilestoneBox, |
| 102 | NoneOption, |
| 103 | SaveMilestone, |
| 104 | NoMilestone, |
| 105 | ConversationBox, |
| 106 | Locked, |
| 107 | UnlockConversation, |
| 108 | NoReason, |
| 109 | LockReasonAria, |
| 110 | LockConversation, |
| 111 | LockedToCollaborators, |
| 112 | OpenToEveryone, |
| 113 | |
| 114 | // Comment form. |
| 115 | AddComment, |
| 116 | CloseCompleted, |
| 117 | CloseNotPlanned, |
| 118 | ReopenWithComment, |
| 119 | CommentEmpty, |
| 120 | |
| 121 | // Label page. |
| 122 | LabelsArchived, |
| 123 | NoLabelsYet, |
| 124 | AddDefaultLabels, |
| 125 | SaveLabel, |
| 126 | NewLabel, |
| 127 | CreateLabel, |
| 128 | OpenLabelCount, |
| 129 | |
| 130 | // Milestone page. |
| 131 | MilestonesArchived, |
| 132 | NoDueDate, |
| 133 | Overdue, |
| 134 | MilestoneState, |
| 135 | NoClosedMilestones, |
| 136 | NoOpenMilestones, |
| 137 | NewMilestone, |
| 138 | DueDate, |
| 139 | CreateMilestone, |
| 140 | EditMilestone, |
| 141 | BackToMilestones, |
| 142 | StateLabel, |
| 143 | ClosedMilestoneCount, |
| 144 | OpenMilestoneCount, |
| 145 | |
| 146 | // Issue list and new issue. |
| 147 | OpenIssue, |
| 148 | ClosedIssue, |
| 149 | SortNewest, |
| 150 | SortOldest, |
| 151 | SortUpdated, |
| 152 | NewIssue, |
| 153 | NoIssuesMatch, |
| 154 | SearchTitles, |
| 155 | IssuesByState, |
| 156 | LabelsAndMilestones, |
| 157 | FiltersApplied, |
| 158 | ClearFilters, |
| 159 | Opened, |
| 160 | By, |
| 161 | ChooseTemplate, |
| 162 | BlankIssue, |
| 163 | MarkdownSupported, |
| 164 | SubmitNewIssue, |
| 165 | Newer, |
| 166 | Older, |
| 167 | |
| 168 | // Edit history. |
| 169 | HistIssueDescription, |
| 170 | HistPullDescription, |
| 171 | HistComment, |
| 172 | HistReviewComment, |
| 173 | NoTextChange, |
| 174 | NoEarlierVersions, |
| 175 | } |
| 176 | |
| 177 | /// The text after the time in "editor edited 3 days ago". Turkish puts the verb last. |
| 178 | pub fn edited_after(lang: Lang) -> &'static str { |
| 179 | match lang { |
| 180 | Lang::En => "", |
| 181 | Lang::Tr => " düzenledi", |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | /// The text after the time in "opened this 3 days ago". Turkish puts the verb last. |
| 186 | pub fn opened_after(lang: Lang) -> &'static str { |
| 187 | match lang { |
| 188 | Lang::En => "", |
| 189 | Lang::Tr => " açtı", |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | pub fn t(lang: Lang, key: K) -> &'static str { |
| 194 | match (key, lang) { |
| 195 | (K::CouldNotSave, Lang::En) => "Could not save", |
| 196 | (K::CouldNotSave, Lang::Tr) => "Kaydedilemedi", |
| 197 | (K::GoBack, Lang::En) => "Go back", |
| 198 | (K::GoBack, Lang::Tr) => "Geri dön", |
| 199 | (K::Issues, Lang::En) => "Issues", |
| 200 | (K::Issues, Lang::Tr) => "Sorunlar", |
| 201 | (K::Labels, Lang::En) => "Labels", |
| 202 | (K::Labels, Lang::Tr) => "Etiketler", |
| 203 | (K::Milestones, Lang::En) => "Milestones", |
| 204 | (K::Milestones, Lang::Tr) => "Kilometre taşları", |
| 205 | (K::Pinned, Lang::En) => "Pinned", |
| 206 | (K::Pinned, Lang::Tr) => "Sabitlenmiş", |
| 207 | (K::Comment, Lang::En) => "Comment", |
| 208 | (K::Comment, Lang::Tr) => "Yorum", |
| 209 | (K::Edit, Lang::En) => "Edit", |
| 210 | (K::Edit, Lang::Tr) => "Düzenle", |
| 211 | (K::Delete, Lang::En) => "Delete", |
| 212 | (K::Delete, Lang::Tr) => "Sil", |
| 213 | (K::Title, Lang::En) => "Title", |
| 214 | (K::Title, Lang::Tr) => "Başlık", |
| 215 | (K::Description, Lang::En) => "Description", |
| 216 | (K::Description, Lang::Tr) => "Açıklama", |
| 217 | (K::Cancel, Lang::En) => "Cancel", |
| 218 | (K::Cancel, Lang::Tr) => "İptal", |
| 219 | (K::Name, Lang::En) => "Name", |
| 220 | (K::Name, Lang::Tr) => "Ad", |
| 221 | (K::Color, Lang::En) => "Color", |
| 222 | (K::Color, Lang::Tr) => "Renk", |
| 223 | (K::Reason, Lang::En) => "Reason", |
| 224 | (K::Reason, Lang::Tr) => "Neden", |
| 225 | (K::None, Lang::En) => "None", |
| 226 | (K::None, Lang::Tr) => "Yok", |
| 227 | (K::Open, Lang::En) => "Open", |
| 228 | (K::Open, Lang::Tr) => "Açık", |
| 229 | (K::Closed, Lang::En) => "Closed", |
| 230 | (K::Closed, Lang::Tr) => "Kapalı", |
| 231 | (K::Search, Lang::En) => "Search", |
| 232 | (K::Search, Lang::Tr) => "Ara", |
| 233 | (K::Sort, Lang::En) => "Sort", |
| 234 | (K::Sort, Lang::Tr) => "Sırala", |
| 235 | (K::Unknown, Lang::En) => "unknown", |
| 236 | (K::Unknown, Lang::Tr) => "bilinmeyen", |
| 237 | (K::System, Lang::En) => "system", |
| 238 | (K::System, Lang::Tr) => "sistem", |
| 239 | (K::Edited, Lang::En) => "edited", |
| 240 | (K::Edited, Lang::Tr) => "düzenlendi", |
| 241 | (K::EditedBy, Lang::En) => " edited ", |
| 242 | (K::EditedBy, Lang::Tr) => " ", |
| 243 | (K::Raw, Lang::En) => "Raw", |
| 244 | (K::Raw, Lang::Tr) => "Ham", |
| 245 | |
| 246 | (K::IssuePages, Lang::En) => "Issue pages", |
| 247 | (K::IssuePages, Lang::Tr) => "Sorun sayfaları", |
| 248 | (K::PinIssue, Lang::En) => "Pin issue", |
| 249 | (K::PinIssue, Lang::Tr) => "Sorunu sabitle", |
| 250 | (K::UnpinIssue, Lang::En) => "Unpin issue", |
| 251 | (K::UnpinIssue, Lang::Tr) => "Sabitlemeyi kaldır", |
| 252 | (K::PinnedTopNote, Lang::En) => "Pinned to the top of the issue list.", |
| 253 | (K::PinnedTopNote, Lang::Tr) => "Sorun listesinin en üstünde sabitlendi.", |
| 254 | (K::NotPinned, Lang::En) => "Not pinned.", |
| 255 | (K::NotPinned, Lang::Tr) => "Sabitlenmemiş.", |
| 256 | (K::PinnedIssues, Lang::En) => "Pinned issues", |
| 257 | (K::PinnedIssues, Lang::Tr) => "Sabitlenmiş sorunlar", |
| 258 | |
| 259 | (K::LockOffTopic, Lang::En) => "off-topic", |
| 260 | (K::LockOffTopic, Lang::Tr) => "konu dışı", |
| 261 | (K::LockTooHeated, Lang::En) => "too heated", |
| 262 | (K::LockTooHeated, Lang::Tr) => "tartışma kızıştı", |
| 263 | (K::LockResolved, Lang::En) => "resolved", |
| 264 | (K::LockResolved, Lang::Tr) => "çözüldü", |
| 265 | (K::LockSpam, Lang::En) => "spam", |
| 266 | (K::LockSpam, Lang::Tr) => "spam", |
| 267 | (K::OptOffTopic, Lang::En) => "Off-topic", |
| 268 | (K::OptOffTopic, Lang::Tr) => "Konu dışı", |
| 269 | (K::OptTooHeated, Lang::En) => "Too heated", |
| 270 | (K::OptTooHeated, Lang::Tr) => "Tartışma kızıştı", |
| 271 | (K::OptResolved, Lang::En) => "Resolved", |
| 272 | (K::OptResolved, Lang::Tr) => "Çözüldü", |
| 273 | (K::OptSpam, Lang::En) => "Spam", |
| 274 | (K::OptSpam, Lang::Tr) => "Spam", |
| 275 | (K::ConversationLocked, Lang::En) => { |
| 276 | "This conversation has been locked and limited to collaborators." |
| 277 | } |
| 278 | (K::ConversationLocked, Lang::Tr) => { |
| 279 | "Bu tartışma kilitlendi ve yalnızca katkıda bulunanlarla sınırlandı." |
| 280 | } |
| 281 | (K::ArchivedIssuesReadOnly, Lang::En) => { |
| 282 | "This repository is archived, so its issues are read-only." |
| 283 | } |
| 284 | (K::ArchivedIssuesReadOnly, Lang::Tr) => { |
| 285 | "Bu depo arşivlenmiş, bu yüzden sorunları salt okunurdur." |
| 286 | } |
| 287 | (K::LogIn, Lang::En) => "Log in", |
| 288 | (K::LogIn, Lang::Tr) => "Giriş yap", |
| 289 | (K::LogInLink, Lang::En) => "Log in", |
| 290 | (K::LogInLink, Lang::Tr) => "giriş yapın", |
| 291 | (K::ToComment, Lang::En) => " to comment.", |
| 292 | (K::ToComment, Lang::Tr) => ".", |
| 293 | |
| 294 | (K::ClosedCompleted, Lang::En) => "closed this as completed", |
| 295 | (K::ClosedCompleted, Lang::Tr) => "bunu tamamlandı olarak kapattı", |
| 296 | (K::ClosedNotPlanned, Lang::En) => "closed this as not planned", |
| 297 | (K::ClosedNotPlanned, Lang::Tr) => "bunu planlanmadı olarak kapattı", |
| 298 | (K::ClosedThis, Lang::En) => "closed this", |
| 299 | (K::ClosedThis, Lang::Tr) => "bunu kapattı", |
| 300 | (K::ReopenedThis, Lang::En) => "reopened this", |
| 301 | (K::ReopenedThis, Lang::Tr) => "bunu yeniden açtı", |
| 302 | (K::ReferencedThis, Lang::En) => "referenced this", |
| 303 | (K::ReferencedThis, Lang::Tr) => "buna atıfta bulundu", |
| 304 | (K::LockedConversation, Lang::En) => "locked this conversation", |
| 305 | (K::LockedConversation, Lang::Tr) => "bu tartışmayı kilitledi", |
| 306 | (K::UnlockedConversation, Lang::En) => "unlocked this conversation", |
| 307 | (K::UnlockedConversation, Lang::Tr) => "bu tartışmanın kilidini açtı", |
| 308 | (K::PinnedThisIssue, Lang::En) => "pinned this issue", |
| 309 | (K::PinnedThisIssue, Lang::Tr) => "bu sorunu sabitledi", |
| 310 | (K::UnpinnedThisIssue, Lang::En) => "unpinned this issue", |
| 311 | (K::UnpinnedThisIssue, Lang::Tr) => "bu sorunun sabitlemesini kaldırdı", |
| 312 | (K::MergedCommit, Lang::En) => "merged commit", |
| 313 | (K::MergedCommit, Lang::Tr) => "commit'i birleştirdi", |
| 314 | (K::PushedNewCommits, Lang::En) => "pushed new commits", |
| 315 | (K::PushedNewCommits, Lang::Tr) => "yeni commit'ler gönderdi", |
| 316 | (K::DeletedHeadBranch, Lang::En) => "deleted the head branch", |
| 317 | (K::DeletedHeadBranch, Lang::Tr) => "kaynak dalını sildi", |
| 318 | (K::InCommit, Lang::En) => " in", |
| 319 | (K::InCommit, Lang::Tr) => "commit'inde", |
| 320 | (K::ReviewDismissedPrefix, Lang::En) => "dismissed a review: ", |
| 321 | (K::ReviewDismissedPrefix, Lang::Tr) => "bir incelemeyi iptal etti: ", |
| 322 | |
| 323 | (K::OpenedThis, Lang::En) => " opened this ", |
| 324 | (K::OpenedThis, Lang::Tr) => " bunu ", |
| 325 | (K::StateClosedNotPlanned, Lang::En) => "Closed as not planned", |
| 326 | (K::StateClosedNotPlanned, Lang::Tr) => "Planlanmadı olarak kapalı", |
| 327 | (K::SaveChanges, Lang::En) => "Save changes", |
| 328 | (K::SaveChanges, Lang::Tr) => "Değişiklikleri kaydet", |
| 329 | (K::EditComment, Lang::En) => "Edit comment", |
| 330 | (K::EditComment, Lang::Tr) => "Yorumu düzenle", |
| 331 | (K::SaveComment, Lang::En) => "Save comment", |
| 332 | (K::SaveComment, Lang::Tr) => "Yorumu kaydet", |
| 333 | |
| 334 | (K::ApprovedChanges, Lang::En) => "approved these changes", |
| 335 | (K::ApprovedChanges, Lang::Tr) => "bu değişiklikleri onayladı", |
| 336 | (K::RequestedChanges, Lang::En) => "requested changes", |
| 337 | (K::RequestedChanges, Lang::Tr) => "değişiklik istedi", |
| 338 | (K::Reviewed, Lang::En) => "reviewed", |
| 339 | (K::Reviewed, Lang::Tr) => "inceledi", |
| 340 | (K::ApprovedDismissed, Lang::En) => "approved these changes (dismissed)", |
| 341 | (K::ApprovedDismissed, Lang::Tr) => "bu değişiklikleri onayladı (iptal edildi)", |
| 342 | (K::RequestedDismissed, Lang::En) => "requested changes (dismissed)", |
| 343 | (K::RequestedDismissed, Lang::Tr) => "değişiklik istedi (iptal edildi)", |
| 344 | (K::ReviewedDismissed, Lang::En) => "reviewed (dismissed)", |
| 345 | (K::ReviewedDismissed, Lang::Tr) => "inceledi (iptal edildi)", |
| 346 | (K::DismissedPrefix, Lang::En) => "dismissed: ", |
| 347 | (K::DismissedPrefix, Lang::Tr) => "iptal edildi: ", |
| 348 | (K::AddReaction, Lang::En) => "Add reaction", |
| 349 | (K::AddReaction, Lang::Tr) => "Tepki ekle", |
| 350 | (K::NoDescription, Lang::En) => "_No description provided._", |
| 351 | (K::NoDescription, Lang::Tr) => "_Açıklama girilmedi._", |
| 352 | |
| 353 | (K::NoRepoLabels, Lang::En) => "This repository has no labels yet.", |
| 354 | (K::NoRepoLabels, Lang::Tr) => "Bu depoda henüz etiket yok.", |
| 355 | (K::SaveLabels, Lang::En) => "Save labels", |
| 356 | (K::SaveLabels, Lang::Tr) => "Etiketleri kaydet", |
| 357 | (K::NoneYet, Lang::En) => "None yet.", |
| 358 | (K::NoneYet, Lang::Tr) => "Henüz yok.", |
| 359 | (K::Assignees, Lang::En) => "Assignees", |
| 360 | (K::Assignees, Lang::Tr) => "Atananlar", |
| 361 | (K::CommaUsernames, Lang::En) => "Comma-separated usernames.", |
| 362 | (K::CommaUsernames, Lang::Tr) => "Kullanıcı adlarını virgülle ayırın.", |
| 363 | (K::SaveAssignees, Lang::En) => "Save assignees", |
| 364 | (K::SaveAssignees, Lang::Tr) => "Atananları kaydet", |
| 365 | (K::NoOneAssigned, Lang::En) => "No one assigned.", |
| 366 | (K::NoOneAssigned, Lang::Tr) => "Kimse atanmadı.", |
| 367 | (K::MilestoneBox, Lang::En) => "Milestone", |
| 368 | (K::MilestoneBox, Lang::Tr) => "Kilometre taşı", |
| 369 | (K::NoneOption, Lang::En) => "None", |
| 370 | (K::NoneOption, Lang::Tr) => "Yok", |
| 371 | (K::SaveMilestone, Lang::En) => "Save milestone", |
| 372 | (K::SaveMilestone, Lang::Tr) => "Kilometre taşını kaydet", |
| 373 | (K::NoMilestone, Lang::En) => "No milestone.", |
| 374 | (K::NoMilestone, Lang::Tr) => "Kilometre taşı yok.", |
| 375 | (K::ConversationBox, Lang::En) => "Conversation", |
| 376 | (K::ConversationBox, Lang::Tr) => "Tartışma", |
| 377 | (K::Locked, Lang::En) => "Locked", |
| 378 | (K::Locked, Lang::Tr) => "Kilitli", |
| 379 | (K::UnlockConversation, Lang::En) => "Unlock conversation", |
| 380 | (K::UnlockConversation, Lang::Tr) => "Tartışmanın kilidini aç", |
| 381 | (K::NoReason, Lang::En) => "No reason", |
| 382 | (K::NoReason, Lang::Tr) => "Neden yok", |
| 383 | (K::LockReasonAria, Lang::En) => "Lock reason", |
| 384 | (K::LockReasonAria, Lang::Tr) => "Kilit nedeni", |
| 385 | (K::LockConversation, Lang::En) => "Lock conversation", |
| 386 | (K::LockConversation, Lang::Tr) => "Tartışmayı kilitle", |
| 387 | (K::LockedToCollaborators, Lang::En) => "Locked to collaborators", |
| 388 | (K::LockedToCollaborators, Lang::Tr) => "Katkıda bulunanlarla sınırlı", |
| 389 | (K::OpenToEveryone, Lang::En) => "Open to everyone", |
| 390 | (K::OpenToEveryone, Lang::Tr) => "Herkese açık", |
| 391 | |
| 392 | (K::AddComment, Lang::En) => "Add a comment", |
| 393 | (K::AddComment, Lang::Tr) => "Yorum ekle", |
| 394 | (K::CloseCompleted, Lang::En) => "Close as completed", |
| 395 | (K::CloseCompleted, Lang::Tr) => "Tamamlandı olarak kapat", |
| 396 | (K::CloseNotPlanned, Lang::En) => "Close as not planned", |
| 397 | (K::CloseNotPlanned, Lang::Tr) => "Planlanmadı olarak kapat", |
| 398 | (K::ReopenWithComment, Lang::En) => "Reopen with comment", |
| 399 | (K::ReopenWithComment, Lang::Tr) => "Yorumla yeniden aç", |
| 400 | (K::CommentEmpty, Lang::En) => "Comment cannot be empty.", |
| 401 | (K::CommentEmpty, Lang::Tr) => "Yorum boş olamaz.", |
| 402 | |
| 403 | (K::LabelsArchived, Lang::En) => "This repository is archived. Labels are read-only.", |
| 404 | (K::LabelsArchived, Lang::Tr) => "Bu depo arşivlenmiş. Etiketler salt okunur.", |
| 405 | (K::NoLabelsYet, Lang::En) => "No labels yet.", |
| 406 | (K::NoLabelsYet, Lang::Tr) => "Henüz etiket yok.", |
| 407 | (K::AddDefaultLabels, Lang::En) => "Add default labels", |
| 408 | (K::AddDefaultLabels, Lang::Tr) => "Varsayılan etiketleri ekle", |
| 409 | (K::SaveLabel, Lang::En) => "Save label", |
| 410 | (K::SaveLabel, Lang::Tr) => "Etiketi kaydet", |
| 411 | (K::NewLabel, Lang::En) => "New label", |
| 412 | (K::NewLabel, Lang::Tr) => "Yeni etiket", |
| 413 | (K::CreateLabel, Lang::En) => "Create label", |
| 414 | (K::CreateLabel, Lang::Tr) => "Etiketi oluştur", |
| 415 | (K::OpenLabelCount, Lang::En) => "open", |
| 416 | (K::OpenLabelCount, Lang::Tr) => "açık", |
| 417 | |
| 418 | (K::MilestonesArchived, Lang::En) => { |
| 419 | "This repository is archived. Milestones are read-only." |
| 420 | } |
| 421 | (K::MilestonesArchived, Lang::Tr) => "Bu depo arşivlenmiş. Kilometre taşları salt okunur.", |
| 422 | (K::NoDueDate, Lang::En) => "No due date", |
| 423 | (K::NoDueDate, Lang::Tr) => "Bitiş tarihi yok", |
| 424 | (K::Overdue, Lang::En) => "overdue", |
| 425 | (K::Overdue, Lang::Tr) => "gecikmiş", |
| 426 | (K::MilestoneState, Lang::En) => "Milestone state", |
| 427 | (K::MilestoneState, Lang::Tr) => "Kilometre taşı durumu", |
| 428 | (K::NoClosedMilestones, Lang::En) => "No closed milestones.", |
| 429 | (K::NoClosedMilestones, Lang::Tr) => "Kapalı kilometre taşı yok.", |
| 430 | (K::NoOpenMilestones, Lang::En) => "No open milestones.", |
| 431 | (K::NoOpenMilestones, Lang::Tr) => "Açık kilometre taşı yok.", |
| 432 | (K::NewMilestone, Lang::En) => "New milestone", |
| 433 | (K::NewMilestone, Lang::Tr) => "Yeni kilometre taşı", |
| 434 | (K::DueDate, Lang::En) => "Due date", |
| 435 | (K::DueDate, Lang::Tr) => "Bitiş tarihi", |
| 436 | (K::CreateMilestone, Lang::En) => "Create milestone", |
| 437 | (K::CreateMilestone, Lang::Tr) => "Kilometre taşı oluştur", |
| 438 | (K::EditMilestone, Lang::En) => "Edit milestone", |
| 439 | (K::EditMilestone, Lang::Tr) => "Kilometre taşını düzenle", |
| 440 | (K::BackToMilestones, Lang::En) => "Back to milestones", |
| 441 | (K::BackToMilestones, Lang::Tr) => "Kilometre taşlarına dön", |
| 442 | (K::StateLabel, Lang::En) => "State", |
| 443 | (K::StateLabel, Lang::Tr) => "Durum", |
| 444 | (K::ClosedMilestoneCount, Lang::En) => "closed", |
| 445 | (K::ClosedMilestoneCount, Lang::Tr) => "kapalı", |
| 446 | (K::OpenMilestoneCount, Lang::En) => "open", |
| 447 | (K::OpenMilestoneCount, Lang::Tr) => "açık", |
| 448 | |
| 449 | (K::OpenIssue, Lang::En) => "Open issue", |
| 450 | (K::OpenIssue, Lang::Tr) => "Açık sorun", |
| 451 | (K::ClosedIssue, Lang::En) => "Closed issue", |
| 452 | (K::ClosedIssue, Lang::Tr) => "Kapalı sorun", |
| 453 | (K::SortNewest, Lang::En) => "Newest", |
| 454 | (K::SortNewest, Lang::Tr) => "En yeni", |
| 455 | (K::SortOldest, Lang::En) => "Oldest", |
| 456 | (K::SortOldest, Lang::Tr) => "En eski", |
| 457 | (K::SortUpdated, Lang::En) => "Recently updated", |
| 458 | (K::SortUpdated, Lang::Tr) => "Son güncellenen", |
| 459 | (K::NewIssue, Lang::En) => "New issue", |
| 460 | (K::NewIssue, Lang::Tr) => "Yeni sorun", |
| 461 | (K::NoIssuesMatch, Lang::En) => "No issues match these filters.", |
| 462 | (K::NoIssuesMatch, Lang::Tr) => "Bu filtrelerle eşleşen sorun yok.", |
| 463 | (K::SearchTitles, Lang::En) => "Search titles", |
| 464 | (K::SearchTitles, Lang::Tr) => "Başlıklarda ara", |
| 465 | (K::IssuesByState, Lang::En) => "Issues by state", |
| 466 | (K::IssuesByState, Lang::Tr) => "Duruma göre sorunlar", |
| 467 | (K::LabelsAndMilestones, Lang::En) => "Labels and milestones", |
| 468 | (K::LabelsAndMilestones, Lang::Tr) => "Etiketler ve kilometre taşları", |
| 469 | (K::FiltersApplied, Lang::En) => "Filters applied · ", |
| 470 | (K::FiltersApplied, Lang::Tr) => "Filtreler uygulandı · ", |
| 471 | (K::ClearFilters, Lang::En) => "Clear filters", |
| 472 | (K::ClearFilters, Lang::Tr) => "Filtreleri temizle", |
| 473 | (K::Opened, Lang::En) => " opened ", |
| 474 | (K::Opened, Lang::Tr) => " açıldı ", |
| 475 | (K::By, Lang::En) => " by ", |
| 476 | (K::By, Lang::Tr) => " tarafından ", |
| 477 | (K::ChooseTemplate, Lang::En) => "Choose a template to start from.", |
| 478 | (K::ChooseTemplate, Lang::Tr) => "Başlamak için bir şablon seçin.", |
| 479 | (K::BlankIssue, Lang::En) => "Open a blank issue", |
| 480 | (K::BlankIssue, Lang::Tr) => "Boş bir sorun aç", |
| 481 | (K::MarkdownSupported, Lang::En) => "Markdown supported.", |
| 482 | (K::MarkdownSupported, Lang::Tr) => "Markdown desteklenir.", |
| 483 | (K::SubmitNewIssue, Lang::En) => "Submit new issue", |
| 484 | (K::SubmitNewIssue, Lang::Tr) => "Yeni sorunu gönder", |
| 485 | (K::Newer, Lang::En) => "Newer", |
| 486 | (K::Newer, Lang::Tr) => "Daha yeni", |
| 487 | (K::Older, Lang::En) => "Older", |
| 488 | (K::Older, Lang::Tr) => "Daha eski", |
| 489 | |
| 490 | (K::HistIssueDescription, Lang::En) => "issue description", |
| 491 | (K::HistIssueDescription, Lang::Tr) => "sorun açıklaması", |
| 492 | (K::HistPullDescription, Lang::En) => "pull request description", |
| 493 | (K::HistPullDescription, Lang::Tr) => "çekme isteği açıklaması", |
| 494 | (K::HistComment, Lang::En) => "comment", |
| 495 | (K::HistComment, Lang::Tr) => "yorum", |
| 496 | (K::HistReviewComment, Lang::En) => "review comment", |
| 497 | (K::HistReviewComment, Lang::Tr) => "inceleme yorumu", |
| 498 | (K::NoTextChange, Lang::En) => "No change to the text.", |
| 499 | (K::NoTextChange, Lang::Tr) => "Metinde değişiklik yok.", |
| 500 | (K::NoEarlierVersions, Lang::En) => "No earlier versions.", |
| 501 | (K::NoEarlierVersions, Lang::Tr) => "Önceki sürüm yok.", |
| 502 | } |
| 503 | } |
| 504 | |
| 505 | /// `1 comment` or `3 comments`. Turkish does not pluralise after a number. |
| 506 | pub fn comment_count(lang: Lang, n: i64) -> String { |
| 507 | match lang { |
| 508 | Lang::En => format!("{n} comment{}", if n == 1 { "" } else { "s" }), |
| 509 | Lang::Tr => format!("{n} yorum"), |
| 510 | } |
| 511 | } |
| 512 | |
| 513 | /// `1 earlier version` or `3 earlier versions`. |
| 514 | pub fn earlier_versions(lang: Lang, n: usize) -> String { |
| 515 | match lang { |
| 516 | Lang::En => format!("{n} earlier version{}", if n == 1 { "" } else { "s" }), |
| 517 | Lang::Tr => format!("{n} önceki sürüm"), |
| 518 | } |
| 519 | } |
| 520 | |
| 521 | /// `{n} open` on a label row. |
| 522 | pub fn open_label_count(lang: Lang, n: i64) -> String { |
| 523 | format!("{n} {}", t(lang, K::OpenLabelCount)) |
| 524 | } |
| 525 | |
| 526 | /// `{n} open` on a milestone progress bar. |
| 527 | pub fn open_milestone_count(lang: Lang, n: i64) -> String { |
| 528 | format!("{n} {}", t(lang, K::OpenMilestoneCount)) |
| 529 | } |
| 530 | |
| 531 | /// `{n} closed` on a milestone progress bar. |
| 532 | pub fn closed_milestone_count(lang: Lang, n: i64) -> String { |
| 533 | format!("{n} {}", t(lang, K::ClosedMilestoneCount)) |
| 534 | } |
| 535 | |
| 536 | /// `Due {date}` on a milestone row. |
| 537 | pub fn due_text(lang: Lang, due: &str) -> String { |
| 538 | match lang { |
| 539 | Lang::En => format!("Due {due}"), |
| 540 | Lang::Tr => format!("Bitiş: {due}"), |
| 541 | } |
| 542 | } |
| 543 | |
| 544 | /// The lock notice on a conversation the viewer may not add to, with the reason label. |
| 545 | pub fn conversation_locked_for(lang: Lang, reason: &str) -> String { |
| 546 | match lang { |
| 547 | Lang::En => { |
| 548 | format!("This conversation has been locked ({reason}) and limited to collaborators.") |
| 549 | } |
| 550 | Lang::Tr => format!( |
| 551 | "Bu tartışma kilitlendi ({reason}) ve yalnızca katkıda bulunanlarla sınırlandı." |
| 552 | ), |
| 553 | } |
| 554 | } |
| 555 | |
| 556 | /// `Open {n}` on the issue state tabs. |
| 557 | pub fn tab_open(lang: Lang, n: impl std::fmt::Display) -> String { |
| 558 | match lang { |
| 559 | Lang::En => format!("Open {n}"), |
| 560 | Lang::Tr => format!("Açık {n}"), |
| 561 | } |
| 562 | } |
| 563 | |
| 564 | /// `Closed {n}` on the issue state tabs. |
| 565 | pub fn tab_closed(lang: Lang, n: impl std::fmt::Display) -> String { |
| 566 | match lang { |
| 567 | Lang::En => format!("Closed {n}"), |
| 568 | Lang::Tr => format!("Kapalı {n}"), |
| 569 | } |
| 570 | } |
| 571 | |
| 572 | /// `All {n}` on the issue state tabs. |
| 573 | pub fn tab_all(lang: Lang, n: impl std::fmt::Display) -> String { |
| 574 | match lang { |
| 575 | Lang::En => format!("All {n}"), |
| 576 | Lang::Tr => format!("Tümü {n}"), |
| 577 | } |
| 578 | } |
| 579 | |
| 580 | /// `Page {n}` under the issue list. |
| 581 | pub fn page_label(lang: Lang, n: u32) -> String { |
| 582 | match lang { |
| 583 | Lang::En => format!("Page {n}"), |
| 584 | Lang::Tr => format!("Sayfa {n}"), |
| 585 | } |
| 586 | } |
| 587 | |
| 588 | /// `Back to #{n}` on the edit history page. |
| 589 | pub fn back_to_item(lang: Lang, number: i64) -> String { |
| 590 | match lang { |
| 591 | Lang::En => format!("Back to #{number}"), |
| 592 | Lang::Tr => format!("#{number} numaraya dön"), |
| 593 | } |
| 594 | } |
| 595 | |
| 596 | /// `Edit issue #{n}` or `Edit pull request #{n}`. |
| 597 | pub fn edit_heading(lang: Lang, pull: bool, number: i64) -> String { |
| 598 | match (lang, pull) { |
| 599 | (Lang::En, false) => format!("Edit issue #{number}"), |
| 600 | (Lang::En, true) => format!("Edit pull request #{number}"), |
| 601 | (Lang::Tr, false) => format!("Sorunu düzenle #{number}"), |
| 602 | (Lang::Tr, true) => format!("Çekme isteğini düzenle #{number}"), |
| 603 | } |
| 604 | } |
| 605 | |
| 606 | /// The title of the item edit page: `Edit #{n} · {repo}`. |
| 607 | pub fn edit_title(lang: Lang, number: i64, repo: &str) -> String { |
| 608 | match lang { |
| 609 | Lang::En => format!("Edit #{number} \u{b7} {repo}"), |
| 610 | Lang::Tr => format!("#{number} düzenle \u{b7} {repo}"), |
| 611 | } |
| 612 | } |
| 613 | |
| 614 | /// The title of the comment edit page: `Edit comment on #{n} · {repo}`. |
| 615 | pub fn edit_comment_title(lang: Lang, number: i64, repo: &str) -> String { |
| 616 | match lang { |
| 617 | Lang::En => format!("Edit comment on #{number} \u{b7} {repo}"), |
| 618 | Lang::Tr => format!("#{number} sorunundaki yorumu düzenle \u{b7} {repo}"), |
| 619 | } |
| 620 | } |
| 621 | |
| 622 | /// `{repo} · Issues`. |
| 623 | pub fn issues_title(lang: Lang, repo: &str) -> String { |
| 624 | match lang { |
| 625 | Lang::En => format!("{repo} \u{b7} Issues"), |
| 626 | Lang::Tr => format!("{repo} \u{b7} Sorunlar"), |
| 627 | } |
| 628 | } |
| 629 | |
| 630 | /// `{repo} · New issue`. |
| 631 | pub fn new_issue_title(lang: Lang, repo: &str) -> String { |
| 632 | match lang { |
| 633 | Lang::En => format!("{repo} \u{b7} New issue"), |
| 634 | Lang::Tr => format!("{repo} \u{b7} Yeni sorun"), |
| 635 | } |
| 636 | } |
| 637 | |
| 638 | /// `{repo} · Labels`. |
| 639 | pub fn labels_title(lang: Lang, repo: &str) -> String { |
| 640 | match lang { |
| 641 | Lang::En => format!("{repo} \u{b7} Labels"), |
| 642 | Lang::Tr => format!("{repo} \u{b7} Etiketler"), |
| 643 | } |
| 644 | } |
| 645 | |
| 646 | /// `{repo} · Milestones`. |
| 647 | pub fn milestones_title(lang: Lang, repo: &str) -> String { |
| 648 | match lang { |
| 649 | Lang::En => format!("{repo} \u{b7} Milestones"), |
| 650 | Lang::Tr => format!("{repo} \u{b7} Kilometre taşları"), |
| 651 | } |
| 652 | } |
| 653 | |
| 654 | /// `{repo} · Edit milestone`. |
| 655 | pub fn milestone_edit_title(lang: Lang, repo: &str) -> String { |
| 656 | match lang { |
| 657 | Lang::En => format!("{repo} \u{b7} Edit milestone"), |
| 658 | Lang::Tr => format!("{repo} \u{b7} Kilometre taşını düzenle"), |
| 659 | } |
| 660 | } |
| 661 | |
| 662 | /// The reader text for the thing whose history is shown: `issue description`, `comment`, ... |
| 663 | pub fn history_what(lang: Lang, pull: bool, target_kind: &str) -> &'static str { |
| 664 | match target_kind { |
| 665 | "issue" if pull => t(lang, K::HistPullDescription), |
| 666 | "issue" => t(lang, K::HistIssueDescription), |
| 667 | "comment" => t(lang, K::HistComment), |
| 668 | _ => t(lang, K::HistReviewComment), |
| 669 | } |
| 670 | } |
| 671 | |
| 672 | /// The history page title: `Edit history of a {what} · {suffix}`. |
| 673 | pub fn history_title(lang: Lang, what: &str, suffix: &str) -> String { |
| 674 | match lang { |
| 675 | Lang::En => format!("Edit history of a {what} \u{b7} {suffix}"), |
| 676 | Lang::Tr => format!("Düzenleme geçmişi: {what} \u{b7} {suffix}"), |
| 677 | } |
| 678 | } |
| 679 | |
| 680 | /// The history page heading: `Edit history of {what}`. |
| 681 | pub fn history_heading(lang: Lang, what: &str) -> String { |
| 682 | match lang { |
| 683 | Lang::En => format!("Edit history of {what}"), |
| 684 | Lang::Tr => format!("Düzenleme geçmişi: {what}"), |
| 685 | } |
| 686 | } |
| 687 | |
| 688 | /// The title change line in the edit history: `Title: {from} → {to}`. |
| 689 | pub fn title_change(lang: Lang, from: &str, to: &str) -> String { |
| 690 | match lang { |
| 691 | Lang::En => format!("Title: {from} \u{2192} {to}"), |
| 692 | Lang::Tr => format!("Başlık: {from} \u{2192} {to}"), |
| 693 | } |
| 694 | } |
| 695 | |
| 696 | /// `{names} and {more} more` on a reaction's hover text. |
| 697 | pub fn reaction_more(lang: Lang, names: &str, more: usize) -> String { |
| 698 | match lang { |
| 699 | Lang::En => format!("{names} and {more} more"), |
| 700 | Lang::Tr => format!("{names} ve {more} daha"), |
| 701 | } |
| 702 | } |
| 703 | |
| 704 | // Timeline event sentences. |
| 705 | |
| 706 | pub fn event_label_added(lang: Lang, label: &str) -> String { |
| 707 | match lang { |
| 708 | Lang::En => format!("added the {label} label"), |
| 709 | Lang::Tr => format!("{label} etiketini ekledi"), |
| 710 | } |
| 711 | } |
| 712 | |
| 713 | pub fn event_label_removed(lang: Lang, label: &str) -> String { |
| 714 | match lang { |
| 715 | Lang::En => format!("removed the {label} label"), |
| 716 | Lang::Tr => format!("{label} etiketini kaldırdı"), |
| 717 | } |
| 718 | } |
| 719 | |
| 720 | pub fn event_assigned(lang: Lang, user: &str) -> String { |
| 721 | match lang { |
| 722 | Lang::En => format!("assigned {user}"), |
| 723 | Lang::Tr => format!("{user} kullanıcısını atadı"), |
| 724 | } |
| 725 | } |
| 726 | |
| 727 | pub fn event_unassigned(lang: Lang, user: &str) -> String { |
| 728 | match lang { |
| 729 | Lang::En => format!("unassigned {user}"), |
| 730 | Lang::Tr => format!("{user} kullanıcısının atamasını kaldırdı"), |
| 731 | } |
| 732 | } |
| 733 | |
| 734 | pub fn event_milestone_added(lang: Lang, title: &str) -> String { |
| 735 | match lang { |
| 736 | Lang::En => format!("added this to the {title} milestone"), |
| 737 | Lang::Tr => format!("bunu {title} kilometre taşına ekledi"), |
| 738 | } |
| 739 | } |
| 740 | |
| 741 | pub fn event_milestone_removed(lang: Lang, title: &str) -> String { |
| 742 | match lang { |
| 743 | Lang::En => format!("removed this from the {title} milestone"), |
| 744 | Lang::Tr => format!("bunu {title} kilometre taşından çıkardı"), |
| 745 | } |
| 746 | } |
| 747 | |
| 748 | pub fn event_renamed(lang: Lang, from: &str, to: &str) -> String { |
| 749 | match lang { |
| 750 | Lang::En => format!("changed the title from {from} to {to}"), |
| 751 | Lang::Tr => format!("başlığı {from} yerine {to} olarak değiştirdi"), |
| 752 | } |
| 753 | } |
| 754 | |
| 755 | pub fn event_locked_as(lang: Lang, reason: &str) -> String { |
| 756 | match lang { |
| 757 | Lang::En => format!("locked this conversation as {reason}"), |
| 758 | Lang::Tr => format!("bu tartışmayı {reason} olarak kilitledi"), |
| 759 | } |
| 760 | } |
| 761 | |
| 762 | pub fn event_branch_deleted(lang: Lang, branch: &str) -> String { |
| 763 | match lang { |
| 764 | Lang::En => format!("deleted the {branch} branch"), |
| 765 | Lang::Tr => format!("{branch} dalını sildi"), |
| 766 | } |
| 767 | } |
| 768 | |
| 769 | pub fn event_branch_restored(lang: Lang, branch: &str) -> String { |
| 770 | match lang { |
| 771 | Lang::En => format!("restored the {branch} branch"), |
| 772 | Lang::Tr => format!("{branch} dalını geri yükledi"), |
| 773 | } |
| 774 | } |
| 775 | |
| 776 | pub fn event_thread_resolved(lang: Lang, path: &str) -> String { |
| 777 | match lang { |
| 778 | Lang::En => format!("resolved a conversation on {path}"), |
| 779 | Lang::Tr => format!("{path} üzerindeki bir tartışmayı çözdü"), |
| 780 | } |
| 781 | } |
| 782 | |
| 783 | pub fn event_thread_unresolved(lang: Lang, path: &str) -> String { |
| 784 | match lang { |
| 785 | Lang::En => format!("unresolved a conversation on {path}"), |
| 786 | Lang::Tr => format!("{path} üzerindeki bir tartışmayı yeniden açtı"), |
| 787 | } |
| 788 | } |
| 789 | |
| 790 | pub fn event_base_changed(lang: Lang, from: &str, to: &str) -> String { |
| 791 | match lang { |
| 792 | Lang::En => format!("changed the base branch from {from} to {to}"), |
| 793 | Lang::Tr => format!("temel dalı {from} yerine {to} olarak değiştirdi"), |
| 794 | } |
| 795 | } |
| 796 | |
| 797 | /// `into {branch}` after a merged event. |
| 798 | pub fn event_merged_into(lang: Lang, branch: &str) -> String { |
| 799 | match lang { |
| 800 | Lang::En => format!("into {branch}"), |
| 801 | Lang::Tr => format!("{branch} dalına"), |
| 802 | } |
| 803 | } |
| 804 | |
| 805 | /// `from {a}..{b}` after a head update. |
| 806 | pub fn event_pushed_range(lang: Lang, from: &str, to: &str) -> String { |
| 807 | match lang { |
| 808 | Lang::En => format!("from {from}..{to}"), |
| 809 | Lang::Tr => format!("{from}..{to} arasında"), |
| 810 | } |
| 811 | } |
| 812 | |
| 813 | /// The lead-in before the sign-in link under a conversation: empty in English, and in Turkish the |
| 814 | /// purpose comes first, as in `Yorum yapmak için giriş yapın.` |
| 815 | pub fn comment_login_lead(lang: Lang) -> &'static str { |
| 816 | match lang { |
| 817 | Lang::En => "", |
| 818 | Lang::Tr => "Yorum yapmak için ", |
| 819 | } |
| 820 | } |
| 821 | |
| 822 | /// The text on either side of a commit link in a `closed`, `referenced` or `merged` timeline |
| 823 | /// event, as `(before, after)`. `verb` is the localised verb, `branch` the base branch for |
| 824 | /// `merged` (empty when unknown) and `linked` whether the commit link is shown. English reads |
| 825 | /// `closed this in <link>` or `merged commit <link> into <branch>`. Turkish puts the commit first |
| 826 | /// and the verb last, so with a link the whole sentence moves after it: `<link> commit'inde ...`. |
| 827 | pub fn commit_event_sides( |
| 828 | lang: Lang, |
| 829 | kind: &str, |
| 830 | verb: &str, |
| 831 | branch: &str, |
| 832 | linked: bool, |
| 833 | ) -> (String, String) { |
| 834 | match (lang, kind) { |
| 835 | (Lang::En, "merged") => { |
| 836 | let after = if branch.is_empty() { |
| 837 | String::new() |
| 838 | } else { |
| 839 | event_merged_into(lang, branch) |
| 840 | }; |
| 841 | (verb.to_owned(), after) |
| 842 | } |
| 843 | (Lang::En, _) if linked => (format!("{verb}{}", t(lang, K::InCommit)), String::new()), |
| 844 | (Lang::En, _) => (verb.to_owned(), String::new()), |
| 845 | (Lang::Tr, "merged") => { |
| 846 | let sentence = if branch.is_empty() { |
| 847 | t(lang, K::MergedCommit).to_owned() |
| 848 | } else { |
| 849 | format!("commit'i {branch} dalına birleştirdi") |
| 850 | }; |
| 851 | if linked { |
| 852 | (String::new(), sentence) |
| 853 | } else { |
| 854 | (sentence, String::new()) |
| 855 | } |
| 856 | } |
| 857 | (Lang::Tr, _) if linked => (String::new(), format!("{} {verb}", t(lang, K::InCommit))), |
| 858 | (Lang::Tr, _) => (verb.to_owned(), String::new()), |
| 859 | } |
| 860 | } |
| 861 | |
| 862 | #[cfg(test)] |
| 863 | mod tests { |
| 864 | use super::{K, Lang, commit_event_sides, t}; |
| 865 | |
| 866 | const ALL: &[K] = &[ |
| 867 | K::CouldNotSave, |
| 868 | K::GoBack, |
| 869 | K::Issues, |
| 870 | K::Labels, |
| 871 | K::Milestones, |
| 872 | K::Pinned, |
| 873 | K::Comment, |
| 874 | K::Edit, |
| 875 | K::Delete, |
| 876 | K::Title, |
| 877 | K::Description, |
| 878 | K::Cancel, |
| 879 | K::Name, |
| 880 | K::Color, |
| 881 | K::Reason, |
| 882 | K::None, |
| 883 | K::Open, |
| 884 | K::Closed, |
| 885 | K::Search, |
| 886 | K::Sort, |
| 887 | K::Unknown, |
| 888 | K::System, |
| 889 | K::Edited, |
| 890 | K::EditedBy, |
| 891 | K::Raw, |
| 892 | K::IssuePages, |
| 893 | K::PinIssue, |
| 894 | K::UnpinIssue, |
| 895 | K::PinnedTopNote, |
| 896 | K::NotPinned, |
| 897 | K::PinnedIssues, |
| 898 | K::LockOffTopic, |
| 899 | K::LockTooHeated, |
| 900 | K::LockResolved, |
| 901 | K::LockSpam, |
| 902 | K::OptOffTopic, |
| 903 | K::OptTooHeated, |
| 904 | K::OptResolved, |
| 905 | K::OptSpam, |
| 906 | K::ConversationLocked, |
| 907 | K::ArchivedIssuesReadOnly, |
| 908 | K::LogIn, |
| 909 | K::LogInLink, |
| 910 | K::ToComment, |
| 911 | K::ClosedCompleted, |
| 912 | K::ClosedNotPlanned, |
| 913 | K::ClosedThis, |
| 914 | K::ReopenedThis, |
| 915 | K::ReferencedThis, |
| 916 | K::LockedConversation, |
| 917 | K::UnlockedConversation, |
| 918 | K::PinnedThisIssue, |
| 919 | K::UnpinnedThisIssue, |
| 920 | K::MergedCommit, |
| 921 | K::PushedNewCommits, |
| 922 | K::DeletedHeadBranch, |
| 923 | K::InCommit, |
| 924 | K::ReviewDismissedPrefix, |
| 925 | K::OpenedThis, |
| 926 | K::StateClosedNotPlanned, |
| 927 | K::SaveChanges, |
| 928 | K::EditComment, |
| 929 | K::SaveComment, |
| 930 | K::ApprovedChanges, |
| 931 | K::RequestedChanges, |
| 932 | K::Reviewed, |
| 933 | K::ApprovedDismissed, |
| 934 | K::RequestedDismissed, |
| 935 | K::ReviewedDismissed, |
| 936 | K::DismissedPrefix, |
| 937 | K::AddReaction, |
| 938 | K::NoDescription, |
| 939 | K::NoRepoLabels, |
| 940 | K::SaveLabels, |
| 941 | K::NoneYet, |
| 942 | K::Assignees, |
| 943 | K::CommaUsernames, |
| 944 | K::SaveAssignees, |
| 945 | K::NoOneAssigned, |
| 946 | K::MilestoneBox, |
| 947 | K::NoneOption, |
| 948 | K::SaveMilestone, |
| 949 | K::NoMilestone, |
| 950 | K::ConversationBox, |
| 951 | K::Locked, |
| 952 | K::UnlockConversation, |
| 953 | K::NoReason, |
| 954 | K::LockReasonAria, |
| 955 | K::LockConversation, |
| 956 | K::LockedToCollaborators, |
| 957 | K::OpenToEveryone, |
| 958 | K::AddComment, |
| 959 | K::CloseCompleted, |
| 960 | K::CloseNotPlanned, |
| 961 | K::ReopenWithComment, |
| 962 | K::CommentEmpty, |
| 963 | K::LabelsArchived, |
| 964 | K::NoLabelsYet, |
| 965 | K::AddDefaultLabels, |
| 966 | K::SaveLabel, |
| 967 | K::NewLabel, |
| 968 | K::CreateLabel, |
| 969 | K::OpenLabelCount, |
| 970 | K::MilestonesArchived, |
| 971 | K::NoDueDate, |
| 972 | K::Overdue, |
| 973 | K::MilestoneState, |
| 974 | K::NoClosedMilestones, |
| 975 | K::NoOpenMilestones, |
| 976 | K::NewMilestone, |
| 977 | K::DueDate, |
| 978 | K::CreateMilestone, |
| 979 | K::EditMilestone, |
| 980 | K::BackToMilestones, |
| 981 | K::StateLabel, |
| 982 | K::ClosedMilestoneCount, |
| 983 | K::OpenMilestoneCount, |
| 984 | K::OpenIssue, |
| 985 | K::ClosedIssue, |
| 986 | K::SortNewest, |
| 987 | K::SortOldest, |
| 988 | K::SortUpdated, |
| 989 | K::NewIssue, |
| 990 | K::NoIssuesMatch, |
| 991 | K::SearchTitles, |
| 992 | K::IssuesByState, |
| 993 | K::LabelsAndMilestones, |
| 994 | K::FiltersApplied, |
| 995 | K::ClearFilters, |
| 996 | K::Opened, |
| 997 | K::By, |
| 998 | K::ChooseTemplate, |
| 999 | K::BlankIssue, |
| 1000 | K::MarkdownSupported, |
| 1001 | K::SubmitNewIssue, |
| 1002 | K::Newer, |
| 1003 | K::Older, |
| 1004 | K::HistIssueDescription, |
| 1005 | K::HistPullDescription, |
| 1006 | K::HistComment, |
| 1007 | K::HistReviewComment, |
| 1008 | K::NoTextChange, |
| 1009 | K::NoEarlierVersions, |
| 1010 | ]; |
| 1011 | |
| 1012 | #[test] |
| 1013 | fn every_key_has_both_languages() { |
| 1014 | let mut differing = 0; |
| 1015 | for key in ALL { |
| 1016 | let en = t(Lang::En, *key); |
| 1017 | let tr = t(Lang::Tr, *key); |
| 1018 | assert!(!en.is_empty(), "{key:?} has no English text"); |
| 1019 | assert!(!tr.is_empty(), "{key:?} has no Turkish text"); |
| 1020 | if en != tr { |
| 1021 | differing += 1; |
| 1022 | } |
| 1023 | } |
| 1024 | assert!(differing >= 3, "only {differing} keys differ from English"); |
| 1025 | } |
| 1026 | |
| 1027 | #[test] |
| 1028 | fn english_commit_sides_are_unchanged() { |
| 1029 | let (before, after) = commit_event_sides(Lang::En, "closed", "closed this", "", true); |
| 1030 | assert_eq!((before.as_str(), after.as_str()), ("closed this in", "")); |
| 1031 | let (before, after) = commit_event_sides(Lang::En, "merged", "merged commit", "main", true); |
| 1032 | assert_eq!( |
| 1033 | (before.as_str(), after.as_str()), |
| 1034 | ("merged commit", "into main") |
| 1035 | ); |
| 1036 | let (before, after) = commit_event_sides(Lang::En, "merged", "merged commit", "", false); |
| 1037 | assert_eq!((before.as_str(), after.as_str()), ("merged commit", "")); |
| 1038 | } |
| 1039 | } |