lurq 0.65.1

A Rust UI toolkit with typed components, retained state, reactive signals, GPU rendering, and DevTools.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
//! What the ways about an app say by themselves: windows and their panels, tabs, bars and menus of the app, pages,
//! slides and pictures turned through, steps gone through, and notifications. A part of the app's
//! [`Locale`](super::Locale).

use std::sync::Arc;

use super::Plural;

/// What the ways about an app say by themselves, in a locale's words. Every field is the app's to replace.
///
/// ```
/// use lurq::core::{Locale, fill};
///
/// let locale = Locale::for_tag("de");
/// assert_eq!(&*locale.navigation.next_page, "Nächste Seite");
/// assert_eq!(fill(&locale.navigation.page_of, &[("at", "2"), ("total", "9")]), "Seite 2 von 9");
/// ```
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct NavigationWords {
  /// What the main navigation of an app is called, and the button that opens it on a narrow window.
  pub main: Arc<str>,
  pub menu: Arc<str>,
  /// What a breadcrumb and a path are called, and the button of the steps folded away.
  pub breadcrumb: Arc<str>,
  pub path: Arc<str>,
  pub show_hidden_steps: Arc<str>,
  /// What a sidebar and a group of it with no label are called, and its buttons.
  pub sidebar: Arc<str>,
  pub group: Arc<str>,
  pub collapse_sidebar: Arc<str>,
  pub expand_sidebar: Arc<str>,
  pub open_sidebar: Arc<str>,
  pub close_sidebar: Arc<str>,
  /// The buttons of a window's title bar, and of a panel of a dock layout.
  pub minimize: Arc<str>,
  pub maximize: Arc<str>,
  pub restore: Arc<str>,
  /// The buttons of tabs: one that adds a tab, one that shows those that do not fit, one that opens a menu of
  /// them, and the arrows that scroll them.
  pub new_tab: Arc<str>,
  pub show_hidden_tabs: Arc<str>,
  pub more_tabs: Arc<str>,
  /// How many tabs a button holds that did not fit: "3 hidden tabs".
  pub hidden_tabs: Plural,
  /// The list of every open tab a strip's button opens: what it is called, what its search field says while it is
  /// empty ("Search 12 open tabs"), what it says where nothing matches (`{query}`, what was typed), and what a row
  /// of a tab not in the strip is described by.
  pub open_tabs: Arc<str>,
  pub search_tabs: Plural,
  pub no_tab_matches: Arc<str>,
  pub not_in_strip: Arc<str>,
  pub scroll_back: Arc<str>,
  pub scroll_on: Arc<str>,
  /// What a dock layout is called, and what is done with its panels.
  pub dock_layout: Arc<str>,
  pub float: Arc<str>,
  pub hide: Arc<str>,
  pub put_back: Arc<str>,
  pub move_left: Arc<str>,
  pub move_right: Arc<str>,
  pub move_top: Arc<str>,
  pub move_bottom: Arc<str>,
  pub hidden_panels: Arc<str>,
  /// The handles of a floating panel, and what its keys do with them.
  pub move_panel: Arc<str>,
  pub resize: Arc<str>,
  pub collapse: Arc<str>,
  pub move_hint: Arc<str>,
  pub resize_hint: Arc<str>,
  pub back_to_top: Arc<str>,
  /// The title of a table of contents.
  pub on_this_page: Arc<str>,
  /// What a carousel is called, what kind of thing it and a slide of it are to what reads the tree, its arrows,
  /// and a slide with `{at}` and `{total}`.
  pub carousel: Arc<str>,
  pub carousel_role: Arc<str>,
  pub slide_role: Arc<str>,
  pub previous_slide: Arc<str>,
  pub next_slide: Arc<str>,
  pub slide_of: Arc<str>,
  /// What a lightbox is called, and its buttons.
  pub pictures: Arc<str>,
  pub previous_picture: Arc<str>,
  pub next_picture: Arc<str>,
  pub zoom_in: Arc<str>,
  pub zoom_out: Arc<str>,
  pub fit_to_window: Arc<str>,
  /// What a pagination is called, its arrows, a page by its number, and what it says of where it is: a page with
  /// `{at}` and `{total}`, the rows of a page with `{first}`, `{last}` and `{total}`.
  pub pagination: Arc<str>,
  pub previous_page: Arc<str>,
  pub next_page: Arc<str>,
  pub page: Arc<str>,
  pub page_of: Arc<str>,
  pub range_of: Arc<str>,
  /// A step of steps, with `{at}` and `{total}`, and what it is: done, the current one, to come, wrong.
  pub step_of: Arc<str>,
  pub step_done: Arc<str>,
  pub step_current: Arc<str>,
  pub step_to_come: Arc<str>,
  pub step_error: Arc<str>,
  /// Steps all gone through: "4 of 4 steps done".
  pub steps_done: Plural,
  /// A notification center: its title, what it says empty, and its buttons; and a notification not yet read.
  pub notifications: Arc<str>,
  pub no_notifications: Arc<str>,
  pub mark_all_read: Arc<str>,
  pub clear_all: Arc<str>,
  pub view_all: Arc<str>,
  pub unread: Arc<str>,
  /// What a command bar is called, and its button of the commands that do not fit.
  pub commands: Arc<str>,
  pub more_commands: Arc<str>,
  /// The buttons of an action bar.
  pub clear_selection: Arc<str>,
  pub more_actions: Arc<str>,
  /// The menu of the app on a Mac: its name until the app gives one, its last item, and what the system puts in
  /// it, with `{app}` for the app's name.
  pub application: Arc<str>,
  pub quit: Arc<str>,
  pub services: Arc<str>,
  pub hide_app: Arc<str>,
  pub hide_others: Arc<str>,
  pub show_all: Arc<str>,
  /// The Edit menu lurq puts in the bar of an app on a Mac, and the item of the system's characters in it.
  pub edit: Arc<str>,
  pub emoji_and_symbols: Arc<str>,
  /// Select All in the Edit menu, as the system writes an item of its menus.
  pub select_all: Arc<str>,
}

