@azx-pbc/axiom-web 0.0.0-stage → 0.0.6

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 (141) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +161 -2
  3. package/dist/address.d.ts +32 -0
  4. package/dist/address.d.ts.map +1 -0
  5. package/dist/address.js +146 -0
  6. package/dist/address.js.map +1 -0
  7. package/dist/capture/MediaCapture.d.ts +45 -0
  8. package/dist/capture/MediaCapture.d.ts.map +1 -0
  9. package/dist/capture/MediaCapture.js +669 -0
  10. package/dist/capture/MediaCapture.js.map +1 -0
  11. package/dist/capture/SignatureCapture.d.ts +31 -0
  12. package/dist/capture/SignatureCapture.d.ts.map +1 -0
  13. package/dist/capture/SignatureCapture.js +329 -0
  14. package/dist/capture/SignatureCapture.js.map +1 -0
  15. package/dist/capture/copy.d.ts +101 -0
  16. package/dist/capture/copy.d.ts.map +1 -0
  17. package/dist/capture/copy.js +1369 -0
  18. package/dist/capture/copy.js.map +1 -0
  19. package/dist/capture/index.d.ts +19 -0
  20. package/dist/capture/index.d.ts.map +1 -0
  21. package/dist/capture/index.js +14 -0
  22. package/dist/capture/index.js.map +1 -0
  23. package/dist/capture/media-kind.d.ts +16 -0
  24. package/dist/capture/media-kind.d.ts.map +1 -0
  25. package/dist/capture/media-kind.js +64 -0
  26. package/dist/capture/media-kind.js.map +1 -0
  27. package/dist/capture/permissions.d.ts +109 -0
  28. package/dist/capture/permissions.d.ts.map +1 -0
  29. package/dist/capture/permissions.js +172 -0
  30. package/dist/capture/permissions.js.map +1 -0
  31. package/dist/capture/refusal.d.ts +13 -0
  32. package/dist/capture/refusal.d.ts.map +1 -0
  33. package/dist/capture/refusal.js +16 -0
  34. package/dist/capture/refusal.js.map +1 -0
  35. package/dist/controls.d.ts +64 -0
  36. package/dist/controls.d.ts.map +1 -0
  37. package/dist/controls.js +2524 -0
  38. package/dist/controls.js.map +1 -0
  39. package/dist/coordinate.d.ts +38 -0
  40. package/dist/coordinate.d.ts.map +1 -0
  41. package/dist/coordinate.js +220 -0
  42. package/dist/coordinate.js.map +1 -0
  43. package/dist/copy.d.ts +313 -0
  44. package/dist/copy.d.ts.map +1 -0
  45. package/dist/copy.js +2602 -0
  46. package/dist/copy.js.map +1 -0
  47. package/dist/countries.d.ts +14 -0
  48. package/dist/countries.d.ts.map +1 -0
  49. package/dist/countries.js +264 -0
  50. package/dist/countries.js.map +1 -0
  51. package/dist/format/calendar-locale.d.ts +19 -0
  52. package/dist/format/calendar-locale.d.ts.map +1 -0
  53. package/dist/format/calendar-locale.js +38 -0
  54. package/dist/format/calendar-locale.js.map +1 -0
  55. package/dist/format/country-names.d.ts +21 -0
  56. package/dist/format/country-names.d.ts.map +1 -0
  57. package/dist/format/country-names.js +2277 -0
  58. package/dist/format/country-names.js.map +1 -0
  59. package/dist/format/date.d.ts +58 -0
  60. package/dist/format/date.d.ts.map +1 -0
  61. package/dist/format/date.js +155 -0
  62. package/dist/format/date.js.map +1 -0
  63. package/dist/format/digits.d.ts +23 -0
  64. package/dist/format/digits.d.ts.map +1 -0
  65. package/dist/format/digits.js +46 -0
  66. package/dist/format/digits.js.map +1 -0
  67. package/dist/format/index.d.ts +28 -0
  68. package/dist/format/index.d.ts.map +1 -0
  69. package/dist/format/index.js +24 -0
  70. package/dist/format/index.js.map +1 -0
  71. package/dist/format/locale.d.ts +33 -0
  72. package/dist/format/locale.d.ts.map +1 -0
  73. package/dist/format/locale.js +39 -0
  74. package/dist/format/locale.js.map +1 -0
  75. package/dist/format/media-type.d.ts +8 -0
  76. package/dist/format/media-type.d.ts.map +1 -0
  77. package/dist/format/media-type.js +302 -0
  78. package/dist/format/media-type.js.map +1 -0
  79. package/dist/format/money.d.ts +52 -0
  80. package/dist/format/money.d.ts.map +1 -0
  81. package/dist/format/money.js +36 -0
  82. package/dist/format/money.js.map +1 -0
  83. package/dist/format/number.d.ts +28 -0
  84. package/dist/format/number.d.ts.map +1 -0
  85. package/dist/format/number.js +91 -0
  86. package/dist/format/number.js.map +1 -0
  87. package/dist/host.d.ts +122 -0
  88. package/dist/host.d.ts.map +1 -0
  89. package/dist/host.js +20 -0
  90. package/dist/host.js.map +1 -0
  91. package/dist/index.d.ts +57 -0
  92. package/dist/index.d.ts.map +1 -0
  93. package/dist/index.js +49 -0
  94. package/dist/index.js.map +1 -0
  95. package/dist/media.d.ts +42 -0
  96. package/dist/media.d.ts.map +1 -0
  97. package/dist/media.js +151 -0
  98. package/dist/media.js.map +1 -0
  99. package/dist/pickers/DatePicker.d.ts +35 -0
  100. package/dist/pickers/DatePicker.d.ts.map +1 -0
  101. package/dist/pickers/DatePicker.js +212 -0
  102. package/dist/pickers/DatePicker.js.map +1 -0
  103. package/dist/pickers/TimeSegments.d.ts +27 -0
  104. package/dist/pickers/TimeSegments.d.ts.map +1 -0
  105. package/dist/pickers/TimeSegments.js +82 -0
  106. package/dist/pickers/TimeSegments.js.map +1 -0
  107. package/dist/pickers/day-picker-locale.d.ts +15 -0
  108. package/dist/pickers/day-picker-locale.d.ts.map +1 -0
  109. package/dist/pickers/day-picker-locale.js +46 -0
  110. package/dist/pickers/day-picker-locale.js.map +1 -0
  111. package/dist/render/dom.d.ts +100 -0
  112. package/dist/render/dom.d.ts.map +1 -0
  113. package/dist/render/dom.js +882 -0
  114. package/dist/render/dom.js.map +1 -0
  115. package/dist/render/layout.d.ts +45 -0
  116. package/dist/render/layout.d.ts.map +1 -0
  117. package/dist/render/layout.js +8 -0
  118. package/dist/render/layout.js.map +1 -0
  119. package/dist/schedule/SchedulePicker.d.ts +46 -0
  120. package/dist/schedule/SchedulePicker.d.ts.map +1 -0
  121. package/dist/schedule/SchedulePicker.js +160 -0
  122. package/dist/schedule/SchedulePicker.js.map +1 -0
  123. package/dist/schedule/timeslot.d.ts +52 -0
  124. package/dist/schedule/timeslot.d.ts.map +1 -0
  125. package/dist/schedule/timeslot.js +265 -0
  126. package/dist/schedule/timeslot.js.map +1 -0
  127. package/dist/styles.css +2151 -0
  128. package/dist/theme/index.d.ts +12 -0
  129. package/dist/theme/index.d.ts.map +1 -0
  130. package/dist/theme/index.js +11 -0
  131. package/dist/theme/index.js.map +1 -0
  132. package/dist/theme/presets.d.ts +93 -0
  133. package/dist/theme/presets.d.ts.map +1 -0
  134. package/dist/theme/presets.js +200 -0
  135. package/dist/theme/presets.js.map +1 -0
  136. package/dist/tokens.css +234 -0
  137. package/dist/wizard-checkpoints.d.ts +18 -0
  138. package/dist/wizard-checkpoints.d.ts.map +1 -0
  139. package/dist/wizard-checkpoints.js +56 -0
  140. package/dist/wizard-checkpoints.js.map +1 -0
  141. package/package.json +76 -3
