@protobase/ui 0.25.2 → 0.25.4

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 (271) hide show
  1. package/dist/account/account-pages.js +3 -2
  2. package/dist/account/account-section.js +1 -1
  3. package/dist/account/account-security-page.js +9 -4
  4. package/dist/account/backup-codes.js +7 -6
  5. package/dist/account/messages.js +214 -0
  6. package/dist/account/passkeys-section.js +23 -22
  7. package/dist/account/password-dialog.js +4 -3
  8. package/dist/account/sign-in-policy-form.js +14 -13
  9. package/dist/account/sign-in-policy-labels.js +30 -29
  10. package/dist/account/sign-in-policy-page.js +11 -6
  11. package/dist/account/sign-in-providers-section.js +6 -5
  12. package/dist/account/staff-sign-in-log.js +11 -10
  13. package/dist/account/totp-qr.js +2 -1
  14. package/dist/account/two-factor-section.js +24 -23
  15. package/dist/account/two-factor-setup.js +19 -18
  16. package/dist/action-card/action-card.js +2 -1
  17. package/dist/action-card/field-list.js +1 -1
  18. package/dist/action-card/messages.js +8 -0
  19. package/dist/activity-chart/activity-chart.js +3 -2
  20. package/dist/activity-chart/messages.js +14 -0
  21. package/dist/app/app.d.ts +1 -1
  22. package/dist/app/app.js +20 -21
  23. package/dist/app/assistant-shell.js +2 -1
  24. package/dist/app/batch-failure.js +2 -1
  25. package/dist/app/breadcrumb-for.js +4 -3
  26. package/dist/app/charts/chart-groups.js +3 -2
  27. package/dist/app/charts/chart-view.js +3 -2
  28. package/dist/app/charts/group-bars.js +2 -1
  29. package/dist/app/charts/messages.js +26 -0
  30. package/dist/app/charts/period-chart.js +3 -2
  31. package/dist/app/charts/split-points.js +2 -1
  32. package/dist/app/comments/comment-composer.js +19 -18
  33. package/dist/app/comments/comments-section.js +4 -3
  34. package/dist/app/comments/messages.js +26 -0
  35. package/dist/app/create/create-page.js +11 -18
  36. package/dist/app/custom-section.js +4 -6
  37. package/dist/app/displays/board-column.js +7 -6
  38. package/dist/app/displays/board-columns.js +3 -2
  39. package/dist/app/displays/board-display.js +13 -15
  40. package/dist/app/displays/calendar-controls.js +3 -2
  41. package/dist/app/displays/calendar-display.js +12 -17
  42. package/dist/app/displays/card-carousel.js +4 -3
  43. package/dist/app/displays/cards-display.js +2 -1
  44. package/dist/app/displays/custom-display.js +4 -6
  45. package/dist/app/displays/display-frame.js +3 -2
  46. package/dist/app/displays/list-cards.js +5 -8
  47. package/dist/app/displays/list-displays.js +3 -3
  48. package/dist/app/displays/map-display.js +15 -14
  49. package/dist/app/displays/messages.js +128 -2
  50. package/dist/app/displays/period-controls.js +4 -3
  51. package/dist/app/displays/record-card.js +7 -6
  52. package/dist/app/displays/timeline-display.js +17 -26
  53. package/dist/app/displays/timeline-range.js +2 -1
  54. package/dist/app/displays/timeline-row.js +1 -1
  55. package/dist/app/displays/use-board-move.js +2 -2
  56. package/dist/app/displays/use-calendar-move.js +2 -1
  57. package/dist/app/document-title.js +2 -1
  58. package/dist/app/error-banner.js +1 -1
  59. package/dist/app/export/builder-port.js +2 -1
  60. package/dist/app/export/export-dialog.js +39 -43
  61. package/dist/app/export/export-worker.js +2 -0
  62. package/dist/app/export/messages.js +78 -0
  63. package/dist/app/export/run-export.js +5 -2
  64. package/dist/app/export/sink.js +4 -3
  65. package/dist/app/export/use-export-flow.js +4 -3
  66. package/dist/app/field-editor.js +4 -3
  67. package/dist/app/field-types/messages.js +8 -0
  68. package/dist/app/field-types/widget-part.js +2 -1
  69. package/dist/app/file-field.js +11 -14
  70. package/dist/app/gallery/gallery-section.js +4 -3
  71. package/dist/app/gallery/lightbox.js +5 -4
  72. package/dist/app/gallery/messages.js +30 -0
  73. package/dist/app/gallery/photo-details.js +3 -2
  74. package/dist/app/hand-order/hand-sorted-list.js +3 -6
  75. package/dist/app/hand-order/messages.js +4 -2
  76. package/dist/app/history/describe-change.js +3 -8
  77. package/dist/app/history/messages.js +32 -0
  78. package/dist/app/import/convert.js +20 -19
  79. package/dist/app/import/failed-rows.js +3 -2
  80. package/dist/app/import/import-button.js +2 -1
  81. package/dist/app/import/import-check-step.js +21 -37
  82. package/dist/app/import/import-dialog.js +13 -17
  83. package/dist/app/import/import-file-step.js +5 -9
  84. package/dist/app/import/import-mapping-step.js +32 -35
  85. package/dist/app/import/import-result-step.js +13 -12
  86. package/dist/app/import/messages.js +200 -0
  87. package/dist/app/import/parse-worker.js +2 -0
  88. package/dist/app/import/prepare-rows.js +5 -4
  89. package/dist/app/import/sheet-cell.js +2 -1
  90. package/dist/app/import/sheet-file.js +3 -2
  91. package/dist/app/import/sheet-source.js +7 -3
  92. package/dist/app/import/xlsx-reader.js +4 -3
  93. package/dist/app/import/xlsx-xml.js +2 -1
  94. package/dist/app/import/zip-reader.js +4 -3
  95. package/dist/app/list-edit/use-list-edits.js +1 -1
  96. package/dist/app/list-group-chart.js +2 -1
  97. package/dist/app/list-page.js +1 -1
  98. package/dist/app/map/map-layer-switch.js +3 -2
  99. package/dist/app/map/messages.js +14 -0
  100. package/dist/app/messages.js +116 -2
  101. package/dist/app/meta-gate.js +1 -1
  102. package/dist/app/nav-from-meta.js +11 -10
  103. package/dist/app/pages/action-inputs/action-inputs-dialog.js +3 -2
  104. package/dist/app/pages/action-inputs/input-answers.js +6 -5
  105. package/dist/app/pages/blocks/card-row.js +3 -2
  106. package/dist/app/pages/blocks/field.js +1 -1
  107. package/dist/app/pages/blocks/modal-form.js +5 -4
  108. package/dist/app/pages/blocks/progress.js +1 -1
  109. package/dist/app/pages/blocks/record-card.js +3 -2
  110. package/dist/app/pages/blocks/stat.js +2 -1
  111. package/dist/app/pages/composed-page.js +6 -8
  112. package/dist/app/pages/confirm-action.js +2 -1
  113. package/dist/app/pages/custom-boundary.js +4 -2
  114. package/dist/app/pages/messages.js +64 -0
  115. package/dist/app/pages/render-node.js +5 -7
  116. package/dist/app/pages/use-run-action.js +11 -10
  117. package/dist/app/record-page.js +1 -1
  118. package/dist/app/record-row/messages.js +26 -0
  119. package/dist/app/record-row/record-row-body.js +12 -7
  120. package/dist/app/record-row/record-row.js +4 -3
  121. package/dist/app/record-row/saved-record-row.js +3 -2
  122. package/dist/app/related-dots/dots-summary.js +2 -1
  123. package/dist/app/related-dots/messages.js +8 -0
  124. package/dist/app/relation-picker.js +9 -8
  125. package/dist/app/router.js +5 -4
  126. package/dist/app/runtime/messages.js +58 -0
  127. package/dist/app/runtime/runtime-status.js +10 -23
  128. package/dist/app/runtime/runtime-update-dialog.js +7 -6
  129. package/dist/app/runtime/runtime-update.js +4 -3
  130. package/dist/app/saved/favorite-button.js +2 -1
  131. package/dist/app/saved/messages.js +22 -0
  132. package/dist/app/saved/saved-list.js +4 -7
  133. package/dist/app/saved/use-favorite.js +3 -2
  134. package/dist/app/search/messages.js +6 -2
  135. package/dist/app/search/navigation-hits.js +9 -7
  136. package/dist/app/searches/filter-chip-list.js +2 -1
  137. package/dist/app/searches/messages.js +96 -0
  138. package/dist/app/searches/save-search-button.js +5 -4
  139. package/dist/app/searches/saved-search-rows.js +3 -2
  140. package/dist/app/searches/saved-search-section.js +6 -5
  141. package/dist/app/searches/saved-search.js +4 -3
  142. package/dist/app/searches/saved-searches.js +15 -25
  143. package/dist/app/searches/search-controls.js +5 -4
  144. package/dist/app/searches/search-diff.js +4 -2
  145. package/dist/app/searches/search-name-dialog.js +4 -3
  146. package/dist/app/searches/update-search-dialog.js +15 -30
  147. package/dist/app/searches/use-save-search.js +8 -7
  148. package/dist/app/searches/use-search-row.js +4 -3
  149. package/dist/app/sensitive-field.js +5 -4
  150. package/dist/app/source-notice.js +13 -8
  151. package/dist/app/staff-banner.js +13 -20
  152. package/dist/app-shell/global-search.js +2 -2
  153. package/dist/app-shell/messages.js +4 -2
  154. package/dist/app-shell/sidebar-group.js +1 -1
  155. package/dist/app-shell/sidebar-item.js +1 -1
  156. package/dist/app-shell/sidebar.js +1 -1
  157. package/dist/assistant-dock/assistant-dock.js +6 -6
  158. package/dist/assistant-dock/messages.js +26 -0
  159. package/dist/assistant-dock/use-assistant.js +2 -1
  160. package/dist/assistant-dock/use-backend-data.js +2 -1
  161. package/dist/assistant-dock/widget-view.js +3 -2
  162. package/dist/auth/auth-gate.js +10 -5
  163. package/dist/auth/auth-locale.js +14 -0
  164. package/dist/auth/auth-messages.js +122 -43
  165. package/dist/auth/auth-provider.js +6 -1
  166. package/dist/auth/code-form.js +4 -3
  167. package/dist/auth/email-code-form.js +11 -13
  168. package/dist/auth/email-code-page.js +2 -1
  169. package/dist/auth/first-run-page.js +6 -5
  170. package/dist/auth/forgot-password-form.js +15 -17
  171. package/dist/auth/forgot-password-page.js +2 -1
  172. package/dist/auth/messages.js +200 -0
  173. package/dist/auth/provider-sign-in-page.js +5 -5
  174. package/dist/auth/resend-code-button.js +2 -1
  175. package/dist/auth/reset-password-form.js +12 -11
  176. package/dist/auth/reset-password-page.js +4 -3
  177. package/dist/auth/setup-required-form.js +8 -10
  178. package/dist/auth/setup-required-page.js +7 -2
  179. package/dist/auth/sign-in-form.js +18 -21
  180. package/dist/auth/sign-in-prompt.js +4 -3
  181. package/dist/auth/sign-up-code-form.js +11 -13
  182. package/dist/auth/sign-up-details-form.js +15 -22
  183. package/dist/auth/sign-up-email-form.js +9 -8
  184. package/dist/auth/sign-up-page.js +2 -1
  185. package/dist/auth/staff-sign-in-form.js +16 -19
  186. package/dist/auth/two-factor-form.js +19 -18
  187. package/dist/auth/user-to-shell.js +2 -1
  188. package/dist/chat/composer.js +8 -7
  189. package/dist/chat/messages.js +14 -0
  190. package/dist/compact-table/compact-table.js +4 -8
  191. package/dist/compact-table/messages.js +18 -0
  192. package/dist/data/meta-data.d.ts +1 -1
  193. package/dist/data/use-update-record.js +1 -1
  194. package/dist/data-grid/grid-header.js +1 -1
  195. package/dist/filter-panel/date-presets.js +1 -1
  196. package/dist/forms/public-form-page.js +1 -1
  197. package/dist/inline-child-table/inline-child-table.js +12 -12
  198. package/dist/inline-child-table/line-row.js +10 -9
  199. package/dist/inline-child-table/messages.js +52 -0
  200. package/dist/inline-child-table/totals-footer.js +5 -8
  201. package/dist/invitations/invite-form.js +3 -2
  202. package/dist/invitations/link-notice.js +6 -4
  203. package/dist/invitations/messages.js +24 -0
  204. package/dist/invitations/pending-invitation-row.js +4 -3
  205. package/dist/lists/messages.js +8 -0
  206. package/dist/lists/paged-search-list.js +2 -1
  207. package/dist/locale/slotted.js +14 -0
  208. package/dist/markdown/markdown-editor.js +6 -5
  209. package/dist/markdown/messages.js +16 -0
  210. package/dist/organizations/all-organizations.js +6 -5
  211. package/dist/organizations/app-roles-picker.js +2 -1
  212. package/dist/organizations/invitation-page.js +41 -51
  213. package/dist/organizations/invitations-page.js +11 -10
  214. package/dist/organizations/members-page.js +16 -11
  215. package/dist/organizations/messages.js +180 -0
  216. package/dist/organizations/organization-page.js +27 -26
  217. package/dist/organizations/organization-paths.js +16 -13
  218. package/dist/organizations/organization-row.js +3 -2
  219. package/dist/organizations/organizations-page.js +17 -16
  220. package/dist/organizations/use-organizations.js +2 -1
  221. package/dist/package.js +1 -1
  222. package/dist/plugins/before-sign-in.js +6 -1
  223. package/dist/plugins/load-plugin.d.ts +1 -1
  224. package/dist/plugins/load-plugin.js +3 -2
  225. package/dist/plugins/messages.js +36 -0
  226. package/dist/plugins/plugin-gate.js +6 -1
  227. package/dist/plugins/plugin-manifest.js +8 -7
  228. package/dist/plugins/plugin-notice.js +8 -12
  229. package/dist/primitives/button.js +1 -1
  230. package/dist/primitives/messages.js +16 -0
  231. package/dist/primitives/segmented.js +1 -1
  232. package/dist/primitives/sheet.js +2 -1
  233. package/dist/primitives/spinner.js +2 -1
  234. package/dist/primitives/token.js +2 -1
  235. package/dist/record-view/field.js +2 -2
  236. package/dist/record-view/messages.js +4 -2
  237. package/dist/record-view/record-tabs.js +2 -1
  238. package/dist/roles/messages.js +14 -0
  239. package/dist/roles/use-active-role.js +3 -2
  240. package/dist/shell/assets/app-yCMYvqMX.js +69 -0
  241. package/dist/shell/assets/cn-Bi0ZEjD9.js +1 -0
  242. package/dist/shell/assets/export-worker-ClACk00b.js +2 -0
  243. package/dist/shell/assets/{index-BRkDA5KD.css → index-Bkc7w8I4.css} +1 -1
  244. package/dist/shell/assets/{index-xY0Mvv6V.js → index-HkjqX_O-.js} +2 -2
  245. package/dist/shell/assets/maplibre-DUTS_eJM.js +814 -0
  246. package/dist/shell/assets/{markdown-content-ukDTCu6u.js → markdown-content-CtGUP4W6.js} +1 -1
  247. package/dist/shell/assets/parse-worker-UhbwEjS0.js +5 -0
  248. package/dist/shell/assets/preload-helper-BZ3hrQDD.js +1 -0
  249. package/dist/shell/assets/{record-map-BJmYZ7kQ.js → record-map-DFy7sJEU.js} +1 -1
  250. package/dist/shell/assets/records-map-MfQEuiFB.js +1 -0
  251. package/dist/shell/assets/shared-protobase-ui-Bfa59vx6.js +1 -0
  252. package/dist/shell/index.html +6 -4
  253. package/dist/shell/protobase.shell.json +1 -1
  254. package/dist/shell/protobase.sw.js +2 -2
  255. package/dist/side-panel/messages.js +8 -0
  256. package/dist/side-panel/side-panel.js +2 -1
  257. package/dist/toasts/messages.js +8 -0
  258. package/dist/toasts/toast.js +2 -1
  259. package/dist/users/app-invitations.js +5 -4
  260. package/dist/users/create-user-form.js +9 -8
  261. package/dist/users/messages.js +52 -0
  262. package/dist/users/use-user-roles.js +2 -1
  263. package/dist/users/user-list.js +6 -5
  264. package/dist/users/user-row.js +5 -4
  265. package/package.json +4 -4
  266. package/dist/shell/assets/app-C-OLrsRR.js +0 -69
  267. package/dist/shell/assets/export-worker-Bz57Pf5g.js +0 -2
  268. package/dist/shell/assets/maplibre-Dov6nhPX.js +0 -814
  269. package/dist/shell/assets/parse-worker-BtcY0dQw.js +0 -5
  270. package/dist/shell/assets/records-map-C1_gDKHR.js +0 -1
  271. package/dist/shell/assets/shared-protobase-ui-CFYJAbMR.js +0 -1