impl NavigationWords {
  pub fn english() -> Self {
    Self {
      main: "Main".into(),
      menu: "Menu".into(),
      breadcrumb: "Breadcrumb".into(),
      path: "Path".into(),
      show_hidden_steps: "Show the hidden steps".into(),
      sidebar: "Sidebar".into(),
      group: "Group".into(),
      collapse_sidebar: "Collapse sidebar".into(),
      expand_sidebar: "Expand sidebar".into(),
      open_sidebar: "Open sidebar".into(),
      close_sidebar: "Close sidebar".into(),
      minimize: "Minimize".into(),
      maximize: "Maximize".into(),
      restore: "Restore".into(),
      new_tab: "New tab".into(),
      show_hidden_tabs: "Show the hidden tabs".into(),
      more_tabs: "More tabs".into(),
      hidden_tabs: Plural::two("{count} hidden tab", "{count} hidden tabs"),
      open_tabs: "Open tabs".into(),
      search_tabs: Plural::two("Search {count} open tab", "Search {count} open tabs"),
      no_tab_matches: "No open tab matches “{query}”".into(),
      not_in_strip: "Not in the tab strip".into(),
      scroll_back: "Scroll back".into(),
      scroll_on: "Scroll on".into(),
      dock_layout: "Dock layout".into(),
      float: "Float".into(),
      hide: "Hide".into(),
      put_back: "Put back".into(),
      move_left: "Move to the left".into(),
      move_right: "Move to the right".into(),
      move_top: "Move to the top".into(),
      move_bottom: "Move to the bottom".into(),
      hidden_panels: "Hidden panels".into(),
      move_panel: "Move".into(),
      resize: "Resize".into(),
      collapse: "Collapse".into(),
      move_hint: "Arrow keys move it".into(),
      resize_hint: "Arrow keys resize it".into(),
      back_to_top: "Back to top".into(),
      on_this_page: "On this page".into(),
      carousel: "Carousel".into(),
      carousel_role: "carousel".into(),
      slide_role: "slide".into(),
      previous_slide: "Previous slide".into(),
      next_slide: "Next slide".into(),
      slide_of: "Slide {at} of {total}".into(),
      pictures: "Pictures".into(),
      previous_picture: "Previous picture".into(),
      next_picture: "Next picture".into(),
      zoom_in: "Zoom in".into(),
      zoom_out: "Zoom out".into(),
      fit_to_window: "Fit to the window".into(),
      pagination: "Pagination".into(),
      previous_page: "Previous page".into(),
      next_page: "Next page".into(),
      page: "Page".into(),
      page_of: "Page {at} of {total}".into(),
      range_of: "{first}–{last} of {total}".into(),
      step_of: "Step {at} of {total}".into(),
      step_done: "done".into(),
      step_current: "current".into(),
      step_to_come: "to come".into(),
      step_error: "error".into(),
      steps_done: Plural::two("{count} of {count} step done", "{count} of {count} steps done"),
      notifications: "Notifications".into(),
      no_notifications: "No notifications".into(),
      mark_all_read: "Mark all read".into(),
      clear_all: "Clear all".into(),
      view_all: "View all".into(),
      unread: "Unread".into(),
      commands: "Commands".into(),
      more_commands: "More commands".into(),
      clear_selection: "Clear selection".into(),
      more_actions: "More actions".into(),
      application: "Application".into(),
      quit: "Quit".into(),
      services: "Services".into(),
      hide_app: "Hide {app}".into(),
      hide_others: "Hide Others".into(),
      show_all: "Show All".into(),
      edit: "Edit".into(),
      emoji_and_symbols: "Emoji & Symbols".into(),
      select_all: "Select All".into(),
    }
  }