package/dist/copy.js ADDED
@@ -0,0 +1,2602 @@
1
+ import { createContext, useContext } from 'react';
2
+ import { renderValueText } from '@azx-pbc/axiom-react';
3
+ import { assertNever, isDurationUnit, isRecord } from '@azx-pbc/axiom-runtime';
4
+ import { cardinalCategory } from '@azx-pbc/axiom-runtime/messages';
5
+ import { COUNTRY_NAMES } from './format/country-names.js';
6
+ import { formatCivilDate, formatInstant, isCivilDateString, isInstantString, } from './format/date.js';
7
+ import { DEFAULT_DIGIT_POLICY } from './format/digits.js';
8
+ import { resolveLocale } from './format/locale.js';
9
+ import { mediaTypeNameIn, mediaTypePluralIn, mediaTypeSeparatorIn } from './format/media-type.js';
10
+ import { isCanonicalMoneyText } from './format/money.js';
11
+ import { formatDecimal, groupCanonicalNumericText, isDecimalString } from './format/number.js';
12
+ /**
13
+ * The form a count selects in one locale.
14
+ *
15
+ * The registry is the runtime's own vendored CLDR contract, never the host's `Intl.PluralRules`:
16
+ * a device upgrade cannot move a branch, and a language whose rules the registry carries is read
17
+ * with the same answer on Node, in a browser and on Hermes. `other` is the fallback a category the
18
+ * sentence does not list reads, which is CLDR's own closure rule.
19
+ */
20
+ function countForm(locale, count, forms) {
21
+ return forms[cardinalCategory(locale, count)] ?? forms.other;
22
+ }
23
+ /**
24
+ * A count with the noun it counts.
25
+ *
26
+ * Arabic's dual already means two, so a formal sentence writes `صفان` or `صفين` and never the
27
+ * numeral before it; every other category keeps the numeral. The helper reads the same category
28
+ * the form does, so the frames that name a count state one convention rather than two.
29
+ */
30
+ function countedText(locale, count, forms) {
31
+ const noun = countForm(locale, count, forms);
32
+ return locale === 'ar' && cardinalCategory(locale, count) === 'two'
33
+ ? noun
34
+ : `${String(count)} ${noun}`;
35
+ }
36
+ const BUFFER_COPY = {
37
+ en: {
38
+ 'buffer.decimal.one_point': () => 'Use one decimal point.',
39
+ 'buffer.decimal.digits': () => 'Use digits only, with an optional leading minus.',
40
+ 'buffer.decimal.fraction_digits': () => 'Use digits after the decimal point.',
41
+ 'buffer.decimal.not_canonical': () => 'That number cannot be stored exactly as typed.',
42
+ 'buffer.integer.digits': () => 'Use whole digits only.',
43
+ 'buffer.integer.no_point': () => 'A whole number has no decimal point.',
44
+ 'buffer.integer.not_safe': () => 'That whole number is too large to store safely.',
45
+ 'buffer.money.not_amount': () => 'Enter an amount.',
46
+ 'buffer.money.scale_exceeded': (params) => `Use at most ${String(params?.['scale'] ?? 0)} decimal places.`,
47
+ 'buffer.quantity.scale_exceeded': (params) => `Use at most ${String(params?.['scale'] ?? 0)} decimal places.`,
48
+ 'buffer.percentage.digits': () => 'Use whole digits only for the percentage, with an optional leading minus.',
49
+ 'buffer.percentage.no_point': () => 'A percentage has no decimal point.',
50
+ 'buffer.percentage.not_safe': () => 'That percentage is too large to store safely.',
51
+ 'buffer.integer.minimum': (params) => `Enter ${String(params?.['minimum'] ?? 0)} or more.`,
52
+ 'buffer.integer.maximum': (params) => `Enter ${String(params?.['maximum'] ?? 0)} or less.`,
53
+ 'buffer.integer.range': (params) => `Enter ${String(params?.['minimum'] ?? 0)} to ${String(params?.['maximum'] ?? 0)}.`,
54
+ 'buffer.integer.step': (params) => `Enter a multiple of ${String(params?.['step'] ?? 1)}, or type the answer.`,
55
+ 'buffer.phone.e164': () => 'Use an international number, such as +14155550123.',
56
+ 'buffer.date.nonexistent_day': () => 'That day does not exist.',
57
+ 'buffer.date.format': () => 'Use the format YYYY-MM-DD.',
58
+ },
59
+ es: {
60
+ 'buffer.decimal.one_point': () => 'Usa un solo punto decimal.',
61
+ 'buffer.decimal.digits': () => 'Usa solo dígitos, con un signo menos inicial opcional.',
62
+ 'buffer.decimal.fraction_digits': () => 'Usa dígitos después del punto decimal.',
63
+ 'buffer.decimal.not_canonical': () => 'Ese número no se puede guardar exactamente como lo escribiste.',
64
+ 'buffer.integer.digits': () => 'Usa solo dígitos enteros.',
65
+ 'buffer.integer.no_point': () => 'Un número entero no lleva punto decimal.',
66
+ 'buffer.integer.not_safe': () => 'Ese número entero es demasiado grande para guardarlo con seguridad.',
67
+ 'buffer.money.not_amount': () => 'Introduce un importe.',
68
+ 'buffer.money.scale_exceeded': (params) => `Usa como máximo ${String(params?.['scale'] ?? 0)} decimales.`,
69
+ 'buffer.quantity.scale_exceeded': (params) => `Usa como máximo ${String(params?.['scale'] ?? 0)} decimales para la cantidad.`,
70
+ 'buffer.percentage.digits': () => 'Usa solo dígitos enteros para el porcentaje, con un signo menos inicial opcional.',
71
+ 'buffer.percentage.no_point': () => 'Un porcentaje no lleva punto decimal.',
72
+ 'buffer.percentage.not_safe': () => 'Ese porcentaje es demasiado grande para guardarlo con seguridad.',
73
+ 'buffer.integer.minimum': (params) => `Introduce ${String(params?.['minimum'] ?? 0)} o más.`,
74
+ 'buffer.integer.maximum': (params) => `Introduce ${String(params?.['maximum'] ?? 0)} o menos.`,
75
+ 'buffer.integer.range': (params) => `Introduce un valor entre ${String(params?.['minimum'] ?? 0)} y ${String(params?.['maximum'] ?? 0)}.`,
76
+ 'buffer.integer.step': (params) => `El paso declarado es ${String(params?.['step'] ?? 1)}; escribe la respuesta.`,
77
+ 'buffer.phone.e164': () => 'Usa un número internacional, por ejemplo +14155550123.',
78
+ 'buffer.date.nonexistent_day': () => 'Ese día no existe.',
79
+ 'buffer.date.format': () => 'Usa el formato AAAA-MM-DD.',
80
+ },
81
+ pt: {
82
+ 'buffer.decimal.one_point': () => 'Usa apenas um ponto decimal.',
83
+ 'buffer.decimal.digits': () => 'Usa apenas dígitos, com um sinal de menos inicial opcional.',
84
+ 'buffer.decimal.fraction_digits': () => 'Usa dígitos depois do ponto decimal.',
85
+ 'buffer.decimal.not_canonical': () => 'Esse número não pode ser guardado exatamente como escrito.',
86
+ 'buffer.integer.digits': () => 'Usa apenas dígitos inteiros.',
87
+ 'buffer.integer.no_point': () => 'Um número inteiro não tem ponto decimal.',
88
+ 'buffer.integer.not_safe': () => 'Esse número inteiro é demasiado grande para guardar com segurança.',
89
+ 'buffer.money.not_amount': () => 'Introduz um valor.',
90
+ 'buffer.money.scale_exceeded': (params) => `Usa no máximo ${String(params?.['scale'] ?? 0)} casas decimais.`,
91
+ 'buffer.quantity.scale_exceeded': (params) => `Usa no máximo ${String(params?.['scale'] ?? 0)} casas decimais para a quantidade.`,
92
+ 'buffer.percentage.digits': () => 'Usa apenas dígitos inteiros para a percentagem, com um sinal de menos inicial opcional.',
93
+ 'buffer.percentage.no_point': () => 'Uma percentagem não tem ponto decimal.',
94
+ 'buffer.percentage.not_safe': () => 'Essa percentagem é demasiado grande para guardar com segurança.',
95
+ 'buffer.integer.minimum': (params) => `Introduz ${String(params?.['minimum'] ?? 0)} ou mais.`,
96
+ 'buffer.integer.maximum': (params) => `Introduz ${String(params?.['maximum'] ?? 0)} ou menos.`,
97
+ 'buffer.integer.range': (params) => `Introduz um valor entre ${String(params?.['minimum'] ?? 0)} e ${String(params?.['maximum'] ?? 0)}.`,
98
+ 'buffer.integer.step': (params) => `O passo declarado é ${String(params?.['step'] ?? 1)}; escreve a resposta.`,
99
+ 'buffer.phone.e164': () => 'Usa um número internacional, por exemplo +14155550123.',
100
+ 'buffer.date.nonexistent_day': () => 'Esse dia não existe.',
101
+ 'buffer.date.format': () => 'Usa o formato AAAA-MM-DD.',
102
+ },
103
+ ar: {
104
+ 'buffer.decimal.one_point': () => 'استخدم نقطة عشرية واحدة.',
105
+ 'buffer.decimal.digits': () => 'استخدم الأرقام فقط، مع إشارة سالب اختيارية في البداية.',
106
+ 'buffer.decimal.fraction_digits': () => 'استخدم أرقامًا بعد النقطة العشرية.',
107
+ 'buffer.decimal.not_canonical': () => 'لا يمكن تخزين هذا الرقم تمامًا كما كُتب.',
108
+ 'buffer.integer.digits': () => 'استخدم أرقامًا صحيحة فقط.',
109
+ 'buffer.integer.no_point': () => 'العدد الصحيح لا يحتوي على نقطة عشرية.',
110
+ 'buffer.integer.not_safe': () => 'هذا العدد الصحيح أكبر من أن يُخزَّن بأمان.',
111
+ 'buffer.money.not_amount': () => 'أدخل مبلغًا.',
112
+ 'buffer.money.scale_exceeded': (params) => `استخدم ${String(params?.['scale'] ?? 0)} منازل عشرية كحد أقصى.`,
113
+ 'buffer.quantity.scale_exceeded': (params) => `استخدم ${String(params?.['scale'] ?? 0)} منازل عشرية كحد أقصى للكمية.`,
114
+ 'buffer.percentage.digits': () => 'استخدم أرقامًا صحيحة فقط للنسبة المئوية، مع إشارة سالب اختيارية في البداية.',
115
+ 'buffer.percentage.no_point': () => 'النسبة المئوية لا تحتوي على نقطة عشرية.',
116
+ 'buffer.percentage.not_safe': () => 'هذه النسبة المئوية أكبر من أن تُخزَّن بأمان.',
117
+ 'buffer.integer.minimum': (params) => `أدخل ${String(params?.['minimum'] ?? 0)} أو أكثر.`,
118
+ 'buffer.integer.maximum': (params) => `أدخل ${String(params?.['maximum'] ?? 0)} أو أقل.`,
119
+ 'buffer.integer.range': (params) => `أدخل قيمة بين ${String(params?.['minimum'] ?? 0)} و${String(params?.['maximum'] ?? 0)}.`,
120
+ 'buffer.integer.step': (params) => `الخطوة المعلنة هي ${String(params?.['step'] ?? 1)}؛ اكتب الإجابة.`,
121
+ 'buffer.phone.e164': () => 'استخدم رقمًا دوليًا، مثل +14155550123.',
122
+ 'buffer.date.nonexistent_day': () => 'هذا اليوم غير موجود.',
123
+ 'buffer.date.format': () => 'استخدم الصيغة YYYY-MM-DD.',
124
+ },
125
+ fr: {
126
+ 'buffer.decimal.one_point': () => 'Utilisez un seul point décimal.',
127
+ 'buffer.decimal.digits': () => 'Utilisez uniquement des chiffres, avec un signe moins initial facultatif.',
128
+ 'buffer.decimal.fraction_digits': () => 'Utilisez des chiffres après le point décimal.',
129
+ 'buffer.decimal.not_canonical': () => 'Ce nombre ne peut pas être enregistré exactement tel que saisi.',
130
+ 'buffer.integer.digits': () => 'Utilisez uniquement des chiffres entiers.',
131
+ 'buffer.integer.no_point': () => "Un nombre entier n'a pas de point décimal.",
132
+ 'buffer.integer.not_safe': () => 'Ce nombre entier est trop grand pour être enregistré en toute sécurité.',
133
+ 'buffer.money.not_amount': () => 'Saisissez un montant.',
134
+ 'buffer.money.scale_exceeded': (params) => `Utilisez au maximum ${String(params?.['scale'] ?? 0)} décimales.`,
135
+ 'buffer.quantity.scale_exceeded': (params) => `Utilisez au maximum ${String(params?.['scale'] ?? 0)} décimales pour la quantité.`,
136
+ 'buffer.percentage.digits': () => 'Utilisez uniquement des chiffres entiers pour le pourcentage, avec un signe moins initial facultatif.',
137
+ 'buffer.percentage.no_point': () => "Un pourcentage n'a pas de point décimal.",
138
+ 'buffer.percentage.not_safe': () => 'Ce pourcentage est trop grand pour être enregistré en toute sécurité.',
139
+ 'buffer.integer.minimum': (params) => `Saisissez ${String(params?.['minimum'] ?? 0)} ou plus.`,
140
+ 'buffer.integer.maximum': (params) => `Saisissez ${String(params?.['maximum'] ?? 0)} ou moins.`,
141
+ 'buffer.integer.range': (params) => `Saisissez une valeur entre ${String(params?.['minimum'] ?? 0)} et ${String(params?.['maximum'] ?? 0)}.`,
142
+ 'buffer.integer.step': (params) => `Le pas déclaré est de ${String(params?.['step'] ?? 1)} ; saisissez la réponse.`,
143
+ 'buffer.phone.e164': () => 'Utilisez un numéro international, par exemple +14155550123.',
144
+ 'buffer.date.nonexistent_day': () => "Ce jour n'existe pas.",
145
+ 'buffer.date.format': () => 'Utilisez le format AAAA-MM-JJ.',
146
+ },
147
+ // Native review: the three `buffer.decimal.*` sentences name a separator without seeing the
148
+ // parser. German writes a comma; if the field accepts only a full stop, this wording misleads.
149
+ de: {
150
+ 'buffer.decimal.one_point': () => 'Verwenden Sie genau ein Dezimaltrennzeichen.',
151
+ 'buffer.decimal.digits': () => 'Verwenden Sie nur Ziffern; ein führendes Minus ist optional.',
152
+ 'buffer.decimal.fraction_digits': () => 'Verwenden Sie Ziffern nach dem Dezimaltrennzeichen.',
153
+ 'buffer.decimal.not_canonical': () => 'Diese Zahl lässt sich nicht genau so speichern, wie sie eingegeben wurde.',
154
+ 'buffer.integer.digits': () => 'Verwenden Sie nur Ziffern ohne Nachkommastellen.',
155
+ 'buffer.integer.no_point': () => 'Eine ganze Zahl hat kein Dezimaltrennzeichen.',
156
+ 'buffer.integer.not_safe': () => 'Diese ganze Zahl ist zu groß, um sie sicher zu speichern.',
157
+ 'buffer.money.not_amount': () => 'Geben Sie einen Betrag ein.',
158
+ 'buffer.money.scale_exceeded': (params) => {
159
+ const scale = Number(params?.['scale'] ?? 0);
160
+ return countForm('de', scale, {
161
+ one: `Verwenden Sie höchstens ${String(scale)} Nachkommastelle.`,
162
+ other: `Verwenden Sie höchstens ${String(scale)} Nachkommastellen.`,
163
+ });
164
+ },
165
+ 'buffer.quantity.scale_exceeded': (params) => {
166
+ const scale = Number(params?.['scale'] ?? 0);
167
+ return countForm('de', scale, {
168
+ one: `Verwenden Sie höchstens ${String(scale)} Nachkommastelle für die Menge.`,
169
+ other: `Verwenden Sie höchstens ${String(scale)} Nachkommastellen für die Menge.`,
170
+ });
171
+ },
172
+ 'buffer.percentage.digits': () => 'Verwenden Sie für den Prozentsatz nur Ziffern ohne Nachkommastellen; ein führendes Minus ist optional.',
173
+ 'buffer.percentage.no_point': () => 'Ein Prozentsatz hat kein Dezimaltrennzeichen.',
174
+ 'buffer.percentage.not_safe': () => 'Dieser Prozentsatz ist zu groß, um ihn sicher zu speichern.',
175
+ 'buffer.integer.minimum': (params) => `Geben Sie ${String(params?.['minimum'] ?? 0)} oder mehr ein.`,
176
+ 'buffer.integer.maximum': (params) => `Geben Sie ${String(params?.['maximum'] ?? 0)} oder weniger ein.`,
177
+ 'buffer.integer.range': (params) => `Geben Sie ${String(params?.['minimum'] ?? 0)} bis ${String(params?.['maximum'] ?? 0)} ein.`,
178
+ // `Schritt` is the wizard step in this catalogue (`Schritte`, `Schritt 1 von 3`), so the
179
+ // numeric increment names itself: `Schrittweite`.
180
+ 'buffer.integer.step': (params) => `Die angegebene Schrittweite ist ${String(params?.['step'] ?? 1)}; geben Sie die Antwort ein.`,
181
+ 'buffer.phone.e164': () => 'Verwenden Sie eine internationale Nummer, zum Beispiel +14155550123.',
182
+ 'buffer.date.nonexistent_day': () => 'Diesen Tag gibt es nicht.',
183
+ 'buffer.date.format': () => 'Verwenden Sie das Format JJJJ-MM-TT.',
184
+ },
185
+ // Native review: the three `buffer.decimal.*` sentences name a separator without seeing the
186
+ // parser. Russian writes a comma; if the field accepts only a full stop, this wording misleads.
187
+ ru: {
188
+ 'buffer.decimal.one_point': () => 'Используйте один десятичный разделитель.',
189
+ 'buffer.decimal.digits': () => 'Используйте только цифры, минус в начале необязателен.',
190
+ 'buffer.decimal.fraction_digits': () => 'После десятичного разделителя нужны цифры.',
191
+ 'buffer.decimal.not_canonical': () => 'Это число нельзя сохранить точно в том виде, в каком оно введено.',
192
+ 'buffer.integer.digits': () => 'Используйте только цифры без дробной части.',
193
+ 'buffer.integer.no_point': () => 'В целом числе нет десятичного разделителя.',
194
+ 'buffer.integer.not_safe': () => 'Это целое число слишком велико для надёжного сохранения.',
195
+ 'buffer.money.not_amount': () => 'Укажите сумму.',
196
+ 'buffer.money.scale_exceeded': (params) => {
197
+ const scale = Number(params?.['scale'] ?? 0);
198
+ return countForm('ru', scale, {
199
+ one: `Используйте не более ${String(scale)} знака после запятой.`,
200
+ few: `Используйте не более ${String(scale)} знаков после запятой.`,
201
+ many: `Используйте не более ${String(scale)} знаков после запятой.`,
202
+ other: `Используйте не более ${String(scale)} знаков после запятой.`,
203
+ });
204
+ },
205
+ 'buffer.quantity.scale_exceeded': (params) => {
206
+ const scale = Number(params?.['scale'] ?? 0);
207
+ return countForm('ru', scale, {
208
+ one: `Используйте не более ${String(scale)} знака после запятой для количества.`,
209
+ few: `Используйте не более ${String(scale)} знаков после запятой для количества.`,
210
+ many: `Используйте не более ${String(scale)} знаков после запятой для количества.`,
211
+ other: `Используйте не более ${String(scale)} знаков после запятой для количества.`,
212
+ });
213
+ },
214
+ 'buffer.percentage.digits': () => 'Для процента используйте только целые цифры, минус в начале необязателен.',
215
+ 'buffer.percentage.no_point': () => 'У процента нет десятичного разделителя.',
216
+ 'buffer.percentage.not_safe': () => 'Этот процент слишком велик для надёжного сохранения.',
217
+ 'buffer.integer.minimum': (params) => `Введите ${String(params?.['minimum'] ?? 0)} или больше.`,
218
+ 'buffer.integer.maximum': (params) => `Введите ${String(params?.['maximum'] ?? 0)} или меньше.`,
219
+ 'buffer.integer.range': (params) => `Введите от ${String(params?.['minimum'] ?? 0)} до ${String(params?.['maximum'] ?? 0)}.`,
220
+ // Native review on `приращения`: `шаг` alone is the wizard step in this catalogue
221
+ // (`Шаги`, `Шаг 1 из 3`), so the numeric increment is spelled out.
222
+ 'buffer.integer.step': (params) => `Заданный шаг приращения: ${String(params?.['step'] ?? 1)}; введите ответ.`,
223
+ 'buffer.phone.e164': () => 'Укажите международный номер, например +14155550123.',
224
+ 'buffer.date.nonexistent_day': () => 'Такого дня не существует.',
225
+ 'buffer.date.format': () => 'Используйте формат ГГГГ-ММ-ДД.',
226
+ },
227
+ // Native review: the three `buffer.decimal.*` sentences name a separator without seeing the
228
+ // parser. Italian writes a comma; if the field accepts only a full stop, this wording misleads.
229
+ it: {
230
+ 'buffer.decimal.one_point': () => 'Usa un solo separatore decimale.',
231
+ 'buffer.decimal.digits': () => 'Usa solo cifre; il segno meno iniziale è facoltativo.',
232
+ 'buffer.decimal.fraction_digits': () => 'Dopo il separatore decimale servono delle cifre.',
233
+ 'buffer.decimal.not_canonical': () => 'Questo numero non può essere salvato esattamente come è stato digitato.',
234
+ 'buffer.integer.digits': () => 'Usa solo cifre senza decimali.',
235
+ 'buffer.integer.no_point': () => 'Un numero intero non ha separatore decimale.',
236
+ 'buffer.integer.not_safe': () => 'Questo numero intero è troppo grande per essere salvato in modo sicuro.',
237
+ 'buffer.money.not_amount': () => 'Inserisci un importo.',
238
+ 'buffer.money.scale_exceeded': (params) => {
239
+ const scale = Number(params?.['scale'] ?? 0);
240
+ return countForm('it', scale, {
241
+ one: `Usa al massimo ${String(scale)} decimale.`,
242
+ other: `Usa al massimo ${String(scale)} decimali.`,
243
+ });
244
+ },
245
+ 'buffer.quantity.scale_exceeded': (params) => {
246
+ const scale = Number(params?.['scale'] ?? 0);
247
+ return countForm('it', scale, {
248
+ one: `Usa al massimo ${String(scale)} decimale per la quantità.`,
249
+ other: `Usa al massimo ${String(scale)} decimali per la quantità.`,
250
+ });
251
+ },
252
+ 'buffer.percentage.digits': () => 'Usa solo cifre intere per la percentuale, con un segno meno iniziale facoltativo.',
253
+ 'buffer.percentage.no_point': () => 'Una percentuale non ha separatore decimale.',
254
+ 'buffer.percentage.not_safe': () => 'Questa percentuale è troppo grande per essere salvata in modo sicuro.',
255
+ 'buffer.integer.minimum': (params) => `Inserisci ${String(params?.['minimum'] ?? 0)} o più.`,
256
+ 'buffer.integer.maximum': (params) => `Inserisci ${String(params?.['maximum'] ?? 0)} o meno.`,
257
+ 'buffer.integer.range': (params) => `Inserisci un valore tra ${String(params?.['minimum'] ?? 0)} e ${String(params?.['maximum'] ?? 0)}.`,
258
+ // `passo` is the wizard step in this catalogue (`Passi`, `Passo 1 di 3`), so the numeric
259
+ // increment names itself: `incremento`.
260
+ 'buffer.integer.step': (params) => `L'incremento dichiarato è ${String(params?.['step'] ?? 1)}; digita la risposta.`,
261
+ 'buffer.phone.e164': () => 'Usa un numero internazionale, per esempio +14155550123.',
262
+ 'buffer.date.nonexistent_day': () => 'Quel giorno non esiste.',
263
+ 'buffer.date.format': () => 'Usa il formato AAAA-MM-GG.',
264
+ },
265
+ zh: {
266
+ 'buffer.decimal.one_point': () => '请只使用一个小数点。',
267
+ 'buffer.decimal.digits': () => '请只填写数字,可在开头添加负号。',
268
+ 'buffer.decimal.fraction_digits': () => '小数点后请填写数字。',
269
+ 'buffer.decimal.not_canonical': () => '该数字无法按所填内容原样保存。',
270
+ 'buffer.integer.digits': () => '请只填写整数。',
271
+ 'buffer.integer.no_point': () => '整数不带小数点。',
272
+ 'buffer.integer.not_safe': () => '该整数过大,无法安全保存。',
273
+ 'buffer.money.not_amount': () => '请填写金额。',
274
+ 'buffer.money.scale_exceeded': (params) => `最多保留 ${String(params?.['scale'] ?? 0)} 位小数。`,
275
+ 'buffer.quantity.scale_exceeded': (params) => `数量最多保留 ${String(params?.['scale'] ?? 0)} 位小数。`,
276
+ 'buffer.percentage.digits': () => '百分比请只填写整数,可在开头添加负号。',
277
+ 'buffer.percentage.no_point': () => '百分比不带小数点。',
278
+ 'buffer.percentage.not_safe': () => '该百分比过大,无法安全保存。',
279
+ 'buffer.integer.minimum': (params) => `请填写不小于 ${String(params?.['minimum'] ?? 0)} 的值。`,
280
+ 'buffer.integer.maximum': (params) => `请填写不大于 ${String(params?.['maximum'] ?? 0)} 的值。`,
281
+ 'buffer.integer.range': (params) => `请填写 ${String(params?.['minimum'] ?? 0)} 到 ${String(params?.['maximum'] ?? 0)} 之间的值。`,
282
+ 'buffer.integer.step': (params) => `声明的步长为 ${String(params?.['step'] ?? 1)};请填写答案。`,
283
+ 'buffer.phone.e164': () => '请填写国际号码,例如 +14155550123。',
284
+ 'buffer.date.nonexistent_day': () => '该日期不存在。',
285
+ 'buffer.date.format': () => '请使用 YYYY-MM-DD 的格式。',
286
+ },
287
+ };
288
+ /** One refusal in the host's words. Both tables are closed, so neither can print a key. */
289
+ function bufferText(locale, reason, params) {
290
+ return BUFFER_COPY[locale][reason](params);
291
+ }
292
+ /** The words a locale uses for a boolean. */
293
+ const YES_NO = {
294
+ en: { yes: 'Yes', no: 'No' },
295
+ es: { yes: 'Sí', no: 'No' },
296
+ pt: { yes: 'Sim', no: 'Não' },
297
+ fr: { yes: 'Oui', no: 'Non' },
298
+ ar: { yes: 'نعم', no: 'لا' },
299
+ de: { yes: 'Ja', no: 'Nein' },
300
+ it: { yes: 'sì', no: 'no' },
301
+ ru: { yes: 'да', no: 'нет' },
302
+ zh: { yes: '是', no: '否' },
303
+ };
304
+ /**
305
+ * How a list of records reads when no entry has a scalar spelling of its own.
306
+ *
307
+ * A summary card that lists a row array has no text for each row: a row is a record, and a
308
+ * record's neutral spelling is nothing. Joining those blanks with a comma renders a separator
309
+ * between nothing, so the count in the host's own words is the honest summary. The noun is
310
+ * selected by the runtime's CLDR category, because Russian needs three forms and Chinese needs
311
+ * one frame for every count. A category a language does not use repeats the form it does use.
312
+ */
313
+ const ROW_NOUNS = {
314
+ en: { zero: 'rows', one: 'row', two: 'rows', few: 'rows', many: 'rows', other: 'rows' },
315
+ es: { zero: 'filas', one: 'fila', two: 'filas', few: 'filas', many: 'filas', other: 'filas' },
316
+ pt: {
317
+ zero: 'linhas',
318
+ one: 'linha',
319
+ two: 'linhas',
320
+ few: 'linhas',
321
+ many: 'linhas',
322
+ other: 'linhas',
323
+ },
324
+ fr: {
325
+ zero: 'lignes',
326
+ one: 'ligne',
327
+ two: 'lignes',
328
+ few: 'lignes',
329
+ many: 'lignes',
330
+ other: 'lignes',
331
+ },
332
+ // The standalone summary names a count, so Arabic's dual is the nominative `صفان`; a phrase
333
+ // governed by a preposition takes the oblique `صفين`, which the frames that need it state.
334
+ // The many arm is the singular accusative of 11-99 and the other arm the singular of 100+.
335
+ ar: { zero: 'صفوف', one: 'صف', two: 'صفان', few: 'صفوف', many: 'صفًا', other: 'صف' },
336
+ de: {
337
+ zero: 'Zeilen',
338
+ one: 'Zeile',
339
+ two: 'Zeilen',
340
+ few: 'Zeilen',
341
+ many: 'Zeilen',
342
+ other: 'Zeilen',
343
+ },
344
+ it: { zero: 'righe', one: 'riga', two: 'righe', few: 'righe', many: 'righe', other: 'righe' },
345
+ ru: { zero: 'строк', one: 'строка', two: 'строки', few: 'строки', many: 'строк', other: 'строк' },
346
+ zh: { zero: '行', one: '行', two: '行', few: '行', many: '行', other: '行' },
347
+ };
348
+ /**
349
+ * The mark a catalogue knows for one currency.
350
+ *
351
+ * A code that is absent is printed as the code itself beside the amount, so an ISO currency the
352
+ * table has no mark for stays legible rather than disappearing. Placement is `MONEY_MARK`'s
353
+ * business; this is only the mark.
354
+ */
355
+ const CURRENCY_SYMBOLS = Object.freeze({
356
+ USD: '$',
357
+ AUD: '$',
358
+ CAD: '$',
359
+ NZD: '$',
360
+ SGD: '$',
361
+ HKD: '$',
362
+ EUR: '€',
363
+ GBP: '£',
364
+ JPY: '¥',
365
+ CNY: '¥',
366
+ INR: '₹',
367
+ });
368
+ /**
369
+ * Where a locale writes the currency mark, and the gap before it, in CLDR 48's own spelling.
370
+ *
371
+ * Authored from CLDR 48 through Node 26.13.0's ICU, the same source and version as the country
372
+ * names, so the shipped path calls no `Intl`. English and Chinese write the mark first with no
373
+ * gap, Portuguese writes it first after a no-break space, and the other six write it last after
374
+ * one. Arabic's pattern also states a leading right-to-left mark; the renderer isolates the value
375
+ * instead, so the table carries placement and nothing invisible.
376
+ */
377
+ const MONEY_MARK = Object.freeze({
378
+ en: { side: 'before', gap: '' },
379
+ zh: { side: 'before', gap: '' },
380
+ pt: { side: 'before', gap: '\u00A0' },
381
+ es: { side: 'after', gap: '\u00A0' },
382
+ fr: { side: 'after', gap: '\u00A0' },
383
+ ar: { side: 'after', gap: '\u00A0' },
384
+ de: { side: 'after', gap: '\u00A0' },
385
+ it: { side: 'after', gap: '\u00A0' },
386
+ ru: { side: 'after', gap: '\u00A0' },
387
+ });
388
+ /**
389
+ * A money value as a person reads it: `$120.00`, `1234,00 €` or `€ 1.234,00`, and `AUD` beside
390
+ * the amount when the catalogue knows no mark. The scale places the fraction and is never
391
+ * printed; the currency is stated once.
392
+ *
393
+ * The amount is grouped by the vendored number table, not by a hand-written comma: German and
394
+ * Russian write `1.234,00` and `1 234,00`, while Spanish and Italian leave a four-digit integer
395
+ * ungrouped (`1234,00 €`) and group from five (`12.345,00 €`); an English grouping would state
396
+ * the wrong number to the reader. Only the integer part is grouped; the fraction keeps its
397
+ * declared scale. The sign leads the whole value in every locale, so a negative prefix currency
398
+ * is `-$1.00`, never `$-1.00`.
399
+ */
400
+ function moneyText(value, locale) {
401
+ const minor = value['minor'];
402
+ const currency = value['currency'];
403
+ const scale = value['scale'];
404
+ if (typeof minor !== 'string' || typeof currency !== 'string' || typeof scale !== 'number') {
405
+ return undefined;
406
+ }
407
+ const negative = minor.startsWith('-');
408
+ const digits = (negative ? minor.slice(1) : minor).padStart(scale + 1, '0');
409
+ const whole = scale === 0 ? digits : digits.slice(0, digits.length - scale);
410
+ const fraction = scale === 0 ? '' : `.${digits.slice(digits.length - scale)}`;
411
+ const canonical = `${negative ? '-' : ''}${whole}${fraction}`;
412
+ const amount = groupCanonicalNumericText(canonical, locale, DEFAULT_DIGIT_POLICY);
413
+ const sign = amount.startsWith('-') ? '-' : '';
414
+ const unsigned = sign === '' ? amount : amount.slice(1);
415
+ const symbol = CURRENCY_SYMBOLS[currency];
416
+ const { side, gap } = MONEY_MARK[locale];
417
+ const mark = symbol ?? currency;
418
+ // A code is a word, not a mark: CLDR separates it from the digits in every locale, including
419
+ // the two whose symbol sits flush against them.
420
+ const space = symbol === undefined ? '\u00A0' : gap;
421
+ const placed = side === 'before' ? `${mark}${space}${unsigned}` : `${unsigned}${space}${mark}`;
422
+ return `${sign}${placed}`;
423
+ }
424
+ const SIGNED_DATE_ORDER = {
425
+ en: 'day-first',
426
+ es: 'day-first',
427
+ pt: 'day-first',
428
+ fr: 'day-first',
429
+ ar: 'day-first',
430
+ de: 'day-dot',
431
+ it: 'day-first',
432
+ ru: 'day-dot',
433
+ zh: 'year-first',
434
+ };
435
+ /**
436
+ * A captured instant as the short civil reading a signature line states: `02/09/2026 11:00 UTC`,
437
+ * `02.09.2026 11:00 UTC` or `2026/09/02 11:00 UTC`, by the locale's own order.
438
+ */
439
+ function signedTimeText(iso, locale) {
440
+ const match = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})/u.exec(iso);
441
+ if (match === null)
442
+ return iso;
443
+ const year = match[1] ?? '';
444
+ const month = match[2] ?? '';
445
+ const day = match[3] ?? '';
446
+ const order = SIGNED_DATE_ORDER[locale];
447
+ let date;
448
+ switch (order) {
449
+ case 'year-first':
450
+ date = `${year}/${month}/${day}`;
451
+ break;
452
+ case 'day-dot':
453
+ date = `${day}.${month}.${year}`;
454
+ break;
455
+ case 'day-first':
456
+ date = `${day}/${month}/${year}`;
457
+ break;
458
+ default:
459
+ return assertNever(order);
460
+ }
461
+ return `${date} ${match[4] ?? ''}:${match[5] ?? ''} UTC`;
462
+ }
463
+ /**
464
+ * The localised name of an alpha-2 code, from the vendored CLDR table.
465
+ *
466
+ * The table is committed data, not a platform query: a device's ICU release would decide the
467
+ * words, so two hosts could paint different country names for the same record. A code the table
468
+ * does not carry is painted as its code rather than guessed.
469
+ */
470
+ function countryNameFor(locale, code) {
471
+ if (!/^[A-Z]{2}$/u.test(code))
472
+ return code;
473
+ return COUNTRY_NAMES[locale][code] ?? code;
474
+ }
475
+ /**
476
+ * An address as a person reads it, for a read-only value or a summary.
477
+ *
478
+ * The members are joined in postal order (lines, city, region, postal code, country), and the
479
+ * country is its localised name, not the wire's code. A record that is not a complete address
480
+ * answers `undefined`, so the generic renderer keeps the value it knows rather than this
481
+ * guessing at a half-shaped record.
482
+ */
483
+ function addressTextFor(locale, value) {
484
+ const line1 = value['line1'];
485
+ const city = value['city'];
486
+ const postalCode = value['postalCode'];
487
+ const country = value['country'];
488
+ if (typeof line1 !== 'string' ||
489
+ typeof city !== 'string' ||
490
+ typeof postalCode !== 'string' ||
491
+ typeof country !== 'string') {
492
+ return undefined;
493
+ }
494
+ const parts = [line1];
495
+ const line2 = value['line2'];
496
+ if (typeof line2 === 'string')
497
+ parts.push(line2);
498
+ parts.push(city);
499
+ const region = value['region'];
500
+ if (typeof region === 'string')
501
+ parts.push(region);
502
+ parts.push(postalCode, countryNameFor(locale, country));
503
+ return parts.filter((part) => part !== '').join(LIST_SEPARATOR[locale]);
504
+ }
505
+ /**
506
+ * The metre symbol one catalogue already prints, shared by the radius and the reading.
507
+ *
508
+ * Russian and Arabic write their own letter and Chinese its own character; the other six keep the
509
+ * international `m`. `positionMetres` and a captured coordinate state the same unit, so they read
510
+ * one table rather than two spellings that could drift.
511
+ */
512
+ const METRE_SYMBOL = {
513
+ en: 'm',
514
+ es: 'm',
515
+ pt: 'm',
516
+ fr: 'm',
517
+ ar: 'م',
518
+ de: 'm',
519
+ it: 'm',
520
+ ru: 'м',
521
+ zh: '米',
522
+ };
523
+ /** The punctuation that separates the members of a list in each catalogue. */
524
+ const LIST_SEPARATOR = {
525
+ en: ', ',
526
+ es: ', ',
527
+ pt: ', ',
528
+ fr: ', ',
529
+ ar: '، ',
530
+ de: ', ',
531
+ it: ', ',
532
+ ru: ', ',
533
+ zh: '、',
534
+ };
535
+ /**
536
+ * Localized duration unit labels for a duration control's visible affix, keyed by wire unit code.
537
+ */
538
+ const DURATION_UNIT_LABELS = Object.freeze({
539
+ en: Object.freeze({ hours: 'hours', minutes: 'minutes', seconds: 'seconds' }),
540
+ es: Object.freeze({ hours: 'horas', minutes: 'minutos', seconds: 'segundos' }),
541
+ pt: Object.freeze({ hours: 'horas', minutes: 'minutos', seconds: 'segundos' }),
542
+ fr: Object.freeze({ hours: 'heures', minutes: 'minutes', seconds: 'secondes' }),
543
+ ar: Object.freeze({ hours: 'ساعات', minutes: 'دقائق', seconds: 'ثوانٍ' }),
544
+ de: Object.freeze({ hours: 'Stunden', minutes: 'Minuten', seconds: 'Sekunden' }),
545
+ it: Object.freeze({ hours: 'ore', minutes: 'minuti', seconds: 'secondi' }),
546
+ ru: Object.freeze({ hours: 'часы', minutes: 'минуты', seconds: 'секунды' }),
547
+ zh: Object.freeze({ hours: '小时', minutes: '分钟', seconds: '秒' }),
548
+ });
549
+ /**
550
+ * CLDR plural forms for each duration unit, used when formatting a decided `{ amount, unit }`
551
+ * duration in a summary readout or read-only display.
552
+ */
553
+ const DURATION_UNIT_FORMS = Object.freeze({
554
+ en: Object.freeze({
555
+ hours: { one: 'hour', other: 'hours' },
556
+ minutes: { one: 'minute', other: 'minutes' },
557
+ seconds: { one: 'second', other: 'seconds' },
558
+ }),
559
+ es: Object.freeze({
560
+ hours: { one: 'hora', other: 'horas' },
561
+ minutes: { one: 'minuto', other: 'minutos' },
562
+ seconds: { one: 'segundo', other: 'segundos' },
563
+ }),
564
+ pt: Object.freeze({
565
+ hours: { one: 'hora', other: 'horas' },
566
+ minutes: { one: 'minuto', other: 'minutos' },
567
+ seconds: { one: 'segundo', other: 'segundos' },
568
+ }),
569
+ fr: Object.freeze({
570
+ hours: { one: 'heure', other: 'heures' },
571
+ minutes: { one: 'minute', other: 'minutes' },
572
+ seconds: { one: 'seconde', other: 'secondes' },
573
+ }),
574
+ ar: Object.freeze({
575
+ hours: { zero: 'ساعات', one: 'ساعة', two: 'ساعتان', few: 'ساعات', many: 'ساعة', other: 'ساعة' },
576
+ minutes: {
577
+ zero: 'دقائق',
578
+ one: 'دقيقة',
579
+ two: 'دقيقتان',
580
+ few: 'دقائق',
581
+ many: 'دقيقة',
582
+ other: 'دقيقة',
583
+ },
584
+ seconds: {
585
+ zero: 'ثوانٍ',
586
+ one: 'ثانية',
587
+ two: 'ثانيتان',
588
+ few: 'ثوانٍ',
589
+ many: 'ثانية',
590
+ other: 'ثانية',
591
+ },
592
+ }),
593
+ de: Object.freeze({
594
+ hours: { one: 'Stunde', other: 'Stunden' },
595
+ minutes: { one: 'Minute', other: 'Minuten' },
596
+ seconds: { one: 'Sekunde', other: 'Sekunden' },
597
+ }),
598
+ it: Object.freeze({
599
+ hours: { one: 'ora', other: 'ore' },
600
+ minutes: { one: 'minuto', other: 'minuti' },
601
+ seconds: { one: 'secondo', other: 'secondi' },
602
+ }),
603
+ ru: Object.freeze({
604
+ hours: { one: 'час', few: 'часа', many: 'часов', other: 'часов' },
605
+ minutes: { one: 'минута', few: 'минуты', many: 'минут', other: 'минут' },
606
+ seconds: { one: 'секунда', few: 'секунды', many: 'секунд', other: 'секунд' },
607
+ }),
608
+ zh: Object.freeze({
609
+ hours: { other: '小时' },
610
+ minutes: { other: '分钟' },
611
+ seconds: { other: '秒' },
612
+ }),
613
+ });
614
+ /** Canonical numeric text formatted in the locale's marks, leaving non-canonical text unchanged. */
615
+ function formatNumericText(text, locale) {
616
+ if (isDecimalString(text))
617
+ return formatDecimal(text, locale);
618
+ if (isCanonicalMoneyText(text)) {
619
+ return groupCanonicalNumericText(text, locale, DEFAULT_DIGIT_POLICY);
620
+ }
621
+ return text;
622
+ }
623
+ /** A coordinate accuracy radius formatted in the locale's marks with its metre symbol. */
624
+ function positionMetresFor(locale, metres) {
625
+ return `${formatNumericText(metres, locale)} ${METRE_SYMBOL[locale]}`;
626
+ }
627
+ /** A measured quantity `{ value, unit }` formatted in the locale's numeric marks. */
628
+ function quantityTextFor(value, locale) {
629
+ const amount = value['value'];
630
+ const unit = value['unit'];
631
+ if (typeof amount !== 'string' || typeof unit !== 'string')
632
+ return undefined;
633
+ return `${formatNumericText(amount, locale)} ${unit}`;
634
+ }
635
+ /** A decided duration `{ amount, unit }` formatted with the locale's numeric marks and plural noun. */
636
+ function durationTextFor(value, locale) {
637
+ const amount = value['amount'];
638
+ const unit = value['unit'];
639
+ if (typeof amount !== 'number' || !Number.isFinite(amount) || !isDurationUnit(unit)) {
640
+ return undefined;
641
+ }
642
+ const noun = countForm(locale, amount, DURATION_UNIT_FORMS[locale][unit]);
643
+ if (locale === 'ar' && cardinalCategory(locale, amount) === 'two') {
644
+ return noun;
645
+ }
646
+ return `${formatNumericText(String(amount), locale)} ${noun}`;
647
+ }
648
+ /** A coordinate as a person reads it: the pair, and its accuracy radius when one was captured. */
649
+ function coordinateTextFor(value, locale) {
650
+ const latitude = value['latitude'];
651
+ const longitude = value['longitude'];
652
+ if (typeof latitude !== 'string' || typeof longitude !== 'string')
653
+ return undefined;
654
+ const pair = `${latitude}${LIST_SEPARATOR[locale]}${longitude}`;
655
+ const accuracy = value['accuracy'];
656
+ return typeof accuracy === 'string'
657
+ ? `${pair} ±${formatNumericText(accuracy, locale)} ${METRE_SYMBOL[locale]}`
658
+ : pair;
659
+ }
660
+ /** Whether a record matches the wire shape of a captured `media_ref` value. */
661
+ function isMediaRefRecord(value) {
662
+ return (typeof value['id'] === 'string' &&
663
+ typeof value['mime'] === 'string' &&
664
+ typeof value['byteSize'] === 'number' &&
665
+ typeof value['sha256'] === 'string');
666
+ }
667
+ /** Whether a record matches the wire shape of a `timeslot` value (`{ slotId, localDate, start, end }`). */
668
+ function isTimeslotRecord(value) {
669
+ return (typeof value['localDate'] === 'string' &&
670
+ typeof value['start'] === 'string' &&
671
+ typeof value['end'] === 'string');
672
+ }
673
+ /** Formats one structured wire record (money, address, coordinate, quantity, or duration). */
674
+ function structuredRecordText(value, locale) {
675
+ return (moneyText(value, locale) ??
676
+ addressTextFor(locale, value) ??
677
+ coordinateTextFor(value, locale) ??
678
+ quantityTextFor(value, locale) ??
679
+ durationTextFor(value, locale));
680
+ }
681
+ function displayFor(locale) {
682
+ const words = YES_NO[locale];
683
+ const nouns = ROW_NOUNS[locale];
684
+ const display = (value, primitive, itemPrimitive) => {
685
+ if (isRecord(value) && primitive !== 'record') {
686
+ const structured = structuredRecordText(value, locale);
687
+ if (structured !== undefined)
688
+ return structured;
689
+ }
690
+ if (typeof value === 'string') {
691
+ // When the binding's primitive is known, only format strings whose primitive calls for
692
+ // locale formatting; a plain string such as "2026" or "1234567" is never re-grouped.
693
+ if (primitive === 'decimal') {
694
+ return isDecimalString(value) ? formatDecimal(value, locale) : undefined;
695
+ }
696
+ if (primitive === 'date') {
697
+ return isCivilDateString(value) ? formatCivilDate(value, locale) : undefined;
698
+ }
699
+ if (primitive === 'instant') {
700
+ return isInstantString(value) ? formatInstant(value, locale) : undefined;
701
+ }
702
+ if (primitive !== undefined)
703
+ return undefined;
704
+ // Untyped call (summary readout or direct `display` call): civil dates and UTC instants have
705
+ // unambiguous syntax, and a string carrying a fractional point is a decimal rather than a
706
+ // year or identifier such as "2026".
707
+ if (isCivilDateString(value))
708
+ return formatCivilDate(value, locale);
709
+ if (isInstantString(value))
710
+ return formatInstant(value, locale);
711
+ if (value.includes('.') && isDecimalString(value))
712
+ return formatDecimal(value, locale);
713
+ return undefined;
714
+ }
715
+ if (typeof value === 'number' && Number.isFinite(value)) {
716
+ const text = String(value);
717
+ if (isDecimalString(text))
718
+ return formatDecimal(text, locale);
719
+ }
720
+ if (typeof value === 'boolean')
721
+ return value ? words.yes : words.no;
722
+ if (Array.isArray(value)) {
723
+ // A declared repeating-record array (`itemPrimitive === 'record'`) always summarizes as a
724
+ // row count even when row member keys overlap with structured primitives such as duration.
725
+ // Untyped arrays format structured value lists (money[], quantity[], duration[], address[],
726
+ // coordinate[], media_ref[], and timeslot[]) per item instead of summarizing as rows.
727
+ const isRowArray = value.length > 0 &&
728
+ (itemPrimitive === 'record'
729
+ ? value.every(isRecord)
730
+ : itemPrimitive === undefined &&
731
+ value.every((entry) => isRecord(entry) &&
732
+ !isMediaRefRecord(entry) &&
733
+ !isTimeslotRecord(entry) &&
734
+ structuredRecordText(entry, locale) === undefined));
735
+ if (isRowArray) {
736
+ return countedText(locale, value.length, nouns);
737
+ }
738
+ return value
739
+ .map((entry) => entry === null
740
+ ? ''
741
+ : (display(entry, itemPrimitive) ?? renderValueText(entry, undefined, itemPrimitive)))
742
+ .join(LIST_SEPARATOR[locale]);
743
+ }
744
+ return undefined;
745
+ };
746
+ return display;
747
+ }
748
+ /** Byte-size unit symbols across all nine shipped locales. */
749
+ const BYTE_UNITS = Object.freeze({
750
+ en: { b: 'B', kb: 'KB', mb: 'MB' },
751
+ es: { b: 'B', kb: 'KB', mb: 'MB' },
752
+ pt: { b: 'B', kb: 'KB', mb: 'MB' },
753
+ fr: { b: 'o', kb: 'ko', mb: 'Mo' },
754
+ ar: { b: 'بايت', kb: 'كيلوبايت', mb: 'ميغابايت' },
755
+ de: { b: 'B', kb: 'KB', mb: 'MB' },
756
+ it: { b: 'B', kb: 'KB', mb: 'MB' },
757
+ ru: { b: 'Б', kb: 'КБ', mb: 'МБ' },
758
+ zh: { b: '字节', kb: 'KB', mb: 'MB' },
759
+ });
760
+ /**
761
+ * A byte count as the size a sentence states, in the locale's marks and unit symbols.
762
+ *
763
+ * This is the host's own presentation of a number the engine reported, so the catalogue owns
764
+ * the units. The bound and the offending size pass through the same function, which is what makes
765
+ * `Photo is 12 MB; the limit is 5 MB` compare two sizes rather than two integer byte counts.
766
+ */
767
+ function bytesText(bytes, locale) {
768
+ const units = BYTE_UNITS[locale];
769
+ if (bytes >= 1_000_000)
770
+ return `${decimalText(bytes / 1_000_000, locale)} ${units.mb}`;
771
+ if (bytes >= 1_000)
772
+ return `${decimalText(bytes / 1_000, locale)} ${units.kb}`;
773
+ return `${String(bytes)} ${units.b}`;
774
+ }
775
+ /**
776
+ * A byte quotient without a trailing `.0`, written with the locale's decimal mark.
777
+ *
778
+ * The quotient is a number this host computes, so the separator is the catalogue's: Spanish and
779
+ * French write `12,5 MB` / `12,5 Mo`, where an English full stop would state a different number.
780
+ */
781
+ function decimalText(value, locale) {
782
+ const text = Number.isInteger(value) ? String(value) : String(Math.round(value * 10) / 10);
783
+ return groupCanonicalNumericText(text, locale, DEFAULT_DIGIT_POLICY);
784
+ }
785
+ /** The offending size and the declared bound, each in the sentence's own units. */
786
+ function mediaSizeParts(limit, value, locale) {
787
+ return {
788
+ size: typeof value === 'number' ? bytesText(value, locale) : value,
789
+ bound: typeof limit === 'number' ? bytesText(limit, locale) : limit.join(', '),
790
+ };
791
+ }
792
+ /**
793
+ * The locales this catalogue carries.
794
+ *
795
+ * `formCopy` answers English for a locale not named here, so the list is the difference between
796
+ * "translated" and "fell back". It is exported because the parity gate cannot enumerate a private
797
+ * table: a sixth locale added below without being named here would be invisible to the check that
798
+ * every locale is complete.
799
+ */
800
+ export const FORM_COPY_LOCALES = ['en', 'es', 'pt', 'fr', 'ar', 'de', 'it', 'ru', 'zh'];
801
+ /** The catalogue's own spelling of a locale tag, or `undefined` when it is not carried. */
802
+ export function shippedLocale(tag) {
803
+ if (tag === undefined)
804
+ return undefined;
805
+ const { language } = resolveLocale(tag);
806
+ for (const locale of FORM_COPY_LOCALES) {
807
+ if (locale === language)
808
+ return locale;
809
+ }
810
+ return undefined;
811
+ }
812
+ const CATALOGUE = {
813
+ en: {
814
+ required: (label, rowName) => rowName === undefined ? `${label} is required` : `${label} in ${rowName} is required`,
815
+ cardinality: (label, bound, count, limit) => {
816
+ // A minimum of zero cannot block, so there is no sentence to state: the caller omits it.
817
+ if (bound === 'minItems' && limit === 0)
818
+ return undefined;
819
+ const limitNoun = countForm('en', limit, { one: 'entry', other: 'entries' });
820
+ const countNoun = countForm('en', count, { one: 'entry', other: 'entries' });
821
+ return bound === 'minItems'
822
+ ? `${label} needs at least ${String(limit)} ${limitNoun}. It has ${String(count)} ${countNoun}.`
823
+ : `${label} allows at most ${String(limit)} ${limitNoun}. It has ${String(count)} ${countNoun}.`;
824
+ },
825
+ mediaConstraint: (label, member, limit, value) => {
826
+ if (member === 'accept') {
827
+ const admitted = Array.isArray(limit)
828
+ ? limit.map((entry) => mediaTypePluralIn('en', entry)).join(mediaTypeSeparatorIn('en'))
829
+ : String(limit);
830
+ return `${label} takes ${admitted}. The file is ${mediaTypeNameIn('en', String(value))}.`;
831
+ }
832
+ const { size, bound } = mediaSizeParts(limit, value, 'en');
833
+ return member === 'minBytes'
834
+ ? `${label} is ${size}; the minimum is ${bound}.`
835
+ : `${label} is ${size}; the limit is ${bound}.`;
836
+ },
837
+ mediaTypeName: (mediaType) => mediaTypeNameIn('en', mediaType),
838
+ rowCount: (label, expected, actual, source, reason, ceiling) => {
839
+ const expectedNoun = countForm('en', expected, { one: 'row', other: 'rows' });
840
+ const actualNoun = countForm('en', actual, { one: 'row', other: 'rows' });
841
+ return reason === undefined
842
+ ? `${label}: expected ${String(expected)} ${expectedNoun} from ${source}; the record has ${String(actual)} ${actualNoun}.`
843
+ : reason === 'ceiling'
844
+ ? `${label}: the row count ${source} exceeds the limit of ${String(ceiling ?? expected)}.`
845
+ : `${label}: the row count ${source} is not a valid whole number.`;
846
+ },
847
+ invalidValue: (label) => `${label} no longer has that choice. Pick another one.`,
848
+ unavailableOption: (label) => `${label} is not available for this answer. Pick another option.`,
849
+ undeterminedOption: (label, optionLabel, cause) => {
850
+ const because = cause === 'deferred'
851
+ ? 'The server has not answered yet.'
852
+ : 'The check could not be answered here.';
853
+ return `Could not check whether ${optionLabel} is available for ${label}. ${because}`;
854
+ },
855
+ invalidSelection: () => 'One of your answers is no longer available. Pick another.',
856
+ withheldValue: () => 'The server did not send this value.',
857
+ deferredValue: () => 'The server did not send this value. You can still answer the field.',
858
+ notEditable: (label, access) => {
859
+ // Three different withholdings, and only one of them means "you cannot change this". A
860
+ // write-only field is editable by design; telling its user it is "not editable" states a
861
+ // state they can act on wrongly.
862
+ switch (access) {
863
+ case 'masked':
864
+ return `${label} is hidden here.`;
865
+ case 'hidden':
866
+ return `${label} is not shown.`;
867
+ case 'write_only':
868
+ return `You can add ${label}, but you cannot read it back.`;
869
+ case 'read_only':
870
+ case 'read_write':
871
+ return `${label} is not editable`;
872
+ default:
873
+ return assertNever(access);
874
+ }
875
+ },
876
+ rowKey: (label, rowName) => rowName === undefined
877
+ ? `${label}: two rows share the same key. Change one so each row is distinct.`
878
+ : `${label}: another row already uses ${rowName}. Pick a different one.`,
879
+ unanswered: (count) => countForm('en', count, {
880
+ one: `${String(count)} item is not answered yet.`,
881
+ other: `${String(count)} items are not answered yet.`,
882
+ }),
883
+ notAnswered: (label, rowName) => rowName === undefined
884
+ ? `${label} still needs an answer.`
885
+ : `${label} in ${rowName} still needs an answer.`,
886
+ rowAdded: (position, total) => {
887
+ const noun = countForm('en', total, { one: 'row', other: 'rows' });
888
+ return `Row ${String(position)} added. The list now has ${String(total)} ${noun}.`;
889
+ },
890
+ summaryHeading: () => 'Check these answers',
891
+ requiredMarker: () => 'required',
892
+ signed: (at, covered) => {
893
+ const parts = ['Signed'];
894
+ if (at !== undefined)
895
+ parts.push(signedTimeText(at, 'en'));
896
+ if (covered !== undefined) {
897
+ parts.push(countForm('en', covered, {
898
+ one: `${String(covered)} field covered`,
899
+ other: `${String(covered)} fields covered`,
900
+ }));
901
+ }
902
+ return parts.join(' · ');
903
+ },
904
+ captureSignature: (label) => `Sign ${label}`,
905
+ captureFailed: () => 'No signature was captured.',
906
+ signerFailed: () => 'The signature pad stopped responding.',
907
+ signatureUnavailable: (label) => `${label} cannot be signed on this device.`,
908
+ attachMedia: () => 'Attach file',
909
+ removeMedia: (name) => `Remove ${name}`,
910
+ mediaFailed: () => 'The file was not attached.',
911
+ mediaTooLarge: (size, limit) => `This file is ${size}; the limit is ${limit}.`,
912
+ mediaServerRefused: () => 'The server refused this file.',
913
+ sectionToggle: (title, expanded) => title === undefined
914
+ ? `${expanded ? 'Hide' : 'Show'} this section`
915
+ : `${expanded ? 'Hide' : 'Show'} ${title}`,
916
+ stepsLabel: () => 'Steps',
917
+ stepAnnouncement: (position, total, title) => `Step ${String(position)} of ${String(total)}: ${title}`,
918
+ stepStateCurrent: () => 'current step',
919
+ stepStateComplete: () => 'complete',
920
+ stepStateUnvisited: () => 'not started',
921
+ stepStateBlocked: (count) => countForm('en', count, {
922
+ one: `${String(count)} problem to fix`,
923
+ other: `${String(count)} problems to fix`,
924
+ }),
925
+ rowsEmpty: () => 'No rows yet.',
926
+ nestedListRefused: () => 'This list contains another list, and this form cannot show that yet. Move the inner list to the top level.',
927
+ rowRemoved: (count) => count === 0
928
+ ? 'Row removed. No rows remain.'
929
+ : countForm('en', count, {
930
+ one: `Row removed. ${String(count)} row remains.`,
931
+ other: `Row removed. ${String(count)} rows remain.`,
932
+ }),
933
+ rowHeading: (position, key) => key === '' ? `Row ${String(position)}` : `Row ${String(position)}: ${key}`,
934
+ rowAtPosition: (position) => `row ${String(position)}`,
935
+ addRow: () => 'Add row',
936
+ removeRow: (name) => `Remove row ${name}`,
937
+ rowRemoveFailed: () => 'The row was not removed.',
938
+ rowAddFailed: () => 'The row was not added.',
939
+ writeRefused: () => 'The change was not saved. The value is unchanged.',
940
+ rowRefused: () => 'the form did not accept the change',
941
+ loadingOptions: () => 'Loading options…',
942
+ optionsFailed: () => 'The options did not load.',
943
+ loadMoreOptions: () => 'Load more options',
944
+ rankMoveUp: (label) => `Move ${label} up`,
945
+ rankMoveDown: (label) => `Move ${label} down`,
946
+ rankRemove: (label) => `Remove ${label}`,
947
+ rankAdd: () => 'Add an option…',
948
+ rankEmpty: () => 'Choose an option to rank.',
949
+ rankAddTo: (label) => `Add an option to ${label}`,
950
+ rankMoved: (label, position, total) => `${label} is now at position ${String(position)} of ${String(total)}.`,
951
+ rankRemoved: (label, remaining) => remaining === 0
952
+ ? `${label} removed. No options remain.`
953
+ : countForm('en', remaining, {
954
+ one: `${label} removed. ${String(remaining)} option remains.`,
955
+ other: `${label} removed. ${String(remaining)} options remain.`,
956
+ }),
957
+ quantityAmount: (label) => `${label}, amount`,
958
+ quantityUnit: (label) => `${label}, unit`,
959
+ quantityStep: (label, direction) => direction === 'increase' ? `Increase ${label}` : `Decrease ${label}`,
960
+ integerStep: (label, direction) => direction === 'increase' ? `Increase ${label}` : `Decrease ${label}`,
961
+ percentageSign: () => '%',
962
+ durationUnit: (unit) => DURATION_UNIT_LABELS.en[unit],
963
+ addressLine1: () => 'Line 1',
964
+ addressLine2: () => 'Line 2',
965
+ addressCity: () => 'City',
966
+ addressRegion: () => 'Region / state',
967
+ addressPostalCode: () => 'Postal code',
968
+ addressCountry: () => 'Country',
969
+ addressCountryPlaceholder: () => 'Choose a country…',
970
+ memberScope: (label) => `in ${label}`,
971
+ countryName: (code) => countryNameFor('en', code),
972
+ coordinateLatitude: () => 'Latitude',
973
+ coordinateLongitude: () => 'Longitude',
974
+ coordinateRange: (low, high) => `Between ${low} and ${high}`,
975
+ coordinateOutOfRange: (member, low, high) => `Enter a ${member.toLowerCase()} between ${low} and ${high}.`,
976
+ coordinateNotDecimal: (member) => `${member}: enter a decimal number, for example -33.8688.`,
977
+ positionCapture: (label) => `Use my location for ${label}`,
978
+ positionRequesting: () => 'Requesting your location…',
979
+ positionIdleHint: () => 'Use your current location, or enter the coordinates below.',
980
+ positionManualHint: () => 'Enter the coordinates below.',
981
+ positionDenied: () => 'Location permission was denied. Enter the coordinates below instead.',
982
+ positionUnavailable: () => 'This device cannot provide a location. Enter the coordinates below instead.',
983
+ positionTimedOut: () => 'The location request timed out. Enter the coordinates below instead.',
984
+ positionFailed: () => 'The location could not be read.',
985
+ positionInvalidReading: () => 'The device returned a position outside the valid range. Enter the coordinates below instead.',
986
+ positionAccuracyLabel: () => 'Accuracy',
987
+ positionCapturedAtLabel: () => 'Captured',
988
+ positionMetres: (metres) => positionMetresFor('en', metres),
989
+ positionCapturedAt: (iso) => signedTimeText(iso, 'en'),
990
+ buffer: (reason, params) => bufferText('en', reason, params),
991
+ display: displayFor('en'),
992
+ selectPlaceholder: () => 'Choose an option…',
993
+ freeformTagsHint: () => 'Separate entries with commas.',
994
+ freeformTagsCount: (count) => countForm('en', count, {
995
+ one: `${String(count)} entry.`,
996
+ other: `${String(count)} entries.`,
997
+ }),
998
+ emptyOptions: () => 'This field has no options.',
999
+ noMatches: () => 'No options match that search.',
1000
+ deprecatedSuffix: () => ' (no longer recommended)',
1001
+ comboboxHint: () => 'Type to narrow the list, then press Enter to choose the highlighted option.',
1002
+ },
1003
+ es: {
1004
+ required: (label, rowName) => rowName === undefined ? `${label} es obligatorio` : `${label} en ${rowName} es obligatorio`,
1005
+ cardinality: (label, bound, count, limit) => {
1006
+ // Un mínimo de cero no puede incumplirse, así que no hay frase que mostrar.
1007
+ if (bound === 'minItems' && limit === 0)
1008
+ return undefined;
1009
+ const noun = (value) => countForm('es', value, { one: 'fila', other: 'filas' });
1010
+ return bound === 'minItems'
1011
+ ? `${label} necesita al menos ${String(limit)} ${noun(limit)}. Tiene ${String(count)} ${noun(count)}.`
1012
+ : `${label} permite como máximo ${String(limit)} ${noun(limit)}. Tiene ${String(count)} ${noun(count)}.`;
1013
+ },
1014
+ mediaConstraint: (label, member, limit, value) => {
1015
+ if (member === 'accept') {
1016
+ const admitted = Array.isArray(limit)
1017
+ ? limit.map((entry) => mediaTypePluralIn('es', entry)).join(mediaTypeSeparatorIn('es'))
1018
+ : String(limit);
1019
+ return `${label} acepta ${admitted}. El archivo es ${mediaTypeNameIn('es', String(value))}.`;
1020
+ }
1021
+ const { size, bound } = mediaSizeParts(limit, value, 'es');
1022
+ return member === 'minBytes'
1023
+ ? `${label} pesa ${size}; el mínimo es ${bound}.`
1024
+ : `${label} pesa ${size}; el límite es ${bound}.`;
1025
+ },
1026
+ mediaTypeName: (mediaType) => mediaTypeNameIn('es', mediaType),
1027
+ rowCount: (label, expected, actual, source, reason, ceiling) => {
1028
+ const noun = (value) => countForm('es', value, { one: 'fila', other: 'filas' });
1029
+ return reason === undefined
1030
+ ? `${label}: se esperaban ${String(expected)} ${noun(expected)} de ${source}; el registro tiene ${String(actual)} ${noun(actual)}.`
1031
+ : reason === 'ceiling'
1032
+ ? `${label}: el recuento ${source} supera el límite de ${String(ceiling ?? expected)}.`
1033
+ : `${label}: el recuento ${source} no es un número entero válido.`;
1034
+ },
1035
+ invalidValue: (label) => `${label} ya no ofrece ese valor`,
1036
+ unavailableOption: (label) => `${label} no se puede elegir con este registro`,
1037
+ undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
1038
+ ? `No se pudo comprobar si ${optionLabel} está disponible para ${label}. El servidor aún no ha respondido.`
1039
+ : `No se pudo comprobar si ${optionLabel} está disponible para ${label}. La comprobación no se pudo resolver aquí.`,
1040
+ invalidSelection: () => 'Ya no se ofrece un valor seleccionado',
1041
+ withheldValue: () => 'El valor está oculto.',
1042
+ deferredValue: () => 'Pendiente: el servidor retuvo este valor, así que aquí no se ha respondido.',
1043
+ notEditable: (label, access) => {
1044
+ switch (access) {
1045
+ case 'masked':
1046
+ return `${label}: el valor está oculto para ti`;
1047
+ case 'hidden':
1048
+ return `${label}: el valor no se muestra`;
1049
+ case 'write_only':
1050
+ return `${label}: puedes añadir un valor pero no volver a leerlo`;
1051
+ case 'read_only':
1052
+ case 'read_write':
1053
+ return `${label} no se puede editar`;
1054
+ default:
1055
+ return assertNever(access);
1056
+ }
1057
+ },
1058
+ rowKey: (label, rowName) => rowName === undefined
1059
+ ? `${label}: dos filas comparten la misma clave. Cambia una para que cada fila sea distinta.`
1060
+ : `${label}: otra fila ya usa ${rowName}. Elige una diferente.`,
1061
+ unanswered: (count) => countForm('es', count, {
1062
+ one: `${String(count)} elemento aún no está respondido.`,
1063
+ other: `${String(count)} elementos aún no están respondidos.`,
1064
+ }),
1065
+ notAnswered: (label, rowName) => rowName === undefined
1066
+ ? `${label} aún necesita una respuesta.`
1067
+ : `${label} en ${rowName} aún necesita una respuesta.`,
1068
+ rowAdded: (position, total) => `Fila ${String(position)} de ${String(total)} añadida.`,
1069
+ summaryHeading: () => 'Revisa el formulario',
1070
+ requiredMarker: () => 'obligatorio',
1071
+ signed: (at, covered) => {
1072
+ const parts = ['Firmado'];
1073
+ if (at !== undefined)
1074
+ parts.push(signedTimeText(at, 'es'));
1075
+ if (covered !== undefined) {
1076
+ parts.push(countForm('es', covered, {
1077
+ one: `${String(covered)} campo cubierto`,
1078
+ other: `${String(covered)} campos cubiertos`,
1079
+ }));
1080
+ }
1081
+ return parts.join(' · ');
1082
+ },
1083
+ captureSignature: (label) => `Firmar ${label}`,
1084
+ captureFailed: () => 'No se capturó ninguna firma.',
1085
+ signerFailed: () => 'El panel de firma dejó de responder.',
1086
+ signatureUnavailable: (label) => `${label} no se puede firmar en este dispositivo.`,
1087
+ attachMedia: () => 'Adjuntar archivo',
1088
+ removeMedia: (name) => `Quitar ${name}`,
1089
+ mediaFailed: () => 'El archivo no se adjuntó.',
1090
+ mediaTooLarge: (size, limit) => `El archivo pesa ${size}; el límite es ${limit}.`,
1091
+ mediaServerRefused: () => 'El servidor rechazó el archivo.',
1092
+ sectionToggle: (title, expanded) => title === undefined
1093
+ ? `${expanded ? 'Ocultar' : 'Mostrar'} sección`
1094
+ : `${title}: ${expanded ? 'ocultar' : 'mostrar'}`,
1095
+ stepsLabel: () => 'Pasos',
1096
+ stepAnnouncement: (position, total, title) => `Paso ${String(position)} de ${String(total)}: ${title}`,
1097
+ stepStateCurrent: () => 'página actual',
1098
+ stepStateComplete: () => 'completada',
1099
+ stepStateUnvisited: () => 'aún no visitada',
1100
+ stepStateBlocked: (count) => countForm('es', count, {
1101
+ one: `${String(count)} por corregir`,
1102
+ other: `${String(count)} por corregir`,
1103
+ }),
1104
+ rowsEmpty: () => 'No hay filas.',
1105
+ nestedListRefused: () => 'Esta lista contiene filas dentro de filas, y esta versión aún no puede mostrarlo. Mueve la lista interior al nivel superior del formulario.',
1106
+ rowRemoved: (count) => count === 0
1107
+ ? 'Fila eliminada. No quedan filas.'
1108
+ : countForm('es', count, {
1109
+ one: `Fila eliminada. ${String(count)} fila queda.`,
1110
+ other: `Fila eliminada. ${String(count)} filas quedan.`,
1111
+ }),
1112
+ rowHeading: (position, key) => key === '' ? `Fila ${String(position)}` : `Fila ${String(position)}: ${key}`,
1113
+ rowAtPosition: (position) => `en la posición ${String(position)}`,
1114
+ addRow: () => 'Añadir fila',
1115
+ removeRow: (name) => `Eliminar la fila ${name}`,
1116
+ rowRemoveFailed: () => 'La fila no se eliminó.',
1117
+ rowAddFailed: () => 'La fila no se añadió.',
1118
+ writeRefused: () => 'Ese cambio se rechazó y el valor quedó como estaba.',
1119
+ rowRefused: () => 'el registro rechazó el cambio',
1120
+ loadingOptions: () => 'Cargando opciones…',
1121
+ optionsFailed: () => 'Las opciones no se cargaron.',
1122
+ loadMoreOptions: () => 'Cargar más opciones',
1123
+ rankMoveUp: (label) => `Subir ${label}`,
1124
+ rankMoveDown: (label) => `Bajar ${label}`,
1125
+ rankRemove: (label) => `Quitar ${label}`,
1126
+ rankAdd: () => 'Añadir una opción…',
1127
+ rankEmpty: () => 'Elige una opción para ordenar.',
1128
+ rankAddTo: (label) => `${label}: añadir una opción`,
1129
+ rankMoved: (label, position, total) => `${label} ahora está en la posición ${String(position)} de ${String(total)}.`,
1130
+ rankRemoved: (label, remaining) => remaining === 0
1131
+ ? `${label} eliminado. No quedan opciones.`
1132
+ : countForm('es', remaining, {
1133
+ one: `${label} eliminado. Queda ${String(remaining)} opción.`,
1134
+ other: `${label} eliminado. Quedan ${String(remaining)} opciones.`,
1135
+ }),
1136
+ quantityAmount: (label) => `${label}: importe`,
1137
+ quantityUnit: (label) => `${label}: unidad`,
1138
+ quantityStep: (label, direction) => direction === 'increase' ? `Aumentar ${label} en uno` : `Disminuir ${label} en uno`,
1139
+ integerStep: (label, direction) => direction === 'increase' ? `Aumentar ${label}` : `Disminuir ${label}`,
1140
+ percentageSign: () => '%',
1141
+ durationUnit: (unit) => DURATION_UNIT_LABELS.es[unit],
1142
+ addressLine1: () => 'Línea 1',
1143
+ addressLine2: () => 'Línea 2',
1144
+ addressCity: () => 'Ciudad',
1145
+ addressRegion: () => 'Región / provincia',
1146
+ addressPostalCode: () => 'Código postal',
1147
+ addressCountry: () => 'País',
1148
+ addressCountryPlaceholder: () => 'Elige un país…',
1149
+ memberScope: (label) => `en ${label}`,
1150
+ countryName: (code) => countryNameFor('es', code),
1151
+ coordinateLatitude: () => 'Latitud',
1152
+ coordinateLongitude: () => 'Longitud',
1153
+ coordinateRange: (low, high) => `Entre ${low} y ${high}`,
1154
+ coordinateOutOfRange: (member, low, high) => `${member} debe estar entre ${low} y ${high}.`,
1155
+ coordinateNotDecimal: (member) => `${member}: usa un número decimal, por ejemplo -33.8688.`,
1156
+ positionCapture: (label) => `Usar mi ubicación para ${label}`,
1157
+ positionRequesting: () => 'Solicitando tu ubicación…',
1158
+ positionIdleHint: () => 'Usa tu ubicación actual o introduce las coordenadas abajo.',
1159
+ positionManualHint: () => 'Introduce las coordenadas abajo.',
1160
+ positionDenied: () => 'Se denegó el permiso de ubicación. Introduce las coordenadas abajo.',
1161
+ positionUnavailable: () => 'Este dispositivo no puede proporcionar una ubicación. Introduce las coordenadas abajo.',
1162
+ positionTimedOut: () => 'La solicitud de ubicación agotó el tiempo de espera. Introduce las coordenadas abajo.',
1163
+ positionFailed: () => 'No se pudo leer la ubicación.',
1164
+ positionInvalidReading: () => 'El dispositivo devolvió una posición fuera del rango válido. Introduce las coordenadas abajo.',
1165
+ positionAccuracyLabel: () => 'Precisión',
1166
+ positionCapturedAtLabel: () => 'Capturada',
1167
+ positionMetres: (metres) => positionMetresFor('es', metres),
1168
+ positionCapturedAt: (iso) => signedTimeText(iso, 'es'),
1169
+ buffer: (reason, params) => bufferText('es', reason, params),
1170
+ display: displayFor('es'),
1171
+ selectPlaceholder: () => 'Elige una opción…',
1172
+ freeformTagsHint: () => 'Separa las entradas con comas.',
1173
+ freeformTagsCount: (count) => countForm('es', count, {
1174
+ one: `${String(count)} entrada.`,
1175
+ other: `${String(count)} entradas.`,
1176
+ }),
1177
+ emptyOptions: () => 'No se ofrece ninguna opción.',
1178
+ noMatches: () => 'Ninguna opción coincide con esa búsqueda.',
1179
+ deprecatedSuffix: () => ' (obsoleta)',
1180
+ comboboxHint: () => 'Escribe para acotar la lista y pulsa Intro para elegir la opción resaltada.',
1181
+ },
1182
+ pt: {
1183
+ required: (label, rowName) => rowName === undefined ? `${label} é obrigatório` : `${label} em ${rowName} é obrigatório`,
1184
+ cardinality: (label, bound, count, limit) => {
1185
+ // Um mínimo de zero não pode falhar, por isso não há frase a mostrar.
1186
+ if (bound === 'minItems' && limit === 0)
1187
+ return undefined;
1188
+ const noun = (value) => countForm('pt', value, { one: 'linha', other: 'linhas' });
1189
+ return bound === 'minItems'
1190
+ ? `${label} precisa de pelo menos ${String(limit)} ${noun(limit)}. Tem ${String(count)} ${noun(count)}.`
1191
+ : `${label} permite no máximo ${String(limit)} ${noun(limit)}. Tem ${String(count)} ${noun(count)}.`;
1192
+ },
1193
+ mediaConstraint: (label, member, limit, value) => {
1194
+ if (member === 'accept') {
1195
+ const admitted = Array.isArray(limit)
1196
+ ? limit.map((entry) => mediaTypePluralIn('pt', entry)).join(mediaTypeSeparatorIn('pt'))
1197
+ : String(limit);
1198
+ return `${label} aceita ${admitted}. O ficheiro é ${mediaTypeNameIn('pt', String(value))}.`;
1199
+ }
1200
+ const { size, bound } = mediaSizeParts(limit, value, 'pt');
1201
+ return member === 'minBytes'
1202
+ ? `${label} pesa ${size}; o mínimo é ${bound}.`
1203
+ : `${label} pesa ${size}; o limite é ${bound}.`;
1204
+ },
1205
+ mediaTypeName: (mediaType) => mediaTypeNameIn('pt', mediaType),
1206
+ rowCount: (label, expected, actual, source, reason, ceiling) => {
1207
+ const noun = (value) => countForm('pt', value, { one: 'linha', other: 'linhas' });
1208
+ return reason === undefined
1209
+ ? `${label}: eram esperadas ${String(expected)} ${noun(expected)} de ${source}; o registo tem ${String(actual)} ${noun(actual)}.`
1210
+ : reason === 'ceiling'
1211
+ ? `${label}: a contagem ${source} excede o limite de ${String(ceiling ?? expected)}.`
1212
+ : `${label}: a contagem ${source} não é um número inteiro válido.`;
1213
+ },
1214
+ invalidValue: (label) => `${label} já não oferece esse valor`,
1215
+ unavailableOption: (label) => `${label} não pode ser escolhido com este registo`,
1216
+ undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
1217
+ ? `Não foi possível verificar se ${optionLabel} está disponível para ${label}. O servidor ainda não respondeu.`
1218
+ : `Não foi possível verificar se ${optionLabel} está disponível para ${label}. A verificação não pôde ser resolvida aqui.`,
1219
+ invalidSelection: () => 'Um valor selecionado já não é oferecido',
1220
+ withheldValue: () => 'O valor está oculto.',
1221
+ deferredValue: () => 'Pendente: o servidor retirou este valor, por isso não foi respondido aqui.',
1222
+ notEditable: (label, access) => {
1223
+ switch (access) {
1224
+ case 'masked':
1225
+ return `${label}: o valor está oculto para si`;
1226
+ case 'hidden':
1227
+ return `${label}: o valor não é mostrado`;
1228
+ case 'write_only':
1229
+ return `${label}: pode adicionar um valor mas não pode voltar a lê-lo`;
1230
+ case 'read_only':
1231
+ case 'read_write':
1232
+ return `${label} não é editável`;
1233
+ default:
1234
+ return assertNever(access);
1235
+ }
1236
+ },
1237
+ rowKey: (label, rowName) => rowName === undefined
1238
+ ? `${label}: duas linhas partilham a mesma chave. Altere uma para que cada linha seja distinta.`
1239
+ : `${label}: outra linha já usa ${rowName}. Escolha uma diferente.`,
1240
+ unanswered: (count) => countForm('pt', count, {
1241
+ one: `${String(count)} item ainda não foi respondido.`,
1242
+ other: `${String(count)} itens ainda não foram respondidos.`,
1243
+ }),
1244
+ notAnswered: (label, rowName) => rowName === undefined
1245
+ ? `${label} ainda precisa de uma resposta.`
1246
+ : `${label} em ${rowName} ainda precisa de uma resposta.`,
1247
+ rowAdded: (position, total) => `Linha ${String(position)} de ${String(total)} adicionada.`,
1248
+ summaryHeading: () => 'Verifique o formulário',
1249
+ requiredMarker: () => 'obrigatório',
1250
+ signed: (at, covered) => {
1251
+ const parts = ['Assinado'];
1252
+ if (at !== undefined)
1253
+ parts.push(signedTimeText(at, 'pt'));
1254
+ if (covered !== undefined) {
1255
+ parts.push(countForm('pt', covered, {
1256
+ one: `${String(covered)} campo coberto`,
1257
+ other: `${String(covered)} campos cobertos`,
1258
+ }));
1259
+ }
1260
+ return parts.join(' · ');
1261
+ },
1262
+ captureSignature: (label) => `Assinar ${label}`,
1263
+ captureFailed: () => 'Nenhuma assinatura foi capturada.',
1264
+ signerFailed: () => 'O painel de assinatura deixou de responder.',
1265
+ signatureUnavailable: (label) => `${label} não pode ser assinado neste dispositivo.`,
1266
+ attachMedia: () => 'Anexar ficheiro',
1267
+ removeMedia: (name) => `Remover ${name}`,
1268
+ mediaFailed: () => 'O ficheiro não foi anexado.',
1269
+ mediaTooLarge: (size, limit) => `O ficheiro tem ${size}; o limite é ${limit}.`,
1270
+ mediaServerRefused: () => 'O servidor recusou o ficheiro.',
1271
+ sectionToggle: (title, expanded) => title === undefined
1272
+ ? `${expanded ? 'Ocultar' : 'Mostrar'} secção`
1273
+ : `${title}: ${expanded ? 'ocultar' : 'mostrar'}`,
1274
+ stepsLabel: () => 'Passos',
1275
+ stepAnnouncement: (position, total, title) => `Passo ${String(position)} de ${String(total)}: ${title}`,
1276
+ stepStateCurrent: () => 'página atual',
1277
+ stepStateComplete: () => 'concluída',
1278
+ stepStateUnvisited: () => 'ainda não visitada',
1279
+ stepStateBlocked: (count) => countForm('pt', count, {
1280
+ one: `${String(count)} por corrigir`,
1281
+ other: `${String(count)} por corrigir`,
1282
+ }),
1283
+ rowsEmpty: () => 'Nenhuma linha.',
1284
+ nestedListRefused: () => 'Esta lista contém linhas dentro de linhas, e esta versão ainda não o consegue mostrar. Move a lista interior para o nível superior do formulário.',
1285
+ rowRemoved: (count) => count === 0
1286
+ ? 'Linha removida. Nenhuma linha permanece.'
1287
+ : countForm('pt', count, {
1288
+ one: `Linha removida. ${String(count)} linha permanece.`,
1289
+ other: `Linha removida. ${String(count)} linhas permanecem.`,
1290
+ }),
1291
+ rowHeading: (position, key) => key === '' ? `Linha ${String(position)}` : `Linha ${String(position)}: ${key}`,
1292
+ rowAtPosition: (position) => `na posição ${String(position)}`,
1293
+ addRow: () => 'Adicionar linha',
1294
+ removeRow: (name) => `Remover a linha ${name}`,
1295
+ rowRemoveFailed: () => 'A linha não foi removida.',
1296
+ rowAddFailed: () => 'A linha não foi adicionada.',
1297
+ writeRefused: () => 'Essa alteração foi recusada e o valor ficou como estava.',
1298
+ rowRefused: () => 'o registo recusou a alteração',
1299
+ loadingOptions: () => 'A carregar opções…',
1300
+ optionsFailed: () => 'As opções não foram carregadas.',
1301
+ loadMoreOptions: () => 'Carregar mais opções',
1302
+ rankMoveUp: (label) => `Mover ${label} para cima`,
1303
+ rankMoveDown: (label) => `Mover ${label} para baixo`,
1304
+ rankRemove: (label) => `Remover ${label}`,
1305
+ rankAdd: () => 'Adicionar uma opção…',
1306
+ rankEmpty: () => 'Escolhe uma opção para ordenar.',
1307
+ rankAddTo: (label) => `${label}: adicionar uma opção`,
1308
+ rankMoved: (label, position, total) => `${label} está agora na posição ${String(position)} de ${String(total)}.`,
1309
+ rankRemoved: (label, remaining) => remaining === 0
1310
+ ? `${label} removido. Não restam opções.`
1311
+ : countForm('pt', remaining, {
1312
+ one: `${label} removido. Resta ${String(remaining)} opção.`,
1313
+ other: `${label} removido. Restam ${String(remaining)} opções.`,
1314
+ }),
1315
+ quantityAmount: (label) => `${label}: valor`,
1316
+ quantityUnit: (label) => `${label}: unidade`,
1317
+ quantityStep: (label, direction) => direction === 'increase' ? `Aumentar ${label} em um` : `Diminuir ${label} em um`,
1318
+ integerStep: (label, direction) => direction === 'increase' ? `Aumentar ${label}` : `Diminuir ${label}`,
1319
+ percentageSign: () => '%',
1320
+ durationUnit: (unit) => DURATION_UNIT_LABELS.pt[unit],
1321
+ addressLine1: () => 'Linha 1',
1322
+ addressLine2: () => 'Linha 2',
1323
+ addressCity: () => 'Cidade',
1324
+ addressRegion: () => 'Região / estado',
1325
+ addressPostalCode: () => 'Código postal',
1326
+ addressCountry: () => 'País',
1327
+ addressCountryPlaceholder: () => 'Escolhe um país…',
1328
+ memberScope: (label) => `em ${label}`,
1329
+ countryName: (code) => countryNameFor('pt', code),
1330
+ coordinateLatitude: () => 'Latitude',
1331
+ coordinateLongitude: () => 'Longitude',
1332
+ coordinateRange: (low, high) => `Entre ${low} e ${high}`,
1333
+ coordinateOutOfRange: (member, low, high) => `${member} tem de estar entre ${low} e ${high}.`,
1334
+ coordinateNotDecimal: (member) => `${member}: usa um número decimal, por exemplo -33.8688.`,
1335
+ positionCapture: (label) => `Usar a minha localização para ${label}`,
1336
+ positionRequesting: () => 'A pedir a tua localização…',
1337
+ positionIdleHint: () => 'Usa a tua localização atual ou introduz as coordenadas abaixo.',
1338
+ positionManualHint: () => 'Introduz as coordenadas abaixo.',
1339
+ positionDenied: () => 'A permissão de localização foi recusada. Introduz as coordenadas abaixo.',
1340
+ positionUnavailable: () => 'Este dispositivo não consegue fornecer uma localização. Introduz as coordenadas abaixo.',
1341
+ positionTimedOut: () => 'O pedido de localização excedeu o tempo de espera. Introduz as coordenadas abaixo.',
1342
+ positionFailed: () => 'Não foi possível ler a localização.',
1343
+ positionInvalidReading: () => 'O dispositivo devolveu uma posição fora do intervalo válido. Introduz as coordenadas abaixo.',
1344
+ positionAccuracyLabel: () => 'Precisão',
1345
+ positionCapturedAtLabel: () => 'Capturada',
1346
+ positionMetres: (metres) => positionMetresFor('pt', metres),
1347
+ positionCapturedAt: (iso) => signedTimeText(iso, 'pt'),
1348
+ buffer: (reason, params) => bufferText('pt', reason, params),
1349
+ display: displayFor('pt'),
1350
+ selectPlaceholder: () => 'Escolhe uma opção…',
1351
+ freeformTagsHint: () => 'Separa as entradas com vírgulas.',
1352
+ freeformTagsCount: (count) => countForm('pt', count, {
1353
+ one: `${String(count)} entrada.`,
1354
+ other: `${String(count)} entradas.`,
1355
+ }),
1356
+ emptyOptions: () => 'Não há opções oferecidas.',
1357
+ noMatches: () => 'Nenhuma opção corresponde a essa pesquisa.',
1358
+ deprecatedSuffix: () => ' (obsoleta)',
1359
+ comboboxHint: () => 'Escreve para reduzir a lista e prime Enter para escolher a opção destacada.',
1360
+ },
1361
+ ar: {
1362
+ required: (label, rowName) => rowName === undefined ? `${label} مطلوب` : `${label} في ${rowName} مطلوب`,
1363
+ cardinality: (label, bound, count, limit) => {
1364
+ // الحد الأدنى صفر لا يمكن أن يُخالف، فلا جملة تُعرض.
1365
+ if (bound === 'minItems' && limit === 0)
1366
+ return undefined;
1367
+ // `يلزم` governs a nominative subject, so a minimum dual is `صفان`; `بـ` governs the
1368
+ // genitive, so a maximum dual is `صفين`. `يحتوي على` also governs the genitive. No dual
1369
+ // states a numeral, while every other category keeps its count.
1370
+ const nounForms = (dual) => ({
1371
+ zero: 'صفوف',
1372
+ one: 'صف',
1373
+ two: dual,
1374
+ few: 'صفوف',
1375
+ many: 'صفًا',
1376
+ other: 'صف',
1377
+ });
1378
+ const minimumText = countedText('ar', limit, nounForms('صفين'));
1379
+ const maximumText = countedText('ar', limit, nounForms('صفين'));
1380
+ const countText = countedText('ar', count, nounForms('صفين'));
1381
+ return bound === 'minItems'
1382
+ ? `${label} يحتاج إلى ${minimumText} على الأقل. فيه ${countText}.`
1383
+ : `${label} يسمح بـ ${maximumText} كحد أقصى. فيه ${countText}.`;
1384
+ },
1385
+ mediaConstraint: (label, member, limit, value) => {
1386
+ if (member === 'accept') {
1387
+ const admitted = Array.isArray(limit)
1388
+ ? limit.map((entry) => mediaTypePluralIn('ar', entry)).join(mediaTypeSeparatorIn('ar'))
1389
+ : String(limit);
1390
+ return `${label} يقبل ${admitted}. هذا الملف ${mediaTypeNameIn('ar', String(value))}.`;
1391
+ }
1392
+ const { size, bound } = mediaSizeParts(limit, value, 'ar');
1393
+ return member === 'minBytes'
1394
+ ? `${label} حجمه ${size}؛ الحد الأدنى ${bound}.`
1395
+ : `${label} حجمه ${size}؛ الحد الأقصى ${bound}.`;
1396
+ },
1397
+ mediaTypeName: (mediaType) => mediaTypeNameIn('ar', mediaType),
1398
+ rowCount: (label, expected, actual, source, reason, ceiling) => {
1399
+ // `كان` puts its predicate in the accusative, so the expected dual is `صفين`; `يحتوي على`
1400
+ // governs the genitive, so the actual dual is the same oblique form. The dual states no
1401
+ // numeral, while every other category keeps its count.
1402
+ const expectedText = countedText('ar', expected, {
1403
+ zero: 'صفوف',
1404
+ one: 'صف',
1405
+ two: 'صفين',
1406
+ few: 'صفوف',
1407
+ many: 'صفًا',
1408
+ other: 'صف',
1409
+ });
1410
+ const actualText = countedText('ar', actual, {
1411
+ zero: 'صفوف',
1412
+ one: 'صف',
1413
+ two: 'صفين',
1414
+ few: 'صفوف',
1415
+ many: 'صفًا',
1416
+ other: 'صف',
1417
+ });
1418
+ return reason === undefined
1419
+ ? `${label}: كان المتوقع ${expectedText} من ${source}؛ السجل يحتوي على ${actualText}.`
1420
+ : reason === 'ceiling'
1421
+ ? `${label}: عدد الصفوف ${source} يتجاوز الحد ${String(ceiling ?? expected)}.`
1422
+ : `${label}: عدد الصفوف ${source} ليس عددًا صحيحًا صالحًا.`;
1423
+ },
1424
+ invalidValue: (label) => `${label} لم يعد يعرض هذه القيمة`,
1425
+ unavailableOption: (label) => `${label} لا يمكن اختياره مع هذا السجل`,
1426
+ undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
1427
+ ? `تعذّر التحقق من توفر ${optionLabel} في ${label}. لم يردّ الخادم بعد.`
1428
+ : `تعذّر التحقق من توفر ${optionLabel} في ${label}. لم يُحسم الفحص هنا.`,
1429
+ invalidSelection: () => 'لم تعد القيمة المحددة معروضة',
1430
+ withheldValue: () => 'القيمة محجوبة.',
1431
+ deferredValue: () => 'مؤجّل — حجب الخادم هذه القيمة، لذلك لم تُجب هنا.',
1432
+ notEditable: (label, access) => {
1433
+ switch (access) {
1434
+ case 'masked':
1435
+ return `${label}: القيمة مخفية عنك`;
1436
+ case 'hidden':
1437
+ return `${label}: القيمة غير معروضة`;
1438
+ case 'write_only':
1439
+ return `${label}: يمكنك إضافة قيمة لكن لا يمكنك قراءتها مرة أخرى`;
1440
+ case 'read_only':
1441
+ case 'read_write':
1442
+ return `${label} غير قابل للتحرير`;
1443
+ default:
1444
+ return assertNever(access);
1445
+ }
1446
+ },
1447
+ rowKey: (label, rowName) => rowName === undefined
1448
+ ? `${label}: صفّان يستخدمان المفتاح نفسه. غيّر أحدهما ليكون كل صف مميزًا.`
1449
+ : `${label}: صف آخر يستخدم ${rowName} بالفعل. اختر اسمًا مختلفًا.`,
1450
+ unanswered: (count) => countForm('ar', count, {
1451
+ // The element is the subject of the clause, so the dual is `عنصران`.
1452
+ zero: `${String(count)} عناصر لم تُجب بعد.`,
1453
+ one: 'عنصر واحد لم يُجب بعد.',
1454
+ two: 'عنصران لم يُجبا بعد.',
1455
+ few: `${String(count)} عناصر لم تُجب بعد.`,
1456
+ many: `${String(count)} عنصرًا لم يُجب بعد.`,
1457
+ other: `${String(count)} عنصر لم يُجب بعد.`,
1458
+ }),
1459
+ notAnswered: (label, rowName) => rowName === undefined
1460
+ ? `${label} لا يزال بحاجة إلى إجابة.`
1461
+ : `${label} في ${rowName} لا يزال بحاجة إلى إجابة.`,
1462
+ rowAdded: (position, total) => `تمت إضافة الصف ${String(position)} من ${String(total)}.`,
1463
+ summaryHeading: () => 'يرجى مراجعة النموذج',
1464
+ requiredMarker: () => 'مطلوب',
1465
+ signed: (at, covered) => {
1466
+ const parts = ['موقّع'];
1467
+ if (at !== undefined)
1468
+ parts.push(signedTimeText(at, 'ar'));
1469
+ if (covered !== undefined) {
1470
+ // The phrase is a nominative subject, so the dual is `حقلان` with the dual adjective and
1471
+ // no numeral; every other category keeps its count.
1472
+ parts.push(countedText('ar', covered, {
1473
+ zero: 'حقول مغطاة',
1474
+ one: 'حقل مغطى',
1475
+ two: 'حقلان مغطيان',
1476
+ few: 'حقول مغطاة',
1477
+ many: 'حقلًا مغطى',
1478
+ other: 'حقل مغطى',
1479
+ }));
1480
+ }
1481
+ return parts.join(' · ');
1482
+ },
1483
+ captureSignature: (label) => `توقيع ${label}`,
1484
+ captureFailed: () => 'لم يُلتقط أي توقيع.',
1485
+ signerFailed: () => 'توقّف لوح التوقيع عن الاستجابة.',
1486
+ signatureUnavailable: (label) => `تعذّر توقيع ${label} على هذا الجهاز.`,
1487
+ attachMedia: () => 'إرفاق ملف',
1488
+ removeMedia: (name) => `إزالة ${name}`,
1489
+ mediaFailed: () => 'لم يُرفق الملف.',
1490
+ mediaTooLarge: (size, limit) => `حجم الملف ${size}؛ الحد ${limit}.`,
1491
+ mediaServerRefused: () => 'رفض الخادم هذا الملف.',
1492
+ sectionToggle: (title, expanded) => title === undefined
1493
+ ? `${expanded ? 'إخفاء' : 'إظهار'} القسم`
1494
+ : `${title}: ${expanded ? 'إخفاء' : 'إظهار'}`,
1495
+ stepsLabel: () => 'الخطوات',
1496
+ stepAnnouncement: (position, total, title) => `الخطوة ${String(position)} من ${String(total)}: ${title}`,
1497
+ stepStateCurrent: () => 'الصفحة الحالية',
1498
+ stepStateComplete: () => 'مكتملة',
1499
+ stepStateUnvisited: () => 'لم تُزر بعد',
1500
+ stepStateBlocked: (count) => countForm('ar', count, {
1501
+ // The element is the subject of the phrase, so the dual is `عنصران`.
1502
+ zero: `${String(count)} عناصر للإصلاح`,
1503
+ one: 'عنصر واحد للإصلاح',
1504
+ two: 'عنصران للإصلاح',
1505
+ few: `${String(count)} عناصر للإصلاح`,
1506
+ many: `${String(count)} عنصرًا للإصلاح`,
1507
+ other: `${String(count)} عنصر للإصلاح`,
1508
+ }),
1509
+ rowsEmpty: () => 'لا توجد صفوف.',
1510
+ nestedListRefused: () => 'هذه القائمة تحتوي على صفوف داخل صفوف، ولا يعرض هذا الإصدار ذلك بعد. انقل القائمة الداخلية إلى المستوى الأعلى من النموذج.',
1511
+ rowRemoved: (count) => count === 0
1512
+ ? 'تمت إزالة الصف. لم تبقَ صفوف.'
1513
+ : `تمت إزالة الصف. بقي ${countedText('ar', count, {
1514
+ // `بقي` leaves the remaining row as its nominative subject, so the dual is `صفان`
1515
+ // with no numeral; every other category keeps its count.
1516
+ one: 'صف',
1517
+ two: 'صفان',
1518
+ few: 'صفوف',
1519
+ many: 'صفًا',
1520
+ other: 'صف',
1521
+ })}.`,
1522
+ rowHeading: (position, key) => key === '' ? `الصف ${String(position)}` : `الصف ${String(position)}: ${key}`,
1523
+ rowAtPosition: (position) => `في الموضع ${String(position)}`,
1524
+ addRow: () => 'إضافة صف',
1525
+ removeRow: (name) => `إزالة الصف ${name}`,
1526
+ rowRemoveFailed: () => 'لم تُزل الصف.',
1527
+ rowAddFailed: () => 'لم تُضف الصف.',
1528
+ writeRefused: () => 'رُفض هذا التغيير وبقيت القيمة كما كانت.',
1529
+ rowRefused: () => 'رفض السجل التغيير',
1530
+ loadingOptions: () => 'جارٍ تحميل الخيارات…',
1531
+ optionsFailed: () => 'لم تُحمَّل الخيارات.',
1532
+ loadMoreOptions: () => 'تحميل المزيد من الخيارات',
1533
+ rankMoveUp: (label) => `نقل ${label} لأعلى`,
1534
+ rankMoveDown: (label) => `نقل ${label} لأسفل`,
1535
+ rankRemove: (label) => `إزالة ${label}`,
1536
+ rankAdd: () => 'إضافة خيار…',
1537
+ rankEmpty: () => 'اختر خيارًا للترتيب.',
1538
+ rankAddTo: (label) => `${label}: إضافة خيار`,
1539
+ rankMoved: (label, position, total) => `${label} أصبح الآن في الموضع ${String(position)} من ${String(total)}.`,
1540
+ rankRemoved: (label, remaining) => remaining === 0
1541
+ ? `تمت إزالة ${label}. لم تبقَ خيارات.`
1542
+ : countForm('ar', remaining, {
1543
+ // The option is the nominative subject of `بقي`, so the dual is `خياران`.
1544
+ one: `تمت إزالة ${label}. بقي خيار واحد.`,
1545
+ two: `تمت إزالة ${label}. بقي خياران.`,
1546
+ few: `تمت إزالة ${label}. بقي ${String(remaining)} خيارات.`,
1547
+ many: `تمت إزالة ${label}. بقي ${String(remaining)} خيارًا.`,
1548
+ other: `تمت إزالة ${label}. بقي ${String(remaining)} خيار.`,
1549
+ }),
1550
+ quantityAmount: (label) => `${label}: المبلغ`,
1551
+ quantityUnit: (label) => `${label}: الوحدة`,
1552
+ quantityStep: (label, direction) => direction === 'increase' ? `زيادة ${label} بمقدار واحد` : `إنقاص ${label} بمقدار واحد`,
1553
+ integerStep: (label, direction) => direction === 'increase' ? `زيادة ${label}` : `إنقاص ${label}`,
1554
+ percentageSign: () => '٪',
1555
+ durationUnit: (unit) => DURATION_UNIT_LABELS.ar[unit],
1556
+ addressLine1: () => 'السطر 1',
1557
+ addressLine2: () => 'السطر 2',
1558
+ addressCity: () => 'المدينة',
1559
+ addressRegion: () => 'المنطقة / الولاية',
1560
+ addressPostalCode: () => 'الرمز البريدي',
1561
+ addressCountry: () => 'الدولة',
1562
+ addressCountryPlaceholder: () => 'اختر دولة…',
1563
+ memberScope: (label) => `في ${label}`,
1564
+ countryName: (code) => countryNameFor('ar', code),
1565
+ coordinateLatitude: () => 'خط العرض',
1566
+ coordinateLongitude: () => 'خط الطول',
1567
+ coordinateRange: (low, high) => `بين ${low} و${high}`,
1568
+ coordinateOutOfRange: (member, low, high) => `${member} يجب أن يكون بين ${low} و${high}.`,
1569
+ coordinateNotDecimal: (member) => `${member}: أدخل رقمًا عشريًا، مثل -33.8688.`,
1570
+ positionCapture: (label) => `استخدم موقعي الحالي لـ ${label}`,
1571
+ positionRequesting: () => 'جارٍ طلب موقعك…',
1572
+ positionIdleHint: () => 'استخدم موقعك الحالي أو أدخل الإحداثيات أدناه.',
1573
+ positionManualHint: () => 'أدخل الإحداثيات أدناه.',
1574
+ positionDenied: () => 'تم رفض إذن الموقع. أدخل الإحداثيات أدناه.',
1575
+ positionUnavailable: () => 'لا يمكن لهذا الجهاز تحديد الموقع. أدخل الإحداثيات أدناه.',
1576
+ positionTimedOut: () => 'انتهت مهلة طلب الموقع. أدخل الإحداثيات أدناه.',
1577
+ positionFailed: () => 'تعذّرت قراءة الموقع.',
1578
+ positionInvalidReading: () => 'أعاد الجهاز موضعًا خارج النطاق الصالح. أدخل الإحداثيات أدناه.',
1579
+ positionAccuracyLabel: () => 'الدقة',
1580
+ positionCapturedAtLabel: () => 'تم الالتقاط',
1581
+ positionMetres: (metres) => positionMetresFor('ar', metres),
1582
+ positionCapturedAt: (iso) => signedTimeText(iso, 'ar'),
1583
+ buffer: (reason, params) => bufferText('ar', reason, params),
1584
+ display: displayFor('ar'),
1585
+ selectPlaceholder: () => 'اختر خيارًا…',
1586
+ freeformTagsHint: () => 'افصل بين الإدخالات بفواصل.',
1587
+ freeformTagsCount: (count) => countForm('ar', count, {
1588
+ // A count standing alone states the nominative dual `إدخالان`.
1589
+ zero: `${String(count)} إدخالات.`,
1590
+ one: 'إدخال واحد.',
1591
+ two: 'إدخالان.',
1592
+ few: `${String(count)} إدخالات.`,
1593
+ many: `${String(count)} إدخالًا.`,
1594
+ other: `${String(count)} إدخال.`,
1595
+ }),
1596
+ emptyOptions: () => 'لا توجد خيارات معروضة.',
1597
+ noMatches: () => 'لا يوجد أي خيار يطابق هذا البحث.',
1598
+ deprecatedSuffix: () => ' (مهملة)',
1599
+ comboboxHint: () => 'اكتب لتضييق القائمة ثم اضغط Enter لاختيار الخيار المميز.',
1600
+ },
1601
+ fr: {
1602
+ required: (label, rowName) => rowName === undefined
1603
+ ? `${label} est obligatoire`
1604
+ : `${label} dans ${rowName} est obligatoire`,
1605
+ cardinality: (label, bound, count, limit) => {
1606
+ // Un minimum de zéro ne peut pas être enfreint : aucune phrase à afficher.
1607
+ if (bound === 'minItems' && limit === 0)
1608
+ return undefined;
1609
+ const noun = (value) => countForm('fr', value, { one: 'ligne', other: 'lignes' });
1610
+ return bound === 'minItems'
1611
+ ? `${label} a besoin d'au moins ${String(limit)} ${noun(limit)}. Il en contient ${String(count)}.`
1612
+ : `${label} autorise au plus ${String(limit)} ${noun(limit)}. Il en contient ${String(count)}.`;
1613
+ },
1614
+ mediaConstraint: (label, member, limit, value) => {
1615
+ if (member === 'accept') {
1616
+ const admitted = Array.isArray(limit)
1617
+ ? limit.map((entry) => mediaTypePluralIn('fr', entry)).join(mediaTypeSeparatorIn('fr'))
1618
+ : String(limit);
1619
+ return `${label} accepte ${admitted}. Le fichier est ${mediaTypeNameIn('fr', String(value))}.`;
1620
+ }
1621
+ const { size, bound } = mediaSizeParts(limit, value, 'fr');
1622
+ return member === 'minBytes'
1623
+ ? `${label} pèse ${size} ; le minimum est ${bound}.`
1624
+ : `${label} pèse ${size} ; la limite est ${bound}.`;
1625
+ },
1626
+ mediaTypeName: (mediaType) => mediaTypeNameIn('fr', mediaType),
1627
+ rowCount: (label, expected, actual, source, reason, ceiling) => {
1628
+ const noun = (value) => countForm('fr', value, { one: 'ligne', other: 'lignes' });
1629
+ return reason === undefined
1630
+ ? `${label} : ${String(expected)} ${noun(expected)} étaient attendues de ${source} ; l'enregistrement en contient ${String(actual)} ${noun(actual)}.`
1631
+ : reason === 'ceiling'
1632
+ ? `${label} : le compte ${source} dépasse la limite de ${String(ceiling ?? expected)}.`
1633
+ : `${label} : le compte ${source} n'est pas un nombre entier valide.`;
1634
+ },
1635
+ invalidValue: (label) => `${label} n'offre plus cette valeur`,
1636
+ unavailableOption: (label) => `${label} ne peut pas être choisi avec cet enregistrement`,
1637
+ undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
1638
+ ? `Impossible de vérifier si ${optionLabel} est disponible pour ${label}. Le serveur n'a pas encore répondu.`
1639
+ : `Impossible de vérifier si ${optionLabel} est disponible pour ${label}. La vérification n'a pas pu être tranchée ici.`,
1640
+ invalidSelection: () => "Une valeur sélectionnée n'est plus proposée",
1641
+ withheldValue: () => 'La valeur est masquée.',
1642
+ deferredValue: () => "En attente : le serveur a retenu cette valeur, elle n'a donc pas été renseignée ici.",
1643
+ notEditable: (label, access) => {
1644
+ switch (access) {
1645
+ case 'masked':
1646
+ return `${label} : la valeur vous est cachée`;
1647
+ case 'hidden':
1648
+ return `${label} : la valeur n'est pas affichée`;
1649
+ case 'write_only':
1650
+ return `${label} : vous pouvez saisir une valeur sans pouvoir la relire`;
1651
+ case 'read_only':
1652
+ case 'read_write':
1653
+ return `${label} n'est pas modifiable`;
1654
+ default:
1655
+ return assertNever(access);
1656
+ }
1657
+ },
1658
+ rowKey: (label, rowName) => rowName === undefined
1659
+ ? `${label} : deux lignes partagent la même clé. Modifiez-en une pour que chaque ligne soit distincte.`
1660
+ : `${label} : une autre ligne utilise déjà ${rowName}. Choisissez-en un autre.`,
1661
+ unanswered: (count) => countForm('fr', count, {
1662
+ one: `${String(count)} élément n'a pas encore de réponse.`,
1663
+ other: `${String(count)} éléments n'ont pas encore de réponse.`,
1664
+ }),
1665
+ notAnswered: (label, rowName) => rowName === undefined
1666
+ ? `${label} attend encore une réponse.`
1667
+ : `${label} dans ${rowName} attend encore une réponse.`,
1668
+ rowAdded: (position, total) => `Ligne ${String(position)} sur ${String(total)} ajoutée.`,
1669
+ summaryHeading: () => 'Vérifiez le formulaire',
1670
+ requiredMarker: () => 'obligatoire',
1671
+ signed: (at, covered) => {
1672
+ const parts = ['Signé'];
1673
+ if (at !== undefined)
1674
+ parts.push(signedTimeText(at, 'fr'));
1675
+ if (covered !== undefined) {
1676
+ parts.push(countForm('fr', covered, {
1677
+ one: `${String(covered)} champ couvert`,
1678
+ other: `${String(covered)} champs couverts`,
1679
+ }));
1680
+ }
1681
+ return parts.join(' · ');
1682
+ },
1683
+ captureSignature: (label) => `Signer ${label}`,
1684
+ captureFailed: () => "Aucune signature n'a été capturée.",
1685
+ signerFailed: () => 'Le pavé de signature ne répond plus.',
1686
+ signatureUnavailable: (label) => `${label} ne peut pas être signé sur cet appareil.`,
1687
+ attachMedia: () => 'Joindre un fichier',
1688
+ removeMedia: (name) => `Retirer ${name}`,
1689
+ mediaFailed: () => "Le fichier n'a pas été joint.",
1690
+ mediaTooLarge: (size, limit) => `Ce fichier pèse ${size} ; la limite est ${limit}.`,
1691
+ mediaServerRefused: () => 'Le serveur a refusé ce fichier.',
1692
+ sectionToggle: (title, expanded) => title === undefined
1693
+ ? `${expanded ? 'Masquer' : 'Afficher'} la section`
1694
+ : `${title} : ${expanded ? 'masquer' : 'afficher'}`,
1695
+ stepsLabel: () => 'Étapes',
1696
+ stepAnnouncement: (position, total, title) => `Étape ${String(position)} sur ${String(total)} : ${title}`,
1697
+ stepStateCurrent: () => 'page actuelle',
1698
+ stepStateComplete: () => 'terminée',
1699
+ stepStateUnvisited: () => 'pas encore visitée',
1700
+ stepStateBlocked: (count) => countForm('fr', count, {
1701
+ one: `${String(count)} à corriger`,
1702
+ other: `${String(count)} à corriger`,
1703
+ }),
1704
+ rowsEmpty: () => 'Aucune ligne.',
1705
+ nestedListRefused: () => 'Cette liste contient des lignes imbriquées, que cette version ne sait pas encore afficher. Déplacez la liste intérieure au niveau supérieur du formulaire.',
1706
+ rowRemoved: (count) => count === 0
1707
+ ? 'Ligne supprimée. Aucune ligne ne reste.'
1708
+ : countForm('fr', count, {
1709
+ one: `Ligne supprimée. ${String(count)} ligne reste.`,
1710
+ other: `Ligne supprimée. ${String(count)} lignes restent.`,
1711
+ }),
1712
+ rowHeading: (position, key) => key === '' ? `Ligne ${String(position)}` : `Ligne ${String(position)} : ${key}`,
1713
+ rowAtPosition: (position) => `à la position ${String(position)}`,
1714
+ addRow: () => 'Ajouter une ligne',
1715
+ removeRow: (name) => `Supprimer la ligne ${name}`,
1716
+ rowRemoveFailed: () => "La ligne n'a pas été supprimée.",
1717
+ rowAddFailed: () => "La ligne n'a pas été ajoutée.",
1718
+ writeRefused: () => 'Cette modification a été refusée et la valeur est restée inchangée.',
1719
+ rowRefused: () => "l'enregistrement a refusé la modification",
1720
+ loadingOptions: () => 'Chargement des options…',
1721
+ optionsFailed: () => "Les options n'ont pas été chargées.",
1722
+ loadMoreOptions: () => 'Charger plus d’options',
1723
+ rankMoveUp: (label) => `Monter ${label}`,
1724
+ rankMoveDown: (label) => `Descendre ${label}`,
1725
+ rankRemove: (label) => `Retirer ${label}`,
1726
+ rankAdd: () => 'Ajouter une option…',
1727
+ rankEmpty: () => 'Choisissez une option à classer.',
1728
+ rankAddTo: (label) => `${label} : ajouter une option`,
1729
+ rankMoved: (label, position, total) => `${label} est maintenant à la position ${String(position)} sur ${String(total)}.`,
1730
+ rankRemoved: (label, remaining) => remaining === 0
1731
+ ? `${label} retiré. Aucune option ne reste.`
1732
+ : countForm('fr', remaining, {
1733
+ one: `${label} retiré. ${String(remaining)} option reste.`,
1734
+ other: `${label} retiré. ${String(remaining)} options restent.`,
1735
+ }),
1736
+ quantityAmount: (label) => `${label} : montant`,
1737
+ quantityUnit: (label) => `${label} : unité`,
1738
+ quantityStep: (label, direction) => direction === 'increase' ? `Augmenter ${label} de un` : `Diminuer ${label} de un`,
1739
+ integerStep: (label, direction) => direction === 'increase' ? `Augmenter ${label}` : `Diminuer ${label}`,
1740
+ percentageSign: () => '%',
1741
+ durationUnit: (unit) => DURATION_UNIT_LABELS.fr[unit],
1742
+ addressLine1: () => 'Ligne 1',
1743
+ addressLine2: () => 'Ligne 2',
1744
+ addressCity: () => 'Ville',
1745
+ addressRegion: () => 'Région / état',
1746
+ addressPostalCode: () => 'Code postal',
1747
+ addressCountry: () => 'Pays',
1748
+ addressCountryPlaceholder: () => 'Choisissez un pays…',
1749
+ memberScope: (label) => `dans ${label}`,
1750
+ countryName: (code) => countryNameFor('fr', code),
1751
+ coordinateLatitude: () => 'Latitude',
1752
+ coordinateLongitude: () => 'Longitude',
1753
+ coordinateRange: (low, high) => `Entre ${low} et ${high}`,
1754
+ coordinateOutOfRange: (member, low, high) => `${member} doit être entre ${low} et ${high}.`,
1755
+ coordinateNotDecimal: (member) => `${member} : saisissez un nombre décimal, par exemple -33.8688.`,
1756
+ positionCapture: (label) => `Utiliser ma position pour ${label}`,
1757
+ positionRequesting: () => 'Demande de votre position…',
1758
+ positionIdleHint: () => 'Utilisez votre position actuelle ou saisissez les coordonnées ci-dessous.',
1759
+ positionManualHint: () => 'Saisissez les coordonnées ci-dessous.',
1760
+ positionDenied: () => "L'autorisation de localisation a été refusée. Saisissez les coordonnées ci-dessous.",
1761
+ positionUnavailable: () => 'Cet appareil ne peut pas fournir de position. Saisissez les coordonnées ci-dessous.',
1762
+ positionTimedOut: () => 'La demande de localisation a expiré. Saisissez les coordonnées ci-dessous.',
1763
+ positionFailed: () => "La position n'a pas pu être lue.",
1764
+ positionInvalidReading: () => "L'appareil a renvoyé une position hors de la plage valide. Saisissez les coordonnées ci-dessous.",
1765
+ positionAccuracyLabel: () => 'Précision',
1766
+ positionCapturedAtLabel: () => 'Capturée',
1767
+ positionMetres: (metres) => positionMetresFor('fr', metres),
1768
+ positionCapturedAt: (iso) => signedTimeText(iso, 'fr'),
1769
+ buffer: (reason, params) => bufferText('fr', reason, params),
1770
+ display: displayFor('fr'),
1771
+ selectPlaceholder: () => 'Choisissez une option…',
1772
+ freeformTagsHint: () => 'Séparez les entrées par des virgules.',
1773
+ freeformTagsCount: (count) => countForm('fr', count, {
1774
+ one: `${String(count)} entrée.`,
1775
+ other: `${String(count)} entrées.`,
1776
+ }),
1777
+ emptyOptions: () => 'Aucune option offerte.',
1778
+ noMatches: () => 'Aucune option ne correspond à cette recherche.',
1779
+ deprecatedSuffix: () => ' (obsolète)',
1780
+ comboboxHint: () => 'Tapez pour réduire la liste, puis appuyez sur Entrée pour choisir l’option surlignée.',
1781
+ },
1782
+ // Native review, from the pending translation draft: `buffer.decimal.*` says
1783
+ // `Dezimaltrennzeichen` because the parser was not visible when the string was written;
1784
+ // `signerFailed` names a component;
1785
+ // `nestedListRefused` assumes a form top level the builder may not model; `addressRegion`
1786
+ // (`Bundesland`) is wrong for Switzerland; `deferredValue` could be `Zurückgestellt` instead of
1787
+ // `Aufgeschoben`. No variant is invented here.
1788
+ de: {
1789
+ required: (label, rowName) => rowName === undefined
1790
+ ? `${label} ist erforderlich`
1791
+ : `${label} in ${rowName} ist erforderlich`,
1792
+ cardinality: (label, bound, count, limit) => {
1793
+ // Ein Minimum von null kann nicht verletzt werden; es gibt keinen Satz dazu.
1794
+ if (bound === 'minItems' && limit === 0)
1795
+ return undefined;
1796
+ const limitNoun = countForm('de', limit, { one: 'Zeile', other: 'Zeilen' });
1797
+ const countNoun = countForm('de', count, { one: 'Zeile', other: 'Zeilen' });
1798
+ return bound === 'minItems'
1799
+ ? `${label} braucht mindestens ${String(limit)} ${limitNoun}. Es hat ${String(count)} ${countNoun}.`
1800
+ : `${label} erlaubt höchstens ${String(limit)} ${limitNoun}. Es hat ${String(count)} ${countNoun}.`;
1801
+ },
1802
+ mediaConstraint: (label, member, limit, value) => {
1803
+ if (member === 'accept') {
1804
+ const admitted = Array.isArray(limit)
1805
+ ? limit.map((entry) => mediaTypePluralIn('de', entry)).join(mediaTypeSeparatorIn('de'))
1806
+ : String(limit);
1807
+ return `${label} akzeptiert ${admitted}. Die Datei ist ${mediaTypeNameIn('de', String(value))}.`;
1808
+ }
1809
+ const { size, bound } = mediaSizeParts(limit, value, 'de');
1810
+ return member === 'minBytes'
1811
+ ? `${label}: ${size}; das Minimum ist ${bound}.`
1812
+ : `${label}: ${size}; das Maximum ist ${bound}.`;
1813
+ },
1814
+ mediaTypeName: (mediaType) => mediaTypeNameIn('de', mediaType),
1815
+ rowCount: (label, expected, actual, source, reason, ceiling) => {
1816
+ const expectedClause = countForm('de', expected, {
1817
+ one: `Erwartet war ${String(expected)} Zeile`,
1818
+ other: `Erwartet waren ${String(expected)} Zeilen`,
1819
+ });
1820
+ const actualNoun = countForm('de', actual, { one: 'Zeile', other: 'Zeilen' });
1821
+ return reason === undefined
1822
+ ? `${label}: ${expectedClause} aus ${source}; der Datensatz hat ${String(actual)} ${actualNoun}.`
1823
+ : reason === 'ceiling'
1824
+ ? `${label}: Die Zeilenzahl aus ${source} überschreitet die Grenze von ${String(ceiling ?? expected)}.`
1825
+ : `${label}: Die Zeilenzahl aus ${source} ist keine ganze Zahl.`;
1826
+ },
1827
+ invalidValue: (label) => `${label}: Dieser Wert wird nicht mehr angeboten`,
1828
+ unavailableOption: (label) => `${label}: Diese Option ist für diesen Datensatz nicht wählbar`,
1829
+ undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
1830
+ ? `${optionLabel} konnte für ${label} noch nicht geprüft werden. Der Server hat noch nicht geantwortet.`
1831
+ : `${optionLabel} konnte für ${label} nicht geprüft werden. Die Prüfung ließ sich hier nicht entscheiden.`,
1832
+ invalidSelection: () => 'Ein ausgewählter Wert wird nicht mehr angeboten',
1833
+ withheldValue: () => 'Der Wert wird zurückgehalten.',
1834
+ deferredValue: () => 'Aufgeschoben: Der Server hat diesen Wert zurückgehalten, deshalb steht hier keine Antwort.',
1835
+ notEditable: (label, access) => {
1836
+ switch (access) {
1837
+ case 'masked':
1838
+ return `${label}: Der Wert ist für Sie nicht sichtbar`;
1839
+ case 'hidden':
1840
+ return `${label}: Der Wert wird nicht angezeigt`;
1841
+ case 'write_only':
1842
+ return `${label}: Sie können einen Wert eingeben, ihn aber nicht wieder lesen`;
1843
+ case 'read_only':
1844
+ case 'read_write':
1845
+ return `${label} ist nicht bearbeitbar`;
1846
+ default:
1847
+ return assertNever(access);
1848
+ }
1849
+ },
1850
+ rowKey: (label, rowName) => rowName === undefined
1851
+ ? `${label}: Zwei Zeilen teilen denselben Schlüssel. Ändern Sie einen, damit jede Zeile eindeutig ist.`
1852
+ : `${label}: Eine andere Zeile verwendet bereits ${rowName}. Wählen Sie einen anderen.`,
1853
+ unanswered: (count) => countForm('de', count, {
1854
+ one: `${String(count)} Eintrag ist noch nicht beantwortet.`,
1855
+ other: `${String(count)} Einträge sind noch nicht beantwortet.`,
1856
+ }),
1857
+ notAnswered: (label, rowName) => rowName === undefined
1858
+ ? `${label} braucht noch eine Antwort.`
1859
+ : `${label} in ${rowName} braucht noch eine Antwort.`,
1860
+ rowAdded: (position, total) => `Zeile ${String(position)} von ${String(total)} hinzugefügt.`,
1861
+ summaryHeading: () => 'Bitte prüfen Sie das Formular',
1862
+ requiredMarker: () => 'erforderlich',
1863
+ signed: (at, covered) => {
1864
+ const parts = ['Unterschrieben'];
1865
+ if (at !== undefined)
1866
+ parts.push(signedTimeText(at, 'de'));
1867
+ if (covered !== undefined) {
1868
+ parts.push(countForm('de', covered, {
1869
+ one: `${String(covered)} Feld umfasst`,
1870
+ other: `${String(covered)} Felder umfasst`,
1871
+ }));
1872
+ }
1873
+ return parts.join(' · ');
1874
+ },
1875
+ captureSignature: (label) => `${label} unterschreiben`,
1876
+ captureFailed: () => 'Es wurde keine Unterschrift erfasst.',
1877
+ signerFailed: () => 'Das Signaturfeld reagiert nicht mehr.',
1878
+ signatureUnavailable: (label) => `${label} kann auf diesem Gerät nicht unterschrieben werden.`,
1879
+ attachMedia: () => 'Datei anhängen',
1880
+ removeMedia: (name) => `${name} entfernen`,
1881
+ mediaFailed: () => 'Die Datei wurde nicht angehängt.',
1882
+ mediaTooLarge: (size, limit) => `Diese Datei ist ${size} groß; zulässig sind ${limit}.`,
1883
+ mediaServerRefused: () => 'Der Server hat diese Datei abgelehnt.',
1884
+ sectionToggle: (title, expanded) => title === undefined
1885
+ ? expanded
1886
+ ? 'Abschnitt ausblenden'
1887
+ : 'Abschnitt einblenden'
1888
+ : expanded
1889
+ ? `${title}: ausblenden`
1890
+ : `${title}: einblenden`,
1891
+ stepsLabel: () => 'Schritte',
1892
+ stepAnnouncement: (position, total, title) => `Schritt ${String(position)} von ${String(total)}: ${title}`,
1893
+ stepStateCurrent: () => 'aktuelle Seite',
1894
+ stepStateComplete: () => 'abgeschlossen',
1895
+ stepStateUnvisited: () => 'noch nicht geöffnet',
1896
+ stepStateBlocked: (count) => countForm('de', count, {
1897
+ one: `${String(count)} zu beheben`,
1898
+ other: `${String(count)} zu beheben`,
1899
+ }),
1900
+ rowsEmpty: () => 'Keine Zeilen.',
1901
+ nestedListRefused: () => 'Diese Liste enthält Zeilen innerhalb von Zeilen, und diese Version kann das noch nicht anzeigen. Verschieben Sie die innere Liste auf die oberste Ebene des Formulars.',
1902
+ rowRemoved: (count) => count === 0
1903
+ ? 'Zeile entfernt. Die Liste ist leer.'
1904
+ : countForm('de', count, {
1905
+ one: `Zeile entfernt. Es bleibt ${String(count)} Zeile.`,
1906
+ other: `Zeile entfernt. Es bleiben ${String(count)} Zeilen.`,
1907
+ }),
1908
+ rowHeading: (position, key) => key === '' ? `Zeile ${String(position)}` : `Zeile ${String(position)}: ${key}`,
1909
+ rowAtPosition: (position) => `an Position ${String(position)}`,
1910
+ addRow: () => 'Zeile hinzufügen',
1911
+ removeRow: (name) => `Zeile ${name} entfernen`,
1912
+ rowRemoveFailed: () => 'Die Zeile wurde nicht entfernt.',
1913
+ rowAddFailed: () => 'Die Zeile wurde nicht hinzugefügt.',
1914
+ writeRefused: () => 'Diese Änderung wurde abgelehnt, und der Wert ist unverändert geblieben.',
1915
+ rowRefused: () => 'der Datensatz hat die Änderung abgelehnt',
1916
+ loadingOptions: () => 'Optionen werden geladen…',
1917
+ optionsFailed: () => 'Die Optionen wurden nicht geladen.',
1918
+ // Not in the pending translation draft; written here and reported for native review.
1919
+ loadMoreOptions: () => 'Weitere Optionen laden',
1920
+ rankMoveUp: (label) => `${label} nach oben verschieben`,
1921
+ rankMoveDown: (label) => `${label} nach unten verschieben`,
1922
+ rankRemove: (label) => `${label} entfernen`,
1923
+ rankAdd: () => 'Option hinzufügen…',
1924
+ rankEmpty: () => 'Wählen Sie eine Option zum Sortieren.',
1925
+ rankAddTo: (label) => `${label}: Option hinzufügen`,
1926
+ rankMoved: (label, position, total) => `${label} steht jetzt an Position ${String(position)} von ${String(total)}.`,
1927
+ rankRemoved: (label, remaining) => remaining === 0
1928
+ ? `${label} entfernt. Die Reihenfolge ist leer.`
1929
+ : countForm('de', remaining, {
1930
+ one: `${label} entfernt. Es bleibt ${String(remaining)} Option.`,
1931
+ other: `${label} entfernt. Es bleiben ${String(remaining)} Optionen.`,
1932
+ }),
1933
+ quantityAmount: (label) => `${label}: Wert`,
1934
+ quantityUnit: (label) => `${label}: Einheit`,
1935
+ quantityStep: (label, direction) => direction === 'increase' ? `${label} um eins erhöhen` : `${label} um eins verringern`,
1936
+ integerStep: (label, direction) => direction === 'increase' ? `${label} erhöhen` : `${label} verringern`,
1937
+ percentageSign: () => '%',
1938
+ durationUnit: (unit) => DURATION_UNIT_LABELS.de[unit],
1939
+ addressLine1: () => 'Adresszeile 1',
1940
+ addressLine2: () => 'Adresszeile 2',
1941
+ addressCity: () => 'Ort',
1942
+ addressRegion: () => 'Region / Bundesland',
1943
+ addressPostalCode: () => 'Postleitzahl',
1944
+ addressCountry: () => 'Land',
1945
+ addressCountryPlaceholder: () => 'Land auswählen…',
1946
+ memberScope: (label) => `im Feld ${label}`,
1947
+ countryName: (code) => countryNameFor('de', code),
1948
+ coordinateLatitude: () => 'Breitengrad',
1949
+ coordinateLongitude: () => 'Längengrad',
1950
+ coordinateRange: (low, high) => `Zwischen ${low} und ${high}`,
1951
+ coordinateOutOfRange: (member, low, high) => `${member} muss zwischen ${low} und ${high} liegen.`,
1952
+ coordinateNotDecimal: (member) => `${member}: Geben Sie eine Dezimalzahl ein, zum Beispiel -33.8688.`,
1953
+ positionCapture: (label) => `Meinen Standort für ${label} verwenden`,
1954
+ positionRequesting: () => 'Standort wird abgefragt…',
1955
+ positionIdleHint: () => 'Verwenden Sie Ihren aktuellen Standort oder geben Sie die Koordinaten unten ein.',
1956
+ positionManualHint: () => 'Geben Sie die Koordinaten unten ein.',
1957
+ positionDenied: () => 'Der Standortzugriff wurde abgelehnt. Geben Sie die Koordinaten unten ein.',
1958
+ positionUnavailable: () => 'Dieses Gerät kann keinen Standort liefern. Geben Sie die Koordinaten unten ein.',
1959
+ positionTimedOut: () => 'Die Standortabfrage hat zu lange gedauert. Geben Sie die Koordinaten unten ein.',
1960
+ positionFailed: () => 'Der Standort konnte nicht gelesen werden.',
1961
+ positionInvalidReading: () => 'Das Gerät hat eine Position außerhalb des gültigen Bereichs geliefert. Geben Sie die Koordinaten unten ein.',
1962
+ positionAccuracyLabel: () => 'Genauigkeit',
1963
+ positionCapturedAtLabel: () => 'Erfasst',
1964
+ positionMetres: (metres) => positionMetresFor('de', metres),
1965
+ positionCapturedAt: (iso) => signedTimeText(iso, 'de'),
1966
+ buffer: (reason, params) => bufferText('de', reason, params),
1967
+ display: displayFor('de'),
1968
+ selectPlaceholder: () => 'Option wählen…',
1969
+ freeformTagsHint: () => 'Trennen Sie Einträge durch Kommas.',
1970
+ freeformTagsCount: (count) => countForm('de', count, {
1971
+ one: `${String(count)} Eintrag.`,
1972
+ other: `${String(count)} Einträge.`,
1973
+ }),
1974
+ emptyOptions: () => 'Es werden keine Optionen angeboten.',
1975
+ noMatches: () => 'Keine Option entspricht dieser Suche.',
1976
+ deprecatedSuffix: () => ' (veraltet)',
1977
+ comboboxHint: () => 'Geben Sie Text ein, um die Liste einzugrenzen, und drücken Sie dann die Eingabetaste, um die markierte Option zu wählen.',
1978
+ },
1979
+ // Native review, from the pending translation draft: `buffer.decimal.*` names a separator the
1980
+ // parser may not accept; `signerFailed` names a component; `nestedListRefused` assumes a form
1981
+ // top level; `deferredValue` (`Rinviato`)
1982
+ // may read as "postponed by us". No variant is invented here.
1983
+ it: {
1984
+ required: (label, rowName) => rowName === undefined
1985
+ ? `${label}: campo obbligatorio`
1986
+ : `${label} in ${rowName}: campo obbligatorio`,
1987
+ cardinality: (label, bound, count, limit) => {
1988
+ // Un minimo di zero non può essere violato: nessuna frase da mostrare.
1989
+ if (bound === 'minItems' && limit === 0)
1990
+ return undefined;
1991
+ const limitNoun = countForm('it', limit, { one: 'riga', other: 'righe' });
1992
+ const countNoun = countForm('it', count, { one: 'riga', other: 'righe' });
1993
+ return bound === 'minItems'
1994
+ ? `${label} richiede almeno ${String(limit)} ${limitNoun}. Ne ha ${String(count)} ${countNoun}.`
1995
+ : `${label} consente al massimo ${String(limit)} ${limitNoun}. Ne ha ${String(count)} ${countNoun}.`;
1996
+ },
1997
+ mediaConstraint: (label, member, limit, value) => {
1998
+ if (member === 'accept') {
1999
+ const admitted = Array.isArray(limit)
2000
+ ? limit.map((entry) => mediaTypePluralIn('it', entry)).join(mediaTypeSeparatorIn('it'))
2001
+ : String(limit);
2002
+ return `${label} accetta ${admitted}. Il file è ${mediaTypeNameIn('it', String(value))}.`;
2003
+ }
2004
+ const { size, bound } = mediaSizeParts(limit, value, 'it');
2005
+ return member === 'minBytes'
2006
+ ? `${label}: ${size}; il minimo è ${bound}.`
2007
+ : `${label}: ${size}; il massimo è ${bound}.`;
2008
+ },
2009
+ mediaTypeName: (mediaType) => mediaTypeNameIn('it', mediaType),
2010
+ rowCount: (label, expected, actual, source, reason, ceiling) => {
2011
+ const expectedClause = countForm('it', expected, {
2012
+ one: `da ${source} ci si aspettava ${String(expected)} riga`,
2013
+ other: `da ${source} ci si aspettavano ${String(expected)} righe`,
2014
+ });
2015
+ const actualNoun = countForm('it', actual, { one: 'riga', other: 'righe' });
2016
+ return reason === undefined
2017
+ ? `${label}: ${expectedClause} e la registrazione ne ha ${String(actual)} ${actualNoun}.`
2018
+ : reason === 'ceiling'
2019
+ ? `${label}: il numero di righe da ${source} supera il limite di ${String(ceiling ?? expected)}.`
2020
+ : `${label}: il numero di righe da ${source} non è un numero intero valido.`;
2021
+ },
2022
+ invalidValue: (label) => `${label}: questo valore non è più tra le opzioni`,
2023
+ unavailableOption: (label) => `${label}: questa opzione non è selezionabile per questa registrazione`,
2024
+ undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
2025
+ ? `Non è stato possibile verificare se ${optionLabel} è disponibile per ${label}. Il server non ha ancora risposto.`
2026
+ : `Non è stato possibile verificare se ${optionLabel} è disponibile per ${label}. Il controllo non è stato risolto qui.`,
2027
+ invalidSelection: () => 'Un valore selezionato non è più tra le opzioni',
2028
+ withheldValue: () => 'Il valore è trattenuto.',
2029
+ deferredValue: () => "Rinviato: il server ha trattenuto questo valore, quindi qui non c'è una risposta.",
2030
+ notEditable: (label, access) => {
2031
+ switch (access) {
2032
+ case 'masked':
2033
+ return `${label}: il valore non ti è visibile`;
2034
+ case 'hidden':
2035
+ return `${label}: il valore non viene mostrato`;
2036
+ case 'write_only':
2037
+ return `${label}: puoi inserire un valore ma non rileggerlo`;
2038
+ case 'read_only':
2039
+ case 'read_write':
2040
+ return `${label} non è modificabile`;
2041
+ default:
2042
+ return assertNever(access);
2043
+ }
2044
+ },
2045
+ rowKey: (label, rowName) => rowName === undefined
2046
+ ? `${label}: due righe usano la stessa chiave. Cambiane una perché ogni riga sia distinta.`
2047
+ : `${label}: un'altra riga usa già ${rowName}. Scegline una diversa.`,
2048
+ unanswered: (count) => countForm('it', count, {
2049
+ one: `${String(count)} elemento senza risposta.`,
2050
+ other: `${String(count)} elementi senza risposta.`,
2051
+ }),
2052
+ notAnswered: (label, rowName) => rowName === undefined
2053
+ ? `${label} aspetta ancora una risposta.`
2054
+ : `${label} in ${rowName} aspetta ancora una risposta.`,
2055
+ rowAdded: (position, total) => `Aggiunta la riga ${String(position)} di ${String(total)}.`,
2056
+ summaryHeading: () => 'Controlla il modulo',
2057
+ requiredMarker: () => 'obbligatorio',
2058
+ signed: (at, covered) => {
2059
+ const parts = ['Firmato'];
2060
+ if (at !== undefined)
2061
+ parts.push(signedTimeText(at, 'it'));
2062
+ if (covered !== undefined) {
2063
+ parts.push(countForm('it', covered, {
2064
+ one: `${String(covered)} campo coperto`,
2065
+ other: `${String(covered)} campi coperti`,
2066
+ }));
2067
+ }
2068
+ return parts.join(' · ');
2069
+ },
2070
+ captureSignature: (label) => `Firma ${label}`,
2071
+ captureFailed: () => 'Nessuna firma è stata acquisita.',
2072
+ signerFailed: () => 'Il riquadro della firma non risponde più.',
2073
+ signatureUnavailable: (label) => `${label}: firma non disponibile su questo dispositivo.`,
2074
+ attachMedia: () => 'Allega file',
2075
+ removeMedia: (name) => `Rimuovi ${name}`,
2076
+ mediaFailed: () => 'Il file non è stato allegato.',
2077
+ mediaTooLarge: (size, limit) => `Questo file è ${size}; il limite è ${limit}.`,
2078
+ mediaServerRefused: () => 'Il server ha rifiutato questo file.',
2079
+ sectionToggle: (title, expanded) => title === undefined
2080
+ ? expanded
2081
+ ? 'Nascondi la sezione'
2082
+ : 'Mostra la sezione'
2083
+ : expanded
2084
+ ? `${title}: nascondi`
2085
+ : `${title}: mostra`,
2086
+ stepsLabel: () => 'Passi',
2087
+ stepAnnouncement: (position, total, title) => `Passo ${String(position)} di ${String(total)}: ${title}`,
2088
+ stepStateCurrent: () => 'pagina corrente',
2089
+ stepStateComplete: () => 'completata',
2090
+ stepStateUnvisited: () => 'non ancora aperta',
2091
+ stepStateBlocked: (count) => countForm('it', count, {
2092
+ one: `${String(count)} da correggere`,
2093
+ other: `${String(count)} da correggere`,
2094
+ }),
2095
+ rowsEmpty: () => 'Nessuna riga.',
2096
+ nestedListRefused: () => 'Questa lista contiene righe dentro righe e questa versione non è ancora in grado di mostrarle. Sposta la lista interna al primo livello del modulo.',
2097
+ rowRemoved: (count) => count === 0
2098
+ ? 'Riga rimossa. La lista è vuota.'
2099
+ : countForm('it', count, {
2100
+ one: `Riga rimossa. Resta ${String(count)} riga.`,
2101
+ other: `Riga rimossa. Restano ${String(count)} righe.`,
2102
+ }),
2103
+ rowHeading: (position, key) => key === '' ? `Riga ${String(position)}` : `Riga ${String(position)}: ${key}`,
2104
+ rowAtPosition: (position) => `in posizione ${String(position)}`,
2105
+ addRow: () => 'Aggiungi riga',
2106
+ removeRow: (name) => `Rimuovi la riga ${name}`,
2107
+ rowRemoveFailed: () => 'La riga non è stata rimossa.',
2108
+ rowAddFailed: () => 'La riga non è stata aggiunta.',
2109
+ writeRefused: () => "La modifica è stata rifiutata e il valore è rimasto com'era.",
2110
+ rowRefused: () => 'la registrazione ha rifiutato la modifica',
2111
+ loadingOptions: () => 'Caricamento delle opzioni…',
2112
+ optionsFailed: () => 'Le opzioni non sono state caricate.',
2113
+ // Not in the pending translation draft; written here and reported for native review.
2114
+ loadMoreOptions: () => 'Carica altre opzioni',
2115
+ rankMoveUp: (label) => `Sposta ${label} in alto`,
2116
+ rankMoveDown: (label) => `Sposta ${label} in basso`,
2117
+ rankRemove: (label) => `Rimuovi ${label}`,
2118
+ rankAdd: () => "Aggiungi un'opzione…",
2119
+ rankEmpty: () => "Scegli un'opzione da ordinare.",
2120
+ rankAddTo: (label) => `${label}: aggiungi un'opzione`,
2121
+ rankMoved: (label, position, total) => `${label} è ora in posizione ${String(position)} di ${String(total)}.`,
2122
+ rankRemoved: (label, remaining) => remaining === 0
2123
+ ? `Rimosso: ${label}. L'ordine è vuoto.`
2124
+ : countForm('it', remaining, {
2125
+ one: `Rimosso: ${label}. Resta ${String(remaining)} opzione.`,
2126
+ other: `Rimosso: ${label}. Restano ${String(remaining)} opzioni.`,
2127
+ }),
2128
+ quantityAmount: (label) => `${label}: valore`,
2129
+ quantityUnit: (label) => `${label}: unità`,
2130
+ quantityStep: (label, direction) => direction === 'increase' ? `Aumenta ${label} di uno` : `Riduci ${label} di uno`,
2131
+ integerStep: (label, direction) => direction === 'increase' ? `Aumenta ${label}` : `Riduci ${label}`,
2132
+ percentageSign: () => '%',
2133
+ durationUnit: (unit) => DURATION_UNIT_LABELS.it[unit],
2134
+ addressLine1: () => 'Indirizzo, riga 1',
2135
+ addressLine2: () => 'Indirizzo, riga 2',
2136
+ addressCity: () => 'Città',
2137
+ addressRegion: () => 'Regione / provincia',
2138
+ addressPostalCode: () => 'Codice postale',
2139
+ addressCountry: () => 'Paese',
2140
+ addressCountryPlaceholder: () => 'Scegli un paese…',
2141
+ memberScope: (label) => `nel campo ${label}`,
2142
+ countryName: (code) => countryNameFor('it', code),
2143
+ coordinateLatitude: () => 'Latitudine',
2144
+ coordinateLongitude: () => 'Longitudine',
2145
+ coordinateRange: (low, high) => `Tra ${low} e ${high}`,
2146
+ coordinateOutOfRange: (member, low, high) => `${member} deve essere tra ${low} e ${high}.`,
2147
+ coordinateNotDecimal: (member) => `${member}: inserisci un numero decimale, per esempio -33.8688.`,
2148
+ positionCapture: (label) => `Usa la mia posizione per ${label}`,
2149
+ positionRequesting: () => 'Richiesta della posizione…',
2150
+ positionIdleHint: () => 'Usa la posizione attuale oppure inserisci le coordinate qui sotto.',
2151
+ positionManualHint: () => 'Inserisci le coordinate qui sotto.',
2152
+ positionDenied: () => "L'accesso alla posizione è stato negato. Inserisci le coordinate qui sotto.",
2153
+ positionUnavailable: () => 'Questo dispositivo non può fornire la posizione. Inserisci le coordinate qui sotto.',
2154
+ positionTimedOut: () => 'La richiesta della posizione è scaduta. Inserisci le coordinate qui sotto.',
2155
+ positionFailed: () => 'Non è stato possibile leggere la posizione.',
2156
+ positionInvalidReading: () => "Il dispositivo ha restituito una posizione fuori dall'intervallo valido. Inserisci le coordinate qui sotto.",
2157
+ positionAccuracyLabel: () => 'Precisione',
2158
+ positionCapturedAtLabel: () => 'Rilevata',
2159
+ positionMetres: (metres) => positionMetresFor('it', metres),
2160
+ positionCapturedAt: (iso) => signedTimeText(iso, 'it'),
2161
+ buffer: (reason, params) => bufferText('it', reason, params),
2162
+ display: displayFor('it'),
2163
+ selectPlaceholder: () => "Scegli un'opzione…",
2164
+ freeformTagsHint: () => 'Separa le voci con le virgole.',
2165
+ freeformTagsCount: (count) => countForm('it', count, {
2166
+ one: `${String(count)} voce.`,
2167
+ other: `${String(count)} voci.`,
2168
+ }),
2169
+ emptyOptions: () => 'Nessuna opzione disponibile.',
2170
+ noMatches: () => 'Nessuna opzione corrisponde a questa ricerca.',
2171
+ // Native review: the suffix follows a label whose grammatical gender is unknown, so `obsoleto`
2172
+ // (masculine) agreed with nothing in the sentence; `in disuso` is a prepositional phrase that
2173
+ // agrees with no noun.
2174
+ deprecatedSuffix: () => ' (in disuso)',
2175
+ comboboxHint: () => "Digita per restringere la lista, poi premi Invio per scegliere l'opzione evidenziata.",
2176
+ },
2177
+ // Native review, from the pending translation draft: `buffer.decimal.*` names a separator the
2178
+ // parser may not accept; the `display` row nouns now select one, few and many through the CLDR
2179
+ // registry, but a reviewer should confirm the summary frame; `seal` is `заверить` (attest) and
2180
+ // `verifyMatch` depends on that choice; `signerFailed` names a component;
2181
+ // `nestedListRefused` assumes a form top level; `item` is
2182
+ // `пункт` in counts and `элемент` in the host chrome. No variant is invented here.
2183
+ ru: {
2184
+ required: (label, rowName) => rowName === undefined
2185
+ ? `${label}: обязательное поле`
2186
+ : `${label} в строке ${rowName}: обязательное поле`,
2187
+ cardinality: (label, bound, count, limit) => {
2188
+ // Минимум ноль нарушить нельзя, поэтому предложения нет.
2189
+ if (bound === 'minItems' && limit === 0)
2190
+ return undefined;
2191
+ const limitNoun = countForm('ru', limit, {
2192
+ one: 'строки',
2193
+ few: 'строк',
2194
+ many: 'строк',
2195
+ other: 'строк',
2196
+ });
2197
+ const countNoun = countForm('ru', count, {
2198
+ one: 'строка',
2199
+ few: 'строки',
2200
+ many: 'строк',
2201
+ other: 'строк',
2202
+ });
2203
+ return bound === 'minItems'
2204
+ ? `${label}: нужно не меньше ${String(limit)} ${limitNoun}. Сейчас в записи ${String(count)} ${countNoun}.`
2205
+ : `${label}: допускается не больше ${String(limit)} ${limitNoun}. Сейчас в записи ${String(count)} ${countNoun}.`;
2206
+ },
2207
+ mediaConstraint: (label, member, limit, value) => {
2208
+ if (member === 'accept') {
2209
+ const admitted = Array.isArray(limit)
2210
+ ? limit.map((entry) => mediaTypePluralIn('ru', entry)).join(mediaTypeSeparatorIn('ru'))
2211
+ : String(limit);
2212
+ return `${label} принимает ${admitted}. Этот файл: ${mediaTypeNameIn('ru', String(value))}.`;
2213
+ }
2214
+ const { size, bound } = mediaSizeParts(limit, value, 'ru');
2215
+ return member === 'minBytes'
2216
+ ? `${label}: ${size}; минимум ${bound}.`
2217
+ : `${label}: ${size}; максимум ${bound}.`;
2218
+ },
2219
+ mediaTypeName: (mediaType) => mediaTypeNameIn('ru', mediaType),
2220
+ rowCount: (label, expected, actual, source, reason, ceiling) => {
2221
+ // A count of one needs the feminine singular verb and noun; every other category takes
2222
+ // `ожидалось` and the counting form the registry selected, so `21 строка` and `22 строки`
2223
+ // agree the way the language does rather than the way English would.
2224
+ const one = cardinalCategory('ru', expected) === 'one';
2225
+ const noun = countForm('ru', expected, {
2226
+ one: 'строка',
2227
+ few: 'строки',
2228
+ many: 'строк',
2229
+ other: 'строк',
2230
+ });
2231
+ const verb = one ? 'ожидалась' : 'ожидалось';
2232
+ const actualNoun = countForm('ru', actual, {
2233
+ one: 'строка',
2234
+ few: 'строки',
2235
+ many: 'строк',
2236
+ other: 'строк',
2237
+ });
2238
+ return reason === undefined
2239
+ ? `${label}: по выражению ${source} ${verb} ${String(expected)} ${noun}, в записи ${String(actual)} ${actualNoun}.`
2240
+ : reason === 'ceiling'
2241
+ ? `${label}: число строк по выражению ${source} больше предела ${String(ceiling ?? expected)}.`
2242
+ : `${label}: число строк по выражению ${source} не является целым числом.`;
2243
+ },
2244
+ invalidValue: (label) => `${label}: такое значение больше не предлагается`,
2245
+ unavailableOption: (label) => `${label}: этот вариант нельзя выбрать в этой записи`,
2246
+ undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
2247
+ ? `Не удалось проверить, доступен ли ${optionLabel} для ${label}. Сервер ещё не ответил.`
2248
+ : `Не удалось проверить, доступен ли ${optionLabel} для ${label}. Здесь проверку выполнить нельзя.`,
2249
+ invalidSelection: () => 'Выбранное значение больше не предлагается',
2250
+ withheldValue: () => 'Значение не передано.',
2251
+ deferredValue: () => 'Отложено: сервер не передал это значение, поэтому здесь ответа нет.',
2252
+ notEditable: (label, access) => {
2253
+ switch (access) {
2254
+ case 'masked':
2255
+ return `${label}: значение скрыто от вас`;
2256
+ case 'hidden':
2257
+ return `${label}: значение не отображается`;
2258
+ case 'write_only':
2259
+ return `${label}: значение можно ввести, но нельзя прочитать`;
2260
+ case 'read_only':
2261
+ case 'read_write':
2262
+ return `${label}: изменить нельзя`;
2263
+ default:
2264
+ return assertNever(access);
2265
+ }
2266
+ },
2267
+ rowKey: (label, rowName) => rowName === undefined
2268
+ ? `${label}: две строки используют один ключ. Измените одну, чтобы строки различались.`
2269
+ : `${label}: другая строка уже использует ${rowName}. Выберите другой.`,
2270
+ unanswered: (count) => countForm('ru', count, {
2271
+ one: `Без ответа: ${String(count)} пункт.`,
2272
+ few: `Без ответа: ${String(count)} пункта.`,
2273
+ many: `Без ответа: ${String(count)} пунктов.`,
2274
+ other: `Без ответа: ${String(count)} пунктов.`,
2275
+ }),
2276
+ notAnswered: (label, rowName) => rowName === undefined
2277
+ ? `${label}: ответа пока нет.`
2278
+ : `${label} в строке ${rowName}: ответа пока нет.`,
2279
+ rowAdded: (position, total) => `Добавлена строка ${String(position)} из ${String(total)}.`,
2280
+ summaryHeading: () => 'Проверьте форму',
2281
+ requiredMarker: () => 'обязательно',
2282
+ signed: (at, covered) => {
2283
+ const parts = ['Подписано'];
2284
+ if (at !== undefined)
2285
+ parts.push(signedTimeText(at, 'ru'));
2286
+ if (covered !== undefined) {
2287
+ parts.push(countForm('ru', covered, {
2288
+ one: `охвачено ${String(covered)} поле`,
2289
+ few: `охвачено ${String(covered)} поля`,
2290
+ many: `охвачено ${String(covered)} полей`,
2291
+ other: `охвачено ${String(covered)} полей`,
2292
+ }));
2293
+ }
2294
+ return parts.join(' · ');
2295
+ },
2296
+ captureSignature: (label) => `Подписать: ${label}`,
2297
+ captureFailed: () => 'Подпись не получена.',
2298
+ signerFailed: () => 'Поле подписи перестало отвечать.',
2299
+ signatureUnavailable: (label) => `Подписать ${label} на этом устройстве нельзя.`,
2300
+ attachMedia: () => 'Прикрепить файл',
2301
+ removeMedia: (name) => `Удалить: ${name}`,
2302
+ mediaFailed: () => 'Файл не прикреплён.',
2303
+ mediaTooLarge: (size, limit) => `Размер файла: ${size}; предел: ${limit}.`,
2304
+ mediaServerRefused: () => 'Сервер отклонил этот файл.',
2305
+ sectionToggle: (title, expanded) => title === undefined
2306
+ ? expanded
2307
+ ? 'Свернуть раздел'
2308
+ : 'Развернуть раздел'
2309
+ : expanded
2310
+ ? `${title}: свернуть`
2311
+ : `${title}: развернуть`,
2312
+ stepsLabel: () => 'Шаги',
2313
+ stepAnnouncement: (position, total, title) => `Шаг ${String(position)} из ${String(total)}: ${title}`,
2314
+ stepStateCurrent: () => 'текущая страница',
2315
+ stepStateComplete: () => 'завершена',
2316
+ stepStateUnvisited: () => 'ещё не открыта',
2317
+ stepStateBlocked: (count) => countForm('ru', count, {
2318
+ one: `Исправить: ${String(count)}`,
2319
+ few: `Исправить: ${String(count)}`,
2320
+ many: `Исправить: ${String(count)}`,
2321
+ other: `Исправить: ${String(count)}`,
2322
+ }),
2323
+ rowsEmpty: () => 'Строк нет.',
2324
+ nestedListRefused: () => 'В этом списке есть строки внутри строк, а эта версия пока не умеет их показывать. Перенесите внутренний список на верхний уровень формы.',
2325
+ rowRemoved: (count) => count === 0
2326
+ ? 'Строка удалена. Список пуст.'
2327
+ : countForm('ru', count, {
2328
+ one: `Строка удалена. Осталась ${String(count)} строка.`,
2329
+ few: `Строка удалена. Осталось ${String(count)} строки.`,
2330
+ many: `Строка удалена. Осталось ${String(count)} строк.`,
2331
+ other: `Строка удалена. Осталось ${String(count)} строк.`,
2332
+ }),
2333
+ rowHeading: (position, key) => key === '' ? `Строка ${String(position)}` : `Строка ${String(position)}: ${key}`,
2334
+ rowAtPosition: (position) => `на позиции ${String(position)}`,
2335
+ addRow: () => 'Добавить строку',
2336
+ removeRow: (name) => `Удалить строку: ${name}`,
2337
+ rowRemoveFailed: () => 'Строка не удалена.',
2338
+ rowAddFailed: () => 'Строка не добавлена.',
2339
+ writeRefused: () => 'Изменение отклонено, значение осталось прежним.',
2340
+ rowRefused: () => 'запись отклонила изменение',
2341
+ loadingOptions: () => 'Загружаем варианты…',
2342
+ optionsFailed: () => 'Варианты не загрузились.',
2343
+ // Not in the pending translation draft; written here and reported for native review.
2344
+ loadMoreOptions: () => 'Загрузить ещё варианты',
2345
+ rankMoveUp: (label) => `Переместить выше: ${label}`,
2346
+ rankMoveDown: (label) => `Переместить ниже: ${label}`,
2347
+ rankRemove: (label) => `Удалить: ${label}`,
2348
+ rankAdd: () => 'Добавить вариант…',
2349
+ rankEmpty: () => 'Выберите вариант для упорядочивания.',
2350
+ rankAddTo: (label) => `${label}: добавить вариант`,
2351
+ rankMoved: (label, position, total) => `${label}: теперь на позиции ${String(position)} из ${String(total)}.`,
2352
+ rankRemoved: (label, remaining) => remaining === 0
2353
+ ? `Удалено: ${label}. Список пуст.`
2354
+ : countForm('ru', remaining, {
2355
+ one: `Удалено: ${label}. Остался ${String(remaining)} вариант.`,
2356
+ few: `Удалено: ${label}. Осталось ${String(remaining)} варианта.`,
2357
+ many: `Удалено: ${label}. Осталось ${String(remaining)} вариантов.`,
2358
+ other: `Удалено: ${label}. Осталось ${String(remaining)} вариантов.`,
2359
+ }),
2360
+ quantityAmount: (label) => `${label}: количество`,
2361
+ quantityUnit: (label) => `${label}: единица`,
2362
+ quantityStep: (label, direction) => direction === 'increase'
2363
+ ? `Увеличить на единицу: ${label}`
2364
+ : `Уменьшить на единицу: ${label}`,
2365
+ integerStep: (label, direction) => direction === 'increase' ? `Увеличить: ${label}` : `Уменьшить: ${label}`,
2366
+ percentageSign: () => '%',
2367
+ durationUnit: (unit) => DURATION_UNIT_LABELS.ru[unit],
2368
+ addressLine1: () => 'Строка адреса 1',
2369
+ addressLine2: () => 'Строка адреса 2',
2370
+ addressCity: () => 'Город',
2371
+ addressRegion: () => 'Регион / область',
2372
+ addressPostalCode: () => 'Почтовый индекс',
2373
+ addressCountry: () => 'Страна',
2374
+ addressCountryPlaceholder: () => 'Выберите страну…',
2375
+ memberScope: (label) => `в поле «${label}»`,
2376
+ countryName: (code) => countryNameFor('ru', code),
2377
+ coordinateLatitude: () => 'Широта',
2378
+ coordinateLongitude: () => 'Долгота',
2379
+ coordinateRange: (low, high) => `От ${low} до ${high}`,
2380
+ coordinateOutOfRange: (member, low, high) => `${member}: значение должно быть от ${low} до ${high}.`,
2381
+ coordinateNotDecimal: (member) => `${member}: укажите десятичное число, например -33.8688.`,
2382
+ positionCapture: (label) => `Использовать моё местоположение: ${label}`,
2383
+ positionRequesting: () => 'Запрашиваем местоположение…',
2384
+ positionIdleHint: () => 'Используйте текущее местоположение или укажите координаты ниже.',
2385
+ positionManualHint: () => 'Укажите координаты ниже.',
2386
+ positionDenied: () => 'Доступ к местоположению запрещён. Укажите координаты ниже.',
2387
+ positionUnavailable: () => 'Это устройство не может определить местоположение. Укажите координаты ниже.',
2388
+ positionTimedOut: () => 'Время ожидания местоположения истекло. Укажите координаты ниже.',
2389
+ positionFailed: () => 'Не удалось получить местоположение.',
2390
+ positionInvalidReading: () => 'Устройство вернуло координаты вне допустимого диапазона. Укажите координаты ниже.',
2391
+ positionAccuracyLabel: () => 'Точность',
2392
+ positionCapturedAtLabel: () => 'Получено',
2393
+ positionMetres: (metres) => positionMetresFor('ru', metres),
2394
+ positionCapturedAt: (iso) => signedTimeText(iso, 'ru'),
2395
+ buffer: (reason, params) => bufferText('ru', reason, params),
2396
+ display: displayFor('ru'),
2397
+ selectPlaceholder: () => 'Выберите вариант…',
2398
+ freeformTagsHint: () => 'Разделяйте элементы запятыми.',
2399
+ freeformTagsCount: (count) => countForm('ru', count, {
2400
+ one: `${String(count)} элемент.`,
2401
+ few: `${String(count)} элемента.`,
2402
+ many: `${String(count)} элементов.`,
2403
+ other: `${String(count)} элементов.`,
2404
+ }),
2405
+ emptyOptions: () => 'Варианты не предлагаются.',
2406
+ noMatches: () => 'Ни один вариант не соответствует этому поиску.',
2407
+ deprecatedSuffix: () => ' (устарело)',
2408
+ comboboxHint: () => 'Введите текст, чтобы сузить список, затем нажмите Enter, чтобы выбрать выделенный вариант.',
2409
+ },
2410
+ // Native review, from the pending translation draft: punctuation is the Chinese six-dot
2411
+ // ellipsis, a declarative sentence ends with `。`, and a placeholder meets Chinese text with a
2412
+ // space; `signerFailed` names a component; `nestedListRefused` assumes a form top level; the
2413
+ // measure word belongs to the
2414
+ // noun (行, 项, 条, 个, 栏). No variant is invented here.
2415
+ zh: {
2416
+ required: (label, rowName) => rowName === undefined ? `${label}为必填项` : `${rowName}中的${label}为必填项`,
2417
+ cardinality: (label, bound, count, limit) => {
2418
+ // 下限为零时不会被违反,因此没有要显示的句子。
2419
+ if (bound === 'minItems' && limit === 0)
2420
+ return undefined;
2421
+ const noun = (value) => countForm('zh', value, { other: '行' });
2422
+ return bound === 'minItems'
2423
+ ? `${label}至少需要 ${String(limit)} ${noun(limit)}。当前有 ${String(count)} ${noun(count)}。`
2424
+ : `${label}最多允许 ${String(limit)} ${noun(limit)}。当前有 ${String(count)} ${noun(count)}。`;
2425
+ },
2426
+ mediaConstraint: (label, member, limit, value) => {
2427
+ if (member === 'accept') {
2428
+ const admitted = Array.isArray(limit)
2429
+ ? limit.map((entry) => mediaTypePluralIn('zh', entry)).join(mediaTypeSeparatorIn('zh'))
2430
+ : String(limit);
2431
+ return `${label}接受${admitted}。此文件是${mediaTypeNameIn('zh', String(value))}。`;
2432
+ }
2433
+ const { size, bound } = mediaSizeParts(limit, value, 'zh');
2434
+ return member === 'minBytes'
2435
+ ? `${label}:${size},最小为 ${bound}。`
2436
+ : `${label}:${size},最大为 ${bound}。`;
2437
+ },
2438
+ mediaTypeName: (mediaType) => mediaTypeNameIn('zh', mediaType),
2439
+ rowCount: (label, expected, actual, source, reason, ceiling) => {
2440
+ const noun = (value) => countForm('zh', value, { other: '行' });
2441
+ return reason === undefined
2442
+ ? `${label}:按 ${source} 应为 ${String(expected)} ${noun(expected)},当前记录有 ${String(actual)} ${noun(actual)}。`
2443
+ : reason === 'ceiling'
2444
+ ? `${label}:按 ${source} 计算的行数超过上限 ${String(ceiling ?? expected)}。`
2445
+ : `${label}:按 ${source} 计算的行数不是有效的整数。`;
2446
+ },
2447
+ invalidValue: (label) => `${label}:不再提供该值`,
2448
+ unavailableOption: (label) => `${label}:此记录不能选择该选项`,
2449
+ undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
2450
+ ? `无法确认${optionLabel}是否可用于${label}。服务器尚未答复。`
2451
+ : `无法确认${optionLabel}是否可用于${label}。此处无法完成这项检查。`,
2452
+ invalidSelection: () => '已选的值不再提供',
2453
+ withheldValue: () => '该值未提供。',
2454
+ deferredValue: () => '已延后:服务器未提供该值,因此此处尚无答复。',
2455
+ notEditable: (label, access) => {
2456
+ switch (access) {
2457
+ case 'masked':
2458
+ return `${label}:该值对你不可见。`;
2459
+ case 'hidden':
2460
+ return `${label}:该值不显示。`;
2461
+ case 'write_only':
2462
+ return `${label}:可以填写,但无法读回。`;
2463
+ case 'read_only':
2464
+ case 'read_write':
2465
+ return `${label}不可编辑`;
2466
+ default:
2467
+ return assertNever(access);
2468
+ }
2469
+ },
2470
+ rowKey: (label, rowName) => rowName === undefined
2471
+ ? `${label}:有两行使用了同一个键。请修改其中一行,使每行各不相同。`
2472
+ : `${label}:另一行已使用${rowName}。请换一个。`,
2473
+ unanswered: (count) => countForm('zh', count, { other: `还有 ${String(count)} 项未回答。` }),
2474
+ notAnswered: (label, rowName) => rowName === undefined ? `${label}尚未回答。` : `${rowName}中的${label}尚未回答。`,
2475
+ rowAdded: (position, total) => `已添加第 ${String(position)} 行,共 ${String(total)} 行。`,
2476
+ summaryHeading: () => '请检查表单',
2477
+ requiredMarker: () => '必填',
2478
+ signed: (at, covered) => {
2479
+ const parts = ['已签名'];
2480
+ if (at !== undefined)
2481
+ parts.push(signedTimeText(at, 'zh'));
2482
+ if (covered !== undefined) {
2483
+ parts.push(countForm('zh', covered, { other: `覆盖 ${String(covered)} 个字段` }));
2484
+ }
2485
+ return parts.join(' · ');
2486
+ },
2487
+ captureSignature: (label) => `签署${label}`,
2488
+ captureFailed: () => '未获取到签名。',
2489
+ signerFailed: () => '签名面板已停止响应。',
2490
+ signatureUnavailable: (label) => `${label}无法在此设备上签名。`,
2491
+ attachMedia: () => '添加文件',
2492
+ removeMedia: (name) => `移除${name}`,
2493
+ mediaFailed: () => '文件未添加。',
2494
+ mediaTooLarge: (size, limit) => `该文件为 ${size},上限为 ${limit}。`,
2495
+ mediaServerRefused: () => '服务器已拒绝该文件。',
2496
+ sectionToggle: (title, expanded) => title === undefined
2497
+ ? expanded
2498
+ ? '收起区块'
2499
+ : '展开区块'
2500
+ : expanded
2501
+ ? `${title}:收起`
2502
+ : `${title}:展开`,
2503
+ stepsLabel: () => '步骤',
2504
+ stepAnnouncement: (position, total, title) => `第 ${String(position)} 步,共 ${String(total)} 步:${title}`,
2505
+ stepStateCurrent: () => '当前页',
2506
+ stepStateComplete: () => '已完成',
2507
+ stepStateUnvisited: () => '未访问',
2508
+ stepStateBlocked: (count) => countForm('zh', count, { other: `待修正 ${String(count)} 项` }),
2509
+ rowsEmpty: () => '没有行。',
2510
+ nestedListRefused: () => '该列表包含行内行,当前版本尚不支持显示。请将内层列表移到表单的顶层。',
2511
+ rowRemoved: (count) => count === 0
2512
+ ? '已删除该行,列表为空。'
2513
+ : countForm('zh', count, { other: `已删除该行,还剩 ${String(count)} 行。` }),
2514
+ rowHeading: (position, key) => key === '' ? `第 ${String(position)} 行` : `第 ${String(position)} 行:${key}`,
2515
+ rowAtPosition: (position) => `位于第 ${String(position)} 行`,
2516
+ addRow: () => '添加行',
2517
+ removeRow: (name) => `删除该行:${name}`,
2518
+ rowRemoveFailed: () => '未删除该行。',
2519
+ rowAddFailed: () => '未添加行。',
2520
+ writeRefused: () => '该修改已被拒绝,值保持原样。',
2521
+ rowRefused: () => '记录拒绝了该修改',
2522
+ loadingOptions: () => '正在加载选项……',
2523
+ optionsFailed: () => '选项未加载。',
2524
+ // Not in the pending translation draft; written here and reported for native review.
2525
+ loadMoreOptions: () => '加载更多选项',
2526
+ rankMoveUp: (label) => `上移${label}`,
2527
+ rankMoveDown: (label) => `下移${label}`,
2528
+ rankRemove: (label) => `移除${label}`,
2529
+ rankAdd: () => '添加选项……',
2530
+ rankEmpty: () => '请选择一个选项进行排序。',
2531
+ rankAddTo: (label) => `${label}:添加选项`,
2532
+ rankMoved: (label, position, total) => `${label} 现在位于第 ${String(position)} 位,共 ${String(total)} 项。`,
2533
+ rankRemoved: (label, remaining) => remaining === 0
2534
+ ? `已移除${label},列表为空。`
2535
+ : countForm('zh', remaining, {
2536
+ other: `已移除${label},还剩 ${String(remaining)} 个选项。`,
2537
+ }),
2538
+ quantityAmount: (label) => `${label}:数量`,
2539
+ quantityUnit: (label) => `${label}:单位`,
2540
+ quantityStep: (label, direction) => direction === 'increase' ? `${label}加一` : `${label}减一`,
2541
+ integerStep: (label, direction) => (direction === 'increase' ? `增加${label}` : `减少${label}`),
2542
+ percentageSign: () => '%',
2543
+ durationUnit: (unit) => DURATION_UNIT_LABELS.zh[unit],
2544
+ // Native review: `行` is also the record row, so `地址行 1` can be read either way; the
2545
+ // alternative `地址第 1 行` reads as a row number of the address itself.
2546
+ addressLine1: () => '地址行 1',
2547
+ addressLine2: () => '地址行 2',
2548
+ addressCity: () => '城市',
2549
+ addressRegion: () => '省/州',
2550
+ addressPostalCode: () => '邮政编码',
2551
+ addressCountry: () => '国家',
2552
+ addressCountryPlaceholder: () => '请选择国家……',
2553
+ memberScope: (label) => `所属:${label}`,
2554
+ countryName: (code) => countryNameFor('zh', code),
2555
+ coordinateLatitude: () => '纬度',
2556
+ coordinateLongitude: () => '经度',
2557
+ coordinateRange: (low, high) => `${low} 至 ${high}`,
2558
+ coordinateOutOfRange: (member, low, high) => `${member}必须介于 ${low} 和 ${high} 之间。`,
2559
+ coordinateNotDecimal: (member) => `${member}:请填写小数,例如 -33.8688。`,
2560
+ positionCapture: (label) => `使用我的位置填写${label}`,
2561
+ positionRequesting: () => '正在获取位置……',
2562
+ positionIdleHint: () => '可以使用当前位置,也可以在下方填写坐标。',
2563
+ positionManualHint: () => '请在下方填写坐标。',
2564
+ positionDenied: () => '位置权限已被拒绝。请在下方填写坐标。',
2565
+ positionUnavailable: () => '此设备无法提供位置。请在下方填写坐标。',
2566
+ positionTimedOut: () => '获取位置超时。请在下方填写坐标。',
2567
+ positionFailed: () => '无法获取位置。',
2568
+ positionInvalidReading: () => '设备返回的位置超出有效范围。请在下方填写坐标。',
2569
+ positionAccuracyLabel: () => '精度',
2570
+ positionCapturedAtLabel: () => '获取时间',
2571
+ positionMetres: (metres) => positionMetresFor('zh', metres),
2572
+ positionCapturedAt: (iso) => signedTimeText(iso, 'zh'),
2573
+ buffer: (reason, params) => bufferText('zh', reason, params),
2574
+ display: displayFor('zh'),
2575
+ selectPlaceholder: () => '请选择一个选项……',
2576
+ freeformTagsHint: () => '多个条目请用英文逗号分隔。',
2577
+ freeformTagsCount: (count) => countForm('zh', count, { other: `${String(count)} 条。` }),
2578
+ emptyOptions: () => '没有可用的选项。',
2579
+ noMatches: () => '没有匹配该搜索的选项。',
2580
+ deprecatedSuffix: () => '(已弃用)',
2581
+ // Native review: this names the key by its English keycap label (`Enter`), which Chinese
2582
+ // keyboards print; `回车键` is the same key named by function, and the two are not
2583
+ // interchangeable the way a key name is.
2584
+ comboboxHint: () => '输入文字可缩小列表范围,然后按 Enter 键选择高亮选项。',
2585
+ },
2586
+ };
2587
+ /** The published spelling of the host copy for one locale, falling back to English for a locale it does not carry. */
2588
+ export function formCopy(locale) {
2589
+ const base = shippedLocale(locale);
2590
+ return base === undefined ? CATALOGUE.en : CATALOGUE[base];
2591
+ }
2592
+ /** The copy the rendered tree reads; the page supplies the provider for the selected locale. */
2593
+ export const FormCopyContext = createContext(formCopy(undefined));
2594
+ /** The copy in force for the tree, under the published name. */
2595
+ export function useFormCopy() {
2596
+ return useContext(FormCopyContext);
2597
+ }
2598
+ /** The host copy in force for the tree being rendered. */
2599
+ export function useHostCopy() {
2600
+ return useContext(FormCopyContext);
2601
+ }
2602
+ //# sourceMappingURL=copy.js.map