@@ -1,58 +1,137 @@
1
+ import { defineMessages } from "../locale/messages.js";
1
2
  //#region src/auth/auth-messages.ts
2
- const tooManyRequests = "Too many attempts. Wait a minute and try again.";
3
- const passkeyClosed = "The passkey prompt closed before it finished. Try again.";
3
+ const text = defineMessages({
4
+ en: {
5
+ tooManyRequests: "Too many attempts. Wait a minute and try again.",
6
+ passkeyClosed: "The passkey prompt closed before it finished. Try again.",
7
+ wrongEmailOrPassword: "The email or password is not right.",
8
+ wrongPassword: "The password is not right.",
9
+ wrongCode: "The code is not right.",
10
+ codeExpired: "The code has expired. Ask for a new one.",
11
+ tooManyCodes: "Too many wrong codes. Ask for a new one.",
12
+ wrongBackupCode: "The backup code is not right, or was used before.",
13
+ tooManyCodesSignIn: "Too many wrong codes. Sign in again.",
14
+ locked: "Too many wrong codes. Wait 15 minutes and try again.",
15
+ tooSlow: "This sign-in took too long. Sign in again.",
16
+ passkeyNotFound: "This passkey is not registered for an account here.",
17
+ passkeyFailed: "The passkey could not be checked. Try again.",
18
+ passkeyAdded: "This passkey is added already.",
19
+ notFresh: "For this change, sign out and sign in again first.",
20
+ staffPermissionMissing: "Your staff account has no permission to sign in as people here.",
21
+ staffNotStrong: "Sign in to your staff account with a passkey or a second step, then try again.",
22
+ staffStale: "Your staff sign-in is too old. Sign in to your staff account again.",
23
+ staffExpired: "This staff sign-in took too long or was used already. Start again.",
24
+ staffProviderFailed: "The staff sign-in did not go through at the provider. Try again.",
25
+ staffUserUnavailable: "There is no account with this address, or it is disabled.",
26
+ staffReasonRequired: "Say why you sign in as this person, in at least 10 characters.",
27
+ staffForbidden: "Staff sign-in is turned off for this app.",
28
+ untrustedCallback: "This page is not on an address the server trusts.",
29
+ staffFailed: "The staff sign-in did not go through. Try again."
30
+ },
31
+ nl: {
32
+ tooManyRequests: "Te veel pogingen. Wacht een minuut en probeer het opnieuw.",
33
+ passkeyClosed: "De passkey-vraag sloot voordat die klaar was. Probeer het opnieuw.",
34
+ wrongEmailOrPassword: "Het e-mailadres of wachtwoord klopt niet.",
35
+ wrongPassword: "Het wachtwoord klopt niet.",
36
+ wrongCode: "De code klopt niet.",
37
+ codeExpired: "De code is verlopen. Vraag een nieuwe aan.",
38
+ tooManyCodes: "Te veel verkeerde codes. Vraag een nieuwe aan.",
39
+ wrongBackupCode: "De back-upcode klopt niet, of is al eerder gebruikt.",
40
+ tooManyCodesSignIn: "Te veel verkeerde codes. Log opnieuw in.",
41
+ locked: "Te veel verkeerde codes. Wacht 15 minuten en probeer het opnieuw.",
42
+ tooSlow: "Deze inlogpoging duurde te lang. Log opnieuw in.",
43
+ passkeyNotFound: "Deze passkey hoort hier bij geen enkel account.",
44
+ passkeyFailed: "De passkey kon niet worden gecontroleerd. Probeer het opnieuw.",
45
+ passkeyAdded: "Deze passkey is al toegevoegd.",
46
+ notFresh: "Log voor deze wijziging eerst uit en opnieuw in.",
47
+ staffPermissionMissing: "Je medewerkersaccount mag hier niet als iemand anders inloggen.",
48
+ staffNotStrong: "Log in op je medewerkersaccount met een passkey of een tweede stap, en probeer het dan opnieuw.",
49
+ staffStale: "Je inlog als medewerker is te oud. Log opnieuw in op je medewerkersaccount.",
50
+ staffExpired: "Deze inlog als medewerker duurde te lang of is al gebruikt. Begin opnieuw.",
51
+ staffProviderFailed: "De inlog als medewerker lukte niet bij de provider. Probeer het opnieuw.",
52
+ staffUserUnavailable: "Er is geen account met dit adres, of het is uitgeschakeld.",
53
+ staffReasonRequired: "Zeg in minstens 10 tekens waarom je als deze persoon inlogt.",
54
+ staffForbidden: "Inloggen als medewerker staat uit voor deze app.",
55
+ untrustedCallback: "Deze pagina staat niet op een adres dat de server vertrouwt.",
56
+ staffFailed: "De inlog als medewerker lukte niet. Probeer het opnieuw."
57
+ }
58
+ });
59
+ const providerText = defineMessages({
60
+ en: {
61
+ signupDisabled: (name) => `No account here belongs to this ${name} account. Ask an admin to add you, or sign in another way.`,
62
+ notLinked: (name) => `Your ${name} account is not linked to your account here. Sign in another way, then connect ${name} on the Sign-in & security page.`,
63
+ linkedToOther: (name) => `This ${name} account is linked to someone else here already.`,
64
+ couldNotLink: (name) => `Your ${name} account could not be linked. Try again.`,
65
+ accessDenied: (name) => `${name} did not let you in, or you cancelled.`,
66
+ domainNotAllowed: (name) => `${name} signed you in with an address this app does not accept from it. Sign in another way.`,
67
+ providerFailed: (name) => `Signing in with ${name} did not go through. Try again.`
68
+ },
69
+ nl: {
70
+ signupDisabled: (name) => `Geen account hier hoort bij dit ${name}-account. Vraag een beheerder om je toe te voegen, of log op een andere manier in.`,
71
+ notLinked: (name) => `Je ${name}-account is niet gekoppeld aan je account hier. Log op een andere manier in en koppel ${name} dan op de pagina Inloggen en beveiliging.`,
72
+ linkedToOther: (name) => `Dit ${name}-account is hier al aan iemand anders gekoppeld.`,
73
+ couldNotLink: (name) => `Je ${name}-account kon niet worden gekoppeld. Probeer het opnieuw.`,
74
+ accessDenied: (name) => `${name} liet je niet binnen, of je hebt geannuleerd.`,
75
+ domainNotAllowed: (name) => `${name} logde je in met een adres dat deze app daarvan niet accepteert. Log op een andere manier in.`,
76
+ providerFailed: (name) => `Inloggen met ${name} lukte niet. Probeer het opnieuw.`
77
+ }
78
+ });
4
79
  const messages = {
5
- INVALID_EMAIL_OR_PASSWORD: "The email or password is not right.",
6
- INVALID_PASSWORD: "The password is not right.",
7
- INVALID_OTP: "The code is not right.",
8
- OTP_EXPIRED: "The code has expired. Ask for a new one.",
9
- TOO_MANY_ATTEMPTS: "Too many wrong codes. Ask for a new one.",
10
- INVALID_CODE: "The code is not right.",
11
- INVALID_BACKUP_CODE: "The backup code is not right, or was used before.",
12
- TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: "Too many wrong codes. Sign in again.",
13
- ACCOUNT_TEMPORARILY_LOCKED: "Too many wrong codes. Wait 15 minutes and try again.",
14
- INVALID_TWO_FACTOR_COOKIE: "This sign-in took too long. Sign in again.",
15
- AUTH_CANCELLED: passkeyClosed,
16
- ERROR_CEREMONY_ABORTED: passkeyClosed,
17
- REGISTRATION_CANCELLED: passkeyClosed,
18
- PASSKEY_NOT_FOUND: "This passkey is not registered for an account here.",
19
- AUTHENTICATION_FAILED: "The passkey could not be checked. Try again.",
20
- PREVIOUSLY_REGISTERED: "This passkey is added already.",
21
- ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED: "This passkey is added already.",
22
- SESSION_NOT_FRESH: "For this change, sign out and sign in again first."
80
+ INVALID_EMAIL_OR_PASSWORD: "wrongEmailOrPassword",
81
+ INVALID_PASSWORD: "wrongPassword",
82
+ INVALID_OTP: "wrongCode",
83
+ OTP_EXPIRED: "codeExpired",
84
+ TOO_MANY_ATTEMPTS: "tooManyCodes",
85
+ INVALID_CODE: "wrongCode",
86
+ INVALID_BACKUP_CODE: "wrongBackupCode",
87
+ TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: "tooManyCodesSignIn",
88
+ ACCOUNT_TEMPORARILY_LOCKED: "locked",
89
+ INVALID_TWO_FACTOR_COOKIE: "tooSlow",
90
+ AUTH_CANCELLED: "passkeyClosed",
91
+ ERROR_CEREMONY_ABORTED: "passkeyClosed",
92
+ REGISTRATION_CANCELLED: "passkeyClosed",
93
+ PASSKEY_NOT_FOUND: "passkeyNotFound",
94
+ AUTHENTICATION_FAILED: "passkeyFailed",
95
+ PREVIOUSLY_REGISTERED: "passkeyAdded",
96
+ ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED: "passkeyAdded",
97
+ SESSION_NOT_FRESH: "notFresh"
23
98
  };