  /// The words of a language (`en`, `uk`, `de`, `fr`, `es`, `pl`); of any other, English.
  pub fn for_language(language: &str) -> Self {
    match language {
      "uk" => Self {
        main: "Головна".into(),
        menu: "Меню".into(),
        breadcrumb: "Навігаційний ланцюжок".into(),
        path: "Шлях".into(),
        show_hidden_steps: "Показати приховані кроки".into(),
        sidebar: "Бічна панель".into(),
        group: "Група".into(),
        collapse_sidebar: "Згорнути бічну панель".into(),
        expand_sidebar: "Розгорнути бічну панель".into(),
        open_sidebar: "Відкрити бічну панель".into(),
        close_sidebar: "Закрити бічну панель".into(),
        minimize: "Згорнути".into(),
        maximize: "Розгорнути".into(),
        restore: "Відновити".into(),
        new_tab: "Нова вкладка".into(),
        show_hidden_tabs: "Показати приховані вкладки".into(),
        more_tabs: "Інші вкладки".into(),
        hidden_tabs: Plural::three(
          "{count} прихована вкладка",
          "{count} приховані вкладки",
          "{count} прихованих вкладок",
        ),
        open_tabs: "Відкриті вкладки".into(),
        search_tabs: Plural::three(
          "Пошук серед {count} відкритої вкладки",
          "Пошук серед {count} відкритих вкладок",
          "Пошук серед {count} відкритих вкладок",
        ),
        no_tab_matches: "Жодна відкрита вкладка не відповідає «{query}»".into(),
        not_in_strip: "Немає на панелі вкладок".into(),
        scroll_back: "Прокрутити назад".into(),
        scroll_on: "Прокрутити далі".into(),
        dock_layout: "Розкладка панелей".into(),
        float: "Відкріпити".into(),
        hide: "Приховати".into(),
        put_back: "Повернути на місце".into(),
        move_left: "Перемістити ліворуч".into(),
        move_right: "Перемістити праворуч".into(),
        move_top: "Перемістити вгору".into(),
        move_bottom: "Перемістити вниз".into(),
        hidden_panels: "Приховані панелі".into(),
        move_panel: "Перемістити".into(),
        resize: "Змінити розмір".into(),
        collapse: "Згорнути".into(),
        move_hint: "Клавіші зі стрілками переміщують її".into(),
        resize_hint: "Клавіші зі стрілками змінюють її розмір".into(),
        back_to_top: "Нагору".into(),
        on_this_page: "На цій сторінці".into(),
        carousel: "Карусель".into(),
        carousel_role: "карусель".into(),
        slide_role: "слайд".into(),
        previous_slide: "Попередній слайд".into(),
        next_slide: "Наступний слайд".into(),
        slide_of: "Слайд {at} з {total}".into(),
        pictures: "Зображення".into(),
        previous_picture: "Попереднє зображення".into(),
        next_picture: "Наступне зображення".into(),
        zoom_in: "Збільшити".into(),
        zoom_out: "Зменшити".into(),
        fit_to_window: "За розміром вікна".into(),
        pagination: "Нумерація сторінок".into(),
        previous_page: "Попередня сторінка".into(),
        next_page: "Наступна сторінка".into(),
        page: "Сторінка".into(),
        page_of: "Сторінка {at} з {total}".into(),
        range_of: "{first}–{last} з {total}".into(),
        step_of: "Крок {at} з {total}".into(),
        step_done: "виконано".into(),
        step_current: "поточний".into(),
        step_to_come: "попереду".into(),
        step_error: "помилка".into(),
        steps_done: Plural::three(
          "Виконано {count} з {count} кроку",
          "Виконано {count} з {count} кроків",
          "Виконано {count} з {count} кроків",
        ),
        notifications: "Сповіщення".into(),
        no_notifications: "Немає сповіщень".into(),
        mark_all_read: "Позначити всі як прочитані".into(),
        clear_all: "Очистити все".into(),
        view_all: "Переглянути всі".into(),
        unread: "Непрочитане".into(),
        commands: "Команди".into(),
        more_commands: "Інші команди".into(),
        clear_selection: "Зняти виділення".into(),
        more_actions: "Інші дії".into(),
        application: "Застосунок".into(),
        quit: "Вийти".into(),
        services: "Служби".into(),
        hide_app: "Сховати {app}".into(),
        hide_others: "Сховати інші".into(),
        show_all: "Показати всі".into(),
        edit: "Редагування".into(),
        emoji_and_symbols: "Емодзі та символи".into(),
        select_all: "Вибрати все".into(),
      },
      "de" => Self {
        main: "Hauptnavigation".into(),
        menu: "Menü".into(),
        breadcrumb: "Brotkrümelnavigation".into(),
        path: "Pfad".into(),
        show_hidden_steps: "Ausgeblendete Schritte anzeigen".into(),
        sidebar: "Seitenleiste".into(),
        group: "Gruppe".into(),
        collapse_sidebar: "Seitenleiste einklappen".into(),
        expand_sidebar: "Seitenleiste ausklappen".into(),
        open_sidebar: "Seitenleiste öffnen".into(),
        close_sidebar: "Seitenleiste schließen".into(),
        minimize: "Minimieren".into(),
        maximize: "Maximieren".into(),
        restore: "Wiederherstellen".into(),
        new_tab: "Neuer Tab".into(),
        show_hidden_tabs: "Ausgeblendete Tabs anzeigen".into(),
        more_tabs: "Weitere Tabs".into(),
        hidden_tabs: Plural::two("{count} ausgeblendeter Tab", "{count} ausgeblendete Tabs"),
        open_tabs: "Offene Tabs".into(),
        search_tabs: Plural::two("{count} offenen Tab durchsuchen", "{count} offene Tabs durchsuchen"),
        no_tab_matches: "Kein offener Tab passt zu „{query}“".into(),
        not_in_strip: "Nicht in der Tableiste".into(),
        scroll_back: "Zurückscrollen".into(),
        scroll_on: "Weiterscrollen".into(),
        dock_layout: "Andockbereich".into(),
        float: "Abdocken".into(),
        hide: "Ausblenden".into(),
        put_back: "Wieder andocken".into(),
        move_left: "Nach links verschieben".into(),
        move_right: "Nach rechts verschieben".into(),
        move_top: "Nach oben verschieben".into(),
        move_bottom: "Nach unten verschieben".into(),
        hidden_panels: "Ausgeblendete Bereiche".into(),
        move_panel: "Verschieben".into(),
        resize: "Größe ändern".into(),
        collapse: "Einklappen".into(),
        move_hint: "Mit den Pfeiltasten verschieben".into(),
        resize_hint: "Mit den Pfeiltasten die Größe ändern".into(),
        back_to_top: "Nach oben".into(),
        on_this_page: "Auf dieser Seite".into(),
        carousel: "Karussell".into(),
        carousel_role: "Karussell".into(),
        slide_role: "Folie".into(),
        previous_slide: "Vorherige Folie".into(),
        next_slide: "Nächste Folie".into(),
        slide_of: "Folie {at} von {total}".into(),
        pictures: "Bilder".into(),
        previous_picture: "Vorheriges Bild".into(),
        next_picture: "Nächstes Bild".into(),
        zoom_in: "Vergrößern".into(),
        zoom_out: "Verkleinern".into(),
        fit_to_window: "An Fenster anpassen".into(),
        pagination: "Seitennavigation".into(),
        previous_page: "Vorherige Seite".into(),
        next_page: "Nächste Seite".into(),
        page: "Seite".into(),
        page_of: "Seite {at} von {total}".into(),
        range_of: "{first}–{last} von {total}".into(),
        step_of: "Schritt {at} von {total}".into(),
        step_done: "erledigt".into(),
        step_current: "aktuell".into(),
        step_to_come: "ausstehend".into(),
        step_error: "Fehler".into(),
        steps_done: Plural::two(
          "{count} von {count} Schritt erledigt",
          "{count} von {count} Schritten erledigt",
        ),
        notifications: "Benachrichtigungen".into(),
        no_notifications: "Keine Benachrichtigungen".into(),
        mark_all_read: "Alle als gelesen markieren".into(),
        clear_all: "Alle löschen".into(),
        view_all: "Alle anzeigen".into(),
        unread: "Ungelesen".into(),
        commands: "Befehle".into(),
        more_commands: "Weitere Befehle".into(),
        clear_selection: "Auswahl aufheben".into(),
        more_actions: "Weitere Aktionen".into(),
        application: "Anwendung".into(),
        quit: "Beenden".into(),
        services: "Dienste".into(),
        hide_app: "{app} ausblenden".into(),
        hide_others: "Andere ausblenden".into(),
        show_all: "Alle einblenden".into(),
        edit: "Bearbeiten".into(),
        emoji_and_symbols: "Emoji & Symbole".into(),
        select_all: "Alles auswählen".into(),
      },
      "fr" => Self {
        main: "Principale".into(),
        menu: "Menu".into(),
        breadcrumb: "Fil d’Ariane".into(),
        path: "Chemin".into(),
        show_hidden_steps: "Afficher les étapes masquées".into(),
        sidebar: "Barre latérale".into(),
        group: "Groupe".into(),
        collapse_sidebar: "Réduire la barre latérale".into(),
        expand_sidebar: "Développer la barre latérale".into(),
        open_sidebar: "Ouvrir la barre latérale".into(),
        close_sidebar: "Fermer la barre latérale".into(),
        minimize: "Réduire".into(),
        maximize: "Agrandir".into(),
        restore: "Restaurer".into(),
        new_tab: "Nouvel onglet".into(),
        show_hidden_tabs: "Afficher les onglets masqués".into(),
        more_tabs: "Plus d’onglets".into(),
        hidden_tabs: Plural::two("{count} onglet masqué", "{count} onglets masqués"),
        open_tabs: "Onglets ouverts".into(),
        search_tabs: Plural::two(
          "Rechercher dans {count} onglet ouvert",
          "Rechercher dans {count} onglets ouverts",
        ),
        no_tab_matches: "Aucun onglet ouvert ne correspond à « {query} »".into(),
        not_in_strip: "Absent de la barre d’onglets".into(),
        scroll_back: "Défiler vers l’arrière".into(),
        scroll_on: "Défiler vers l’avant".into(),
        dock_layout: "Disposition des panneaux".into(),
        float: "Détacher".into(),
        hide: "Masquer".into(),
        put_back: "Remettre en place".into(),
        move_left: "Déplacer à gauche".into(),
        move_right: "Déplacer à droite".into(),
        move_top: "Déplacer en haut".into(),
        move_bottom: "Déplacer en bas".into(),
        hidden_panels: "Panneaux masqués".into(),
        move_panel: "Déplacer".into(),
        resize: "Redimensionner".into(),
        collapse: "Réduire".into(),
        move_hint: "Les flèches le déplacent".into(),
        resize_hint: "Les flèches le redimensionnent".into(),
        back_to_top: "Retour en haut".into(),
        on_this_page: "Sur cette page".into(),
        carousel: "Carrousel".into(),
        carousel_role: "carrousel".into(),
        slide_role: "diapositive".into(),
        previous_slide: "Diapositive précédente".into(),
        next_slide: "Diapositive suivante".into(),
        slide_of: "Diapositive {at} sur {total}".into(),
        pictures: "Images".into(),
        previous_picture: "Image précédente".into(),
        next_picture: "Image suivante".into(),
        zoom_in: "Zoom avant".into(),
        zoom_out: "Zoom arrière".into(),
        fit_to_window: "Ajuster à la fenêtre".into(),
        pagination: "Pagination".into(),
        previous_page: "Page précédente".into(),
        next_page: "Page suivante".into(),
        page: "Page".into(),
        page_of: "Page {at} sur {total}".into(),
        range_of: "{first}–{last} sur {total}".into(),
        step_of: "Étape {at} sur {total}".into(),
        step_done: "terminée".into(),
        step_current: "en cours".into(),
        step_to_come: "à venir".into(),
        step_error: "erreur".into(),
        steps_done: Plural::two(
          "{count} étape sur {count} terminée",
          "{count} étapes sur {count} terminées",
        ),
        notifications: "Notifications".into(),
        no_notifications: "Aucune notification".into(),
        mark_all_read: "Tout marquer comme lu".into(),
        clear_all: "Tout effacer".into(),
        view_all: "Tout afficher".into(),
        unread: "Non lu".into(),
        commands: "Commandes".into(),
        more_commands: "Plus de commandes".into(),
        clear_selection: "Effacer la sélection".into(),
        more_actions: "Plus d’actions".into(),
        application: "Application".into(),
        quit: "Quitter".into(),
        services: "Services".into(),
        hide_app: "Masquer {app}".into(),
        hide_others: "Masquer les autres".into(),
        show_all: "Tout afficher".into(),
        edit: "Édition".into(),
        emoji_and_symbols: "Emoji et symboles".into(),
        select_all: "Tout sélectionner".into(),
      },
      "es" => Self {
        main: "Principal".into(),
        menu: "Menú".into(),
        breadcrumb: "Ruta de navegación".into(),
        path: "Ruta".into(),
        show_hidden_steps: "Mostrar los pasos ocultos".into(),
        sidebar: "Barra lateral".into(),
        group: "Grupo".into(),
        collapse_sidebar: "Contraer la barra lateral".into(),
        expand_sidebar: "Expandir la barra lateral".into(),
        open_sidebar: "Abrir la barra lateral".into(),
        close_sidebar: "Cerrar la barra lateral".into(),
        minimize: "Minimizar".into(),
        maximize: "Maximizar".into(),
        restore: "Restaurar".into(),
        new_tab: "Nueva pestaña".into(),
        show_hidden_tabs: "Mostrar las pestañas ocultas".into(),
        more_tabs: "Más pestañas".into(),
        hidden_tabs: Plural::two("{count} pestaña oculta", "{count} pestañas ocultas"),
        open_tabs: "Pestañas abiertas".into(),
        search_tabs: Plural::two("Buscar en {count} pestaña abierta", "Buscar en {count} pestañas abiertas"),
        no_tab_matches: "Ninguna pestaña abierta coincide con «{query}»".into(),
        not_in_strip: "No está en la barra de pestañas".into(),
        scroll_back: "Desplazar atrás".into(),
        scroll_on: "Desplazar adelante".into(),
        dock_layout: "Diseño de paneles".into(),
        float: "Desacoplar".into(),
        hide: "Ocultar".into(),
        put_back: "Volver a colocar".into(),
        move_left: "Mover a la izquierda".into(),
        move_right: "Mover a la derecha".into(),
        move_top: "Mover arriba".into(),
        move_bottom: "Mover abajo".into(),
        hidden_panels: "Paneles ocultos".into(),
        move_panel: "Mover".into(),
        resize: "Cambiar tamaño".into(),
        collapse: "Contraer".into(),
        move_hint: "Las flechas lo mueven".into(),
        resize_hint: "Las flechas cambian su tamaño".into(),
        back_to_top: "Volver arriba".into(),
        on_this_page: "En esta página".into(),
        carousel: "Carrusel".into(),
        carousel_role: "carrusel".into(),
        slide_role: "diapositiva".into(),
        previous_slide: "Diapositiva anterior".into(),
        next_slide: "Diapositiva siguiente".into(),
        slide_of: "Diapositiva {at} de {total}".into(),
        pictures: "Imágenes".into(),
        previous_picture: "Imagen anterior".into(),
        next_picture: "Imagen siguiente".into(),
        zoom_in: "Acercar".into(),
        zoom_out: "Alejar".into(),
        fit_to_window: "Ajustar a la ventana".into(),
        pagination: "Paginación".into(),
        previous_page: "Página anterior".into(),
        next_page: "Página siguiente".into(),
        page: "Página".into(),
        page_of: "Página {at} de {total}".into(),
        range_of: "{first}–{last} de {total}".into(),
        step_of: "Paso {at} de {total}".into(),
        step_done: "completado".into(),
        step_current: "actual".into(),
        step_to_come: "pendiente".into(),
        step_error: "error".into(),
        steps_done: Plural::two(
          "{count} de {count} paso completado",
          "{count} de {count} pasos completados",
        ),
        notifications: "Notificaciones".into(),
        no_notifications: "No hay notificaciones".into(),
        mark_all_read: "Marcar todo como leído".into(),
        clear_all: "Borrar todo".into(),
        view_all: "Ver todo".into(),
        unread: "No leído".into(),
        commands: "Comandos".into(),
        more_commands: "Más comandos".into(),
        clear_selection: "Borrar selección".into(),
        more_actions: "Más acciones".into(),
        application: "Aplicación".into(),
        quit: "Salir".into(),
        services: "Servicios".into(),
        hide_app: "Ocultar {app}".into(),
        hide_others: "Ocultar otros".into(),
        show_all: "Mostrar todo".into(),
        edit: "Edición".into(),
        emoji_and_symbols: "Emojis y símbolos".into(),
        select_all: "Seleccionar todo".into(),
      },
      "pl" => Self {
        main: "Główna".into(),
        menu: "Menu".into(),
        breadcrumb: "Ścieżka nawigacji".into(),
        path: "Ścieżka".into(),
        show_hidden_steps: "Pokaż ukryte kroki".into(),
        sidebar: "Pasek boczny".into(),
        group: "Grupa".into(),
        collapse_sidebar: "Zwiń pasek boczny".into(),
        expand_sidebar: "Rozwiń pasek boczny".into(),
        open_sidebar: "Otwórz pasek boczny".into(),
        close_sidebar: "Zamknij pasek boczny".into(),
        minimize: "Minimalizuj".into(),
        maximize: "Maksymalizuj".into(),
        restore: "Przywróć".into(),
        new_tab: "Nowa karta".into(),
        show_hidden_tabs: "Pokaż ukryte karty".into(),
        more_tabs: "Więcej kart".into(),
        hidden_tabs: Plural::three("{count} ukryta karta", "{count} ukryte karty", "{count} ukrytych kart"),
        open_tabs: "Otwarte karty".into(),
        search_tabs: Plural::three(
          "Szukaj w {count} otwartej karcie",
          "Szukaj w {count} otwartych kartach",
          "Szukaj w {count} otwartych kartach",
        ),
        no_tab_matches: "Żadna otwarta karta nie pasuje do „{query}”".into(),
        not_in_strip: "Poza paskiem kart".into(),
        scroll_back: "Przewiń wstecz".into(),
        scroll_on: "Przewiń dalej".into(),
        dock_layout: "Układ paneli".into(),
        float: "Odepnij".into(),
        hide: "Ukryj".into(),
        put_back: "Przywróć na miejsce".into(),
        move_left: "Przenieś w lewo".into(),
        move_right: "Przenieś w prawo".into(),
        move_top: "Przenieś na górę".into(),
        move_bottom: "Przenieś na dół".into(),
        hidden_panels: "Ukryte panele".into(),
        move_panel: "Przenieś".into(),
        resize: "Zmień rozmiar".into(),
        collapse: "Zwiń".into(),
        move_hint: "Strzałki go przesuwają".into(),
        resize_hint: "Strzałki zmieniają jego rozmiar".into(),
        back_to_top: "Do góry".into(),
        on_this_page: "Na tej stronie".into(),
        carousel: "Karuzela".into(),
        carousel_role: "karuzela".into(),
        slide_role: "slajd".into(),
        previous_slide: "Poprzedni slajd".into(),
        next_slide: "Następny slajd".into(),
        slide_of: "Slajd {at} z {total}".into(),
        pictures: "Obrazy".into(),
        previous_picture: "Poprzedni obraz".into(),
        next_picture: "Następny obraz".into(),
        zoom_in: "Powiększ".into(),
        zoom_out: "Pomniejsz".into(),
        fit_to_window: "Dopasuj do okna".into(),
        pagination: "Paginacja".into(),
        previous_page: "Poprzednia strona".into(),
        next_page: "Następna strona".into(),
        page: "Strona".into(),
        page_of: "Strona {at} z {total}".into(),
        range_of: "{first}–{last} z {total}".into(),
        step_of: "Krok {at} z {total}".into(),
        step_done: "ukończony".into(),
        step_current: "bieżący".into(),
        step_to_come: "do wykonania".into(),
        step_error: "błąd".into(),
        steps_done: Plural::three(
          "Ukończono {count} z {count} kroku",
          "Ukończono {count} z {count} kroków",
          "Ukończono {count} z {count} kroków",
        ),
        notifications: "Powiadomienia".into(),
        no_notifications: "Brak powiadomień".into(),
        mark_all_read: "Oznacz wszystkie jako przeczytane".into(),
        clear_all: "Wyczyść wszystko".into(),
        view_all: "Zobacz wszystkie".into(),
        unread: "Nieprzeczytane".into(),
        commands: "Polecenia".into(),
        more_commands: "Więcej poleceń".into(),
        clear_selection: "Wyczyść zaznaczenie".into(),
        more_actions: "Więcej działań".into(),
        application: "Aplikacja".into(),
        quit: "Zakończ".into(),
        services: "Usługi".into(),
        hide_app: "Ukryj {app}".into(),
        hide_others: "Ukryj pozostałe".into(),
        show_all: "Pokaż wszystkie".into(),
        edit: "Edycja".into(),
        emoji_and_symbols: "Emotikony i symbole".into(),
        select_all: "Zaznacz wszystko".into(),
      },
      _ => Self::english(),
    }
  }
}

