cozy-ui 142.2.3 → 142.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +1 -1
  3. package/react/ActionsBar/locales/de.json +4 -0
  4. package/react/ActionsBar/locales/es.json +4 -0
  5. package/react/ActionsBar/locales/it.json +4 -0
  6. package/react/ActionsBar/locales/withActionsLocales.jsx +6 -0
  7. package/react/ActionsMenu/Actions/locales/de.json +30 -0
  8. package/react/ActionsMenu/Actions/locales/es.json +30 -0
  9. package/react/ActionsMenu/Actions/locales/it.json +30 -0
  10. package/react/ActionsMenu/Actions/locales/withActionsLocales.jsx +6 -0
  11. package/react/Badge/Readme.md +26 -0
  12. package/react/ColorPickerCustom/locales/de.json +6 -0
  13. package/react/ColorPickerCustom/locales/es.json +6 -0
  14. package/react/ColorPickerCustom/locales/index.js +6 -0
  15. package/react/ColorPickerCustom/locales/it.json +6 -0
  16. package/react/CozyDialogs/SpecificDialogs/locales/de.json +41 -0
  17. package/react/CozyDialogs/SpecificDialogs/locales/es.json +41 -0
  18. package/react/CozyDialogs/SpecificDialogs/locales/it.json +41 -0
  19. package/react/CozyDialogs/SpecificDialogs/withSpecificDialogsLocales.jsx +6 -0
  20. package/react/CozyDialogs/locales.js +8 -0
  21. package/react/DatePicker/helpers.js +14 -5
  22. package/react/DatePicker/helpers.spec.js +23 -1
  23. package/react/DatePicker/index.jsx +7 -1
  24. package/react/DatePicker/locales/de.json +8 -0
  25. package/react/DatePicker/locales/es.json +8 -0
  26. package/react/DatePicker/locales/it.json +8 -0
  27. package/react/DatePicker/locales/withOwnLocales.jsx +6 -0
  28. package/react/EditBadge/locales/de.json +18 -0
  29. package/react/EditBadge/locales/es.json +18 -0
  30. package/react/EditBadge/locales/index.js +6 -0
  31. package/react/EditBadge/locales/it.json +18 -0
  32. package/react/MuiCozyTheme/overrides/makeLightOverrides.js +3 -1
  33. package/react/Nav/locales/de.json +6 -0
  34. package/react/Nav/locales/es.json +6 -0
  35. package/react/Nav/locales/it.json +6 -0
  36. package/react/Nav/locales/withNavLocales.jsx +6 -0
  37. package/react/PasswordField/index.jsx +6 -0
  38. package/react/PasswordField/locales/de.json +6 -0
  39. package/react/PasswordField/locales/es.json +6 -0
  40. package/react/PasswordField/locales/it.json +6 -0
  41. package/react/SearchBar/locales/de.json +5 -0
  42. package/react/SearchBar/locales/es.json +5 -0
  43. package/react/SearchBar/locales/it.json +5 -0
  44. package/react/SearchBar/locales/withOnlyLocales.jsx +6 -0
  45. package/react/Table/Virtualized/HeadCell.jsx +4 -1
  46. package/react/Table/Virtualized/locales/de.json +6 -0
  47. package/react/Table/Virtualized/locales/es.json +6 -0
  48. package/react/Table/Virtualized/locales/it.json +6 -0
  49. package/react/deprecated/ActionMenu/Actions/locales/de.json +8 -0
  50. package/react/deprecated/ActionMenu/Actions/locales/es.json +8 -0
  51. package/react/deprecated/ActionMenu/Actions/locales/it.json +8 -0
  52. package/react/deprecated/ActionMenu/Actions/locales/withActionsLocales.jsx +6 -0
  53. package/react/hooks/useConfirmExit/index.jsx +4 -1
  54. package/react/hooks/useConfirmExit/locales/de.json +8 -0
  55. package/react/hooks/useConfirmExit/locales/es.json +8 -0
  56. package/react/hooks/useConfirmExit/locales/it.json +8 -0
  57. package/react/hooks/useSubmitWithLoader/locales/de.json +6 -0
  58. package/react/hooks/useSubmitWithLoader/locales/es.json +6 -0
  59. package/react/hooks/useSubmitWithLoader/locales/it.json +6 -0
  60. package/transpiled/react/ActionsBar/locales/withActionsLocales.d.ts +6 -0
  61. package/transpiled/react/ActionsBar/locales/withActionsLocales.js +15 -0
  62. package/transpiled/react/ActionsMenu/Actions/locales/withActionsLocales.d.ts +6 -0
  63. package/transpiled/react/ActionsMenu/Actions/locales/withActionsLocales.js +93 -0
  64. package/transpiled/react/ColorPickerCustom/locales/index.d.ts +6 -0
  65. package/transpiled/react/ColorPickerCustom/locales/index.js +21 -0
  66. package/transpiled/react/CozyDialogs/SpecificDialogs/withSpecificDialogsLocales.d.ts +6 -0
  67. package/transpiled/react/CozyDialogs/SpecificDialogs/withSpecificDialogsLocales.js +126 -0
  68. package/transpiled/react/CozyDialogs/locales.d.ts +14 -2
  69. package/transpiled/react/CozyDialogs/locales.js +8 -0
  70. package/transpiled/react/DatePicker/helpers.d.ts +1 -1
  71. package/transpiled/react/DatePicker/helpers.js +11 -4
  72. package/transpiled/react/DatePicker/index.js +7 -1
  73. package/transpiled/react/DatePicker/locales/withOwnLocales.d.ts +6 -0
  74. package/transpiled/react/DatePicker/locales/withOwnLocales.js +27 -0
  75. package/transpiled/react/EditBadge/locales/index.d.ts +6 -0
  76. package/transpiled/react/EditBadge/locales/index.js +57 -0
  77. package/transpiled/react/MuiCozyTheme/overrides/makeDarkOverrides.d.ts +2 -1
  78. package/transpiled/react/MuiCozyTheme/overrides/makeLightOverrides.d.ts +2 -1
  79. package/transpiled/react/MuiCozyTheme/overrides/makeLightOverrides.js +3 -1
  80. package/transpiled/react/Nav/locales/withNavLocales.d.ts +6 -0
  81. package/transpiled/react/Nav/locales/withNavLocales.js +21 -0
  82. package/transpiled/react/PasswordField/index.d.ts +6 -0
  83. package/transpiled/react/PasswordField/index.js +21 -0
  84. package/transpiled/react/SearchBar/locales/withOnlyLocales.d.ts +6 -0
  85. package/transpiled/react/SearchBar/locales/withOnlyLocales.js +18 -0
  86. package/transpiled/react/Table/Virtualized/HeadCell.js +21 -0
  87. package/transpiled/react/deprecated/ActionMenu/Actions/locales/withActionsLocales.d.ts +6 -0
  88. package/transpiled/react/deprecated/ActionMenu/Actions/locales/withActionsLocales.js +27 -0
  89. package/transpiled/react/hooks/useConfirmExit/index.js +27 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [142.3.1](https://github.com/cozy/cozy-ui/compare/v142.3.0...v142.3.1) (2026-10-13)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **Badge:** Draw counts as a pill ([5e0875c](https://github.com/cozy/cozy-ui/commit/5e0875c))
7
+
8
+ # [142.3.0](https://github.com/cozy/cozy-ui/compare/v142.2.3...v142.3.0) (2026-10-06)
9
+
10
+
11
+ ### Features
12
+
13
+ * Add Spanish, German and Italian locales ([0397ea2](https://github.com/cozy/cozy-ui/commit/0397ea2))
14
+
1
15
  ## [142.2.3](https://github.com/cozy/cozy-ui/compare/v142.2.2...v142.2.3) (2026-10-06)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-ui",
3
- "version": "142.2.3",
3
+ "version": "142.3.1",
4
4
  "description": "Cozy apps UI SDK",
5
5
  "engines": {
6
6
  "node": "24.x"
@@ -0,0 +1,4 @@
1
+ {
2
+ "selected": "%{smart_count} Element ausgewählt |||| %{smart_count} Elemente ausgewählt",
3
+ "selected_light": "%{smart_count} Element |||| %{smart_count} Elemente"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "selected": "%{smart_count} elemento seleccionado |||| %{smart_count} elementos seleccionados",
3
+ "selected_light": "%{smart_count} elemento |||| %{smart_count} elementos"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "selected": "%{smart_count} elemento selezionato |||| %{smart_count} elementi selezionati",
3
+ "selected_light": "%{smart_count} elemento |||| %{smart_count} elementi"
4
+ }
@@ -1,13 +1,19 @@
1
1
  import { withOnlyLocales } from 'twake-i18n'
2
2
 
3
+ import de from './de.json'
3
4
  import en from './en.json'
5
+ import es from './es.json'
4
6
  import fr from './fr.json'
7
+ import it from './it.json'
5
8
  import ru from './ru.json'
6
9
  import vi from './vi.json'
7
10
 
8
11
  export const locales = {
12
+ de,
9
13
  en,
14
+ es,
10
15
  fr,
16
+ it,
11
17
  ru,
12
18
  vi
13
19
  }
@@ -0,0 +1,30 @@
1
+ {
2
+ "menu": "Menü",
3
+ "viewInContacts": "In Cozy Contacts anzeigen",
4
+ "viewInDrive": "Öffnen",
5
+ "modify": "Bearbeiten",
6
+ "emailTo": "E-Mail senden",
7
+ "smsTo": "Nachricht senden",
8
+ "print": "Drucken",
9
+ "download": "Herunterladen",
10
+ "favorites": {
11
+ "add": {
12
+ "label": "Zu Favoriten hinzufügen",
13
+ "success": "%{filename} wurde zu den Favoriten hinzugefügt |||| Diese Elemente wurden zu den Favoriten hinzugefügt"
14
+ },
15
+ "remove": {
16
+ "label": "Aus Favoriten entfernen",
17
+ "success": "%{filename} wurde aus den Favoriten entfernt |||| Diese Elemente wurden aus den Favoriten entfernt"
18
+ },
19
+ "error": "Ein Fehler ist aufgetreten. Bitte versuchen Sie es erneut."
20
+ },
21
+ "others": "Weitere",
22
+ "editAttribute": "Attribut bearbeiten",
23
+ "copyToClipboard": {
24
+ "copy": "Kopieren",
25
+ "success": "In die Zwischenablage kopiert",
26
+ "error": "Kopieren in die Zwischenablage nicht möglich"
27
+ },
28
+ "call": "Anrufen",
29
+ "exportToText": "Als Text exportieren"
30
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "menu": "Menú",
3
+ "viewInContacts": "Ver en Cozy Contacts",
4
+ "viewInDrive": "Abrir",
5
+ "modify": "Modificar",
6
+ "emailTo": "Enviar un correo",
7
+ "smsTo": "Enviar un mensaje",
8
+ "print": "Imprimir",
9
+ "download": "Descargar",
10
+ "favorites": {
11
+ "add": {
12
+ "label": "Añadir a favoritos",
13
+ "success": "%{filename} se ha añadido a favoritos |||| Estos elementos se han añadido a favoritos"
14
+ },
15
+ "remove": {
16
+ "label": "Quitar de favoritos",
17
+ "success": "%{filename} se ha quitado de favoritos |||| Estos elementos se han quitado de favoritos"
18
+ },
19
+ "error": "Se ha producido un error. Inténtelo de nuevo."
20
+ },
21
+ "others": "Otros",
22
+ "editAttribute": "Editar atributo",
23
+ "copyToClipboard": {
24
+ "copy": "Copiar",
25
+ "success": "Copiado al portapapeles",
26
+ "error": "No se puede copiar al portapapeles"
27
+ },
28
+ "call": "Llamar",
29
+ "exportToText": "Exportar como texto"
30
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "menu": "Menu",
3
+ "viewInContacts": "Visualizza in Cozy Contacts",
4
+ "viewInDrive": "Apri",
5
+ "modify": "Modifica",
6
+ "emailTo": "Invia un'email",
7
+ "smsTo": "Invia un messaggio",
8
+ "print": "Stampa",
9
+ "download": "Scarica",
10
+ "favorites": {
11
+ "add": {
12
+ "label": "Aggiungi ai preferiti",
13
+ "success": "%{filename} è stato aggiunto ai preferiti |||| Questi elementi sono stati aggiunti ai preferiti"
14
+ },
15
+ "remove": {
16
+ "label": "Rimuovi dai preferiti",
17
+ "success": "%{filename} è stato rimosso dai preferiti |||| Questi elementi sono stati rimossi dai preferiti"
18
+ },
19
+ "error": "Si è verificato un errore, riprova."
20
+ },
21
+ "others": "Altro",
22
+ "editAttribute": "Modifica attributo",
23
+ "copyToClipboard": {
24
+ "copy": "Copia",
25
+ "success": "Copiato negli appunti",
26
+ "error": "Impossibile copiare negli appunti"
27
+ },
28
+ "call": "Chiama",
29
+ "exportToText": "Esporta come testo"
30
+ }
@@ -1,13 +1,19 @@
1
1
  import { withOnlyLocales, getI18n } from 'twake-i18n'
2
2
 
3
+ import de from './de.json'
3
4
  import en from './en.json'
5
+ import es from './es.json'
4
6
  import fr from './fr.json'
7
+ import it from './it.json'
5
8
  import ru from './ru.json'
6
9
  import vi from './vi.json'
7
10
 
8
11
  export const locales = {
12
+ de,
9
13
  en,
14
+ es,
10
15
  fr,
16
+ it,
11
17
  ru,
12
18
  vi
13
19
  }
@@ -56,6 +56,32 @@ const DemoBadge = ({ variant, ...props }) => {
56
56
  </Variants>
57
57
  ```
58
58
 
59
+ ### Counts
60
+
61
+ One or two digits sit in a circle, longer counts in a pill.
62
+
63
+ ```jsx
64
+ import Badge from 'cozy-ui/transpiled/react/Badge'
65
+ import { CircleFilled, Icon } from '@linagora/twake-icons'
66
+
67
+ ;
68
+
69
+ <>
70
+ {[1, 12, 44, 99, 120].map(count => (
71
+ <Badge
72
+ key={count}
73
+ className="u-m-1"
74
+ badgeContent={count}
75
+ max={99}
76
+ color="primary"
77
+ size="medium"
78
+ >
79
+ <Icon icon={CircleFilled} size="24" color="var(--iconTextColor)" />
80
+ </Badge>
81
+ ))}
82
+ </>
83
+ ```
84
+
59
85
  ### Double badges
60
86
 
61
87
  Badges can be combined — in this example, we have an item with a new qualification.
@@ -0,0 +1,6 @@
1
+ {
2
+ "ColorPickerCustom": {
3
+ "cancel": "Abbrechen",
4
+ "submit": "Speichern"
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "ColorPickerCustom": {
3
+ "cancel": "Cancelar",
4
+ "submit": "Guardar"
5
+ }
6
+ }
@@ -1,11 +1,17 @@
1
+ import de from './de.json'
1
2
  import en from './en.json'
3
+ import es from './es.json'
2
4
  import fr from './fr.json'
5
+ import it from './it.json'
3
6
  import ru from './ru.json'
4
7
  import vi from './vi.json'
5
8
 
6
9
  export const locales = {
10
+ de,
7
11
  en,
12
+ es,
8
13
  fr,
14
+ it,
9
15
  ru,
10
16
  vi
11
17
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "ColorPickerCustom": {
3
+ "cancel": "Annulla",
4
+ "submit": "Salva"
5
+ }
6
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "cancel": "Abbrechen",
3
+ "allow": "Zulassen",
4
+ "allow-location-dialog": {
5
+ "title": "Zugriff auf Ihren Standort zulassen",
6
+ "description": "Ihr Twake benötigt dauerhaft Zugriff auf den Standort Ihres Telefons, um Ihre Wege zu speichern und Ihnen bei deren Auswertung zu helfen, auch wenn die App nicht verwendet wird.\n\nIhr Standort wird NIEMALS ohne Ihre Zustimmung an Dritte weitergegeben.\n\nSie können diese Funktion in den Einstellungen der App Coach CO2 deaktivieren."
7
+ },
8
+ "install-flagship-app-dialog": {
9
+ "title": "Scannen Sie den QR-Code",
10
+ "text": "oder öffnen Sie direkt den <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>oder den <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a>, um die App Twake Workplace zu installieren",
11
+ "a11n": "Zur Downloadseite der Anwendung Twake Workplace"
12
+ },
13
+ "authentification-dialog": {
14
+ "title": "Anmeldung",
15
+ "title-oidc": "Twake Pass",
16
+ "subtitle": "Bitte bestätigen Sie aus Sicherheitsgründen Ihre Identität",
17
+ "label": "Twake-Passwort",
18
+ "label-oidc": "Twake Pass-Passwort",
19
+ "abort": "Verlassen",
20
+ "unlock": "Entsperren",
21
+ "forgotten-password": "Ich habe mein Passwort vergessen",
22
+ "errors": {
23
+ "invalid_password": "Falsches Passwort. Bitte versuchen Sie es erneut.",
24
+ "server_error": "Auf dem Server ist ein Fehler aufgetreten. Bitte laden Sie die Seite neu."
25
+ }
26
+ },
27
+ "shortcut-dialog": {
28
+ "create-title": "Verknüpfung erstellen",
29
+ "edit-title": "Verknüpfung bearbeiten",
30
+ "filename": "Name der Verknüpfung",
31
+ "url": "URL",
32
+ "cancel": "Abbrechen",
33
+ "create": "Erstellen",
34
+ "edit": "Speichern",
35
+ "created": "Die Verknüpfung wurde erstellt",
36
+ "edited": "Die Verknüpfung wurde geändert",
37
+ "errored": "Ein Fehler ist aufgetreten",
38
+ "needs-info": "Eine Verknüpfung benötigt einen Namen und eine URL",
39
+ "url-bad-format": "Die eingegebene URL hat nicht das richtige Format"
40
+ }
41
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "cancel": "Cancelar",
3
+ "allow": "Permitir",
4
+ "allow-location-dialog": {
5
+ "title": "Permitir el acceso a su ubicación",
6
+ "description": "Su Twake necesita tener siempre autorización para acceder a la ubicación de su teléfono a fin de memorizar sus desplazamientos y ayudarle a analizarlos, incluso cuando la app no esté en uso.\n\nNUNCA se compartirá con nadie sin su solicitud.\n\nPuede desactivar esta función desde los ajustes de la app Coach CO2."
7
+ },
8
+ "install-flagship-app-dialog": {
9
+ "title": "Escanee el código QR",
10
+ "text": "o vaya directamente a <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>o a <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> para instalar la app Twake Workplace",
11
+ "a11n": "Ir a la página de descarga de la aplicación Twake Workplace"
12
+ },
13
+ "authentification-dialog": {
14
+ "title": "Inicio de sesión",
15
+ "title-oidc": "Twake Pass",
16
+ "subtitle": "Por seguridad, confirme su identidad",
17
+ "label": "Contraseña de Twake",
18
+ "label-oidc": "Contraseña de Twake Pass",
19
+ "abort": "Salir",
20
+ "unlock": "Desbloquear",
21
+ "forgotten-password": "He olvidado mi contraseña",
22
+ "errors": {
23
+ "invalid_password": "Contraseña incorrecta. Inténtelo de nuevo.",
24
+ "server_error": "Se ha producido un error en el servidor. Vuelva a cargar la página."
25
+ }
26
+ },
27
+ "shortcut-dialog": {
28
+ "create-title": "Crear un acceso directo",
29
+ "edit-title": "Modificar un acceso directo",
30
+ "filename": "Nombre del acceso directo",
31
+ "url": "URL",
32
+ "cancel": "Cancelar",
33
+ "create": "Crear",
34
+ "edit": "Guardar",
35
+ "created": "Se ha creado el acceso directo",
36
+ "edited": "Se ha modificado el acceso directo",
37
+ "errored": "Se ha producido un error",
38
+ "needs-info": "Un acceso directo necesita un nombre y una URL",
39
+ "url-bad-format": "La URL introducida no tiene el formato correcto"
40
+ }
41
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "cancel": "Annulla",
3
+ "allow": "Consenti",
4
+ "allow-location-dialog": {
5
+ "title": "Consenti l'accesso alla tua posizione",
6
+ "description": "Il tuo Twake deve essere sempre autorizzato ad accedere alla posizione del tuo telefono per memorizzare i tuoi spostamenti e aiutarti ad analizzarli, anche quando l'app non è in uso.\n\nNon verrà MAI condivisa con nessuno senza una tua richiesta.\n\nPuoi disattivare questa funzione dalle impostazioni dell'app Coach CO2."
7
+ },
8
+ "install-flagship-app-dialog": {
9
+ "title": "Scansiona il codice QR",
10
+ "text": "oppure vai direttamente su <img src=%{iosIconSrc} /> <a href='%{iosUrl}' class='u-link' target='_blank' rel='noopener'>App Store</a><br>o su <img src=%{androidIconSrc} /> <a href='%{androidUrl}' class='u-link' target='_blank' rel='noopener'>Play Store</a> per installare l'app Twake Workplace",
11
+ "a11n": "Vai alla pagina di download dell'applicazione Twake Workplace"
12
+ },
13
+ "authentification-dialog": {
14
+ "title": "Accesso",
15
+ "title-oidc": "Twake Pass",
16
+ "subtitle": "Per sicurezza, conferma la tua identità",
17
+ "label": "Password di Twake",
18
+ "label-oidc": "Password di Twake Pass",
19
+ "abort": "Esci",
20
+ "unlock": "Sblocca",
21
+ "forgotten-password": "Ho dimenticato la password",
22
+ "errors": {
23
+ "invalid_password": "Password errata, riprova.",
24
+ "server_error": "Si è verificato un errore del server. Ricarica la pagina."
25
+ }
26
+ },
27
+ "shortcut-dialog": {
28
+ "create-title": "Crea un collegamento",
29
+ "edit-title": "Modifica un collegamento",
30
+ "filename": "Nome del collegamento",
31
+ "url": "URL",
32
+ "cancel": "Annulla",
33
+ "create": "Crea",
34
+ "edit": "Salva",
35
+ "created": "Il collegamento è stato creato",
36
+ "edited": "Il collegamento è stato modificato",
37
+ "errored": "Si è verificato un errore",
38
+ "needs-info": "Un collegamento richiede un nome e un URL",
39
+ "url-bad-format": "L'URL inserito non è nel formato corretto"
40
+ }
41
+ }
@@ -1,13 +1,19 @@
1
1
  import { withOnlyLocales } from 'twake-i18n'
2
2
 
3
+ import de from './locales/de.json'
3
4
  import en from './locales/en.json'
5
+ import es from './locales/es.json'
4
6
  import fr from './locales/fr.json'
7
+ import it from './locales/it.json'
5
8
  import ru from './locales/ru.json'
6
9
  import vi from './locales/vi.json'
7
10
 
8
11
  export const locales = {
12
+ de,
9
13
  en,
14
+ es,
10
15
  fr,
16
+ it,
11
17
  ru,
12
18
  vi
13
19
  }
@@ -11,6 +11,14 @@ export default {
11
11
  closeButton: 'Cerrar',
12
12
  backButton: 'Atrás'
13
13
  },
14
+ de: {
15
+ closeButton: 'Schließen',
16
+ backButton: 'Zurück'
17
+ },
18
+ it: {
19
+ closeButton: 'Chiudi',
20
+ backButton: 'Indietro'
21
+ },
14
22
  ru: {
15
23
  closeButton: 'Закрыть',
16
24
  backButton: 'Назад'
@@ -1,16 +1,25 @@
1
+ const dayFirstDateFormats = {
2
+ fr: 'dd/LL/yyyy',
3
+ es: 'dd/LL/yyyy',
4
+ it: 'dd/LL/yyyy',
5
+ de: 'dd.LL.yyyy'
6
+ }
7
+
1
8
  export const makeFormat = ({ ampm, mode, lang }) => {
9
+ const dayFirstDate = dayFirstDateFormats[lang]
10
+
2
11
  switch (mode) {
3
12
  case 'date':
4
- return lang === 'fr' ? 'dd/LL/yyyy' : 'LL/dd/yyyy'
13
+ return dayFirstDate || 'LL/dd/yyyy'
5
14
  case 'time':
6
- return lang === 'fr' ? 'HH:mm' : ampm ? 'HH:mm a' : 'HH:mm'
15
+ return dayFirstDate ? 'HH:mm' : ampm ? 'HH:mm a' : 'HH:mm'
7
16
  case 'dateTime':
8
- return lang === 'fr'
9
- ? 'dd/LL/yyyy HH:mm'
17
+ return dayFirstDate
18
+ ? `${dayFirstDate} HH:mm`
10
19
  : ampm
11
20
  ? 'LL/dd/yyyy HH:mm a'
12
21
  : 'LL/dd/yyyy HH:mm'
13
22
  default:
14
- return lang === 'fr' ? 'dd/LL/yyyy' : ampm ? 'LL/dd/yyyy a' : 'LL/dd/yyyy'
23
+ return dayFirstDate || (ampm ? 'LL/dd/yyyy a' : 'LL/dd/yyyy')
15
24
  }
16
25
  }
@@ -35,7 +35,29 @@ describe('makeFormat', () => {
35
35
  })
36
36
  })
37
37
 
38
- describe('When lang is not "fr"', () => {
38
+ describe.each([
39
+ ['es', 'dd/LL/yyyy'],
40
+ ['it', 'dd/LL/yyyy'],
41
+ ['de', 'dd.LL.yyyy']
42
+ ])('When lang is "%s"', (lang, dateFormat) => {
43
+ it('should return a day-first format for default mode', () => {
44
+ expect(makeFormat({ lang })).toBe(dateFormat)
45
+ expect(makeFormat({ ampm: true, lang })).toBe(dateFormat)
46
+ })
47
+
48
+ it('should return a 24-hour format for time mode', () => {
49
+ expect(makeFormat({ mode: 'time', lang })).toBe('HH:mm')
50
+ expect(makeFormat({ mode: 'time', ampm: true, lang })).toBe('HH:mm')
51
+ })
52
+
53
+ it('should return a day-first format for dateTime mode', () => {
54
+ expect(makeFormat({ mode: 'dateTime', ampm: true, lang })).toBe(
55
+ `${dateFormat} HH:mm`
56
+ )
57
+ })
58
+ })
59
+
60
+ describe('When lang is "en"', () => {
39
61
  it('should return the right format for default mode', () => {
40
62
  const format = makeFormat({ lang: 'en', ampm: false })
41
63
  expect(format).toBe('LL/dd/yyyy')
@@ -11,8 +11,11 @@ import {
11
11
  import cx from 'classnames'
12
12
  import formatFNS from 'date-fns/format'
13
13
  import isBefore from 'date-fns/isBefore'
14
+ import LocaleDE from 'date-fns/locale/de'
14
15
  import LocaleEN from 'date-fns/locale/en-US'
16
+ import LocaleES from 'date-fns/locale/es'
15
17
  import LocaleFR from 'date-fns/locale/fr'
18
+ import LocaleIT from 'date-fns/locale/it'
16
19
  import subDays from 'date-fns/subDays'
17
20
  import PropTypes from 'prop-types'
18
21
  import React, { forwardRef, useState } from 'react'
@@ -25,7 +28,10 @@ import { makeStyles } from '../styles'
25
28
 
26
29
  const localesFNS = {
27
30
  fr: LocaleFR,
28
- en: LocaleEN
31
+ en: LocaleEN,
32
+ es: LocaleES,
33
+ de: LocaleDE,
34
+ it: LocaleIT
29
35
  }
30
36
 
31
37
  const useStyles = makeStyles(() => ({
@@ -0,0 +1,8 @@
1
+ {
2
+ "cancel": "Abbrechen",
3
+ "clear": "Löschen",
4
+ "invalidDate": "Ungültiges Datum",
5
+ "ok": "OK",
6
+ "today": "Heute",
7
+ "minDateLabelError": "Das Datum darf nicht vor dem Mindestdatum liegen (%{date})"
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "cancel": "Cancelar",
3
+ "clear": "Borrar",
4
+ "invalidDate": "Fecha no válida",
5
+ "ok": "Aceptar",
6
+ "today": "Hoy",
7
+ "minDateLabelError": "La fecha no debe ser anterior a la fecha mínima (%{date})"
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "cancel": "Annulla",
3
+ "clear": "Cancella",
4
+ "invalidDate": "Data non valida",
5
+ "ok": "OK",
6
+ "today": "Oggi",
7
+ "minDateLabelError": "La data non deve essere precedente alla data minima (%{date})"
8
+ }
@@ -1,13 +1,19 @@
1
1
  import { withOnlyLocales } from 'twake-i18n'
2
2
 
3
+ import de from './de.json'
3
4
  import en from './en.json'
5
+ import es from './es.json'
4
6
  import fr from './fr.json'
7
+ import it from './it.json'
5
8
  import ru from './ru.json'
6
9
  import vi from './vi.json'
7
10
 
8
11
  export const locales = {
12
+ de,
9
13
  en,
14
+ es,
10
15
  fr,
16
+ it,
11
17
  ru,
12
18
  vi
13
19
  }
@@ -0,0 +1,18 @@
1
+ {
2
+ "EditBadge": {
3
+ "menu": {
4
+ "update": "Aktualisieren",
5
+ "delete": "Löschen"
6
+ },
7
+ "upload": {
8
+ "file-size": "Die maximale Dateigröße beträgt 5 MB.",
9
+ "file-type": "Dieser Dateityp wird nicht unterstützt. Bitte versuchen Sie es erneut.",
10
+ "success": "Avatar erfolgreich aktualisiert",
11
+ "error": "Das Hochladen des Avatars ist fehlgeschlagen. Bitte versuchen Sie es erneut."
12
+ },
13
+ "delete": {
14
+ "success": "Avatar erfolgreich gelöscht",
15
+ "error": "Das Löschen des Avatars ist fehlgeschlagen. Bitte versuchen Sie es erneut."
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "EditBadge": {
3
+ "menu": {
4
+ "update": "Actualizar",
5
+ "delete": "Eliminar"
6
+ },
7
+ "upload": {
8
+ "file-size": "El tamaño máximo del archivo es de 5 MB.",
9
+ "file-type": "Este tipo de archivo no es compatible. Inténtelo de nuevo.",
10
+ "success": "Avatar actualizado correctamente",
11
+ "error": "No se ha podido subir el avatar. Inténtelo de nuevo."
12
+ },
13
+ "delete": {
14
+ "success": "Avatar eliminado correctamente",
15
+ "error": "No se ha podido eliminar el avatar. Inténtelo de nuevo."
16
+ }
17
+ }
18
+ }
@@ -1,11 +1,17 @@
1
+ import de from './de.json'
1
2
  import en from './en.json'
3
+ import es from './es.json'
2
4
  import fr from './fr.json'
5
+ import it from './it.json'
3
6
  import ru from './ru.json'
4
7
  import vi from './vi.json'
5
8
 
6
9
  export const locales = {
10
+ de,
7
11
  en,
12
+ es,
8
13
  fr,
14
+ it,
9
15
  ru,
10
16
  vi
11
17
  }
@@ -0,0 +1,18 @@
1
+ {
2
+ "EditBadge": {
3
+ "menu": {
4
+ "update": "Aggiorna",
5
+ "delete": "Elimina"
6
+ },
7
+ "upload": {
8
+ "file-size": "La dimensione massima del file è 5 MB.",
9
+ "file-type": "Il tipo di file non è supportato. Riprova.",
10
+ "success": "Avatar aggiornato correttamente",
11
+ "error": "Il caricamento dell'avatar non è riuscito. Riprova."
12
+ },
13
+ "delete": {
14
+ "success": "Avatar eliminato correttamente",
15
+ "error": "L'eliminazione dell'avatar non è riuscita. Riprova."
16
+ }
17
+ }
18
+ }
@@ -1047,7 +1047,9 @@ export const makeLightOverrides = theme => ({
1047
1047
  badge: {
1048
1048
  boxSizing: 'content-box',
1049
1049
  padding: 0,
1050
- borderRadius: '100%',
1050
+ borderRadius: 100,
1051
+ // Every two-digit count fits the circle, longer counts grow into a pill
1052
+ fontVariantNumeric: 'tabular-nums',
1051
1053
  '&.badgeBorder': {
1052
1054
  border: `2px solid ${theme.palette.background.paper}`
1053
1055
  },
@@ -0,0 +1,6 @@
1
+ {
2
+ "navLimiter": {
3
+ "showMore": "Mehr anzeigen",
4
+ "showLess": "Weniger anzeigen"
5
+ }
6
+ }