24
- const known = (error) => error.code ? messages[error.code] : void 0;
99
+ const lookup = (ids, code) => {
100
+ const id = code ? ids[code] : void 0;
101
+ return id && text(id);
102
+ };
103
+ const known = (error) => lookup(messages, error.code);
25
104
  /** Better Auth's error from a sign-in step or an account change, in words for the person at the keyboard. */
26
- const authMessage = (error) => known(error) ?? (error.status === 429 ? tooManyRequests : error.message);
105
+ const authMessage = (error) => known(error) ?? (error.status === 429 ? text("tooManyRequests") : error.message);
27
106
  /** As `authMessage`, for the password form: any other 401 is a wrong email or password. */
28
- const signInMessage = (error) => known(error) ?? (error.status === 429 ? tooManyRequests : error.status === 401 ? messages.INVALID_EMAIL_OR_PASSWORD : error.message);
107
+ const signInMessage = (error) => known(error) ?? (error.status === 429 ? text("tooManyRequests") : error.status === 401 ? text("wrongEmailOrPassword") : error.message);
29
108
  const staffMessages = {
30
- STAFF_PERMISSION_MISSING: "Your staff account has no permission to sign in as people here.",
31
- STAFF_SIGN_IN_NOT_STRONG: "Sign in to your staff account with a passkey or a second step, then try again.",
32
- STAFF_SIGN_IN_STALE: "Your staff sign-in is too old. Sign in to your staff account again.",
33
- STAFF_SIGN_IN_EXPIRED: "This staff sign-in took too long or was used already. Start again.",
34
- STAFF_SIGN_IN_FAILED: "The staff sign-in did not go through at the provider. Try again.",
35
- STAFF_USER_UNAVAILABLE: "There is no account with this address, or it is disabled.",
36
- STAFF_REASON_REQUIRED: "Say why you sign in as this person, in at least 10 characters.",
37
- SIGN_IN_METHOD_FORBIDDEN: "Staff sign-in is turned off for this app.",
38
- INVALID_CALLBACK_URL: "This page is not on an address the server trusts."
109
+ STAFF_PERMISSION_MISSING: "staffPermissionMissing",
110
+ STAFF_SIGN_IN_NOT_STRONG: "staffNotStrong",
111
+ STAFF_SIGN_IN_STALE: "staffStale",
112
+ STAFF_SIGN_IN_EXPIRED: "staffExpired",
113
+ STAFF_SIGN_IN_FAILED: "staffProviderFailed",
114
+ STAFF_USER_UNAVAILABLE: "staffUserUnavailable",
115
+ STAFF_REASON_REQUIRED: "staffReasonRequired",
116
+ SIGN_IN_METHOD_FORBIDDEN: "staffForbidden",
117
+ INVALID_CALLBACK_URL: "untrustedCallback"
39
118
  };