impl Default for NavigationWords {
  fn default() -> Self {
    Self::english()
  }
}

#[cfg(test)]
mod tests {
  use super::*;

  #[test]
  fn every_language_has_every_word_with_its_places() {
    for language in super::super::locale::LANGUAGES {
      let words = NavigationWords::for_language(language);
      for word in [&words.slide_of, &words.page_of, &words.step_of] {
        assert!(word.contains("{at}") && word.contains("{total}"), "{language}: {word}");
      }
      assert!(
        ["{first}", "{last}", "{total}"]
          .iter()
          .all(|place| words.range_of.contains(place))
      );
      assert!(words.hide_app.contains("{app}"), "{language}");
      assert!(
        words.steps_done.forms().iter().all(|form| form.contains("{count}")),
        "{language}"
      );
      assert!(
        words.hidden_tabs.forms().iter().all(|form| form.contains("{count}")),
        "{language}"
      );
      assert!(
        words.search_tabs.forms().iter().all(|form| form.contains("{count}")),
        "{language}"
      );
      assert!(words.no_tab_matches.contains("{query}"), "{language}");
      assert!(!words.main.is_empty() && !words.show_all.is_empty(), "{language}");
    }
    assert_eq!(NavigationWords::for_language("xx"), NavigationWords::english());
  }
}