40
119
  /** Why a staff sign-in did not go through, from the code it came back with or an `AuthError` of its start. */
41
120
  const staffSignInMessage = (failure) => {
42
- const code = typeof failure === "string" ? failure : failure.code;
43
- if (code && staffMessages[code]) return staffMessages[code];
44
- if (typeof failure === "string") return "The staff sign-in did not go through. Try again.";
45
- return failure.status === 429 ? tooManyRequests : failure.message;
121
+ const message = lookup(staffMessages, typeof failure === "string" ? failure : failure.code);
122
+ if (message) return message;
123
+ if (typeof failure === "string") return text("staffFailed");
124
+ return failure.status === 429 ? text("tooManyRequests") : failure.message;
46
125
  };
47
126
  const providerMessages = {
48
- signup_disabled: (name) => `No account here belongs to this ${name} account. Ask an admin to add you, or sign in another way.`,
49
- account_not_linked: (name) => `Your ${name} account is not linked to your account here. Sign in another way, then connect ${name} on the Sign-in & security page.`,
50
- account_already_linked_to_different_user: (name) => `This ${name} account is linked to someone else here already.`,
51
- unable_to_link_account: (name) => `Your ${name} account could not be linked. Try again.`,
52
- access_denied: (name) => `${name} did not let you in, or you cancelled.`,
53
- EMAIL_DOMAIN_NOT_ALLOWED: (name) => `${name} signed you in with an address this app does not accept from it. Sign in another way.`
127
+ signup_disabled: (name) => providerText("signupDisabled", name),
128
+ account_not_linked: (name) => providerText("notLinked", name),
129
+ account_already_linked_to_different_user: (name) => providerText("linkedToOther", name),
130
+ unable_to_link_account: (name) => providerText("couldNotLink", name),
131
+ access_denied: (name) => providerText("accessDenied", name),
132
+ EMAIL_DOMAIN_NOT_ALLOWED: (name) => providerText("domainNotAllowed", name)
54
133
  };
55
134
  /** Why signing in or linking with the provider `name` did not go through, from the code it came back with. */
56
- const providerMessage = (code, name) => providerMessages[code]?.(name) ?? `Signing in with ${name} did not go through. Try again.`;
135
+ const providerMessage = (code, name) => providerMessages[code]?.(name) ?? providerText("providerFailed", name);
57
136
  //#endregion
58
137
  export { authMessage, providerMessage, signInMessage, staffSignInMessage };
@@ -1,4 +1,5 @@
1
1
  import { providerName, withoutSignInLink } from "./provider-link.js";
2
+ import { text } from "./messages.js";
2
3
  import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
3
4
  import { createAuthSession } from "@protobase/client";
4
5
  import { jsx } from "react/jsx-runtime";
@@ -23,6 +24,7 @@ const AuthProvider = ({ session: given, children }) => {
23
24
  const [organizations, setOrganizations] = useState();
24
25
  const [anonymous, setAnonymous] = useState(false);
25
26
  const [beforeSignIn, setBeforeSignIn] = useState([]);
27
+ const [locale, setLocale] = useState();
26
28
  const signedOutState = useCallback(() => anonymous ? { kind: "visitor" } : { kind: "signed-out" }, [anonymous]);
27
29
  const markSignedOut = useCallback(() => setState((current) => current.kind === "signed-in" ? { kind: "signed-out" } : current), []);
28
30
  const signedOut = useRef(markSignedOut);
@@ -58,12 +60,13 @@ const AuthProvider = ({ session: given, children }) => {
58
60
  setOrganizations(status.organizations);
59
61
  setAnonymous(Boolean(status.anonymous));
60
62
  setBeforeSignIn(status.plugins ?? []);
63
+ setLocale(status.locale);
61
64
  if (status.needsAdmin) return setState({ kind: "needs-admin" });
62
65
  const user = await session.session();
63
66
  return user ? enter(user) : setState({ kind: status.anonymous ? "visitor" : "signed-out" });
64
67
  }).catch((error) => setState({
65
68
  kind: "error",
66
- message: error instanceof Error ? error.message : "The server did not answer"
69
+ message: error instanceof Error ? error.message : text("noAnswer")
67
70
  }));
68
71
  }, [session, enter]);
69
72
  useEffect(recheck, [recheck]);
@@ -84,6 +87,7 @@ const AuthProvider = ({ session: given, children }) => {
84
87
  markSignedOut,
85
88
  recheck,
86
89
  beforeSignIn,
90
+ locale,
87
91
  adoptSession: async () => {
88
92
  const user = await session.session();
89
93
  if (!user) return false;
@@ -131,6 +135,7 @@ const AuthProvider = ({ session: given, children }) => {
131
135
  organizations,
132
136
  anonymous,
133
137
  beforeSignIn,
138
+ locale,
134
139
  signedOutState,
135
140
  markSignedOut,
136
141
  recheck,
@@ -1,3 +1,4 @@
1
+ import { text } from "./messages.js";
1
2
  import { Button } from "../primitives/button.js";
2
3
  import { OtpInput } from "../primitives/otp-input.js";
3
4
  import { AuthLayout } from "./auth-layout.js";
@@ -21,7 +22,7 @@ const CodeForm = ({ title, description, explanation, submitLabel, onSubmit, onRe
21
22
  }),
22
23
  notice && /* @__PURE__ */ jsx("p", {
23
24
  role: "status",
24
- className: "mb-4 rounded-md bg-success-soft px-3 py-2 text-xs font-medium text-success-text",
25
+ className: "mb-4 rounded-md bg-success-soft px-3 py-2 text-body font-medium text-success-text",
25
26
  children: notice
26
27
  }),
27
28
  /* @__PURE__ */ jsxs("form", {
@@ -33,7 +34,7 @@ const CodeForm = ({ title, description, explanation, submitLabel, onSubmit, onRe
33
34
  children: [
34
35
  /* @__PURE__ */ jsxs("label", {
35
36
  className: "flex flex-col gap-1.5 font-medium",
36
- children: ["Code", /* @__PURE__ */ jsx(OtpInput, {
37
+ children: [text("code"), /* @__PURE__ */ jsx(OtpInput, {
37
38
  name: "code",
38
39
  required: true,
39
40
  autoFocus: true,
@@ -45,7 +46,7 @@ const CodeForm = ({ title, description, explanation, submitLabel, onSubmit, onRe
45
46
  }),
46
47
  error && /* @__PURE__ */ jsx("p", {
47
48
  role: "alert",
48
- className: "text-xs font-medium text-danger-text",
49
+ className: "text-body font-medium text-danger-text",
49
50
  children: error
50
51
  }),
51
52
  /* @__PURE__ */ jsx(Button, {
@@ -1,21 +1,19 @@
1
+ import { text } from "./messages.js";
1
2
  import { CodeForm } from "./code-form.js";
2
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { slotted } from "../locale/slotted.js";
4
+ import { Fragment, jsx } from "react/jsx-runtime";
3
5
  //#region src/auth/email-code-form.tsx
4
6
  /** The second half of signing in with an emailed code: the code from the email. */
5
7
  const EmailCodeForm = ({ email, onBack, ...rest }) => /* @__PURE__ */ jsx(CodeForm, {
6
- title: "Check your email",
7
- description: "Enter the code we sent to sign in.",
8
- explanation: /* @__PURE__ */ jsxs(Fragment, { children: [
9
- "If ",
10
- /* @__PURE__ */ jsx("span", {
11
- className: "font-medium text-foreground",
12
- children: email
13
- }),
14
- " has an account, a 6-digit code is on its way. It works for 5 minutes, once."
15
- ] }),
16
- submitLabel: "Sign in",
8
+ title: text("checkEmail"),
9
+ description: text("signInCodeDescription"),
10
+ explanation: /* @__PURE__ */ jsx(Fragment, { children: slotted(text("signInCodeSent"), /* @__PURE__ */ jsx("span", {
11
+ className: "font-medium text-foreground",
12
+ children: email
13
+ })) }),
14
+ submitLabel: text("signIn"),
17
15
  onChangeAddress: onBack,
18
- changeAddressLabel: "Back to sign in",
16
+ changeAddressLabel: text("backToSignIn"),
19
17
  ...rest
20
18
  });
21
19
  //#endregion
@@ -1,4 +1,5 @@
1
1
  import { authMessage } from "./auth-messages.js";
2
+ import { text } from "./messages.js";
2
3
  import { useAuth } from "./auth-provider.js";
3
4
  import { EmailCodeForm } from "./email-code-form.js";
4
5
  import { useState } from "react";
@@ -32,7 +33,7 @@ const EmailCodePage = ({ email, onBack }) => {
32
33
  onSubmit: (code) => void attempt(() => signInWithCode(email, code)),
33
34
  onResend: () => void attempt(async () => {
34
35
  await sendSignInCode(email);
35
- setNotice("A new code is on its way. Only the newest one works.");
36
+ setNotice(text("newCodeSent"));
36
37
  })
37
38
  });
38
39
  };
@@ -1,3 +1,4 @@
1
+ import { text } from "./messages.js";
1
2
  import { Button } from "../primitives/button.js";
2
3
  import { AuthLayout } from "./auth-layout.js";
3
4
  import { useState } from "react";
@@ -12,12 +13,12 @@ const createAdminCommand = "protobase users create you@example.com";
12
13
  const FirstRunPage = ({ command = createAdminCommand, onCheckAgain, busy }) => {
13
14
  const [copied, setCopied] = useState(false);
14
15
  return /* @__PURE__ */ jsxs(AuthLayout, {
15
- title: "No admin yet",
16
- description: "This Protobase has no users to sign in with.",
16
+ title: text("noAdminTitle"),
17
+ description: text("noAdminDescription"),
17
18
  children: [
18
19
  /* @__PURE__ */ jsx("p", {
19
20
  className: "text-muted-foreground",
20
- children: "Run this in the terminal where Protobase runs, then reload. The first admin is created on the server, not in the browser, so nobody else can claim a fresh URL."
21
+ children: text("noAdminExplanation")
21
22
  }),
22
23
  /* @__PURE__ */ jsxs("div", {
23
24
  className: "mt-4 flex items-center gap-2 rounded-md border bg-surface py-1.5 pl-3 pr-1.5",
@@ -26,7 +27,7 @@ const FirstRunPage = ({ command = createAdminCommand, onCheckAgain, busy }) => {
26
27
  children: command
27
28
  }), /* @__PURE__ */ jsx("button", {
28
29
  type: "button",
29
- "aria-label": "Copy command",
30
+ "aria-label": text("copyCommand"),
30
31
  onClick: () => {
31
32
  navigator.clipboard.writeText(command).then(() => {
32
33
  setCopied(true);
@@ -42,7 +43,7 @@ const FirstRunPage = ({ command = createAdminCommand, onCheckAgain, busy }) => {
42
43
  className: "mt-4 min-h-10 w-full",
43
44
  loading: busy,
44
45
  onClick: onCheckAgain,
45
- children: "Reload"
46
+ children: text("reload")
46
47
  })
47
48
  ]
48
49
  });
@@ -1,34 +1,32 @@
1
1
  import { cn } from "../lib/cn.js";
2
2
  import { RouteLink } from "../primitives/route-link.js";
3
3
  import { Input } from "../primitives/input.js";
4
+ import { text } from "./messages.js";
4
5
  import { Button, buttonClass } from "../primitives/button.js";
5
6
  import { AuthLayout } from "./auth-layout.js";
7
+ import { slotted } from "../locale/slotted.js";
6
8
  import { useState } from "react";
7
9
  import { jsx, jsxs } from "react/jsx-runtime";
8
10
  //#region src/auth/forgot-password-form.tsx
9
11
  const ForgotPasswordForm = ({ onSubmit, back, busy, error, sentTo }) => {
10
12
  const [email, setEmail] = useState("");
11
13
  if (sentTo) return /* @__PURE__ */ jsxs(AuthLayout, {
12
- title: "Check your email",
13
- children: [/* @__PURE__ */ jsxs("p", {
14
+ title: text("checkEmail"),
15
+ children: [/* @__PURE__ */ jsx("p", {
14
16
  className: "text-muted-foreground",
15
- children: [
16
- "If ",
17
- /* @__PURE__ */ jsx("span", {
18
- className: "font-medium text-foreground",
19
- children: sentTo
20
- }),
21
- " has an account, an email with a link to choose a new password is on its way. The link works once, for a limited time."
22
- ]
17
+ children: slotted(text("resetSent"), /* @__PURE__ */ jsx("span", {
18
+ className: "font-medium text-foreground",
19
+ children: sentTo
20
+ }))
23
21
  }), /* @__PURE__ */ jsx(RouteLink, {
24
22
  to: back,
25
23
  className: cn(buttonClass({ variant: "primary" }), "mt-4 min-h-10 w-full"),
26
- children: "Back to sign in"
24
+ children: text("backToSignIn")
27
25
  })]
28
26
  });
29
27
  return /* @__PURE__ */ jsx(AuthLayout, {
30
- title: "Reset your password",
31
- description: "We email you a link to choose a new one.",
28
+ title: text("resetTitle"),
29
+ description: text("resetDescription"),
32
30
  children: /* @__PURE__ */ jsxs("form", {
33
31
  className: "flex flex-col gap-4",
34
32
  onSubmit: (event) => {
@@ -38,7 +36,7 @@ const ForgotPasswordForm = ({ onSubmit, back, busy, error, sentTo }) => {
38
36
  children: [
39
37
  /* @__PURE__ */ jsxs("label", {
40
38
  className: "flex flex-col gap-1.5 font-medium",
41
- children: ["Email", /* @__PURE__ */ jsx(Input, {
39
+ children: [text("email"), /* @__PURE__ */ jsx(Input, {
42
40
  type: "email",
43
41
  name: "email",
44
42
  autoComplete: "username",
@@ -52,7 +50,7 @@ const ForgotPasswordForm = ({ onSubmit, back, busy, error, sentTo }) => {
52
50
  }),
53
51
  error && /* @__PURE__ */ jsx("p", {
54
52
  role: "alert",
55
- className: "text-xs font-medium text-danger-text",
53
+ className: "text-body font-medium text-danger-text",
56
54
  children: error
57
55
  }),
58
56
  /* @__PURE__ */ jsx(Button, {
@@ -60,12 +58,12 @@ const ForgotPasswordForm = ({ onSubmit, back, busy, error, sentTo }) => {
60
58
  type: "submit",
61
59
  loading: busy,
62
60
  className: "min-h-10",
63
- children: "Send reset link"
61
+ children: text("sendResetLink")
64
62
  }),
65
63
  /* @__PURE__ */ jsx(RouteLink, {
66
64
  to: back,
67
65
  className: cn(buttonClass({ variant: "ghost" }), "min-h-10"),
68
- children: "Back to sign in"
66
+ children: text("backToSignIn")
69
67
  })
70
68
  ]
71
69
  })
@@ -1,3 +1,4 @@
1
+ import { text } from "./messages.js";
1
2
  import { useAuth } from "./auth-provider.js";
2
3
  import { ForgotPasswordForm } from "./forgot-password-form.js";
3
4
  import { resetLinkTarget } from "./reset-link.js";
@@ -19,7 +20,7 @@ const ForgotPasswordPage = ({ back }) => {
19
20
  setSentTo(email);
20
21
  } catch (failure) {
21
22
  if (!(failure instanceof AuthError)) throw failure;
22
- setError(failure.status === 429 ? "Too many requests. Wait a minute and try again." : failure.message);
23
+ setError(failure.status === 429 ? text("tooManyRequests") : failure.message);
23
24
  }
24
25
  setBusy(false);
25
26
  };
@@ -0,0 +1,200 @@
1
+ import { defineMessages } from "../locale/messages.js";
2
+ //#region src/auth/messages.ts
3
+ const text = defineMessages({
4
+ en: {
5
+ loading: "Loading",
6
+ cannotReach: (message) => `Cannot reach the server: ${message}`,
7
+ tryAgain: "Try again",
8
+ passwordChanged: "Your password is changed. Sign in with the new one.",
9
+ noAnswer: "The server did not answer",
10
+ code: "Code",
11
+ backupCode: "Backup code",
12
+ email: "Email",
13
+ password: "Password",
14
+ passwordOptional: "Password (optional)",
15
+ signIn: "Sign in",
16
+ signOut: "Sign out",
17
+ continue: "Continue",
18
+ backToSignIn: "Back to sign in",
19
+ useAnotherAddress: "Use another address",
20
+ checkEmail: "Check your email",
21
+ newCodeSent: "A new code is on its way. Only the newest one works.",
22
+ sendNewCode: "Send a new code",
23
+ sendNewCodeIn: (seconds) => `Send a new code in ${seconds}s`,
24
+ signInCodeDescription: "Enter the code we sent to sign in.",
25
+ signInCodeSent: "If {} has an account, a 6-digit code is on its way. It works for 5 minutes, once.",
26
+ signUpCodeDescription: "Enter the code we sent to create your account.",
27
+ signUpCodeSent: "A 6-digit code is on its way to {}. It works for 5 minutes, once. If the address has an account already, the email says so instead.",
28
+ noAdminTitle: "No admin yet",
29
+ noAdminDescription: "This Protobase has no users to sign in with.",
30
+ noAdminExplanation: "Run this in the terminal where Protobase runs, then reload. The first admin is created on the server, not in the browser, so nobody else can claim a fresh URL.",
31
+ copyCommand: "Copy command",
32
+ reload: "Reload",
33
+ tooManyRequests: "Too many requests. Wait a minute and try again.",
34
+ tooManyAttempts: "Too many attempts. Wait a minute and try again.",
35
+ resetTitle: "Reset your password",
36
+ resetDescription: "We email you a link to choose a new one.",
37
+ sendResetLink: "Send reset link",
38
+ resetSent: "If {} has an account, an email with a link to choose a new password is on its way. The link works once, for a limited time.",
39
+ linkExpiredTitle: "This link no longer works",
40
+ linkExpiredExplanation: "A reset link works once, for a limited time. Ask for a new one to choose your password.",
41
+ sendNewLink: "Send a new link",
42
+ passwordsDiffer: "The passwords are not the same.",
43
+ choosePassword: "Choose a new password",
44
+ atLeast: (length) => `At least ${length} characters.`,
45
+ useAtLeast: (length) => `Use at least ${length} characters.`,
46
+ passwordTooLong: "That password is too long.",
47
+ newPassword: "New password",
48
+ repeatPassword: "Repeat new password",
49
+ setPassword: "Set new password",
50
+ signingInWith: (name) => `Signing in with ${name}`,
51
+ takingYouTo: (name) => `Taking you to ${name}…`,
52
+ providerNotOffered: (name) => `Signing in with ${name} is not offered here. Sign in another way.`,
53
+ turnOnTwoFactor: "Turn on two-factor authentication",
54
+ addPasskey: "Add a passkey",
55
+ requiredForEveryAccount: "This app requires it for every account.",
56
+ passkeyExplanation: "A passkey signs you in with Face ID, Touch ID, Windows Hello, your phone or a security key. Your browser asks which one to use.",
57
+ couldNotReadAccount: "Could not read your account",
58
+ signInTitle: "Sign in to Protobase",
59
+ continueWith: (name) => `Continue with ${name}`,
60
+ signInWithPasskey: "Sign in with a passkey",
61
+ passkeyFor: (domain) => `Use a passkey made for ${domain}`,
62
+ or: "or",
63
+ emailSignInCode: "Email me a sign-in code",
64
+ forgotPassword: "Forgot password?",
65
+ newHere: "New here?",
66
+ haveAccount: "Have an account?",
67
+ createAnAccount: "Create an account",
68
+ browse: "Continue without signing in",
69
+ notNow: "Not now",
70
+ detailsTitle: "Your details",
71
+ detailsDescription: "One last step to create your account.",
72
+ yourName: "Your name",
73
+ codeWasRight: "The code was right: the account is for {}.",
74
+ withoutPassword: " Without one, you sign in with a code we email you.",
75
+ createAccount: "Create account",
76
+ codeToConfirm: "We email you a code to make sure the address is yours.",
77
+ emailCode: "Email me a code",
78
+ browseWithoutAccount: "Continue without an account",
79
+ staffTitle: "Staff sign-in",
80
+ staffUnavailable: "Staff of the team that runs this app cannot sign in as people here.",
81
+ signInAsPerson: "Sign in as a person",
82
+ forStaffOf: (operator) => `For staff of ${operator}, to help someone with this app.`,
83
+ theirEmail: "Their email",
84
+ reason: "Reason",
85
+ reasonExample: "Ticket 4211: the invoice totals look wrong",
86
+ staffExplanation: (operator) => `You sign in at ${operator} with a passkey or a second step. The session is short, shows a banner, and cannot change their sign-in. The app's admins see who signed in as whom, and why.`,
87
+ totpInstruction: "Enter the 6-digit code from your authenticator app.",
88
+ otpInstruction: "Enter the 6-digit code we emailed you. It works for 5 minutes.",
89
+ backupInstruction: "Enter one of the backup codes you saved when you set up the authenticator app. Each works once.",
90
+ twoFactorTitle: "Two-factor authentication",
91
+ twoFactorDescription: "One more step to sign in.",
92
+ codeToFinish: "We email you a code to finish signing in.",
93
+ trustBrowser: "Trust this browser",
94
+ trustBrowserFor: "Don't ask again in this browser for 30 days",
95
+ verify: "Verify",
96
+ useAuthenticator: "Use the authenticator app",
97
+ emailCodeInstead: "Email me a code instead",
98
+ useBackupCode: "Use a backup code",
99
+ admin: "Admin"
100
+ },
101
+ nl: {
102
+ loading: "Laden",
103
+ cannotReach: (message) => `Kan de server niet bereiken: ${message}`,
104
+ tryAgain: "Opnieuw proberen",
105
+ passwordChanged: "Je wachtwoord is gewijzigd. Log in met het nieuwe.",
106
+ noAnswer: "De server antwoordde niet",
107
+ code: "Code",
108
+ backupCode: "Back-upcode",
109
+ email: "E-mailadres",
110
+ password: "Wachtwoord",
111
+ passwordOptional: "Wachtwoord (optioneel)",
112
+ signIn: "Inloggen",
113
+ signOut: "Uitloggen",
114
+ continue: "Doorgaan",
115
+ backToSignIn: "Terug naar inloggen",
116
+ useAnotherAddress: "Een ander adres gebruiken",
117
+ checkEmail: "Kijk in je e-mail",
118
+ newCodeSent: "Er is een nieuwe code onderweg. Alleen de nieuwste werkt.",
119
+ sendNewCode: "Nieuwe code sturen",
120
+ sendNewCodeIn: (seconds) => `Nieuwe code sturen over ${seconds}s`,
121
+ signInCodeDescription: "Vul de code in die we stuurden om in te loggen.",
122
+ signInCodeSent: "Als {} een account heeft, is er een code van 6 cijfers onderweg. Die werkt 5 minuten, één keer.",
123
+ signUpCodeDescription: "Vul de code in die we stuurden om je account te maken.",
124
+ signUpCodeSent: "Er is een code van 6 cijfers onderweg naar {}. Die werkt 5 minuten, één keer. Heeft het adres al een account, dan staat dat in de e-mail.",
125
+ noAdminTitle: "Nog geen beheerder",
126
+ noAdminDescription: "Deze Protobase heeft geen gebruikers om mee in te loggen.",
127
+ noAdminExplanation: "Voer dit uit in de terminal waar Protobase draait en laad de pagina daarna opnieuw. De eerste beheerder wordt op de server gemaakt, niet in de browser, zodat niemand anders een nieuwe URL kan opeisen.",
128
+ copyCommand: "Opdracht kopiëren",
129
+ reload: "Opnieuw laden",
130
+ tooManyRequests: "Te veel verzoeken. Wacht een minuut en probeer het opnieuw.",
131
+ tooManyAttempts: "Te veel pogingen. Wacht een minuut en probeer het opnieuw.",
132
+ resetTitle: "Je wachtwoord herstellen",
133
+ resetDescription: "We mailen je een link om een nieuw te kiezen.",
134
+ sendResetLink: "Herstellink sturen",
135
+ resetSent: "Als {} een account heeft, is er een e-mail onderweg met een link om een nieuw wachtwoord te kiezen. De link werkt één keer, een beperkte tijd.",
136
+ linkExpiredTitle: "Deze link werkt niet meer",
137
+ linkExpiredExplanation: "Een herstellink werkt één keer, een beperkte tijd. Vraag een nieuwe aan om je wachtwoord te kiezen.",
138
+ sendNewLink: "Nieuwe link sturen",
139
+ passwordsDiffer: "De wachtwoorden zijn niet hetzelfde.",
140
+ choosePassword: "Kies een nieuw wachtwoord",
141
+ atLeast: (length) => `Minstens ${length} tekens.`,
142
+ useAtLeast: (length) => `Gebruik minstens ${length} tekens.`,
143
+ passwordTooLong: "Dat wachtwoord is te lang.",
144
+ newPassword: "Nieuw wachtwoord",
145
+ repeatPassword: "Nieuw wachtwoord herhalen",
146
+ setPassword: "Nieuw wachtwoord instellen",
147
+ signingInWith: (name) => `Inloggen met ${name}`,
148
+ takingYouTo: (name) => `Je gaat naar ${name}…`,
149
+ providerNotOffered: (name) => `Inloggen met ${name} kan hier niet. Log op een andere manier in.`,
150
+ turnOnTwoFactor: "Tweestapsverificatie aanzetten",
151
+ addPasskey: "Passkey toevoegen",
152
+ requiredForEveryAccount: "Deze app vraagt het voor elk account.",
153
+ passkeyExplanation: "Met een passkey log je in met Face ID, Touch ID, Windows Hello, je telefoon of een beveiligingssleutel. Je browser vraagt welke je gebruikt.",
154
+ couldNotReadAccount: "Kon je account niet lezen",
155
+ signInTitle: "Inloggen bij Protobase",
156
+ continueWith: (name) => `Doorgaan met ${name}`,
157
+ signInWithPasskey: "Inloggen met een passkey",
158
+ passkeyFor: (domain) => `Een passkey voor ${domain} gebruiken`,
159
+ or: "of",
160
+ emailSignInCode: "Mail me een inlogcode",
161
+ forgotPassword: "Wachtwoord vergeten?",
162
+ newHere: "Nieuw hier?",
163
+ haveAccount: "Heb je een account?",
164
+ createAnAccount: "Account maken",
165
+ browse: "Doorgaan zonder in te loggen",
166
+ notNow: "Niet nu",
167
+ detailsTitle: "Je gegevens",
168
+ detailsDescription: "Nog één stap om je account te maken.",
169
+ yourName: "Je naam",
170
+ codeWasRight: "De code klopte: het account is voor {}.",
171
+ withoutPassword: " Zonder wachtwoord log je in met een code die we je mailen.",
172
+ createAccount: "Account maken",
173
+ codeToConfirm: "We mailen je een code om te controleren dat het adres van jou is.",
174
+ emailCode: "Mail me een code",
175
+ browseWithoutAccount: "Doorgaan zonder account",
176
+ staffTitle: "Inloggen als medewerker",
177
+ staffUnavailable: "Medewerkers van het team dat deze app beheert, kunnen hier niet als iemand anders inloggen.",
178
+ signInAsPerson: "Inloggen als iemand anders",
179
+ forStaffOf: (operator) => `Voor medewerkers van ${operator}, om iemand met deze app te helpen.`,
180
+ theirEmail: "Hun e-mailadres",
181
+ reason: "Reden",
182
+ reasonExample: "Ticket 4211: de factuurtotalen kloppen niet",
183
+ staffExplanation: (operator) => `Je logt in bij ${operator} met een passkey of een tweede stap. De sessie is kort, toont een balk en kan hun inlog niet wijzigen. De beheerders van de app zien wie als wie inlogde, en waarom.`,
184
+ totpInstruction: "Vul de code van 6 cijfers uit je authenticator-app in.",
185
+ otpInstruction: "Vul de code van 6 cijfers in die we je mailden. Die werkt 5 minuten.",
186
+ backupInstruction: "Vul een van de back-upcodes in die je bewaarde toen je de authenticator-app instelde. Elke code werkt één keer.",
187
+ twoFactorTitle: "Tweestapsverificatie",
188
+ twoFactorDescription: "Nog één stap om in te loggen.",
189
+ codeToFinish: "We mailen je een code om het inloggen af te ronden.",
190
+ trustBrowser: "Deze browser vertrouwen",
191
+ trustBrowserFor: "Niet meer vragen in deze browser, 30 dagen lang",
192
+ verify: "Controleren",
193
+ useAuthenticator: "De authenticator-app gebruiken",
194
+ emailCodeInstead: "Mail me liever een code",
195
+ useBackupCode: "Een back-upcode gebruiken",
196
+ admin: "Beheerder"
197
+ }
198
+ });
199
+ //#endregion
200
+ export { text };