@azx-pbc/axiom-native 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +95 -2
- package/dist/configurator.d.ts +39 -0
- package/dist/configurator.d.ts.map +1 -0
- package/dist/configurator.js +420 -0
- package/dist/configurator.js.map +1 -0
- package/dist/controls.d.ts +64 -0
- package/dist/controls.d.ts.map +1 -0
- package/dist/controls.js +8 -0
- package/dist/controls.js.map +1 -0
- package/dist/copy.d.ts +216 -0
- package/dist/copy.d.ts.map +1 -0
- package/dist/copy.js +2574 -0
- package/dist/copy.js.map +1 -0
- package/dist/fields.d.ts +9 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +1365 -0
- package/dist/fields.js.map +1 -0
- package/dist/host.d.ts +90 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +8 -0
- package/dist/host.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/input-chain.d.ts +28 -0
- package/dist/input-chain.d.ts.map +1 -0
- package/dist/input-chain.js +64 -0
- package/dist/input-chain.js.map +1 -0
- package/dist/render/layout.d.ts +47 -0
- package/dist/render/layout.d.ts.map +1 -0
- package/dist/render/layout.js +8 -0
- package/dist/render/layout.js.map +1 -0
- package/dist/render/native.d.ts +85 -0
- package/dist/render/native.d.ts.map +1 -0
- package/dist/render/native.js +124 -0
- package/dist/render/native.js.map +1 -0
- package/dist/render/tree.d.ts +50 -0
- package/dist/render/tree.d.ts.map +1 -0
- package/dist/render/tree.js +636 -0
- package/dist/render/tree.js.map +1 -0
- package/dist/theme.d.ts +113 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +211 -0
- package/dist/theme.js.map +1 -0
- package/package.json +78 -3
package/dist/copy.js
ADDED
|
@@ -0,0 +1,2574 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
import { renderValueText } from '@azx-pbc/axiom-react';
|
|
3
|
+
import { DECIMAL_TEXT_PATTERN, INSTANT_PATTERN, MEDIA_EXTENSION_TYPES, isDurationUnit, isRecord, tryParsePlainDate, } from '@azx-pbc/axiom-runtime';
|
|
4
|
+
import { cardinalCategory } from '@azx-pbc/axiom-runtime/messages';
|
|
5
|
+
/** The form a count selects in one locale, from the runtime's vendored CLDR registry. */
|
|
6
|
+
function countForm(locale, count, forms) {
|
|
7
|
+
return forms[cardinalCategory(locale, count)] ?? forms.other;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A count with the noun it counts, mirroring the reference catalogue.
|
|
11
|
+
*
|
|
12
|
+
* Arabic's dual already means two, so a formal sentence writes `صفان` or `صفين` and never the
|
|
13
|
+
* numeral before it; every other category keeps the numeral.
|
|
14
|
+
*/
|
|
15
|
+
function countedText(locale, count, forms) {
|
|
16
|
+
const noun = countForm(locale, count, forms);
|
|
17
|
+
return locale === 'ar' && cardinalCategory(locale, count) === 'two'
|
|
18
|
+
? noun
|
|
19
|
+
: `${String(count)} ${noun}`;
|
|
20
|
+
}
|
|
21
|
+
const BUFFER_COPY = {
|
|
22
|
+
en: {
|
|
23
|
+
'buffer.decimal.one_point': () => 'Use one decimal point.',
|
|
24
|
+
'buffer.decimal.digits': () => 'Use digits only, with an optional leading minus.',
|
|
25
|
+
'buffer.decimal.fraction_digits': () => 'Use digits after the decimal point.',
|
|
26
|
+
'buffer.decimal.not_canonical': () => 'That number cannot be stored exactly as typed.',
|
|
27
|
+
'buffer.integer.digits': () => 'Use whole digits only.',
|
|
28
|
+
'buffer.integer.no_point': () => 'A whole number has no decimal point.',
|
|
29
|
+
'buffer.integer.not_safe': () => 'That whole number is too large to store safely.',
|
|
30
|
+
'buffer.money.not_amount': () => 'Enter an amount.',
|
|
31
|
+
'buffer.money.scale_exceeded': (params) => `Use at most ${String(params?.['scale'] ?? 0)} decimal places.`,
|
|
32
|
+
'buffer.quantity.scale_exceeded': (params) => `Use at most ${String(params?.['scale'] ?? 0)} decimal places.`,
|
|
33
|
+
'buffer.percentage.digits': () => 'Use whole digits only for the percentage, with an optional leading minus.',
|
|
34
|
+
'buffer.percentage.no_point': () => 'A percentage has no decimal point.',
|
|
35
|
+
'buffer.percentage.not_safe': () => 'That percentage is too large to store safely.',
|
|
36
|
+
'buffer.integer.minimum': (params) => `Enter ${String(params?.['minimum'] ?? 0)} or more.`,
|
|
37
|
+
'buffer.integer.maximum': (params) => `Enter ${String(params?.['maximum'] ?? 0)} or less.`,
|
|
38
|
+
'buffer.integer.range': (params) => `Enter ${String(params?.['minimum'] ?? 0)} to ${String(params?.['maximum'] ?? 0)}.`,
|
|
39
|
+
'buffer.integer.step': (params) => `Enter a multiple of ${String(params?.['step'] ?? 1)}, or type the answer.`,
|
|
40
|
+
'buffer.phone.e164': () => 'Use an international number, such as +14155550123.',
|
|
41
|
+
'buffer.date.nonexistent_day': () => 'That day does not exist.',
|
|
42
|
+
'buffer.date.format': () => 'Use the format YYYY-MM-DD.',
|
|
43
|
+
},
|
|
44
|
+
es: {
|
|
45
|
+
'buffer.decimal.one_point': () => 'Usa un solo punto decimal.',
|
|
46
|
+
'buffer.decimal.digits': () => 'Usa solo dígitos, con un signo menos inicial opcional.',
|
|
47
|
+
'buffer.decimal.fraction_digits': () => 'Usa dígitos después del punto decimal.',
|
|
48
|
+
'buffer.decimal.not_canonical': () => 'Ese número no se puede guardar exactamente como lo escribiste.',
|
|
49
|
+
'buffer.integer.digits': () => 'Usa solo dígitos enteros.',
|
|
50
|
+
'buffer.integer.no_point': () => 'Un número entero no lleva punto decimal.',
|
|
51
|
+
'buffer.integer.not_safe': () => 'Ese número entero es demasiado grande para guardarlo con seguridad.',
|
|
52
|
+
'buffer.money.not_amount': () => 'Introduce un importe.',
|
|
53
|
+
'buffer.money.scale_exceeded': (params) => `Usa como máximo ${String(params?.['scale'] ?? 0)} decimales.`,
|
|
54
|
+
'buffer.quantity.scale_exceeded': (params) => `Usa como máximo ${String(params?.['scale'] ?? 0)} decimales para la cantidad.`,
|
|
55
|
+
'buffer.percentage.digits': () => 'Usa solo dígitos enteros para el porcentaje, con un signo menos inicial opcional.',
|
|
56
|
+
'buffer.percentage.no_point': () => 'Un porcentaje no lleva punto decimal.',
|
|
57
|
+
'buffer.percentage.not_safe': () => 'Ese porcentaje es demasiado grande para guardarlo con seguridad.',
|
|
58
|
+
'buffer.integer.minimum': (params) => `Introduce ${String(params?.['minimum'] ?? 0)} o más.`,
|
|
59
|
+
'buffer.integer.maximum': (params) => `Introduce ${String(params?.['maximum'] ?? 0)} o menos.`,
|
|
60
|
+
'buffer.integer.range': (params) => `Introduce un valor entre ${String(params?.['minimum'] ?? 0)} y ${String(params?.['maximum'] ?? 0)}.`,
|
|
61
|
+
'buffer.integer.step': (params) => `El paso declarado es ${String(params?.['step'] ?? 1)}; escribe la respuesta.`,
|
|
62
|
+
'buffer.phone.e164': () => 'Usa un número internacional, por ejemplo +14155550123.',
|
|
63
|
+
'buffer.date.nonexistent_day': () => 'Ese día no existe.',
|
|
64
|
+
'buffer.date.format': () => 'Usa el formato AAAA-MM-DD.',
|
|
65
|
+
},
|
|
66
|
+
pt: {
|
|
67
|
+
'buffer.decimal.one_point': () => 'Usa apenas um ponto decimal.',
|
|
68
|
+
'buffer.decimal.digits': () => 'Usa apenas dígitos, com um sinal de menos inicial opcional.',
|
|
69
|
+
'buffer.decimal.fraction_digits': () => 'Usa dígitos depois do ponto decimal.',
|
|
70
|
+
'buffer.decimal.not_canonical': () => 'Esse número não pode ser guardado exatamente como escrito.',
|
|
71
|
+
'buffer.integer.digits': () => 'Usa apenas dígitos inteiros.',
|
|
72
|
+
'buffer.integer.no_point': () => 'Um número inteiro não tem ponto decimal.',
|
|
73
|
+
'buffer.integer.not_safe': () => 'Esse número inteiro é demasiado grande para guardar com segurança.',
|
|
74
|
+
'buffer.money.not_amount': () => 'Introduz um valor.',
|
|
75
|
+
'buffer.money.scale_exceeded': (params) => `Usa no máximo ${String(params?.['scale'] ?? 0)} casas decimais.`,
|
|
76
|
+
'buffer.quantity.scale_exceeded': (params) => `Usa no máximo ${String(params?.['scale'] ?? 0)} casas decimais para a quantidade.`,
|
|
77
|
+
'buffer.percentage.digits': () => 'Usa apenas dígitos inteiros para a percentagem, com um sinal de menos inicial opcional.',
|
|
78
|
+
'buffer.percentage.no_point': () => 'Uma percentagem não tem ponto decimal.',
|
|
79
|
+
'buffer.percentage.not_safe': () => 'Essa percentagem é demasiado grande para guardar com segurança.',
|
|
80
|
+
'buffer.integer.minimum': (params) => `Introduz ${String(params?.['minimum'] ?? 0)} ou mais.`,
|
|
81
|
+
'buffer.integer.maximum': (params) => `Introduz ${String(params?.['maximum'] ?? 0)} ou menos.`,
|
|
82
|
+
'buffer.integer.range': (params) => `Introduz um valor entre ${String(params?.['minimum'] ?? 0)} e ${String(params?.['maximum'] ?? 0)}.`,
|
|
83
|
+
'buffer.integer.step': (params) => `O passo declarado é ${String(params?.['step'] ?? 1)}; escreve a resposta.`,
|
|
84
|
+
'buffer.phone.e164': () => 'Usa um número internacional, por exemplo +14155550123.',
|
|
85
|
+
'buffer.date.nonexistent_day': () => 'Esse dia não existe.',
|
|
86
|
+
'buffer.date.format': () => 'Usa o formato AAAA-MM-DD.',
|
|
87
|
+
},
|
|
88
|
+
ar: {
|
|
89
|
+
'buffer.decimal.one_point': () => 'استخدم نقطة عشرية واحدة.',
|
|
90
|
+
'buffer.decimal.digits': () => 'استخدم الأرقام فقط، مع إشارة سالب اختيارية في البداية.',
|
|
91
|
+
'buffer.decimal.fraction_digits': () => 'استخدم أرقامًا بعد النقطة العشرية.',
|
|
92
|
+
'buffer.decimal.not_canonical': () => 'لا يمكن تخزين هذا الرقم تمامًا كما كُتب.',
|
|
93
|
+
'buffer.integer.digits': () => 'استخدم أرقامًا صحيحة فقط.',
|
|
94
|
+
'buffer.integer.no_point': () => 'العدد الصحيح لا يحتوي على نقطة عشرية.',
|
|
95
|
+
'buffer.integer.not_safe': () => 'هذا العدد الصحيح أكبر من أن يُخزَّن بأمان.',
|
|
96
|
+
'buffer.money.not_amount': () => 'أدخل مبلغًا.',
|
|
97
|
+
'buffer.money.scale_exceeded': (params) => `استخدم ${String(params?.['scale'] ?? 0)} منازل عشرية كحد أقصى.`,
|
|
98
|
+
'buffer.quantity.scale_exceeded': (params) => `استخدم ${String(params?.['scale'] ?? 0)} منازل عشرية كحد أقصى للكمية.`,
|
|
99
|
+
'buffer.percentage.digits': () => 'استخدم أرقامًا صحيحة فقط للنسبة المئوية، مع إشارة سالب اختيارية في البداية.',
|
|
100
|
+
'buffer.percentage.no_point': () => 'النسبة المئوية لا تحتوي على نقطة عشرية.',
|
|
101
|
+
'buffer.percentage.not_safe': () => 'هذه النسبة المئوية أكبر من أن تُخزَّن بأمان.',
|
|
102
|
+
'buffer.integer.minimum': (params) => `أدخل ${String(params?.['minimum'] ?? 0)} أو أكثر.`,
|
|
103
|
+
'buffer.integer.maximum': (params) => `أدخل ${String(params?.['maximum'] ?? 0)} أو أقل.`,
|
|
104
|
+
'buffer.integer.range': (params) => `أدخل قيمة بين ${String(params?.['minimum'] ?? 0)} و${String(params?.['maximum'] ?? 0)}.`,
|
|
105
|
+
'buffer.integer.step': (params) => `الخطوة المعلنة هي ${String(params?.['step'] ?? 1)}؛ اكتب الإجابة.`,
|
|
106
|
+
'buffer.phone.e164': () => 'استخدم رقمًا دوليًا، مثل +14155550123.',
|
|
107
|
+
'buffer.date.nonexistent_day': () => 'هذا اليوم غير موجود.',
|
|
108
|
+
'buffer.date.format': () => 'استخدم الصيغة YYYY-MM-DD.',
|
|
109
|
+
},
|
|
110
|
+
fr: {
|
|
111
|
+
'buffer.decimal.one_point': () => 'Utilisez un seul point décimal.',
|
|
112
|
+
'buffer.decimal.digits': () => 'Utilisez uniquement des chiffres, avec un signe moins initial facultatif.',
|
|
113
|
+
'buffer.decimal.fraction_digits': () => 'Utilisez des chiffres après le point décimal.',
|
|
114
|
+
'buffer.decimal.not_canonical': () => 'Ce nombre ne peut pas être enregistré exactement tel que saisi.',
|
|
115
|
+
'buffer.integer.digits': () => 'Utilisez uniquement des chiffres entiers.',
|
|
116
|
+
'buffer.integer.no_point': () => "Un nombre entier n'a pas de point décimal.",
|
|
117
|
+
'buffer.integer.not_safe': () => 'Ce nombre entier est trop grand pour être enregistré en toute sécurité.',
|
|
118
|
+
'buffer.money.not_amount': () => 'Saisissez un montant.',
|
|
119
|
+
'buffer.money.scale_exceeded': (params) => `Utilisez au maximum ${String(params?.['scale'] ?? 0)} décimales.`,
|
|
120
|
+
'buffer.quantity.scale_exceeded': (params) => `Utilisez au maximum ${String(params?.['scale'] ?? 0)} décimales pour la quantité.`,
|
|
121
|
+
'buffer.percentage.digits': () => 'Utilisez uniquement des chiffres entiers pour le pourcentage, avec un signe moins initial facultatif.',
|
|
122
|
+
'buffer.percentage.no_point': () => "Un pourcentage n'a pas de point décimal.",
|
|
123
|
+
'buffer.percentage.not_safe': () => 'Ce pourcentage est trop grand pour être enregistré en toute sécurité.',
|
|
124
|
+
'buffer.integer.minimum': (params) => `Saisissez ${String(params?.['minimum'] ?? 0)} ou plus.`,
|
|
125
|
+
'buffer.integer.maximum': (params) => `Saisissez ${String(params?.['maximum'] ?? 0)} ou moins.`,
|
|
126
|
+
'buffer.integer.range': (params) => `Saisissez une valeur entre ${String(params?.['minimum'] ?? 0)} et ${String(params?.['maximum'] ?? 0)}.`,
|
|
127
|
+
'buffer.integer.step': (params) => `Le pas déclaré est de ${String(params?.['step'] ?? 1)} ; saisissez la réponse.`,
|
|
128
|
+
'buffer.phone.e164': () => 'Utilisez un numéro international, par exemple +14155550123.',
|
|
129
|
+
'buffer.date.nonexistent_day': () => "Ce jour n'existe pas.",
|
|
130
|
+
'buffer.date.format': () => 'Utilisez le format AAAA-MM-JJ.',
|
|
131
|
+
},
|
|
132
|
+
de: {
|
|
133
|
+
'buffer.decimal.one_point': () => 'Verwenden Sie genau ein Dezimaltrennzeichen.',
|
|
134
|
+
'buffer.decimal.digits': () => 'Verwenden Sie nur Ziffern; ein führendes Minus ist optional.',
|
|
135
|
+
'buffer.decimal.fraction_digits': () => 'Verwenden Sie Ziffern nach dem Dezimaltrennzeichen.',
|
|
136
|
+
'buffer.decimal.not_canonical': () => 'Diese Zahl lässt sich nicht genau so speichern, wie sie eingegeben wurde.',
|
|
137
|
+
'buffer.integer.digits': () => 'Verwenden Sie nur Ziffern ohne Nachkommastellen.',
|
|
138
|
+
'buffer.integer.no_point': () => 'Eine ganze Zahl hat kein Dezimaltrennzeichen.',
|
|
139
|
+
'buffer.integer.not_safe': () => 'Diese ganze Zahl ist zu groß, um sie sicher zu speichern.',
|
|
140
|
+
'buffer.money.not_amount': () => 'Geben Sie einen Betrag ein.',
|
|
141
|
+
'buffer.money.scale_exceeded': (params) => {
|
|
142
|
+
const scale = Number(params?.['scale'] ?? 0);
|
|
143
|
+
return countForm('de', scale, {
|
|
144
|
+
one: `Verwenden Sie höchstens ${String(scale)} Nachkommastelle.`,
|
|
145
|
+
other: `Verwenden Sie höchstens ${String(scale)} Nachkommastellen.`,
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
'buffer.quantity.scale_exceeded': (params) => {
|
|
149
|
+
const scale = Number(params?.['scale'] ?? 0);
|
|
150
|
+
return countForm('de', scale, {
|
|
151
|
+
one: `Verwenden Sie höchstens ${String(scale)} Nachkommastelle für die Menge.`,
|
|
152
|
+
other: `Verwenden Sie höchstens ${String(scale)} Nachkommastellen für die Menge.`,
|
|
153
|
+
});
|
|
154
|
+
},
|
|
155
|
+
'buffer.percentage.digits': () => 'Verwenden Sie für den Prozentsatz nur Ziffern ohne Nachkommastellen; ein führendes Minus ist optional.',
|
|
156
|
+
'buffer.percentage.no_point': () => 'Ein Prozentsatz hat kein Dezimaltrennzeichen.',
|
|
157
|
+
'buffer.percentage.not_safe': () => 'Dieser Prozentsatz ist zu groß, um ihn sicher zu speichern.',
|
|
158
|
+
'buffer.integer.minimum': (params) => `Geben Sie ${String(params?.['minimum'] ?? 0)} oder mehr ein.`,
|
|
159
|
+
'buffer.integer.maximum': (params) => `Geben Sie ${String(params?.['maximum'] ?? 0)} oder weniger ein.`,
|
|
160
|
+
'buffer.integer.range': (params) => `Geben Sie ${String(params?.['minimum'] ?? 0)} bis ${String(params?.['maximum'] ?? 0)} ein.`,
|
|
161
|
+
'buffer.integer.step': (params) => `Die angegebene Schrittweite ist ${String(params?.['step'] ?? 1)}; geben Sie die Antwort ein.`,
|
|
162
|
+
'buffer.phone.e164': () => 'Verwenden Sie eine internationale Nummer, zum Beispiel +14155550123.',
|
|
163
|
+
'buffer.date.nonexistent_day': () => 'Diesen Tag gibt es nicht.',
|
|
164
|
+
'buffer.date.format': () => 'Verwenden Sie das Format JJJJ-MM-TT.',
|
|
165
|
+
},
|
|
166
|
+
ru: {
|
|
167
|
+
'buffer.decimal.one_point': () => 'Используйте один десятичный разделитель.',
|
|
168
|
+
'buffer.decimal.digits': () => 'Используйте только цифры, минус в начале необязателен.',
|
|
169
|
+
'buffer.decimal.fraction_digits': () => 'После десятичного разделителя нужны цифры.',
|
|
170
|
+
'buffer.decimal.not_canonical': () => 'Это число нельзя сохранить точно в том виде, в каком оно введено.',
|
|
171
|
+
'buffer.integer.digits': () => 'Используйте только цифры без дробной части.',
|
|
172
|
+
'buffer.integer.no_point': () => 'В целом числе нет десятичного разделителя.',
|
|
173
|
+
'buffer.integer.not_safe': () => 'Это целое число слишком велико для надёжного сохранения.',
|
|
174
|
+
'buffer.money.not_amount': () => 'Укажите сумму.',
|
|
175
|
+
'buffer.money.scale_exceeded': (params) => {
|
|
176
|
+
const scale = Number(params?.['scale'] ?? 0);
|
|
177
|
+
return countForm('ru', scale, {
|
|
178
|
+
one: `Используйте не более ${String(scale)} знака после запятой.`,
|
|
179
|
+
few: `Используйте не более ${String(scale)} знаков после запятой.`,
|
|
180
|
+
many: `Используйте не более ${String(scale)} знаков после запятой.`,
|
|
181
|
+
other: `Используйте не более ${String(scale)} знаков после запятой.`,
|
|
182
|
+
});
|
|
183
|
+
},
|
|
184
|
+
'buffer.quantity.scale_exceeded': (params) => {
|
|
185
|
+
const scale = Number(params?.['scale'] ?? 0);
|
|
186
|
+
return countForm('ru', scale, {
|
|
187
|
+
one: `Используйте не более ${String(scale)} знака после запятой для количества.`,
|
|
188
|
+
few: `Используйте не более ${String(scale)} знаков после запятой для количества.`,
|
|
189
|
+
many: `Используйте не более ${String(scale)} знаков после запятой для количества.`,
|
|
190
|
+
other: `Используйте не более ${String(scale)} знаков после запятой для количества.`,
|
|
191
|
+
});
|
|
192
|
+
},
|
|
193
|
+
'buffer.percentage.digits': () => 'Для процента используйте только целые цифры, минус в начале необязателен.',
|
|
194
|
+
'buffer.percentage.no_point': () => 'У процента нет десятичного разделителя.',
|
|
195
|
+
'buffer.percentage.not_safe': () => 'Этот процент слишком велик для надёжного сохранения.',
|
|
196
|
+
'buffer.integer.minimum': (params) => `Введите ${String(params?.['minimum'] ?? 0)} или больше.`,
|
|
197
|
+
'buffer.integer.maximum': (params) => `Введите ${String(params?.['maximum'] ?? 0)} или меньше.`,
|
|
198
|
+
'buffer.integer.range': (params) => `Введите от ${String(params?.['minimum'] ?? 0)} до ${String(params?.['maximum'] ?? 0)}.`,
|
|
199
|
+
'buffer.integer.step': (params) => `Заданный шаг приращения: ${String(params?.['step'] ?? 1)}; введите ответ.`,
|
|
200
|
+
'buffer.phone.e164': () => 'Укажите международный номер, например +14155550123.',
|
|
201
|
+
'buffer.date.nonexistent_day': () => 'Такого дня не существует.',
|
|
202
|
+
'buffer.date.format': () => 'Используйте формат ГГГГ-ММ-ДД.',
|
|
203
|
+
},
|
|
204
|
+
it: {
|
|
205
|
+
'buffer.decimal.one_point': () => 'Usa un solo separatore decimale.',
|
|
206
|
+
'buffer.decimal.digits': () => 'Usa solo cifre; il segno meno iniziale è facoltativo.',
|
|
207
|
+
'buffer.decimal.fraction_digits': () => 'Dopo il separatore decimale servono delle cifre.',
|
|
208
|
+
'buffer.decimal.not_canonical': () => 'Questo numero non può essere salvato esattamente come è stato digitato.',
|
|
209
|
+
'buffer.integer.digits': () => 'Usa solo cifre senza decimali.',
|
|
210
|
+
'buffer.integer.no_point': () => 'Un numero intero non ha separatore decimale.',
|
|
211
|
+
'buffer.integer.not_safe': () => 'Questo numero intero è troppo grande per essere salvato in modo sicuro.',
|
|
212
|
+
'buffer.money.not_amount': () => 'Inserisci un importo.',
|
|
213
|
+
'buffer.money.scale_exceeded': (params) => {
|
|
214
|
+
const scale = Number(params?.['scale'] ?? 0);
|
|
215
|
+
return countForm('it', scale, {
|
|
216
|
+
one: `Usa al massimo ${String(scale)} decimale.`,
|
|
217
|
+
other: `Usa al massimo ${String(scale)} decimali.`,
|
|
218
|
+
});
|
|
219
|
+
},
|
|
220
|
+
'buffer.quantity.scale_exceeded': (params) => {
|
|
221
|
+
const scale = Number(params?.['scale'] ?? 0);
|
|
222
|
+
return countForm('it', scale, {
|
|
223
|
+
one: `Usa al massimo ${String(scale)} decimale per la quantità.`,
|
|
224
|
+
other: `Usa al massimo ${String(scale)} decimali per la quantità.`,
|
|
225
|
+
});
|
|
226
|
+
},
|
|
227
|
+
'buffer.percentage.digits': () => 'Usa solo cifre intere per la percentuale, con un segno meno iniziale facoltativo.',
|
|
228
|
+
'buffer.percentage.no_point': () => 'Una percentuale non ha separatore decimale.',
|
|
229
|
+
'buffer.percentage.not_safe': () => 'Questa percentuale è troppo grande per essere salvata in modo sicuro.',
|
|
230
|
+
'buffer.integer.minimum': (params) => `Inserisci ${String(params?.['minimum'] ?? 0)} o più.`,
|
|
231
|
+
'buffer.integer.maximum': (params) => `Inserisci ${String(params?.['maximum'] ?? 0)} o meno.`,
|
|
232
|
+
'buffer.integer.range': (params) => `Inserisci un valore tra ${String(params?.['minimum'] ?? 0)} e ${String(params?.['maximum'] ?? 0)}.`,
|
|
233
|
+
'buffer.integer.step': (params) => `L'incremento dichiarato è ${String(params?.['step'] ?? 1)}; digita la risposta.`,
|
|
234
|
+
'buffer.phone.e164': () => 'Usa un numero internazionale, per esempio +14155550123.',
|
|
235
|
+
'buffer.date.nonexistent_day': () => 'Quel giorno non esiste.',
|
|
236
|
+
'buffer.date.format': () => 'Usa il formato AAAA-MM-GG.',
|
|
237
|
+
},
|
|
238
|
+
zh: {
|
|
239
|
+
'buffer.decimal.one_point': () => '请只使用一个小数点。',
|
|
240
|
+
'buffer.decimal.digits': () => '请只填写数字,可在开头添加负号。',
|
|
241
|
+
'buffer.decimal.fraction_digits': () => '小数点后请填写数字。',
|
|
242
|
+
'buffer.decimal.not_canonical': () => '该数字无法按所填内容原样保存。',
|
|
243
|
+
'buffer.integer.digits': () => '请只填写整数。',
|
|
244
|
+
'buffer.integer.no_point': () => '整数不带小数点。',
|
|
245
|
+
'buffer.integer.not_safe': () => '该整数过大,无法安全保存。',
|
|
246
|
+
'buffer.money.not_amount': () => '请填写金额。',
|
|
247
|
+
'buffer.money.scale_exceeded': (params) => `最多保留 ${String(params?.['scale'] ?? 0)} 位小数。`,
|
|
248
|
+
'buffer.quantity.scale_exceeded': (params) => `数量最多保留 ${String(params?.['scale'] ?? 0)} 位小数。`,
|
|
249
|
+
'buffer.percentage.digits': () => '百分比请只填写整数,可在开头添加负号。',
|
|
250
|
+
'buffer.percentage.no_point': () => '百分比不带小数点。',
|
|
251
|
+
'buffer.percentage.not_safe': () => '该百分比过大,无法安全保存。',
|
|
252
|
+
'buffer.integer.minimum': (params) => `请填写不小于 ${String(params?.['minimum'] ?? 0)} 的值。`,
|
|
253
|
+
'buffer.integer.maximum': (params) => `请填写不大于 ${String(params?.['maximum'] ?? 0)} 的值。`,
|
|
254
|
+
'buffer.integer.range': (params) => `请填写 ${String(params?.['minimum'] ?? 0)} 到 ${String(params?.['maximum'] ?? 0)} 之间的值。`,
|
|
255
|
+
'buffer.integer.step': (params) => `声明的步长为 ${String(params?.['step'] ?? 1)};请填写答案。`,
|
|
256
|
+
'buffer.phone.e164': () => '请填写国际号码,例如 +14155550123。',
|
|
257
|
+
'buffer.date.nonexistent_day': () => '该日期不存在。',
|
|
258
|
+
'buffer.date.format': () => '请使用 YYYY-MM-DD 的格式。',
|
|
259
|
+
},
|
|
260
|
+
};
|
|
261
|
+
/** One refusal in the host's words. Both keys and locales are closed, so no key can be printed. */
|
|
262
|
+
function bufferText(locale, reason, params) {
|
|
263
|
+
return BUFFER_COPY[locale][reason](params);
|
|
264
|
+
}
|
|
265
|
+
/** The words a locale uses for a boolean. */
|
|
266
|
+
const YES_NO = {
|
|
267
|
+
en: { yes: 'Yes', no: 'No' },
|
|
268
|
+
es: { yes: 'Sí', no: 'No' },
|
|
269
|
+
pt: { yes: 'Sim', no: 'Não' },
|
|
270
|
+
fr: { yes: 'Oui', no: 'Non' },
|
|
271
|
+
ar: { yes: 'نعم', no: 'لا' },
|
|
272
|
+
de: { yes: 'Ja', no: 'Nein' },
|
|
273
|
+
it: { yes: 'sì', no: 'no' },
|
|
274
|
+
ru: { yes: 'да', no: 'нет' },
|
|
275
|
+
zh: { yes: '是', no: '否' },
|
|
276
|
+
};
|
|
277
|
+
/** The punctuation that separates the members of a list in each catalogue. */
|
|
278
|
+
const LIST_SEPARATOR = {
|
|
279
|
+
en: ', ',
|
|
280
|
+
es: ', ',
|
|
281
|
+
pt: ', ',
|
|
282
|
+
fr: ', ',
|
|
283
|
+
ar: '، ',
|
|
284
|
+
de: ', ',
|
|
285
|
+
it: ', ',
|
|
286
|
+
ru: ', ',
|
|
287
|
+
zh: '、',
|
|
288
|
+
};
|
|
289
|
+
const NUMBER_MECHANICS = Object.freeze({
|
|
290
|
+
en: { group: ',', decimal: '.', minimumGroupingDigits: 1 },
|
|
291
|
+
es: { group: '.', decimal: ',', minimumGroupingDigits: 2 },
|
|
292
|
+
fr: { group: '\u202F', decimal: ',', minimumGroupingDigits: 1 },
|
|
293
|
+
de: { group: '.', decimal: ',', minimumGroupingDigits: 1 },
|
|
294
|
+
ru: { group: '\u00A0', decimal: ',', minimumGroupingDigits: 1 },
|
|
295
|
+
it: { group: '.', decimal: ',', minimumGroupingDigits: 2 },
|
|
296
|
+
zh: { group: ',', decimal: '.', minimumGroupingDigits: 1 },
|
|
297
|
+
ar: { group: ',', decimal: '.', minimumGroupingDigits: 1 },
|
|
298
|
+
pt: { group: '.', decimal: ',', minimumGroupingDigits: 1 },
|
|
299
|
+
});
|
|
300
|
+
function isDecimalText(value) {
|
|
301
|
+
return value !== '-0' && DECIMAL_TEXT_PATTERN.test(value);
|
|
302
|
+
}
|
|
303
|
+
function isCanonicalMoneyAmount(value) {
|
|
304
|
+
return /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$/u.test(value) && value !== '-0';
|
|
305
|
+
}
|
|
306
|
+
function groupWhole(digits, mark, minimumGroupingDigits) {
|
|
307
|
+
if (digits.length < 3 + minimumGroupingDigits)
|
|
308
|
+
return digits;
|
|
309
|
+
let grouped = '';
|
|
310
|
+
for (let end = digits.length; end > 0; end -= 3) {
|
|
311
|
+
const start = Math.max(0, end - 3);
|
|
312
|
+
const chunk = digits.slice(start, end);
|
|
313
|
+
grouped = grouped === '' ? chunk : `${chunk}${mark}${grouped}`;
|
|
314
|
+
}
|
|
315
|
+
return grouped;
|
|
316
|
+
}
|
|
317
|
+
function groupCanonicalNumericText(text, locale) {
|
|
318
|
+
const marks = NUMBER_MECHANICS[locale];
|
|
319
|
+
const negative = text.startsWith('-');
|
|
320
|
+
const unsigned = negative ? text.slice(1) : text;
|
|
321
|
+
const point = unsigned.indexOf('.');
|
|
322
|
+
const whole = point === -1 ? unsigned : unsigned.slice(0, point);
|
|
323
|
+
const fraction = point === -1 ? '' : unsigned.slice(point + 1);
|
|
324
|
+
const grouped = groupWhole(whole, marks.group, marks.minimumGroupingDigits);
|
|
325
|
+
const sign = negative ? '-' : '';
|
|
326
|
+
const decimal = fraction === '' ? '' : `${marks.decimal}${fraction}`;
|
|
327
|
+
return `${sign}${grouped}${decimal}`;
|
|
328
|
+
}
|
|
329
|
+
function formatNumericText(text, locale) {
|
|
330
|
+
if (isDecimalText(text) || isCanonicalMoneyAmount(text)) {
|
|
331
|
+
return groupCanonicalNumericText(text, locale);
|
|
332
|
+
}
|
|
333
|
+
return text;
|
|
334
|
+
}
|
|
335
|
+
/** Formatting-context wide month names matching `@azx-pbc/axiom-web` (`date-fns` tables). */
|
|
336
|
+
const MONTH_NAMES = Object.freeze({
|
|
337
|
+
en: [
|
|
338
|
+
'January',
|
|
339
|
+
'February',
|
|
340
|
+
'March',
|
|
341
|
+
'April',
|
|
342
|
+
'May',
|
|
343
|
+
'June',
|
|
344
|
+
'July',
|
|
345
|
+
'August',
|
|
346
|
+
'September',
|
|
347
|
+
'October',
|
|
348
|
+
'November',
|
|
349
|
+
'December',
|
|
350
|
+
],
|
|
351
|
+
es: [
|
|
352
|
+
'enero',
|
|
353
|
+
'febrero',
|
|
354
|
+
'marzo',
|
|
355
|
+
'abril',
|
|
356
|
+
'mayo',
|
|
357
|
+
'junio',
|
|
358
|
+
'julio',
|
|
359
|
+
'agosto',
|
|
360
|
+
'septiembre',
|
|
361
|
+
'octubre',
|
|
362
|
+
'noviembre',
|
|
363
|
+
'diciembre',
|
|
364
|
+
],
|
|
365
|
+
pt: [
|
|
366
|
+
'janeiro',
|
|
367
|
+
'fevereiro',
|
|
368
|
+
'março',
|
|
369
|
+
'abril',
|
|
370
|
+
'maio',
|
|
371
|
+
'junho',
|
|
372
|
+
'julho',
|
|
373
|
+
'agosto',
|
|
374
|
+
'setembro',
|
|
375
|
+
'outubro',
|
|
376
|
+
'novembro',
|
|
377
|
+
'dezembro',
|
|
378
|
+
],
|
|
379
|
+
fr: [
|
|
380
|
+
'janvier',
|
|
381
|
+
'février',
|
|
382
|
+
'mars',
|
|
383
|
+
'avril',
|
|
384
|
+
'mai',
|
|
385
|
+
'juin',
|
|
386
|
+
'juillet',
|
|
387
|
+
'août',
|
|
388
|
+
'septembre',
|
|
389
|
+
'octobre',
|
|
390
|
+
'novembre',
|
|
391
|
+
'décembre',
|
|
392
|
+
],
|
|
393
|
+
ar: [
|
|
394
|
+
'يناير',
|
|
395
|
+
'فبراير',
|
|
396
|
+
'مارس',
|
|
397
|
+
'أبريل',
|
|
398
|
+
'مايو',
|
|
399
|
+
'يونيو',
|
|
400
|
+
'يوليو',
|
|
401
|
+
'أغسطس',
|
|
402
|
+
'سبتمبر',
|
|
403
|
+
'أكتوبر',
|
|
404
|
+
'نوفمبر',
|
|
405
|
+
'ديسمبر',
|
|
406
|
+
],
|
|
407
|
+
de: [
|
|
408
|
+
'Januar',
|
|
409
|
+
'Februar',
|
|
410
|
+
'März',
|
|
411
|
+
'April',
|
|
412
|
+
'Mai',
|
|
413
|
+
'Juni',
|
|
414
|
+
'Juli',
|
|
415
|
+
'August',
|
|
416
|
+
'September',
|
|
417
|
+
'Oktober',
|
|
418
|
+
'November',
|
|
419
|
+
'Dezember',
|
|
420
|
+
],
|
|
421
|
+
it: [
|
|
422
|
+
'gennaio',
|
|
423
|
+
'febbraio',
|
|
424
|
+
'marzo',
|
|
425
|
+
'aprile',
|
|
426
|
+
'maggio',
|
|
427
|
+
'giugno',
|
|
428
|
+
'luglio',
|
|
429
|
+
'agosto',
|
|
430
|
+
'settembre',
|
|
431
|
+
'ottobre',
|
|
432
|
+
'novembre',
|
|
433
|
+
'dicembre',
|
|
434
|
+
],
|
|
435
|
+
ru: [
|
|
436
|
+
'января',
|
|
437
|
+
'февраля',
|
|
438
|
+
'марта',
|
|
439
|
+
'апреля',
|
|
440
|
+
'мая',
|
|
441
|
+
'июня',
|
|
442
|
+
'июля',
|
|
443
|
+
'августа',
|
|
444
|
+
'сентября',
|
|
445
|
+
'октября',
|
|
446
|
+
'ноября',
|
|
447
|
+
'декабря',
|
|
448
|
+
],
|
|
449
|
+
});
|
|
450
|
+
const INSTANT_DATE_TIME_GLUE = Object.freeze({
|
|
451
|
+
en: ', ',
|
|
452
|
+
es: ', ',
|
|
453
|
+
fr: ', ',
|
|
454
|
+
de: ', ',
|
|
455
|
+
ru: ', ',
|
|
456
|
+
it: ', ',
|
|
457
|
+
zh: ' ',
|
|
458
|
+
ar: '، ',
|
|
459
|
+
pt: ', ',
|
|
460
|
+
});
|
|
461
|
+
function formatDateParts(locale, year, month, day) {
|
|
462
|
+
const paddedYear = String(year).padStart(4, '0');
|
|
463
|
+
if (locale === 'zh') {
|
|
464
|
+
return `${paddedYear}年${String(month)}月${String(day)}日`;
|
|
465
|
+
}
|
|
466
|
+
const monthText = MONTH_NAMES[locale][month - 1] ?? String(month);
|
|
467
|
+
switch (locale) {
|
|
468
|
+
case 'es':
|
|
469
|
+
case 'pt':
|
|
470
|
+
return `${String(day)} de ${monthText} de ${paddedYear}`;
|
|
471
|
+
case 'de':
|
|
472
|
+
return `${String(day)}. ${monthText} ${paddedYear}`;
|
|
473
|
+
case 'en':
|
|
474
|
+
case 'fr':
|
|
475
|
+
case 'ru':
|
|
476
|
+
case 'it':
|
|
477
|
+
case 'ar':
|
|
478
|
+
return `${String(day)} ${monthText} ${paddedYear}`;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
function isCivilDateText(value) {
|
|
482
|
+
return tryParsePlainDate(value) !== undefined;
|
|
483
|
+
}
|
|
484
|
+
function isInstantText(value) {
|
|
485
|
+
return INSTANT_PATTERN.test(value) && tryParsePlainDate(value.slice(0, 10)) !== undefined;
|
|
486
|
+
}
|
|
487
|
+
function formatCivilDate(date, locale) {
|
|
488
|
+
return formatDateParts(locale, Number(date.slice(0, 4)), Number(date.slice(5, 7)), Number(date.slice(8, 10)));
|
|
489
|
+
}
|
|
490
|
+
function formatInstantText(instant, locale) {
|
|
491
|
+
const dateText = formatDateParts(locale, Number(instant.slice(0, 4)), Number(instant.slice(5, 7)), Number(instant.slice(8, 10)));
|
|
492
|
+
const hours = instant.slice(11, 13);
|
|
493
|
+
const minutes = instant.slice(14, 16);
|
|
494
|
+
const seconds = instant.slice(17, 19);
|
|
495
|
+
const clock = seconds === '00' ? `${hours}:${minutes}` : `${hours}:${minutes}:${seconds}`;
|
|
496
|
+
return `${dateText}${INSTANT_DATE_TIME_GLUE[locale]}${clock} UTC`;
|
|
497
|
+
}
|
|
498
|
+
const DRAFT_UTC_INSTANT_PATTERN = /^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,3})?Z$/u;
|
|
499
|
+
/** Formats a draft timestamp (canonical or whole-second ISO UTC instant, or civil date) in locale text. */
|
|
500
|
+
function formatDraftTimestamp(updatedAt, locale) {
|
|
501
|
+
if (DRAFT_UTC_INSTANT_PATTERN.test(updatedAt) &&
|
|
502
|
+
tryParsePlainDate(updatedAt.slice(0, 10)) !== undefined) {
|
|
503
|
+
return formatInstantText(updatedAt, locale);
|
|
504
|
+
}
|
|
505
|
+
if (isCivilDateText(updatedAt)) {
|
|
506
|
+
return formatCivilDate(updatedAt, locale);
|
|
507
|
+
}
|
|
508
|
+
return updatedAt;
|
|
509
|
+
}
|
|
510
|
+
/** Localized plural forms for duration units, matching `@azx-pbc/axiom-web`. */
|
|
511
|
+
const DURATION_UNIT_FORMS = Object.freeze({
|
|
512
|
+
en: Object.freeze({
|
|
513
|
+
hours: { one: 'hour', other: 'hours' },
|
|
514
|
+
minutes: { one: 'minute', other: 'minutes' },
|
|
515
|
+
seconds: { one: 'second', other: 'seconds' },
|
|
516
|
+
}),
|
|
517
|
+
es: Object.freeze({
|
|
518
|
+
hours: { one: 'hora', other: 'horas' },
|
|
519
|
+
minutes: { one: 'minuto', other: 'minutos' },
|
|
520
|
+
seconds: { one: 'segundo', other: 'segundos' },
|
|
521
|
+
}),
|
|
522
|
+
pt: Object.freeze({
|
|
523
|
+
hours: { one: 'hora', other: 'horas' },
|
|
524
|
+
minutes: { one: 'minuto', other: 'minutos' },
|
|
525
|
+
seconds: { one: 'segundo', other: 'segundos' },
|
|
526
|
+
}),
|
|
527
|
+
fr: Object.freeze({
|
|
528
|
+
hours: { one: 'heure', other: 'heures' },
|
|
529
|
+
minutes: { one: 'minute', other: 'minutes' },
|
|
530
|
+
seconds: { one: 'seconde', other: 'secondes' },
|
|
531
|
+
}),
|
|
532
|
+
ar: Object.freeze({
|
|
533
|
+
hours: { zero: 'ساعات', one: 'ساعة', two: 'ساعتان', few: 'ساعات', many: 'ساعة', other: 'ساعة' },
|
|
534
|
+
minutes: {
|
|
535
|
+
zero: 'دقائق',
|
|
536
|
+
one: 'دقيقة',
|
|
537
|
+
two: 'دقيقتان',
|
|
538
|
+
few: 'دقائق',
|
|
539
|
+
many: 'دقيقة',
|
|
540
|
+
other: 'دقيقة',
|
|
541
|
+
},
|
|
542
|
+
seconds: {
|
|
543
|
+
zero: 'ثوانٍ',
|
|
544
|
+
one: 'ثانية',
|
|
545
|
+
two: 'ثانيتان',
|
|
546
|
+
few: 'ثوانٍ',
|
|
547
|
+
many: 'ثانية',
|
|
548
|
+
other: 'ثانية',
|
|
549
|
+
},
|
|
550
|
+
}),
|
|
551
|
+
de: Object.freeze({
|
|
552
|
+
hours: { one: 'Stunde', other: 'Stunden' },
|
|
553
|
+
minutes: { one: 'Minute', other: 'Minuten' },
|
|
554
|
+
seconds: { one: 'Sekunde', other: 'Sekunden' },
|
|
555
|
+
}),
|
|
556
|
+
it: Object.freeze({
|
|
557
|
+
hours: { one: 'ora', other: 'ore' },
|
|
558
|
+
minutes: { one: 'minuto', other: 'minuti' },
|
|
559
|
+
seconds: { one: 'secondo', other: 'secondi' },
|
|
560
|
+
}),
|
|
561
|
+
ru: Object.freeze({
|
|
562
|
+
hours: { one: 'час', few: 'часа', many: 'часов', other: 'часов' },
|
|
563
|
+
minutes: { one: 'минута', few: 'минуты', many: 'минут', other: 'минут' },
|
|
564
|
+
seconds: { one: 'секунда', few: 'секунды', many: 'секунд', other: 'секунд' },
|
|
565
|
+
}),
|
|
566
|
+
zh: Object.freeze({
|
|
567
|
+
hours: { other: '小时' },
|
|
568
|
+
minutes: { other: '分钟' },
|
|
569
|
+
seconds: { other: '秒' },
|
|
570
|
+
}),
|
|
571
|
+
});
|
|
572
|
+
function quantityTextFor(value, locale) {
|
|
573
|
+
const amount = value['value'];
|
|
574
|
+
const unit = value['unit'];
|
|
575
|
+
if (typeof amount !== 'string' || typeof unit !== 'string')
|
|
576
|
+
return undefined;
|
|
577
|
+
return `${formatNumericText(amount, locale)} ${unit}`;
|
|
578
|
+
}
|
|
579
|
+
function durationTextFor(value, locale) {
|
|
580
|
+
const amount = value['amount'];
|
|
581
|
+
const unit = value['unit'];
|
|
582
|
+
if (typeof amount !== 'number' || !Number.isFinite(amount) || !isDurationUnit(unit)) {
|
|
583
|
+
return undefined;
|
|
584
|
+
}
|
|
585
|
+
const noun = countForm(locale, amount, DURATION_UNIT_FORMS[locale][unit]);
|
|
586
|
+
if (locale === 'ar' && cardinalCategory(locale, amount) === 'two') {
|
|
587
|
+
return noun;
|
|
588
|
+
}
|
|
589
|
+
return `${formatNumericText(String(amount), locale)} ${noun}`;
|
|
590
|
+
}
|
|
591
|
+
/** How a list of records reads when no entry has a scalar spelling of its own. */
|
|
592
|
+
const ROW_NOUNS = Object.freeze({
|
|
593
|
+
en: { one: 'row', other: 'rows' },
|
|
594
|
+
es: { one: 'fila', other: 'filas' },
|
|
595
|
+
pt: { one: 'linha', other: 'linhas' },
|
|
596
|
+
fr: { one: 'ligne', other: 'lignes' },
|
|
597
|
+
ar: { zero: 'صفوف', one: 'صف', two: 'صفان', few: 'صفوف', many: 'صفًا', other: 'صف' },
|
|
598
|
+
de: { one: 'Zeile', other: 'Zeilen' },
|
|
599
|
+
it: { one: 'riga', other: 'righe' },
|
|
600
|
+
ru: { one: 'строка', few: 'строки', many: 'строк', other: 'строк' },
|
|
601
|
+
zh: { other: '行' },
|
|
602
|
+
});
|
|
603
|
+
/** Currency symbols shared with `@azx-pbc/axiom-web`; unknown codes print beside the amount. */
|
|
604
|
+
const CURRENCY_SYMBOLS = Object.freeze({
|
|
605
|
+
USD: '$',
|
|
606
|
+
AUD: '$',
|
|
607
|
+
CAD: '$',
|
|
608
|
+
NZD: '$',
|
|
609
|
+
SGD: '$',
|
|
610
|
+
HKD: '$',
|
|
611
|
+
EUR: '€',
|
|
612
|
+
GBP: '£',
|
|
613
|
+
JPY: '¥',
|
|
614
|
+
CNY: '¥',
|
|
615
|
+
INR: '₹',
|
|
616
|
+
});
|
|
617
|
+
/** CLDR 48 currency mark placement and spacing per locale, matching `@azx-pbc/axiom-web`. */
|
|
618
|
+
const MONEY_MARK = Object.freeze({
|
|
619
|
+
en: { side: 'before', gap: '' },
|
|
620
|
+
zh: { side: 'before', gap: '' },
|
|
621
|
+
pt: { side: 'before', gap: '\u00A0' },
|
|
622
|
+
es: { side: 'after', gap: '\u00A0' },
|
|
623
|
+
fr: { side: 'after', gap: '\u00A0' },
|
|
624
|
+
ar: { side: 'after', gap: '\u00A0' },
|
|
625
|
+
de: { side: 'after', gap: '\u00A0' },
|
|
626
|
+
it: { side: 'after', gap: '\u00A0' },
|
|
627
|
+
ru: { side: 'after', gap: '\u00A0' },
|
|
628
|
+
});
|
|
629
|
+
/** The metre symbol one catalogue prints beside a coordinate accuracy radius. */
|
|
630
|
+
const METRE_SYMBOL = Object.freeze({
|
|
631
|
+
en: 'm',
|
|
632
|
+
es: 'm',
|
|
633
|
+
pt: 'm',
|
|
634
|
+
fr: 'm',
|
|
635
|
+
ar: 'م',
|
|
636
|
+
de: 'm',
|
|
637
|
+
it: 'm',
|
|
638
|
+
ru: 'м',
|
|
639
|
+
zh: '米',
|
|
640
|
+
});
|
|
641
|
+
function moneyText(value, locale) {
|
|
642
|
+
const minor = value['minor'];
|
|
643
|
+
const currency = value['currency'];
|
|
644
|
+
const scale = value['scale'];
|
|
645
|
+
if (typeof minor !== 'string' || typeof currency !== 'string' || typeof scale !== 'number') {
|
|
646
|
+
return undefined;
|
|
647
|
+
}
|
|
648
|
+
const negative = minor.startsWith('-');
|
|
649
|
+
const digits = (negative ? minor.slice(1) : minor).padStart(scale + 1, '0');
|
|
650
|
+
const whole = scale === 0 ? digits : digits.slice(0, digits.length - scale);
|
|
651
|
+
const fraction = scale === 0 ? '' : `.${digits.slice(digits.length - scale)}`;
|
|
652
|
+
const canonical = `${negative ? '-' : ''}${whole}${fraction}`;
|
|
653
|
+
const amount = groupCanonicalNumericText(canonical, locale);
|
|
654
|
+
const sign = amount.startsWith('-') ? '-' : '';
|
|
655
|
+
const unsigned = sign === '' ? amount : amount.slice(1);
|
|
656
|
+
const symbol = CURRENCY_SYMBOLS[currency];
|
|
657
|
+
const { side, gap } = MONEY_MARK[locale];
|
|
658
|
+
const mark = symbol ?? currency;
|
|
659
|
+
const space = symbol === undefined ? '\u00A0' : gap;
|
|
660
|
+
const placed = side === 'before' ? `${mark}${space}${unsigned}` : `${unsigned}${space}${mark}`;
|
|
661
|
+
return `${sign}${placed}`;
|
|
662
|
+
}
|
|
663
|
+
function addressTextFor(locale, value) {
|
|
664
|
+
const line1 = value['line1'];
|
|
665
|
+
const city = value['city'];
|
|
666
|
+
const postalCode = value['postalCode'];
|
|
667
|
+
const country = value['country'];
|
|
668
|
+
if (typeof line1 !== 'string' ||
|
|
669
|
+
typeof city !== 'string' ||
|
|
670
|
+
typeof postalCode !== 'string' ||
|
|
671
|
+
typeof country !== 'string') {
|
|
672
|
+
return undefined;
|
|
673
|
+
}
|
|
674
|
+
const parts = [line1];
|
|
675
|
+
const line2 = value['line2'];
|
|
676
|
+
if (typeof line2 === 'string')
|
|
677
|
+
parts.push(line2);
|
|
678
|
+
parts.push(city);
|
|
679
|
+
const region = value['region'];
|
|
680
|
+
if (typeof region === 'string')
|
|
681
|
+
parts.push(region);
|
|
682
|
+
parts.push(postalCode, country);
|
|
683
|
+
return parts.filter((part) => part !== '').join(LIST_SEPARATOR[locale]);
|
|
684
|
+
}
|
|
685
|
+
function coordinateTextFor(value, locale) {
|
|
686
|
+
const latitude = value['latitude'];
|
|
687
|
+
const longitude = value['longitude'];
|
|
688
|
+
if (typeof latitude !== 'string' || typeof longitude !== 'string')
|
|
689
|
+
return undefined;
|
|
690
|
+
const pair = `${latitude}${LIST_SEPARATOR[locale]}${longitude}`;
|
|
691
|
+
const accuracy = value['accuracy'];
|
|
692
|
+
return typeof accuracy === 'string'
|
|
693
|
+
? `${pair} ±${formatNumericText(accuracy, locale)} ${METRE_SYMBOL[locale]}`
|
|
694
|
+
: pair;
|
|
695
|
+
}
|
|
696
|
+
/** Whether a record matches the wire shape of a captured `media_ref` value. */
|
|
697
|
+
function isMediaRefRecord(value) {
|
|
698
|
+
return (typeof value['id'] === 'string' &&
|
|
699
|
+
typeof value['mime'] === 'string' &&
|
|
700
|
+
typeof value['byteSize'] === 'number' &&
|
|
701
|
+
typeof value['sha256'] === 'string');
|
|
702
|
+
}
|
|
703
|
+
/** Whether a record matches the wire shape of a `timeslot` value (`{ slotId, localDate, start, end }`). */
|
|
704
|
+
function isTimeslotRecord(value) {
|
|
705
|
+
return (typeof value['localDate'] === 'string' &&
|
|
706
|
+
typeof value['start'] === 'string' &&
|
|
707
|
+
typeof value['end'] === 'string');
|
|
708
|
+
}
|
|
709
|
+
/** Formats one structured wire record (money, address, coordinate, quantity, or duration). */
|
|
710
|
+
function structuredRecordText(value, locale) {
|
|
711
|
+
return (moneyText(value, locale) ??
|
|
712
|
+
addressTextFor(locale, value) ??
|
|
713
|
+
coordinateTextFor(value, locale) ??
|
|
714
|
+
quantityTextFor(value, locale) ??
|
|
715
|
+
durationTextFor(value, locale));
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* The host's display text for booleans, lists, decimals, money amounts, addresses, coordinates,
|
|
719
|
+
* quantities, durations, dates, UTC instants, and row-array counts, matching `@azx-pbc/axiom-web`
|
|
720
|
+
* without touching `Intl`.
|
|
721
|
+
*
|
|
722
|
+
* Plain string primitives (such as a year `"2026"` or reference `"1234567"`) are never re-grouped.
|
|
723
|
+
*/
|
|
724
|
+
function displayFor(locale) {
|
|
725
|
+
const words = YES_NO[locale];
|
|
726
|
+
const separator = LIST_SEPARATOR[locale];
|
|
727
|
+
const nouns = ROW_NOUNS[locale];
|
|
728
|
+
const display = (value, primitive, itemPrimitive) => {
|
|
729
|
+
if (isRecord(value) && primitive !== 'record') {
|
|
730
|
+
const structured = structuredRecordText(value, locale);
|
|
731
|
+
if (structured !== undefined)
|
|
732
|
+
return structured;
|
|
733
|
+
}
|
|
734
|
+
if (typeof value === 'string') {
|
|
735
|
+
if (primitive === 'decimal') {
|
|
736
|
+
return isDecimalText(value) ? groupCanonicalNumericText(value, locale) : undefined;
|
|
737
|
+
}
|
|
738
|
+
if (primitive === 'date') {
|
|
739
|
+
return isCivilDateText(value) ? formatCivilDate(value, locale) : undefined;
|
|
740
|
+
}
|
|
741
|
+
if (primitive === 'instant') {
|
|
742
|
+
return isInstantText(value) ? formatInstantText(value, locale) : undefined;
|
|
743
|
+
}
|
|
744
|
+
if (primitive !== undefined)
|
|
745
|
+
return undefined;
|
|
746
|
+
if (isCivilDateText(value))
|
|
747
|
+
return formatCivilDate(value, locale);
|
|
748
|
+
if (isInstantText(value))
|
|
749
|
+
return formatInstantText(value, locale);
|
|
750
|
+
if (value.includes('.') && isDecimalText(value)) {
|
|
751
|
+
return groupCanonicalNumericText(value, locale);
|
|
752
|
+
}
|
|
753
|
+
return undefined;
|
|
754
|
+
}
|
|
755
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
756
|
+
const text = String(value);
|
|
757
|
+
if (isDecimalText(text))
|
|
758
|
+
return groupCanonicalNumericText(text, locale);
|
|
759
|
+
}
|
|
760
|
+
if (typeof value === 'boolean')
|
|
761
|
+
return value ? words.yes : words.no;
|
|
762
|
+
if (Array.isArray(value)) {
|
|
763
|
+
// A declared repeating-record array (`itemPrimitive === 'record'`) always summarizes as a
|
|
764
|
+
// row count even when row member keys overlap with structured primitives such as duration.
|
|
765
|
+
// Untyped arrays format structured value lists (money[], quantity[], duration[], address[],
|
|
766
|
+
// coordinate[], media_ref[], and timeslot[]) per item instead of summarizing as rows.
|
|
767
|
+
const isRowArray = value.length > 0 &&
|
|
768
|
+
(itemPrimitive === 'record'
|
|
769
|
+
? value.every(isRecord)
|
|
770
|
+
: itemPrimitive === undefined &&
|
|
771
|
+
value.every((entry) => isRecord(entry) &&
|
|
772
|
+
!isMediaRefRecord(entry) &&
|
|
773
|
+
!isTimeslotRecord(entry) &&
|
|
774
|
+
structuredRecordText(entry, locale) === undefined));
|
|
775
|
+
if (isRowArray) {
|
|
776
|
+
return countedText(locale, value.length, nouns);
|
|
777
|
+
}
|
|
778
|
+
return value
|
|
779
|
+
.map((entry) => entry === null
|
|
780
|
+
? ''
|
|
781
|
+
: (display(entry, itemPrimitive) ?? renderValueText(entry, undefined, itemPrimitive)))
|
|
782
|
+
.join(separator);
|
|
783
|
+
}
|
|
784
|
+
return undefined;
|
|
785
|
+
};
|
|
786
|
+
return display;
|
|
787
|
+
}
|
|
788
|
+
/** Byte-size unit symbols across all nine shipped locales, matching `@azx-pbc/axiom-web`. */
|
|
789
|
+
const BYTE_UNITS = Object.freeze({
|
|
790
|
+
en: { b: 'B', kb: 'KB', mb: 'MB' },
|
|
791
|
+
es: { b: 'B', kb: 'KB', mb: 'MB' },
|
|
792
|
+
pt: { b: 'B', kb: 'KB', mb: 'MB' },
|
|
793
|
+
fr: { b: 'o', kb: 'ko', mb: 'Mo' },
|
|
794
|
+
ar: { b: 'بايت', kb: 'كيلوبايت', mb: 'ميغابايت' },
|
|
795
|
+
de: { b: 'B', kb: 'KB', mb: 'MB' },
|
|
796
|
+
it: { b: 'B', kb: 'KB', mb: 'MB' },
|
|
797
|
+
ru: { b: 'Б', kb: 'КБ', mb: 'МБ' },
|
|
798
|
+
zh: { b: '字节', kb: 'KB', mb: 'MB' },
|
|
799
|
+
});
|
|
800
|
+
/**
|
|
801
|
+
* A byte count as the size a sentence states, in the locale's marks and unit symbols.
|
|
802
|
+
*
|
|
803
|
+
* The bound and the offending size pass through the same function, which is what makes
|
|
804
|
+
* `Photo is 12 MB; the limit is 5 MB` compare two sizes rather than two integer byte counts.
|
|
805
|
+
*/
|
|
806
|
+
function bytesText(bytes, locale) {
|
|
807
|
+
const units = BYTE_UNITS[locale];
|
|
808
|
+
if (bytes >= 1_000_000)
|
|
809
|
+
return `${decimalText(bytes / 1_000_000, locale)} ${units.mb}`;
|
|
810
|
+
if (bytes >= 1_000)
|
|
811
|
+
return `${decimalText(bytes / 1_000, locale)} ${units.kb}`;
|
|
812
|
+
return `${String(bytes)} ${units.b}`;
|
|
813
|
+
}
|
|
814
|
+
/** A byte quotient without a trailing `.0`, written with the locale's decimal and group marks. */
|
|
815
|
+
function decimalText(value, locale) {
|
|
816
|
+
const text = Number.isInteger(value) ? String(value) : String(Math.round(value * 10) / 10);
|
|
817
|
+
return groupCanonicalNumericText(text, locale);
|
|
818
|
+
}
|
|
819
|
+
/** The offending size and the declared bound, each in the sentence's own units. */
|
|
820
|
+
function mediaSizeParts(limit, value, locale) {
|
|
821
|
+
return {
|
|
822
|
+
size: typeof value === 'number' ? bytesText(value, locale) : value,
|
|
823
|
+
bound: typeof limit === 'number' ? bytesText(limit, locale) : limit.join(', '),
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* The locales this catalogue carries, in the order the tables state them.
|
|
828
|
+
*
|
|
829
|
+
* It is the same order and set as `@azx-pbc/axiom-web`'s `FORM_COPY_LOCALES`; the parity gate holds
|
|
830
|
+
* the two lists equal, so a locale the reference renderer carries and this example does not is a
|
|
831
|
+
* failing case rather than a silent English fallback.
|
|
832
|
+
*/
|
|
833
|
+
export const HOST_COPY_LOCALES = ['en', 'es', 'pt', 'fr', 'ar', 'de', 'it', 'ru', 'zh'];
|
|
834
|
+
const MEDIA_TYPES = {
|
|
835
|
+
'image/jpeg': { name: 'JPEG', noun: 'image' },
|
|
836
|
+
'image/png': { name: 'PNG', noun: 'image' },
|
|
837
|
+
'image/gif': { name: 'GIF', noun: 'image' },
|
|
838
|
+
'image/webp': { name: 'WebP', noun: 'image' },
|
|
839
|
+
'image/heic': { name: 'HEIC', noun: 'image' },
|
|
840
|
+
'image/heif': { name: 'HEIF', noun: 'image' },
|
|
841
|
+
'image/svg+xml': { name: 'SVG', noun: 'image' },
|
|
842
|
+
'image/bmp': { name: 'BMP', noun: 'image' },
|
|
843
|
+
'image/tiff': { name: 'TIFF', noun: 'image' },
|
|
844
|
+
'image/avif': { name: 'AVIF', noun: 'image' },
|
|
845
|
+
'audio/mpeg': { name: 'MP3', noun: 'audio' },
|
|
846
|
+
'audio/mp4': { name: 'M4A', noun: 'audio' },
|
|
847
|
+
'audio/ogg': { name: 'Ogg', noun: 'audio' },
|
|
848
|
+
'audio/wav': { name: 'WAV', noun: 'audio' },
|
|
849
|
+
'audio/x-wav': { name: 'WAV', noun: 'audio' },
|
|
850
|
+
'audio/webm': { name: 'WebM', noun: 'audio' },
|
|
851
|
+
'audio/flac': { name: 'FLAC', noun: 'audio' },
|
|
852
|
+
'video/mp4': { name: 'MP4', noun: 'video' },
|
|
853
|
+
'video/webm': { name: 'WebM', noun: 'video' },
|
|
854
|
+
'video/quicktime': { name: 'QuickTime', noun: 'video' },
|
|
855
|
+
'video/ogg': { name: 'Ogg', noun: 'video' },
|
|
856
|
+
'application/pdf': { name: 'PDF', noun: 'file' },
|
|
857
|
+
'application/zip': { name: 'ZIP', noun: 'file' },
|
|
858
|
+
'application/json': { name: 'JSON', noun: 'file' },
|
|
859
|
+
'text/plain': { name: 'plain-text', noun: 'file' },
|
|
860
|
+
'text/csv': { name: 'CSV', noun: 'file' },
|
|
861
|
+
'application/msword': { name: 'Word', noun: 'file' },
|
|
862
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': {
|
|
863
|
+
name: 'Word',
|
|
864
|
+
noun: 'file',
|
|
865
|
+
},
|
|
866
|
+
'application/vnd.ms-excel': { name: 'Excel', noun: 'file' },
|
|
867
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': {
|
|
868
|
+
name: 'Excel',
|
|
869
|
+
noun: 'file',
|
|
870
|
+
},
|
|
871
|
+
'application/octet-stream': { name: 'binary', noun: 'file' },
|
|
872
|
+
};
|
|
873
|
+
const MEDIA_NOUNS = {
|
|
874
|
+
en: {
|
|
875
|
+
image: 'image',
|
|
876
|
+
imagePlural: 'images',
|
|
877
|
+
audio: 'audio file',
|
|
878
|
+
audioPlural: 'audio files',
|
|
879
|
+
video: 'video',
|
|
880
|
+
videoPlural: 'videos',
|
|
881
|
+
file: 'file',
|
|
882
|
+
filePlural: 'files',
|
|
883
|
+
},
|
|
884
|
+
es: {
|
|
885
|
+
image: 'imagen',
|
|
886
|
+
imagePlural: 'imágenes',
|
|
887
|
+
audio: 'archivo de audio',
|
|
888
|
+
audioPlural: 'archivos de audio',
|
|
889
|
+
video: 'vídeo',
|
|
890
|
+
videoPlural: 'vídeos',
|
|
891
|
+
file: 'archivo',
|
|
892
|
+
filePlural: 'archivos',
|
|
893
|
+
},
|
|
894
|
+
pt: {
|
|
895
|
+
image: 'imagem',
|
|
896
|
+
imagePlural: 'imagens',
|
|
897
|
+
audio: 'ficheiro de áudio',
|
|
898
|
+
audioPlural: 'ficheiros de áudio',
|
|
899
|
+
video: 'vídeo',
|
|
900
|
+
videoPlural: 'vídeos',
|
|
901
|
+
file: 'ficheiro',
|
|
902
|
+
filePlural: 'ficheiros',
|
|
903
|
+
},
|
|
904
|
+
fr: {
|
|
905
|
+
image: 'image',
|
|
906
|
+
imagePlural: 'images',
|
|
907
|
+
audio: 'fichier audio',
|
|
908
|
+
audioPlural: 'fichiers audio',
|
|
909
|
+
video: 'vidéo',
|
|
910
|
+
videoPlural: 'vidéos',
|
|
911
|
+
file: 'fichier',
|
|
912
|
+
filePlural: 'fichiers',
|
|
913
|
+
},
|
|
914
|
+
ar: {
|
|
915
|
+
image: 'صورة',
|
|
916
|
+
imagePlural: 'صور',
|
|
917
|
+
audio: 'ملف صوتي',
|
|
918
|
+
audioPlural: 'ملفات صوتية',
|
|
919
|
+
video: 'فيديو',
|
|
920
|
+
videoPlural: 'مقاطع فيديو',
|
|
921
|
+
file: 'ملف',
|
|
922
|
+
filePlural: 'ملفات',
|
|
923
|
+
},
|
|
924
|
+
de: {
|
|
925
|
+
image: 'Bild',
|
|
926
|
+
imagePlural: 'Bilder',
|
|
927
|
+
audio: 'Audiodatei',
|
|
928
|
+
audioPlural: 'Audiodateien',
|
|
929
|
+
video: 'Video',
|
|
930
|
+
videoPlural: 'Videos',
|
|
931
|
+
file: 'Datei',
|
|
932
|
+
filePlural: 'Dateien',
|
|
933
|
+
},
|
|
934
|
+
it: {
|
|
935
|
+
image: 'immagine',
|
|
936
|
+
imagePlural: 'immagini',
|
|
937
|
+
audio: 'file audio',
|
|
938
|
+
audioPlural: 'file audio',
|
|
939
|
+
video: 'video',
|
|
940
|
+
videoPlural: 'video',
|
|
941
|
+
file: 'file',
|
|
942
|
+
filePlural: 'file',
|
|
943
|
+
},
|
|
944
|
+
ru: {
|
|
945
|
+
image: 'изображение',
|
|
946
|
+
imagePlural: 'изображения',
|
|
947
|
+
audio: 'аудиофайл',
|
|
948
|
+
audioPlural: 'аудиофайлы',
|
|
949
|
+
video: 'видео',
|
|
950
|
+
videoPlural: 'видеофайлы',
|
|
951
|
+
file: 'файл',
|
|
952
|
+
filePlural: 'файлы',
|
|
953
|
+
},
|
|
954
|
+
zh: {
|
|
955
|
+
image: '图片',
|
|
956
|
+
imagePlural: '图片',
|
|
957
|
+
audio: '音频文件',
|
|
958
|
+
audioPlural: '音频文件',
|
|
959
|
+
video: '视频',
|
|
960
|
+
videoPlural: '视频',
|
|
961
|
+
file: '文件',
|
|
962
|
+
filePlural: '文件',
|
|
963
|
+
},
|
|
964
|
+
};
|
|
965
|
+
const UNKNOWN_TYPE = {
|
|
966
|
+
en: {
|
|
967
|
+
one: 'a type this field does not take',
|
|
968
|
+
many: 'other file types',
|
|
969
|
+
},
|
|
970
|
+
es: {
|
|
971
|
+
one: 'un tipo que este campo no admite',
|
|
972
|
+
many: 'otros tipos de archivo',
|
|
973
|
+
},
|
|
974
|
+
pt: {
|
|
975
|
+
one: 'um tipo que este campo não aceita',
|
|
976
|
+
many: 'outros tipos de ficheiro',
|
|
977
|
+
},
|
|
978
|
+
fr: {
|
|
979
|
+
one: "un type que ce champ n'accepte pas",
|
|
980
|
+
many: "d'autres types de fichier",
|
|
981
|
+
},
|
|
982
|
+
ar: {
|
|
983
|
+
one: 'نوع لا يقبله هذا الحقل',
|
|
984
|
+
many: 'أنواع ملفات أخرى',
|
|
985
|
+
},
|
|
986
|
+
de: {
|
|
987
|
+
one: 'ein Typ, den dieses Feld nicht annimmt',
|
|
988
|
+
many: 'andere Dateitypen',
|
|
989
|
+
},
|
|
990
|
+
it: {
|
|
991
|
+
one: 'un tipo che questo campo non accetta',
|
|
992
|
+
many: 'altri tipi di file',
|
|
993
|
+
},
|
|
994
|
+
ru: {
|
|
995
|
+
one: 'тип, который это поле не принимает',
|
|
996
|
+
many: 'другие типы файлов',
|
|
997
|
+
},
|
|
998
|
+
zh: {
|
|
999
|
+
one: '此字段不接受的文件类型',
|
|
1000
|
+
many: '其他文件类型',
|
|
1001
|
+
},
|
|
1002
|
+
};
|
|
1003
|
+
const MEDIA_GENDER = {
|
|
1004
|
+
en: { image: 'n', audio: 'n', video: 'n', file: 'n' },
|
|
1005
|
+
es: { image: 'f', audio: 'm', video: 'm', file: 'm' },
|
|
1006
|
+
pt: { image: 'f', audio: 'm', video: 'm', file: 'm' },
|
|
1007
|
+
fr: { image: 'f', audio: 'm', video: 'f', file: 'm' },
|
|
1008
|
+
ar: { image: 'f', audio: 'm', video: 'm', file: 'm' },
|
|
1009
|
+
de: { image: 'n', audio: 'f', video: 'n', file: 'f' },
|
|
1010
|
+
it: { image: 'f', audio: 'm', video: 'm', file: 'm' },
|
|
1011
|
+
ru: { image: 'n', audio: 'm', video: 'n', file: 'm' },
|
|
1012
|
+
zh: { image: 'n', audio: 'n', video: 'n', file: 'n' },
|
|
1013
|
+
};
|
|
1014
|
+
function mediaTypeOf(entry) {
|
|
1015
|
+
const lower = entry.toLowerCase();
|
|
1016
|
+
return lower.startsWith('.') ? (MEDIA_EXTENSION_TYPES.get(lower) ?? '') : lower;
|
|
1017
|
+
}
|
|
1018
|
+
function namedMediaType(entry) {
|
|
1019
|
+
const type = mediaTypeOf(entry);
|
|
1020
|
+
return type === '' ? undefined : MEDIA_TYPES[type];
|
|
1021
|
+
}
|
|
1022
|
+
function mediaArticle(locale, noun, name) {
|
|
1023
|
+
switch (locale) {
|
|
1024
|
+
case 'en':
|
|
1025
|
+
return /^[aeiou]/iu.test(name) ? 'an' : 'a';
|
|
1026
|
+
case 'es':
|
|
1027
|
+
return MEDIA_GENDER.es[noun] === 'f' ? 'una' : 'un';
|
|
1028
|
+
case 'pt':
|
|
1029
|
+
return MEDIA_GENDER.pt[noun] === 'f' ? 'uma' : 'um';
|
|
1030
|
+
case 'fr':
|
|
1031
|
+
return MEDIA_GENDER.fr[noun] === 'f' ? 'une' : 'un';
|
|
1032
|
+
case 'de':
|
|
1033
|
+
return MEDIA_GENDER.de[noun] === 'f' ? 'eine' : 'ein';
|
|
1034
|
+
case 'it':
|
|
1035
|
+
return MEDIA_GENDER.it[noun] === 'f' ? 'una' : 'un';
|
|
1036
|
+
case 'ar':
|
|
1037
|
+
case 'ru':
|
|
1038
|
+
case 'zh':
|
|
1039
|
+
return '';
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
function mediaNameFirst(locale) {
|
|
1043
|
+
return locale === 'en' || locale === 'zh';
|
|
1044
|
+
}
|
|
1045
|
+
function mediaTypeNameIn(locale, mediaType) {
|
|
1046
|
+
const named = namedMediaType(mediaType);
|
|
1047
|
+
if (named === undefined)
|
|
1048
|
+
return UNKNOWN_TYPE[locale].one;
|
|
1049
|
+
const noun = MEDIA_NOUNS[locale][named.noun];
|
|
1050
|
+
const article = mediaArticle(locale, named.noun, named.name);
|
|
1051
|
+
if (mediaNameFirst(locale)) {
|
|
1052
|
+
return article === '' ? `${named.name} ${noun}` : `${article} ${named.name} ${noun}`;
|
|
1053
|
+
}
|
|
1054
|
+
if (locale === 'de')
|
|
1055
|
+
return `${article} ${named.name}-${noun}`;
|
|
1056
|
+
if (locale === 'it' && article === 'una' && /^[aeiou]/iu.test(noun)) {
|
|
1057
|
+
return `un'${noun} ${named.name}`;
|
|
1058
|
+
}
|
|
1059
|
+
return article === '' ? `${noun} ${named.name}` : `${article} ${noun} ${named.name}`;
|
|
1060
|
+
}
|
|
1061
|
+
function mediaPluralOf(locale, noun) {
|
|
1062
|
+
switch (noun) {
|
|
1063
|
+
case 'image':
|
|
1064
|
+
return MEDIA_NOUNS[locale].imagePlural;
|
|
1065
|
+
case 'audio':
|
|
1066
|
+
return MEDIA_NOUNS[locale].audioPlural;
|
|
1067
|
+
case 'video':
|
|
1068
|
+
return MEDIA_NOUNS[locale].videoPlural;
|
|
1069
|
+
case 'file':
|
|
1070
|
+
return MEDIA_NOUNS[locale].filePlural;
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
function mediaTypePluralIn(locale, mediaType) {
|
|
1074
|
+
const named = namedMediaType(mediaType);
|
|
1075
|
+
if (named === undefined)
|
|
1076
|
+
return UNKNOWN_TYPE[locale].many;
|
|
1077
|
+
const noun = mediaPluralOf(locale, named.noun);
|
|
1078
|
+
if (mediaNameFirst(locale))
|
|
1079
|
+
return `${named.name} ${noun}`;
|
|
1080
|
+
if (locale === 'de')
|
|
1081
|
+
return `${named.name}-${noun}`;
|
|
1082
|
+
return `${noun} ${named.name}`;
|
|
1083
|
+
}
|
|
1084
|
+
function mediaSeparatorIn(locale) {
|
|
1085
|
+
switch (locale) {
|
|
1086
|
+
case 'en':
|
|
1087
|
+
return ' or ';
|
|
1088
|
+
case 'es':
|
|
1089
|
+
return ' o ';
|
|
1090
|
+
case 'pt':
|
|
1091
|
+
return ' ou ';
|
|
1092
|
+
case 'fr':
|
|
1093
|
+
return ' ou ';
|
|
1094
|
+
case 'ar':
|
|
1095
|
+
return ' أو ';
|
|
1096
|
+
case 'de':
|
|
1097
|
+
return ' oder ';
|
|
1098
|
+
case 'it':
|
|
1099
|
+
return ' o ';
|
|
1100
|
+
case 'ru':
|
|
1101
|
+
return ' или ';
|
|
1102
|
+
case 'zh':
|
|
1103
|
+
return '或';
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
const CATALOGUE = {
|
|
1107
|
+
en: {
|
|
1108
|
+
required: (label, rowName) => rowName === undefined ? `${label} is required` : `${label} in ${rowName} is required`,
|
|
1109
|
+
cardinality: (label, bound, count, limit) => {
|
|
1110
|
+
if (bound === 'minItems' && limit === 0)
|
|
1111
|
+
return undefined;
|
|
1112
|
+
const limitNoun = countForm('en', limit, { one: 'entry', other: 'entries' });
|
|
1113
|
+
const countNoun = countForm('en', count, { one: 'entry', other: 'entries' });
|
|
1114
|
+
return bound === 'minItems'
|
|
1115
|
+
? `${label} needs at least ${String(limit)} ${limitNoun}. It has ${String(count)} ${countNoun}.`
|
|
1116
|
+
: `${label} allows at most ${String(limit)} ${limitNoun}. It has ${String(count)} ${countNoun}.`;
|
|
1117
|
+
},
|
|
1118
|
+
mediaConstraint: (label, member, limit, value) => {
|
|
1119
|
+
if (member === 'accept') {
|
|
1120
|
+
const admitted = Array.isArray(limit)
|
|
1121
|
+
? limit.map((entry) => mediaTypePluralIn('en', entry)).join(mediaSeparatorIn('en'))
|
|
1122
|
+
: String(limit);
|
|
1123
|
+
return `${label} takes ${admitted}. The file is ${mediaTypeNameIn('en', String(value))}.`;
|
|
1124
|
+
}
|
|
1125
|
+
const { size, bound } = mediaSizeParts(limit, value, 'en');
|
|
1126
|
+
return member === 'minBytes'
|
|
1127
|
+
? `${label} is ${size}; the minimum is ${bound}.`
|
|
1128
|
+
: `${label} is ${size}; the limit is ${bound}.`;
|
|
1129
|
+
},
|
|
1130
|
+
rowCount: (label, expected, actual, source, reason, ceiling) => {
|
|
1131
|
+
const expectedNoun = countForm('en', expected, { one: 'row', other: 'rows' });
|
|
1132
|
+
const actualNoun = countForm('en', actual, { one: 'row', other: 'rows' });
|
|
1133
|
+
return reason === undefined
|
|
1134
|
+
? `${label}: expected ${String(expected)} ${expectedNoun} from ${source}; the record has ${String(actual)} ${actualNoun}.`
|
|
1135
|
+
: reason === 'ceiling'
|
|
1136
|
+
? `${label}: the row count ${source} exceeds the limit of ${String(ceiling ?? expected)}.`
|
|
1137
|
+
: `${label}: the row count ${source} is not a valid whole number.`;
|
|
1138
|
+
},
|
|
1139
|
+
invalidValue: (label) => `${label} no longer has that choice. Pick another one.`,
|
|
1140
|
+
unavailableOption: (label) => `${label} is not available for this answer. Pick another option.`,
|
|
1141
|
+
emptyOptions: () => 'This field has no options.',
|
|
1142
|
+
optionsNeedDependencies: (labels) => labels.length === 0
|
|
1143
|
+
? 'Complete the required earlier fields to see options.'
|
|
1144
|
+
: `Answer ${labels.join(LIST_SEPARATOR.en)} first to see options.`,
|
|
1145
|
+
undeterminedOption: (label, optionLabel, cause) => {
|
|
1146
|
+
const because = cause === 'deferred'
|
|
1147
|
+
? 'The server has not answered yet.'
|
|
1148
|
+
: 'The check could not be answered here.';
|
|
1149
|
+
return `Could not check whether ${optionLabel} is available for ${label}. ${because}`;
|
|
1150
|
+
},
|
|
1151
|
+
loadMoreOptions: () => 'Load more options',
|
|
1152
|
+
deferredValue: () => 'The server did not send this value. You can still answer the field.',
|
|
1153
|
+
notEditable: (label, access) => {
|
|
1154
|
+
switch (access) {
|
|
1155
|
+
case 'masked':
|
|
1156
|
+
return `${label} is hidden here.`;
|
|
1157
|
+
case 'hidden':
|
|
1158
|
+
return `${label} is not shown.`;
|
|
1159
|
+
case 'write_only':
|
|
1160
|
+
return `You can add ${label}, but you cannot read it back.`;
|
|
1161
|
+
case 'read_only':
|
|
1162
|
+
case 'read_write':
|
|
1163
|
+
return `${label} is not editable`;
|
|
1164
|
+
}
|
|
1165
|
+
},
|
|
1166
|
+
rowKey: (label, rowName) => rowName === undefined
|
|
1167
|
+
? `${label}: two rows share the same key. Change one so each row is distinct.`
|
|
1168
|
+
: `${label}: another row already uses ${rowName}. Pick a different one.`,
|
|
1169
|
+
sectionToggle: (title, expanded) => title === undefined
|
|
1170
|
+
? `${expanded ? 'Hide' : 'Show'} this section`
|
|
1171
|
+
: `${expanded ? 'Hide' : 'Show'} ${title}`,
|
|
1172
|
+
rowsEmpty: () => 'No rows yet.',
|
|
1173
|
+
nestedListRefused: () => 'This list contains another list, and this form cannot show that yet. Move the inner list to the top level.',
|
|
1174
|
+
rowRemoved: (count) => count === 0
|
|
1175
|
+
? 'Row removed. No rows remain.'
|
|
1176
|
+
: countForm('en', count, {
|
|
1177
|
+
one: `Row removed. ${String(count)} row remains.`,
|
|
1178
|
+
other: `Row removed. ${String(count)} rows remain.`,
|
|
1179
|
+
}),
|
|
1180
|
+
rowAtPosition: (position) => `row ${String(position)}`,
|
|
1181
|
+
addRow: () => 'Add row',
|
|
1182
|
+
removeRow: (name) => `Remove row ${name}`,
|
|
1183
|
+
rowRemoveFailed: () => 'The row was not removed.',
|
|
1184
|
+
rowAddFailed: () => 'The row was not added.',
|
|
1185
|
+
rowRefused: () => 'the form did not accept the change',
|
|
1186
|
+
captureSignature: (label) => `Sign ${label}`,
|
|
1187
|
+
captureFailed: () => 'No signature was captured.',
|
|
1188
|
+
signerFailed: () => 'The signature pad stopped responding.',
|
|
1189
|
+
attachMedia: () => 'Attach file',
|
|
1190
|
+
removeMedia: (name) => `Remove ${name}`,
|
|
1191
|
+
mediaFailed: () => 'The file was not attached.',
|
|
1192
|
+
positionCapture: (label) => `Use my location for ${label}`,
|
|
1193
|
+
positionRequesting: () => 'Requesting your location…',
|
|
1194
|
+
positionDenied: () => 'Location permission was denied. Enter the coordinates below instead.',
|
|
1195
|
+
positionUnavailable: () => 'This device cannot provide a location. Enter the coordinates below instead.',
|
|
1196
|
+
positionTimedOut: () => 'The location request timed out. Enter the coordinates below instead.',
|
|
1197
|
+
positionFailed: () => 'The location could not be read.',
|
|
1198
|
+
positionInvalidReading: () => 'The device returned a position outside the valid range. Enter the coordinates below instead.',
|
|
1199
|
+
screenUnavailable: (_screenId) => 'This form cannot be submitted yet. One of its checks could not be decided, so try again when the connection returns.',
|
|
1200
|
+
buffer: (reason, params) => bufferText('en', reason, params),
|
|
1201
|
+
display: displayFor('en'),
|
|
1202
|
+
requiredMarker: () => 'required',
|
|
1203
|
+
rankMoveUp: (label) => `Move ${label} up`,
|
|
1204
|
+
rankMoveDown: (label) => `Move ${label} down`,
|
|
1205
|
+
rankRemove: (label) => `Remove ${label}`,
|
|
1206
|
+
addressLine1: () => 'Line 1',
|
|
1207
|
+
addressLine2: () => 'Line 2',
|
|
1208
|
+
addressCity: () => 'City',
|
|
1209
|
+
addressRegion: () => 'Region / state',
|
|
1210
|
+
addressPostalCode: () => 'Postal code',
|
|
1211
|
+
addressCountry: () => 'Country',
|
|
1212
|
+
cacheLoading: () => 'Opening the cached form…',
|
|
1213
|
+
cacheOpenFailed: () => 'This form cannot be opened from the cache.',
|
|
1214
|
+
cacheOpenFailedDetail: () => 'The saved copy could not be read. Try again, and check for an update if it keeps failing.',
|
|
1215
|
+
cacheOffline: () => 'This form cannot be opened offline.',
|
|
1216
|
+
cacheRetry: () => 'Try again',
|
|
1217
|
+
cacheSubmit: () => 'Submit',
|
|
1218
|
+
cacheSubmitWriteFailed: () => 'The cache refused the write. Your answers are still on this screen, so try again.',
|
|
1219
|
+
cacheSubmitInvalid: () => 'The form could not be submitted. Check the highlighted fields and try again.',
|
|
1220
|
+
cacheSavedQueued: () => 'Saved on this device. It will send when you are back online.',
|
|
1221
|
+
cacheSavedExisting: () => 'This was already saved on this device. It will send when you are back online.',
|
|
1222
|
+
cacheDraftTitle: () => 'Resume your saved answers?',
|
|
1223
|
+
cacheDraftBody: (updatedAt) => `You have saved answers from ${formatDraftTimestamp(updatedAt, 'en')}. You can resume them or start fresh.`,
|
|
1224
|
+
cacheDraftResume: () => 'Resume saved answers',
|
|
1225
|
+
cacheDraftDiscard: () => 'Start fresh',
|
|
1226
|
+
signatureUnavailable: (label) => `${label} cannot be signed on this device.`,
|
|
1227
|
+
cacheRefusal: (refusal) => {
|
|
1228
|
+
switch (refusal.reason) {
|
|
1229
|
+
case 'artifact_hash':
|
|
1230
|
+
return 'The saved form does not match the expected copy. Check for an update and try again.';
|
|
1231
|
+
case 'no_record_date':
|
|
1232
|
+
return 'This form needs a record date to open offline. Open it with a date set.';
|
|
1233
|
+
case 'table_digest_missing':
|
|
1234
|
+
return 'A table this form needs cannot be verified on this device. Check for an update and try again.';
|
|
1235
|
+
case 'table_digest_mismatch':
|
|
1236
|
+
return 'A saved table does not match the form that pins it. Check for an update and try again.';
|
|
1237
|
+
case 'table_missing':
|
|
1238
|
+
return 'A table this form needs is not saved on this device yet. Check for an update and try again.';
|
|
1239
|
+
case 'table_stale':
|
|
1240
|
+
return 'A saved table is out of date for this record. Check for an update and try again.';
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
cachePublishRefusal: (refusal) => {
|
|
1244
|
+
switch (refusal.reason) {
|
|
1245
|
+
case 'artifact_digest_mismatch':
|
|
1246
|
+
return 'The saved form does not match the expected copy, so it was not installed. Check for an update and try again.';
|
|
1247
|
+
case 'artifact_conflict':
|
|
1248
|
+
return 'A different copy of this form is already saved on this device. Check for an update and try again.';
|
|
1249
|
+
case 'dataset_digest_mismatch':
|
|
1250
|
+
return 'A table does not match the form that pins it, so nothing was installed. Check for an update and try again.';
|
|
1251
|
+
case 'dataset_conflict':
|
|
1252
|
+
return 'A different copy of a table is already saved on this device. Check for an update and try again.';
|
|
1253
|
+
case 'dataset_unpinned':
|
|
1254
|
+
return 'The update carries a table this form does not use, so nothing was installed. Check for an update and try again.';
|
|
1255
|
+
}
|
|
1256
|
+
},
|
|
1257
|
+
},
|
|
1258
|
+
es: {
|
|
1259
|
+
required: (label, rowName) => rowName === undefined ? `${label} es obligatorio` : `${label} en ${rowName} es obligatorio`,
|
|
1260
|
+
cardinality: (label, bound, count, limit) => {
|
|
1261
|
+
if (bound === 'minItems' && limit === 0)
|
|
1262
|
+
return undefined;
|
|
1263
|
+
const noun = (value) => countForm('es', value, { one: 'fila', other: 'filas' });
|
|
1264
|
+
return bound === 'minItems'
|
|
1265
|
+
? `${label} necesita al menos ${String(limit)} ${noun(limit)}. Tiene ${String(count)} ${noun(count)}.`
|
|
1266
|
+
: `${label} permite como máximo ${String(limit)} ${noun(limit)}. Tiene ${String(count)} ${noun(count)}.`;
|
|
1267
|
+
},
|
|
1268
|
+
mediaConstraint: (label, member, limit, value) => {
|
|
1269
|
+
if (member === 'accept') {
|
|
1270
|
+
const admitted = Array.isArray(limit)
|
|
1271
|
+
? limit.map((entry) => mediaTypePluralIn('es', entry)).join(mediaSeparatorIn('es'))
|
|
1272
|
+
: String(limit);
|
|
1273
|
+
return `${label} acepta ${admitted}. El archivo es ${mediaTypeNameIn('es', String(value))}.`;
|
|
1274
|
+
}
|
|
1275
|
+
const { size, bound } = mediaSizeParts(limit, value, 'es');
|
|
1276
|
+
return member === 'minBytes'
|
|
1277
|
+
? `${label} pesa ${size}; el mínimo es ${bound}.`
|
|
1278
|
+
: `${label} pesa ${size}; el límite es ${bound}.`;
|
|
1279
|
+
},
|
|
1280
|
+
rowCount: (label, expected, actual, source, reason, ceiling) => {
|
|
1281
|
+
const noun = (value) => countForm('es', value, { one: 'fila', other: 'filas' });
|
|
1282
|
+
return reason === undefined
|
|
1283
|
+
? `${label}: se esperaban ${String(expected)} ${noun(expected)} de ${source}; el registro tiene ${String(actual)} ${noun(actual)}.`
|
|
1284
|
+
: reason === 'ceiling'
|
|
1285
|
+
? `${label}: el recuento ${source} supera el límite de ${String(ceiling ?? expected)}.`
|
|
1286
|
+
: `${label}: el recuento ${source} no es un número entero válido.`;
|
|
1287
|
+
},
|
|
1288
|
+
invalidValue: (label) => `${label} ya no ofrece ese valor`,
|
|
1289
|
+
unavailableOption: (label) => `${label} no se puede elegir con este registro`,
|
|
1290
|
+
emptyOptions: () => 'No se ofrece ninguna opción.',
|
|
1291
|
+
optionsNeedDependencies: (labels) => labels.length === 0
|
|
1292
|
+
? 'Completa los campos previos necesarios para ver las opciones.'
|
|
1293
|
+
: `Responde primero a ${labels.join(LIST_SEPARATOR.es)} para ver las opciones.`,
|
|
1294
|
+
undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
|
|
1295
|
+
? `No se pudo comprobar si ${optionLabel} está disponible para ${label}. El servidor aún no ha respondido.`
|
|
1296
|
+
: `No se pudo comprobar si ${optionLabel} está disponible para ${label}. La comprobación no se pudo resolver aquí.`,
|
|
1297
|
+
loadMoreOptions: () => 'Cargar más opciones',
|
|
1298
|
+
deferredValue: () => 'Pendiente: el servidor retuvo este valor, así que aquí no se ha respondido.',
|
|
1299
|
+
notEditable: (label, access) => {
|
|
1300
|
+
switch (access) {
|
|
1301
|
+
case 'masked':
|
|
1302
|
+
return `${label}: el valor está oculto para ti`;
|
|
1303
|
+
case 'hidden':
|
|
1304
|
+
return `${label}: el valor no se muestra`;
|
|
1305
|
+
case 'write_only':
|
|
1306
|
+
return `${label}: puedes añadir un valor pero no volver a leerlo`;
|
|
1307
|
+
case 'read_only':
|
|
1308
|
+
case 'read_write':
|
|
1309
|
+
return `${label} no se puede editar`;
|
|
1310
|
+
}
|
|
1311
|
+
},
|
|
1312
|
+
rowKey: (label, rowName) => rowName === undefined
|
|
1313
|
+
? `${label}: dos filas comparten la misma clave. Cambia una para que cada fila sea distinta.`
|
|
1314
|
+
: `${label}: otra fila ya usa ${rowName}. Elige una diferente.`,
|
|
1315
|
+
sectionToggle: (title, expanded) => title === undefined
|
|
1316
|
+
? `${expanded ? 'Ocultar' : 'Mostrar'} sección`
|
|
1317
|
+
: `${title}: ${expanded ? 'ocultar' : 'mostrar'}`,
|
|
1318
|
+
rowsEmpty: () => 'No hay filas.',
|
|
1319
|
+
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.',
|
|
1320
|
+
rowRemoved: (count) => count === 0
|
|
1321
|
+
? 'Fila eliminada. No quedan filas.'
|
|
1322
|
+
: countForm('es', count, {
|
|
1323
|
+
one: `Fila eliminada. ${String(count)} fila queda.`,
|
|
1324
|
+
other: `Fila eliminada. ${String(count)} filas quedan.`,
|
|
1325
|
+
}),
|
|
1326
|
+
rowAtPosition: (position) => `en la posición ${String(position)}`,
|
|
1327
|
+
addRow: () => 'Añadir fila',
|
|
1328
|
+
removeRow: (name) => `Eliminar la fila ${name}`,
|
|
1329
|
+
rowRemoveFailed: () => 'La fila no se eliminó.',
|
|
1330
|
+
rowAddFailed: () => 'La fila no se añadió.',
|
|
1331
|
+
rowRefused: () => 'el registro rechazó el cambio',
|
|
1332
|
+
captureSignature: (label) => `Firmar ${label}`,
|
|
1333
|
+
captureFailed: () => 'No se capturó ninguna firma.',
|
|
1334
|
+
signerFailed: () => 'El panel de firma dejó de responder.',
|
|
1335
|
+
attachMedia: () => 'Adjuntar archivo',
|
|
1336
|
+
removeMedia: (name) => `Quitar ${name}`,
|
|
1337
|
+
mediaFailed: () => 'El archivo no se adjuntó.',
|
|
1338
|
+
positionCapture: (label) => `Usar mi ubicación para ${label}`,
|
|
1339
|
+
positionRequesting: () => 'Solicitando tu ubicación…',
|
|
1340
|
+
positionDenied: () => 'Se denegó el permiso de ubicación. Introduce las coordenadas abajo.',
|
|
1341
|
+
positionUnavailable: () => 'Este dispositivo no puede proporcionar una ubicación. Introduce las coordenadas abajo.',
|
|
1342
|
+
positionTimedOut: () => 'La solicitud de ubicación agotó el tiempo de espera. Introduce las coordenadas abajo.',
|
|
1343
|
+
positionFailed: () => 'No se pudo leer la ubicación.',
|
|
1344
|
+
positionInvalidReading: () => 'El dispositivo devolvió una posición fuera del rango válido. Introduce las coordenadas abajo.',
|
|
1345
|
+
screenUnavailable: (screenId) => `Este formulario no se puede enviar (${screenId}).`,
|
|
1346
|
+
buffer: (reason, params) => bufferText('es', reason, params),
|
|
1347
|
+
display: displayFor('es'),
|
|
1348
|
+
requiredMarker: () => 'obligatorio',
|
|
1349
|
+
rankMoveUp: (label) => `Subir ${label}`,
|
|
1350
|
+
rankMoveDown: (label) => `Bajar ${label}`,
|
|
1351
|
+
rankRemove: (label) => `Quitar ${label}`,
|
|
1352
|
+
addressLine1: () => 'Línea 1',
|
|
1353
|
+
addressLine2: () => 'Línea 2',
|
|
1354
|
+
addressCity: () => 'Ciudad',
|
|
1355
|
+
addressRegion: () => 'Región / provincia',
|
|
1356
|
+
addressPostalCode: () => 'Código postal',
|
|
1357
|
+
addressCountry: () => 'País',
|
|
1358
|
+
cacheLoading: () => 'Abriendo el formulario guardado…',
|
|
1359
|
+
cacheOpenFailed: () => 'Este formulario no se puede abrir desde la memoria.',
|
|
1360
|
+
cacheOpenFailedDetail: () => 'La copia guardada no se pudo leer. Inténtalo de nuevo y busca una actualización si sigue fallando.',
|
|
1361
|
+
cacheOffline: () => 'Este formulario no se puede abrir sin conexión.',
|
|
1362
|
+
cacheRetry: () => 'Reintentar',
|
|
1363
|
+
cacheSubmit: () => 'Enviar',
|
|
1364
|
+
cacheSubmitWriteFailed: () => 'La memoria rechazó el guardado. Tus respuestas siguen en esta pantalla, así que inténtalo de nuevo.',
|
|
1365
|
+
cacheSubmitInvalid: () => 'El formulario no se pudo enviar. Revisa los campos marcados e inténtalo de nuevo.',
|
|
1366
|
+
cacheSavedQueued: () => 'Guardado en este dispositivo. Se enviará cuando vuelvas a tener conexión.',
|
|
1367
|
+
cacheSavedExisting: () => 'Esto ya estaba guardado en este dispositivo. Se enviará cuando vuelvas a tener conexión.',
|
|
1368
|
+
cacheDraftTitle: () => '¿Quieres continuar con tus respuestas guardadas?',
|
|
1369
|
+
cacheDraftBody: (updatedAt) => `Tienes respuestas guardadas de ${formatDraftTimestamp(updatedAt, 'es')}. Puedes continuar con ellas o empezar de nuevo.`,
|
|
1370
|
+
cacheDraftResume: () => 'Continuar con las respuestas guardadas',
|
|
1371
|
+
cacheDraftDiscard: () => 'Empezar de nuevo',
|
|
1372
|
+
signatureUnavailable: (label) => `${label} no se puede firmar en este dispositivo.`,
|
|
1373
|
+
cacheRefusal: (refusal) => {
|
|
1374
|
+
switch (refusal.reason) {
|
|
1375
|
+
case 'artifact_hash':
|
|
1376
|
+
return 'El formulario guardado no coincide con la copia esperada. Busca una actualización e inténtalo de nuevo.';
|
|
1377
|
+
case 'no_record_date':
|
|
1378
|
+
return 'Este formulario necesita una fecha de registro para abrirse sin conexión. Ábrelo con una fecha indicada.';
|
|
1379
|
+
case 'table_digest_missing':
|
|
1380
|
+
return 'Una tabla que este formulario necesita no se puede verificar en este dispositivo. Busca una actualización e inténtalo de nuevo.';
|
|
1381
|
+
case 'table_digest_mismatch':
|
|
1382
|
+
return 'Una tabla guardada no coincide con el formulario que la usa. Busca una actualización e inténtalo de nuevo.';
|
|
1383
|
+
case 'table_missing':
|
|
1384
|
+
return 'Una tabla que este formulario necesita aún no está guardada en este dispositivo. Busca una actualización e inténtalo de nuevo.';
|
|
1385
|
+
case 'table_stale':
|
|
1386
|
+
return 'Una tabla guardada está desactualizada para este registro. Busca una actualización e inténtalo de nuevo.';
|
|
1387
|
+
}
|
|
1388
|
+
},
|
|
1389
|
+
cachePublishRefusal: (refusal) => {
|
|
1390
|
+
switch (refusal.reason) {
|
|
1391
|
+
case 'artifact_digest_mismatch':
|
|
1392
|
+
return 'El formulario guardado no coincide con la copia esperada, así que no se instaló. Busca una actualización e inténtalo de nuevo.';
|
|
1393
|
+
case 'artifact_conflict':
|
|
1394
|
+
return 'Ya hay otra copia de este formulario guardada en este dispositivo. Busca una actualización e inténtalo de nuevo.';
|
|
1395
|
+
case 'dataset_digest_mismatch':
|
|
1396
|
+
return 'Una tabla no coincide con el formulario que la usa, así que no se instaló nada. Busca una actualización e inténtalo de nuevo.';
|
|
1397
|
+
case 'dataset_conflict':
|
|
1398
|
+
return 'Ya hay otra copia de una tabla guardada en este dispositivo. Busca una actualización e inténtalo de nuevo.';
|
|
1399
|
+
case 'dataset_unpinned':
|
|
1400
|
+
return 'La actualización trae una tabla que este formulario no usa, así que no se instaló nada. Busca una actualización e inténtalo de nuevo.';
|
|
1401
|
+
}
|
|
1402
|
+
},
|
|
1403
|
+
},
|
|
1404
|
+
pt: {
|
|
1405
|
+
required: (label, rowName) => rowName === undefined ? `${label} é obrigatório` : `${label} em ${rowName} é obrigatório`,
|
|
1406
|
+
cardinality: (label, bound, count, limit) => {
|
|
1407
|
+
if (bound === 'minItems' && limit === 0)
|
|
1408
|
+
return undefined;
|
|
1409
|
+
const noun = (value) => countForm('pt', value, { one: 'linha', other: 'linhas' });
|
|
1410
|
+
return bound === 'minItems'
|
|
1411
|
+
? `${label} precisa de pelo menos ${String(limit)} ${noun(limit)}. Tem ${String(count)} ${noun(count)}.`
|
|
1412
|
+
: `${label} permite no máximo ${String(limit)} ${noun(limit)}. Tem ${String(count)} ${noun(count)}.`;
|
|
1413
|
+
},
|
|
1414
|
+
mediaConstraint: (label, member, limit, value) => {
|
|
1415
|
+
if (member === 'accept') {
|
|
1416
|
+
const admitted = Array.isArray(limit)
|
|
1417
|
+
? limit.map((entry) => mediaTypePluralIn('pt', entry)).join(mediaSeparatorIn('pt'))
|
|
1418
|
+
: String(limit);
|
|
1419
|
+
return `${label} aceita ${admitted}. O ficheiro é ${mediaTypeNameIn('pt', String(value))}.`;
|
|
1420
|
+
}
|
|
1421
|
+
const { size, bound } = mediaSizeParts(limit, value, 'pt');
|
|
1422
|
+
return member === 'minBytes'
|
|
1423
|
+
? `${label} pesa ${size}; o mínimo é ${bound}.`
|
|
1424
|
+
: `${label} pesa ${size}; o limite é ${bound}.`;
|
|
1425
|
+
},
|
|
1426
|
+
rowCount: (label, expected, actual, source, reason, ceiling) => {
|
|
1427
|
+
const noun = (value) => countForm('pt', value, { one: 'linha', other: 'linhas' });
|
|
1428
|
+
return reason === undefined
|
|
1429
|
+
? `${label}: eram esperadas ${String(expected)} ${noun(expected)} de ${source}; o registo tem ${String(actual)} ${noun(actual)}.`
|
|
1430
|
+
: reason === 'ceiling'
|
|
1431
|
+
? `${label}: a contagem ${source} excede o limite de ${String(ceiling ?? expected)}.`
|
|
1432
|
+
: `${label}: a contagem ${source} não é um número inteiro válido.`;
|
|
1433
|
+
},
|
|
1434
|
+
invalidValue: (label) => `${label} já não oferece esse valor`,
|
|
1435
|
+
unavailableOption: (label) => `${label} não pode ser escolhido com este registo`,
|
|
1436
|
+
emptyOptions: () => 'Não há opções oferecidas.',
|
|
1437
|
+
optionsNeedDependencies: (labels) => labels.length === 0
|
|
1438
|
+
? 'Preenche os campos anteriores necessários para ver as opções.'
|
|
1439
|
+
: `Responde primeiro a ${labels.join(LIST_SEPARATOR.pt)} para ver as opções.`,
|
|
1440
|
+
undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
|
|
1441
|
+
? `Não foi possível verificar se ${optionLabel} está disponível para ${label}. O servidor ainda não respondeu.`
|
|
1442
|
+
: `Não foi possível verificar se ${optionLabel} está disponível para ${label}. A verificação não pôde ser resolvida aqui.`,
|
|
1443
|
+
loadMoreOptions: () => 'Carregar mais opções',
|
|
1444
|
+
deferredValue: () => 'Pendente: o servidor retirou este valor, por isso não foi respondido aqui.',
|
|
1445
|
+
notEditable: (label, access) => {
|
|
1446
|
+
switch (access) {
|
|
1447
|
+
case 'masked':
|
|
1448
|
+
return `${label}: o valor está oculto para si`;
|
|
1449
|
+
case 'hidden':
|
|
1450
|
+
return `${label}: o valor não é mostrado`;
|
|
1451
|
+
case 'write_only':
|
|
1452
|
+
return `${label}: pode adicionar um valor mas não pode voltar a lê-lo`;
|
|
1453
|
+
case 'read_only':
|
|
1454
|
+
case 'read_write':
|
|
1455
|
+
return `${label} não é editável`;
|
|
1456
|
+
}
|
|
1457
|
+
},
|
|
1458
|
+
rowKey: (label, rowName) => rowName === undefined
|
|
1459
|
+
? `${label}: duas linhas partilham a mesma chave. Altere uma para que cada linha seja distinta.`
|
|
1460
|
+
: `${label}: outra linha já usa ${rowName}. Escolha uma diferente.`,
|
|
1461
|
+
sectionToggle: (title, expanded) => title === undefined
|
|
1462
|
+
? `${expanded ? 'Ocultar' : 'Mostrar'} secção`
|
|
1463
|
+
: `${title}: ${expanded ? 'ocultar' : 'mostrar'}`,
|
|
1464
|
+
rowsEmpty: () => 'Nenhuma linha.',
|
|
1465
|
+
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.',
|
|
1466
|
+
rowRemoved: (count) => count === 0
|
|
1467
|
+
? 'Linha removida. Nenhuma linha permanece.'
|
|
1468
|
+
: countForm('pt', count, {
|
|
1469
|
+
one: `Linha removida. ${String(count)} linha permanece.`,
|
|
1470
|
+
other: `Linha removida. ${String(count)} linhas permanecem.`,
|
|
1471
|
+
}),
|
|
1472
|
+
rowAtPosition: (position) => `na posição ${String(position)}`,
|
|
1473
|
+
addRow: () => 'Adicionar linha',
|
|
1474
|
+
removeRow: (name) => `Remover a linha ${name}`,
|
|
1475
|
+
rowRemoveFailed: () => 'A linha não foi removida.',
|
|
1476
|
+
rowAddFailed: () => 'A linha não foi adicionada.',
|
|
1477
|
+
rowRefused: () => 'o registo recusou a alteração',
|
|
1478
|
+
captureSignature: (label) => `Assinar ${label}`,
|
|
1479
|
+
captureFailed: () => 'Nenhuma assinatura foi capturada.',
|
|
1480
|
+
signerFailed: () => 'O painel de assinatura deixou de responder.',
|
|
1481
|
+
attachMedia: () => 'Anexar ficheiro',
|
|
1482
|
+
removeMedia: (name) => `Remover ${name}`,
|
|
1483
|
+
mediaFailed: () => 'O ficheiro não foi anexado.',
|
|
1484
|
+
positionCapture: (label) => `Usar a minha localização para ${label}`,
|
|
1485
|
+
positionRequesting: () => 'A pedir a tua localização…',
|
|
1486
|
+
positionDenied: () => 'A permissão de localização foi recusada. Introduz as coordenadas abaixo.',
|
|
1487
|
+
positionUnavailable: () => 'Este dispositivo não consegue fornecer uma localização. Introduz as coordenadas abaixo.',
|
|
1488
|
+
positionTimedOut: () => 'O pedido de localização excedeu o tempo de espera. Introduz as coordenadas abaixo.',
|
|
1489
|
+
positionFailed: () => 'Não foi possível ler a localização.',
|
|
1490
|
+
positionInvalidReading: () => 'O dispositivo devolveu uma posição fora do intervalo válido. Introduz as coordenadas abaixo.',
|
|
1491
|
+
screenUnavailable: (screenId) => `Este formulário não pode ser submetido (${screenId}).`,
|
|
1492
|
+
buffer: (reason, params) => bufferText('pt', reason, params),
|
|
1493
|
+
display: displayFor('pt'),
|
|
1494
|
+
requiredMarker: () => 'obrigatório',
|
|
1495
|
+
rankMoveUp: (label) => `Mover ${label} para cima`,
|
|
1496
|
+
rankMoveDown: (label) => `Mover ${label} para baixo`,
|
|
1497
|
+
rankRemove: (label) => `Remover ${label}`,
|
|
1498
|
+
addressLine1: () => 'Linha 1',
|
|
1499
|
+
addressLine2: () => 'Linha 2',
|
|
1500
|
+
addressCity: () => 'Cidade',
|
|
1501
|
+
addressRegion: () => 'Região / estado',
|
|
1502
|
+
addressPostalCode: () => 'Código postal',
|
|
1503
|
+
addressCountry: () => 'País',
|
|
1504
|
+
cacheLoading: () => 'A abrir o formulário guardado…',
|
|
1505
|
+
cacheOpenFailed: () => 'Este formulário não pode ser aberto a partir da memória.',
|
|
1506
|
+
cacheOpenFailedDetail: () => 'A cópia guardada não pôde ser lida. Tenta de novo e procura uma atualização se continuar a falhar.',
|
|
1507
|
+
cacheOffline: () => 'Este formulário não pode ser aberto sem ligação.',
|
|
1508
|
+
cacheRetry: () => 'Tentar de novo',
|
|
1509
|
+
cacheSubmit: () => 'Enviar',
|
|
1510
|
+
cacheSubmitWriteFailed: () => 'A memória recusou o guardado. As tuas respostas continuam neste ecrã, por isso tenta de novo.',
|
|
1511
|
+
cacheSubmitInvalid: () => 'O formulário não pôde ser enviado. Revê os campos assinalados e tenta de novo.',
|
|
1512
|
+
cacheSavedQueued: () => 'Guardado neste dispositivo. Será enviado quando voltares a ter ligação.',
|
|
1513
|
+
cacheSavedExisting: () => 'Isto já estava guardado neste dispositivo. Será enviado quando voltares a ter ligação.',
|
|
1514
|
+
cacheDraftTitle: () => 'Queres continuar com as tuas respostas guardadas?',
|
|
1515
|
+
cacheDraftBody: (updatedAt) => `Tens respostas guardadas de ${formatDraftTimestamp(updatedAt, 'pt')}. Podes continuar com elas ou começar de novo.`,
|
|
1516
|
+
cacheDraftResume: () => 'Continuar com as respostas guardadas',
|
|
1517
|
+
cacheDraftDiscard: () => 'Começar de novo',
|
|
1518
|
+
signatureUnavailable: (label) => `${label} não pode ser assinado neste dispositivo.`,
|
|
1519
|
+
cacheRefusal: (refusal) => {
|
|
1520
|
+
switch (refusal.reason) {
|
|
1521
|
+
case 'artifact_hash':
|
|
1522
|
+
return 'O formulário guardado não corresponde à cópia esperada. Procura uma atualização e tenta de novo.';
|
|
1523
|
+
case 'no_record_date':
|
|
1524
|
+
return 'Este formulário precisa de uma data de registo para abrir sem ligação. Abre-o com uma data indicada.';
|
|
1525
|
+
case 'table_digest_missing':
|
|
1526
|
+
return 'Uma tabela de que este formulário precisa não pode ser verificada neste dispositivo. Procura uma atualização e tenta de novo.';
|
|
1527
|
+
case 'table_digest_mismatch':
|
|
1528
|
+
return 'Uma tabela guardada não corresponde ao formulário que a usa. Procura uma atualização e tenta de novo.';
|
|
1529
|
+
case 'table_missing':
|
|
1530
|
+
return 'Uma tabela de que este formulário precisa ainda não está guardada neste dispositivo. Procura uma atualização e tenta de novo.';
|
|
1531
|
+
case 'table_stale':
|
|
1532
|
+
return 'Uma tabela guardada está desatualizada para este registo. Procura uma atualização e tenta de novo.';
|
|
1533
|
+
}
|
|
1534
|
+
},
|
|
1535
|
+
cachePublishRefusal: (refusal) => {
|
|
1536
|
+
switch (refusal.reason) {
|
|
1537
|
+
case 'artifact_digest_mismatch':
|
|
1538
|
+
return 'O formulário guardado não corresponde à cópia esperada, por isso não foi instalado. Procura uma atualização e tenta de novo.';
|
|
1539
|
+
case 'artifact_conflict':
|
|
1540
|
+
return 'Já existe outra cópia deste formulário guardada neste dispositivo. Procura uma atualização e tenta de novo.';
|
|
1541
|
+
case 'dataset_digest_mismatch':
|
|
1542
|
+
return 'Uma tabela não corresponde ao formulário que a usa, por isso nada foi instalado. Procura uma atualização e tenta de novo.';
|
|
1543
|
+
case 'dataset_conflict':
|
|
1544
|
+
return 'Já existe outra cópia de uma tabela guardada neste dispositivo. Procura uma atualização e tenta de novo.';
|
|
1545
|
+
case 'dataset_unpinned':
|
|
1546
|
+
return 'A atualização traz uma tabela que este formulário não usa, por isso nada foi instalado. Procura uma atualização e tenta de novo.';
|
|
1547
|
+
}
|
|
1548
|
+
},
|
|
1549
|
+
},
|
|
1550
|
+
ar: {
|
|
1551
|
+
required: (label, rowName) => rowName === undefined ? `${label} مطلوب` : `${label} في ${rowName} مطلوب`,
|
|
1552
|
+
cardinality: (label, bound, count, limit) => {
|
|
1553
|
+
if (bound === 'minItems' && limit === 0)
|
|
1554
|
+
return undefined;
|
|
1555
|
+
// The minimum is the nominative subject of `يلزم`, so its dual is `صفان`; `بـ` governs the
|
|
1556
|
+
// genitive, so a maximum dual is `صفين`. `يحتوي على` also governs the genitive. No dual
|
|
1557
|
+
// states a numeral, while every other category keeps its count.
|
|
1558
|
+
const nounForms = (dual) => ({
|
|
1559
|
+
zero: 'صفوف',
|
|
1560
|
+
one: 'صف',
|
|
1561
|
+
two: dual,
|
|
1562
|
+
few: 'صفوف',
|
|
1563
|
+
many: 'صفًا',
|
|
1564
|
+
other: 'صف',
|
|
1565
|
+
});
|
|
1566
|
+
const minimumText = countedText('ar', limit, nounForms('صفين'));
|
|
1567
|
+
const maximumText = countedText('ar', limit, nounForms('صفين'));
|
|
1568
|
+
const countText = countedText('ar', count, nounForms('صفين'));
|
|
1569
|
+
return bound === 'minItems'
|
|
1570
|
+
? `${label} يحتاج إلى ${minimumText} على الأقل. فيه ${countText}.`
|
|
1571
|
+
: `${label} يسمح بـ ${maximumText} كحد أقصى. فيه ${countText}.`;
|
|
1572
|
+
},
|
|
1573
|
+
mediaConstraint: (label, member, limit, value) => {
|
|
1574
|
+
if (member === 'accept') {
|
|
1575
|
+
const admitted = Array.isArray(limit)
|
|
1576
|
+
? limit.map((entry) => mediaTypePluralIn('ar', entry)).join(mediaSeparatorIn('ar'))
|
|
1577
|
+
: String(limit);
|
|
1578
|
+
return `${label} يقبل ${admitted}. هذا الملف ${mediaTypeNameIn('ar', String(value))}.`;
|
|
1579
|
+
}
|
|
1580
|
+
const { size, bound } = mediaSizeParts(limit, value, 'ar');
|
|
1581
|
+
return member === 'minBytes'
|
|
1582
|
+
? `${label} حجمه ${size}؛ الحد الأدنى ${bound}.`
|
|
1583
|
+
: `${label} حجمه ${size}؛ الحد الأقصى ${bound}.`;
|
|
1584
|
+
},
|
|
1585
|
+
rowCount: (label, expected, actual, source, reason, ceiling) => {
|
|
1586
|
+
// `كان` puts its predicate in the accusative, so the expected dual is `صفين`; the actual
|
|
1587
|
+
// count follows `يحتوي على`, which governs the genitive, so its dual is the same form.
|
|
1588
|
+
// The dual states no numeral; every other category keeps its count.
|
|
1589
|
+
const expectedText = countedText('ar', expected, {
|
|
1590
|
+
zero: 'صفوف',
|
|
1591
|
+
one: 'صف',
|
|
1592
|
+
two: 'صفين',
|
|
1593
|
+
few: 'صفوف',
|
|
1594
|
+
many: 'صفًا',
|
|
1595
|
+
other: 'صف',
|
|
1596
|
+
});
|
|
1597
|
+
const actualText = countedText('ar', actual, {
|
|
1598
|
+
zero: 'صفوف',
|
|
1599
|
+
one: 'صف',
|
|
1600
|
+
two: 'صفين',
|
|
1601
|
+
few: 'صفوف',
|
|
1602
|
+
many: 'صفًا',
|
|
1603
|
+
other: 'صف',
|
|
1604
|
+
});
|
|
1605
|
+
return reason === undefined
|
|
1606
|
+
? `${label}: كان المتوقع ${expectedText} من ${source}؛ السجل يحتوي على ${actualText}.`
|
|
1607
|
+
: reason === 'ceiling'
|
|
1608
|
+
? `${label}: عدد الصفوف ${source} يتجاوز الحد ${String(ceiling ?? expected)}.`
|
|
1609
|
+
: `${label}: عدد الصفوف ${source} ليس عددًا صحيحًا صالحًا.`;
|
|
1610
|
+
},
|
|
1611
|
+
invalidValue: (label) => `${label} لم يعد يعرض هذه القيمة`,
|
|
1612
|
+
unavailableOption: (label) => `${label} لا يمكن اختياره مع هذا السجل`,
|
|
1613
|
+
emptyOptions: () => 'لا توجد خيارات معروضة.',
|
|
1614
|
+
optionsNeedDependencies: (labels) => labels.length === 0
|
|
1615
|
+
? 'أكمل الحقول السابقة المطلوبة لعرض الخيارات.'
|
|
1616
|
+
: `أجب عن ${labels.join(LIST_SEPARATOR.ar)} أولًا لعرض الخيارات.`,
|
|
1617
|
+
undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
|
|
1618
|
+
? `تعذّر التحقق من توفر ${optionLabel} في ${label}. لم يردّ الخادم بعد.`
|
|
1619
|
+
: `تعذّر التحقق من توفر ${optionLabel} في ${label}. لم يُحسم الفحص هنا.`,
|
|
1620
|
+
loadMoreOptions: () => 'تحميل المزيد من الخيارات',
|
|
1621
|
+
deferredValue: () => 'مؤجّل — حجب الخادم هذه القيمة، لذلك لم تُجب هنا.',
|
|
1622
|
+
notEditable: (label, access) => {
|
|
1623
|
+
switch (access) {
|
|
1624
|
+
case 'masked':
|
|
1625
|
+
return `${label}: القيمة مخفية عنك`;
|
|
1626
|
+
case 'hidden':
|
|
1627
|
+
return `${label}: القيمة غير معروضة`;
|
|
1628
|
+
case 'write_only':
|
|
1629
|
+
return `${label}: يمكنك إضافة قيمة لكن لا يمكنك قراءتها مرة أخرى`;
|
|
1630
|
+
case 'read_only':
|
|
1631
|
+
case 'read_write':
|
|
1632
|
+
return `${label} غير قابل للتحرير`;
|
|
1633
|
+
}
|
|
1634
|
+
},
|
|
1635
|
+
rowKey: (label, rowName) => rowName === undefined
|
|
1636
|
+
? `${label}: صفّان يستخدمان المفتاح نفسه. غيّر أحدهما ليكون كل صف مميزًا.`
|
|
1637
|
+
: `${label}: صف آخر يستخدم ${rowName} بالفعل. اختر اسمًا مختلفًا.`,
|
|
1638
|
+
sectionToggle: (title, expanded) => title === undefined
|
|
1639
|
+
? `${expanded ? 'إخفاء' : 'إظهار'} القسم`
|
|
1640
|
+
: `${title}: ${expanded ? 'إخفاء' : 'إظهار'}`,
|
|
1641
|
+
rowsEmpty: () => 'لا توجد صفوف.',
|
|
1642
|
+
nestedListRefused: () => 'هذه القائمة تحتوي على صفوف داخل صفوف، ولا يعرض هذا الإصدار ذلك بعد. انقل القائمة الداخلية إلى المستوى الأعلى من النموذج.',
|
|
1643
|
+
rowRemoved: (count) => count === 0
|
|
1644
|
+
? 'تمت إزالة الصف. لم تبقَ صفوف.'
|
|
1645
|
+
: `تمت إزالة الصف. بقي ${countedText('ar', count, {
|
|
1646
|
+
// The remaining row is the nominative subject of `بقي`, so the dual is `صفان`
|
|
1647
|
+
// with no numeral; every other category keeps its count.
|
|
1648
|
+
one: 'صف',
|
|
1649
|
+
two: 'صفان',
|
|
1650
|
+
few: 'صفوف',
|
|
1651
|
+
many: 'صفًا',
|
|
1652
|
+
other: 'صف',
|
|
1653
|
+
})}.`,
|
|
1654
|
+
rowAtPosition: (position) => `في الموضع ${String(position)}`,
|
|
1655
|
+
addRow: () => 'إضافة صف',
|
|
1656
|
+
removeRow: (name) => `إزالة الصف ${name}`,
|
|
1657
|
+
rowRemoveFailed: () => 'لم تُزل الصف.',
|
|
1658
|
+
rowAddFailed: () => 'لم تُضف الصف.',
|
|
1659
|
+
rowRefused: () => 'رفض السجل التغيير',
|
|
1660
|
+
captureSignature: (label) => `توقيع ${label}`,
|
|
1661
|
+
captureFailed: () => 'لم يُلتقط أي توقيع.',
|
|
1662
|
+
signerFailed: () => 'توقّف لوح التوقيع عن الاستجابة.',
|
|
1663
|
+
attachMedia: () => 'إرفاق ملف',
|
|
1664
|
+
removeMedia: (name) => `إزالة ${name}`,
|
|
1665
|
+
mediaFailed: () => 'لم يُرفق الملف.',
|
|
1666
|
+
positionCapture: (label) => `استخدم موقعي الحالي لـ ${label}`,
|
|
1667
|
+
positionRequesting: () => 'جارٍ طلب موقعك…',
|
|
1668
|
+
positionDenied: () => 'تم رفض إذن الموقع. أدخل الإحداثيات أدناه.',
|
|
1669
|
+
positionUnavailable: () => 'لا يمكن لهذا الجهاز تحديد الموقع. أدخل الإحداثيات أدناه.',
|
|
1670
|
+
positionTimedOut: () => 'انتهت مهلة طلب الموقع. أدخل الإحداثيات أدناه.',
|
|
1671
|
+
positionFailed: () => 'تعذّرت قراءة الموقع.',
|
|
1672
|
+
positionInvalidReading: () => 'أعاد الجهاز موضعًا خارج النطاق الصالح. أدخل الإحداثيات أدناه.',
|
|
1673
|
+
screenUnavailable: (screenId) => `لا يمكن إرسال هذا النموذج (${screenId}).`,
|
|
1674
|
+
buffer: (reason, params) => bufferText('ar', reason, params),
|
|
1675
|
+
display: displayFor('ar'),
|
|
1676
|
+
requiredMarker: () => 'مطلوب',
|
|
1677
|
+
rankMoveUp: (label) => `نقل ${label} لأعلى`,
|
|
1678
|
+
rankMoveDown: (label) => `نقل ${label} لأسفل`,
|
|
1679
|
+
rankRemove: (label) => `إزالة ${label}`,
|
|
1680
|
+
addressLine1: () => 'السطر 1',
|
|
1681
|
+
addressLine2: () => 'السطر 2',
|
|
1682
|
+
addressCity: () => 'المدينة',
|
|
1683
|
+
addressRegion: () => 'المنطقة / الولاية',
|
|
1684
|
+
addressPostalCode: () => 'الرمز البريدي',
|
|
1685
|
+
addressCountry: () => 'الدولة',
|
|
1686
|
+
cacheLoading: () => 'جارٍ فتح النموذج المحفوظ…',
|
|
1687
|
+
cacheOpenFailed: () => 'تعذّر فتح هذا النموذج من الذاكرة.',
|
|
1688
|
+
cacheOpenFailedDetail: () => 'تعذّرت قراءة النسخة المحفوظة. حاول مجددًا، وابحث عن تحديث إذا استمر الفشل.',
|
|
1689
|
+
cacheOffline: () => 'تعذّر فتح هذا النموذج دون اتصال.',
|
|
1690
|
+
cacheRetry: () => 'حاول مجددًا',
|
|
1691
|
+
cacheSubmit: () => 'إرسال',
|
|
1692
|
+
cacheSubmitWriteFailed: () => 'رفضت الذاكرة الحفظ. إجاباتك ما زالت على هذه الشاشة، لذا حاول مجددًا.',
|
|
1693
|
+
cacheSubmitInvalid: () => 'تعذّر إرسال النموذج. راجع الحقول المميزة وحاول مجددًا.',
|
|
1694
|
+
cacheSavedQueued: () => 'تم الحفظ على هذا الجهاز. سيتم الإرسال عند عودة الاتصال.',
|
|
1695
|
+
cacheSavedExisting: () => 'هذا محفوظ مسبقًا على هذا الجهاز. سيتم الإرسال عند عودة الاتصال.',
|
|
1696
|
+
cacheDraftTitle: () => 'هل تريد متابعة إجاباتك المحفوظة؟',
|
|
1697
|
+
cacheDraftBody: (updatedAt) => `لديك إجابات محفوظة من ${formatDraftTimestamp(updatedAt, 'ar')}. يمكنك متابعتها أو البدء من جديد.`,
|
|
1698
|
+
cacheDraftResume: () => 'متابعة الإجابات المحفوظة',
|
|
1699
|
+
cacheDraftDiscard: () => 'البدء من جديد',
|
|
1700
|
+
signatureUnavailable: (label) => `تعذّر توقيع ${label} على هذا الجهاز.`,
|
|
1701
|
+
cacheRefusal: (refusal) => {
|
|
1702
|
+
switch (refusal.reason) {
|
|
1703
|
+
case 'artifact_hash':
|
|
1704
|
+
return 'النموذج المحفوظ لا يطابق النسخة المتوقعة. ابحث عن تحديث وحاول مجددًا.';
|
|
1705
|
+
case 'no_record_date':
|
|
1706
|
+
return 'يحتاج هذا النموذج إلى تاريخ سجل ليُفتح دون اتصال. افتحه مع تحديد تاريخ.';
|
|
1707
|
+
case 'table_digest_missing':
|
|
1708
|
+
return 'تعذّر التحقق من جدول يحتاجه هذا النموذج على هذا الجهاز. ابحث عن تحديث وحاول مجددًا.';
|
|
1709
|
+
case 'table_digest_mismatch':
|
|
1710
|
+
return 'جدول محفوظ لا يطابق النموذج الذي يستخدمه. ابحث عن تحديث وحاول مجددًا.';
|
|
1711
|
+
case 'table_missing':
|
|
1712
|
+
return 'جدول يحتاجه هذا النموذج غير محفوظ بعد على هذا الجهاز. ابحث عن تحديث وحاول مجددًا.';
|
|
1713
|
+
case 'table_stale':
|
|
1714
|
+
return 'جدول محفوظ قديم بالنسبة لهذا السجل. ابحث عن تحديث وحاول مجددًا.';
|
|
1715
|
+
}
|
|
1716
|
+
},
|
|
1717
|
+
cachePublishRefusal: (refusal) => {
|
|
1718
|
+
switch (refusal.reason) {
|
|
1719
|
+
case 'artifact_digest_mismatch':
|
|
1720
|
+
return 'النسخة المحفوظة لا تطابق النسخة المتوقعة، لذلك لم يتم التثبيت. ابحث عن تحديث وحاول مجددًا.';
|
|
1721
|
+
case 'artifact_conflict':
|
|
1722
|
+
return 'توجد مسبقًا نسخة مختلفة من هذا النموذج على هذا الجهاز. ابحث عن تحديث وحاول مجددًا.';
|
|
1723
|
+
case 'dataset_digest_mismatch':
|
|
1724
|
+
return 'جدول لا يطابق النموذج الذي يستخدمه، لذلك لم يتم تثبيت شيء. ابحث عن تحديث وحاول مجددًا.';
|
|
1725
|
+
case 'dataset_conflict':
|
|
1726
|
+
return 'توجد مسبقًا نسخة مختلفة من جدول على هذا الجهاز. ابحث عن تحديث وحاول مجددًا.';
|
|
1727
|
+
case 'dataset_unpinned':
|
|
1728
|
+
return 'يحمل التحديث جدولًا لا يستخدمه هذا النموذج، لذلك لم يتم تثبيت شيء. ابحث عن تحديث وحاول مجددًا.';
|
|
1729
|
+
}
|
|
1730
|
+
},
|
|
1731
|
+
},
|
|
1732
|
+
fr: {
|
|
1733
|
+
required: (label, rowName) => rowName === undefined
|
|
1734
|
+
? `${label} est obligatoire`
|
|
1735
|
+
: `${label} dans ${rowName} est obligatoire`,
|
|
1736
|
+
cardinality: (label, bound, count, limit) => {
|
|
1737
|
+
if (bound === 'minItems' && limit === 0)
|
|
1738
|
+
return undefined;
|
|
1739
|
+
const noun = (value) => countForm('fr', value, { one: 'ligne', other: 'lignes' });
|
|
1740
|
+
return bound === 'minItems'
|
|
1741
|
+
? `${label} a besoin d'au moins ${String(limit)} ${noun(limit)}. Il en contient ${String(count)}.`
|
|
1742
|
+
: `${label} autorise au plus ${String(limit)} ${noun(limit)}. Il en contient ${String(count)}.`;
|
|
1743
|
+
},
|
|
1744
|
+
mediaConstraint: (label, member, limit, value) => {
|
|
1745
|
+
if (member === 'accept') {
|
|
1746
|
+
const admitted = Array.isArray(limit)
|
|
1747
|
+
? limit.map((entry) => mediaTypePluralIn('fr', entry)).join(mediaSeparatorIn('fr'))
|
|
1748
|
+
: String(limit);
|
|
1749
|
+
return `${label} accepte ${admitted}. Le fichier est ${mediaTypeNameIn('fr', String(value))}.`;
|
|
1750
|
+
}
|
|
1751
|
+
const { size, bound } = mediaSizeParts(limit, value, 'fr');
|
|
1752
|
+
return member === 'minBytes'
|
|
1753
|
+
? `${label} pèse ${size} ; le minimum est ${bound}.`
|
|
1754
|
+
: `${label} pèse ${size} ; la limite est ${bound}.`;
|
|
1755
|
+
},
|
|
1756
|
+
rowCount: (label, expected, actual, source, reason, ceiling) => {
|
|
1757
|
+
const noun = (value) => countForm('fr', value, { one: 'ligne', other: 'lignes' });
|
|
1758
|
+
return reason === undefined
|
|
1759
|
+
? `${label} : ${String(expected)} ${noun(expected)} étaient attendues de ${source} ; l'enregistrement en contient ${String(actual)} ${noun(actual)}.`
|
|
1760
|
+
: reason === 'ceiling'
|
|
1761
|
+
? `${label} : le compte ${source} dépasse la limite de ${String(ceiling ?? expected)}.`
|
|
1762
|
+
: `${label} : le compte ${source} n'est pas un nombre entier valide.`;
|
|
1763
|
+
},
|
|
1764
|
+
invalidValue: (label) => `${label} n'offre plus cette valeur`,
|
|
1765
|
+
unavailableOption: (label) => `${label} ne peut pas être choisi avec cet enregistrement`,
|
|
1766
|
+
emptyOptions: () => 'Aucune option offerte.',
|
|
1767
|
+
optionsNeedDependencies: (labels) => labels.length === 0
|
|
1768
|
+
? 'Renseignez d’abord les champs préalables pour afficher les options.'
|
|
1769
|
+
: `Renseignez d’abord ${labels.join(LIST_SEPARATOR.fr)} pour afficher les options.`,
|
|
1770
|
+
undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
|
|
1771
|
+
? `Impossible de vérifier si ${optionLabel} est disponible pour ${label}. Le serveur n'a pas encore répondu.`
|
|
1772
|
+
: `Impossible de vérifier si ${optionLabel} est disponible pour ${label}. La vérification n'a pas pu être tranchée ici.`,
|
|
1773
|
+
loadMoreOptions: () => 'Charger plus d’options',
|
|
1774
|
+
deferredValue: () => "En attente : le serveur a retenu cette valeur, elle n'a donc pas été renseignée ici.",
|
|
1775
|
+
notEditable: (label, access) => {
|
|
1776
|
+
switch (access) {
|
|
1777
|
+
case 'masked':
|
|
1778
|
+
return `${label} : la valeur vous est cachée`;
|
|
1779
|
+
case 'hidden':
|
|
1780
|
+
return `${label} : la valeur n'est pas affichée`;
|
|
1781
|
+
case 'write_only':
|
|
1782
|
+
return `${label} : vous pouvez saisir une valeur sans pouvoir la relire`;
|
|
1783
|
+
case 'read_only':
|
|
1784
|
+
case 'read_write':
|
|
1785
|
+
return `${label} n'est pas modifiable`;
|
|
1786
|
+
}
|
|
1787
|
+
},
|
|
1788
|
+
rowKey: (label, rowName) => rowName === undefined
|
|
1789
|
+
? `${label} : deux lignes partagent la même clé. Modifiez-en une pour que chaque ligne soit distincte.`
|
|
1790
|
+
: `${label} : une autre ligne utilise déjà ${rowName}. Choisissez-en un autre.`,
|
|
1791
|
+
sectionToggle: (title, expanded) => title === undefined
|
|
1792
|
+
? `${expanded ? 'Masquer' : 'Afficher'} la section`
|
|
1793
|
+
: `${title} : ${expanded ? 'masquer' : 'afficher'}`,
|
|
1794
|
+
rowsEmpty: () => 'Aucune ligne.',
|
|
1795
|
+
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.',
|
|
1796
|
+
rowRemoved: (count) => count === 0
|
|
1797
|
+
? 'Ligne supprimée. Aucune ligne ne reste.'
|
|
1798
|
+
: countForm('fr', count, {
|
|
1799
|
+
one: `Ligne supprimée. ${String(count)} ligne reste.`,
|
|
1800
|
+
other: `Ligne supprimée. ${String(count)} lignes restent.`,
|
|
1801
|
+
}),
|
|
1802
|
+
rowAtPosition: (position) => `à la position ${String(position)}`,
|
|
1803
|
+
addRow: () => 'Ajouter une ligne',
|
|
1804
|
+
removeRow: (name) => `Supprimer la ligne ${name}`,
|
|
1805
|
+
rowRemoveFailed: () => "La ligne n'a pas été supprimée.",
|
|
1806
|
+
rowAddFailed: () => "La ligne n'a pas été ajoutée.",
|
|
1807
|
+
rowRefused: () => "l'enregistrement a refusé la modification",
|
|
1808
|
+
captureSignature: (label) => `Signer ${label}`,
|
|
1809
|
+
captureFailed: () => "Aucune signature n'a été capturée.",
|
|
1810
|
+
signerFailed: () => 'Le pavé de signature ne répond plus.',
|
|
1811
|
+
attachMedia: () => 'Joindre un fichier',
|
|
1812
|
+
removeMedia: (name) => `Retirer ${name}`,
|
|
1813
|
+
mediaFailed: () => "Le fichier n'a pas été joint.",
|
|
1814
|
+
positionCapture: (label) => `Utiliser ma position pour ${label}`,
|
|
1815
|
+
positionRequesting: () => 'Demande de votre position…',
|
|
1816
|
+
positionDenied: () => "L'autorisation de localisation a été refusée. Saisissez les coordonnées ci-dessous.",
|
|
1817
|
+
positionUnavailable: () => 'Cet appareil ne peut pas fournir de position. Saisissez les coordonnées ci-dessous.',
|
|
1818
|
+
positionTimedOut: () => 'La demande de localisation a expiré. Saisissez les coordonnées ci-dessous.',
|
|
1819
|
+
positionFailed: () => "La position n'a pas pu être lue.",
|
|
1820
|
+
positionInvalidReading: () => "L'appareil a renvoyé une position hors de la plage valide. Saisissez les coordonnées ci-dessous.",
|
|
1821
|
+
screenUnavailable: (screenId) => `Ce formulaire ne peut pas être envoyé (${screenId}).`,
|
|
1822
|
+
buffer: (reason, params) => bufferText('fr', reason, params),
|
|
1823
|
+
display: displayFor('fr'),
|
|
1824
|
+
requiredMarker: () => 'obligatoire',
|
|
1825
|
+
rankMoveUp: (label) => `Monter ${label}`,
|
|
1826
|
+
rankMoveDown: (label) => `Descendre ${label}`,
|
|
1827
|
+
rankRemove: (label) => `Retirer ${label}`,
|
|
1828
|
+
addressLine1: () => 'Ligne 1',
|
|
1829
|
+
addressLine2: () => 'Ligne 2',
|
|
1830
|
+
addressCity: () => 'Ville',
|
|
1831
|
+
addressRegion: () => 'Région / état',
|
|
1832
|
+
addressPostalCode: () => 'Code postal',
|
|
1833
|
+
addressCountry: () => 'Pays',
|
|
1834
|
+
cacheLoading: () => 'Ouverture du formulaire enregistré…',
|
|
1835
|
+
cacheOpenFailed: () => 'Ce formulaire ne peut pas être ouvert depuis la mémoire.',
|
|
1836
|
+
cacheOpenFailedDetail: () => "La copie enregistrée n'a pas pu être lue. Réessayez, et cherchez une mise à jour si cela persiste.",
|
|
1837
|
+
cacheOffline: () => 'Ce formulaire ne peut pas être ouvert hors connexion.',
|
|
1838
|
+
cacheRetry: () => 'Réessayer',
|
|
1839
|
+
cacheSubmit: () => 'Envoyer',
|
|
1840
|
+
cacheSubmitWriteFailed: () => "La mémoire a refusé l'enregistrement. Vos réponses sont toujours sur cet écran, alors réessayez.",
|
|
1841
|
+
cacheSubmitInvalid: () => 'Le formulaire a été bloqué. Vérifiez les champs signalés et réessayez.',
|
|
1842
|
+
cacheSavedQueued: () => 'Enregistré sur cet appareil. Il sera envoyé à votre retour en ligne.',
|
|
1843
|
+
cacheSavedExisting: () => 'Ceci était déjà enregistré sur cet appareil. Il sera envoyé à votre retour en ligne.',
|
|
1844
|
+
cacheDraftTitle: () => 'Reprendre vos réponses enregistrées ?',
|
|
1845
|
+
cacheDraftBody: (updatedAt) => `Vous avez des réponses enregistrées du ${formatDraftTimestamp(updatedAt, 'fr')}. Vous pouvez les reprendre ou recommencer.`,
|
|
1846
|
+
cacheDraftResume: () => 'Reprendre les réponses enregistrées',
|
|
1847
|
+
cacheDraftDiscard: () => 'Recommencer',
|
|
1848
|
+
signatureUnavailable: (label) => `${label} ne peut pas être signé sur cet appareil.`,
|
|
1849
|
+
cacheRefusal: (refusal) => {
|
|
1850
|
+
switch (refusal.reason) {
|
|
1851
|
+
case 'artifact_hash':
|
|
1852
|
+
return 'Le formulaire enregistré ne correspond pas à la copie attendue. Cherchez une mise à jour et réessayez.';
|
|
1853
|
+
case 'no_record_date':
|
|
1854
|
+
return "Ce formulaire a besoin d'une date d'enregistrement pour s'ouvrir hors connexion. Ouvrez-le avec une date renseignée.";
|
|
1855
|
+
case 'table_digest_missing':
|
|
1856
|
+
return 'Un tableau dont ce formulaire a besoin ne peut pas être vérifié sur cet appareil. Cherchez une mise à jour et réessayez.';
|
|
1857
|
+
case 'table_digest_mismatch':
|
|
1858
|
+
return "Un tableau enregistré ne correspond pas au formulaire qui l'utilise. Cherchez une mise à jour et réessayez.";
|
|
1859
|
+
case 'table_missing':
|
|
1860
|
+
return "Un tableau dont ce formulaire a besoin n'est pas encore enregistré sur cet appareil. Cherchez une mise à jour et réessayez.";
|
|
1861
|
+
case 'table_stale':
|
|
1862
|
+
return 'Un tableau enregistré est périmé pour cet enregistrement. Cherchez une mise à jour et réessayez.';
|
|
1863
|
+
}
|
|
1864
|
+
},
|
|
1865
|
+
cachePublishRefusal: (refusal) => {
|
|
1866
|
+
switch (refusal.reason) {
|
|
1867
|
+
case 'artifact_digest_mismatch':
|
|
1868
|
+
return "Le formulaire enregistré ne correspond pas à la copie attendue, donc il n'a pas été installé. Cherchez une mise à jour et réessayez.";
|
|
1869
|
+
case 'artifact_conflict':
|
|
1870
|
+
return 'Une autre copie de ce formulaire est déjà enregistrée sur cet appareil. Cherchez une mise à jour et réessayez.';
|
|
1871
|
+
case 'dataset_digest_mismatch':
|
|
1872
|
+
return "Un tableau ne correspond pas au formulaire qui l'utilise, donc rien n'a été installé. Cherchez une mise à jour et réessayez.";
|
|
1873
|
+
case 'dataset_conflict':
|
|
1874
|
+
return "Une autre copie d'un tableau est déjà enregistrée sur cet appareil. Cherchez une mise à jour et réessayez.";
|
|
1875
|
+
case 'dataset_unpinned':
|
|
1876
|
+
return "La mise à jour apporte un tableau que ce formulaire n'utilise pas, donc rien n'a été installé. Cherchez une mise à jour et réessayez.";
|
|
1877
|
+
}
|
|
1878
|
+
},
|
|
1879
|
+
},
|
|
1880
|
+
// The shared sentences come from the pending translation draft. The cache frame is not in that
|
|
1881
|
+
// draft: it is written here so the device never falls back to English, and is reported for
|
|
1882
|
+
// native review with the catalogue. Shared ambiguities: the decimal separator, `signerFailed`
|
|
1883
|
+
// naming a component, `nestedListRefused` assuming a form top level.
|
|
1884
|
+
de: {
|
|
1885
|
+
required: (label, rowName) => rowName === undefined
|
|
1886
|
+
? `${label} ist erforderlich`
|
|
1887
|
+
: `${label} in ${rowName} ist erforderlich`,
|
|
1888
|
+
cardinality: (label, bound, count, limit) => {
|
|
1889
|
+
if (bound === 'minItems' && limit === 0)
|
|
1890
|
+
return undefined;
|
|
1891
|
+
const limitNoun = countForm('de', limit, { one: 'Zeile', other: 'Zeilen' });
|
|
1892
|
+
const countNoun = countForm('de', count, { one: 'Zeile', other: 'Zeilen' });
|
|
1893
|
+
return bound === 'minItems'
|
|
1894
|
+
? `${label} braucht mindestens ${String(limit)} ${limitNoun}. Es hat ${String(count)} ${countNoun}.`
|
|
1895
|
+
: `${label} erlaubt höchstens ${String(limit)} ${limitNoun}. Es hat ${String(count)} ${countNoun}.`;
|
|
1896
|
+
},
|
|
1897
|
+
mediaConstraint: (label, member, limit, value) => {
|
|
1898
|
+
if (member === 'accept') {
|
|
1899
|
+
const admitted = Array.isArray(limit)
|
|
1900
|
+
? limit.map((entry) => mediaTypePluralIn('de', entry)).join(mediaSeparatorIn('de'))
|
|
1901
|
+
: String(limit);
|
|
1902
|
+
return `${label} akzeptiert ${admitted}. Die Datei ist ${mediaTypeNameIn('de', String(value))}.`;
|
|
1903
|
+
}
|
|
1904
|
+
const { size, bound } = mediaSizeParts(limit, value, 'de');
|
|
1905
|
+
return member === 'minBytes'
|
|
1906
|
+
? `${label}: ${size}; das Minimum ist ${bound}.`
|
|
1907
|
+
: `${label}: ${size}; das Maximum ist ${bound}.`;
|
|
1908
|
+
},
|
|
1909
|
+
rowCount: (label, expected, actual, source, reason, ceiling) => {
|
|
1910
|
+
const expectedClause = countForm('de', expected, {
|
|
1911
|
+
one: `Erwartet war ${String(expected)} Zeile`,
|
|
1912
|
+
other: `Erwartet waren ${String(expected)} Zeilen`,
|
|
1913
|
+
});
|
|
1914
|
+
const actualNoun = countForm('de', actual, { one: 'Zeile', other: 'Zeilen' });
|
|
1915
|
+
return reason === undefined
|
|
1916
|
+
? `${label}: ${expectedClause} aus ${source}; der Datensatz hat ${String(actual)} ${actualNoun}.`
|
|
1917
|
+
: reason === 'ceiling'
|
|
1918
|
+
? `${label}: Die Zeilenzahl aus ${source} überschreitet die Grenze von ${String(ceiling ?? expected)}.`
|
|
1919
|
+
: `${label}: Die Zeilenzahl aus ${source} ist keine ganze Zahl.`;
|
|
1920
|
+
},
|
|
1921
|
+
invalidValue: (label) => `${label}: Dieser Wert wird nicht mehr angeboten`,
|
|
1922
|
+
unavailableOption: (label) => `${label}: Diese Option ist für diesen Datensatz nicht wählbar`,
|
|
1923
|
+
emptyOptions: () => 'Es werden keine Optionen angeboten.',
|
|
1924
|
+
optionsNeedDependencies: (labels) => labels.length === 0
|
|
1925
|
+
? 'Füllen Sie zuerst die erforderlichen vorherigen Felder aus, um Optionen anzuzeigen.'
|
|
1926
|
+
: `Beantworten Sie zuerst ${labels.join(LIST_SEPARATOR.de)}, um Optionen anzuzeigen.`,
|
|
1927
|
+
undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
|
|
1928
|
+
? `${optionLabel} konnte für ${label} noch nicht geprüft werden. Der Server hat noch nicht geantwortet.`
|
|
1929
|
+
: `${optionLabel} konnte für ${label} nicht geprüft werden. Die Prüfung ließ sich hier nicht entscheiden.`,
|
|
1930
|
+
loadMoreOptions: () => 'Weitere Optionen laden',
|
|
1931
|
+
deferredValue: () => 'Aufgeschoben: Der Server hat diesen Wert zurückgehalten, deshalb steht hier keine Antwort.',
|
|
1932
|
+
notEditable: (label, access) => {
|
|
1933
|
+
switch (access) {
|
|
1934
|
+
case 'masked':
|
|
1935
|
+
return `${label}: Der Wert ist für Sie nicht sichtbar`;
|
|
1936
|
+
case 'hidden':
|
|
1937
|
+
return `${label}: Der Wert wird nicht angezeigt`;
|
|
1938
|
+
case 'write_only':
|
|
1939
|
+
return `${label}: Sie können einen Wert eingeben, ihn aber nicht wieder lesen`;
|
|
1940
|
+
case 'read_only':
|
|
1941
|
+
case 'read_write':
|
|
1942
|
+
return `${label} ist nicht bearbeitbar`;
|
|
1943
|
+
}
|
|
1944
|
+
},
|
|
1945
|
+
rowKey: (label, rowName) => rowName === undefined
|
|
1946
|
+
? `${label}: Zwei Zeilen teilen denselben Schlüssel. Ändern Sie einen, damit jede Zeile eindeutig ist.`
|
|
1947
|
+
: `${label}: Eine andere Zeile verwendet bereits ${rowName}. Wählen Sie einen anderen.`,
|
|
1948
|
+
sectionToggle: (title, expanded) => title === undefined
|
|
1949
|
+
? expanded
|
|
1950
|
+
? 'Abschnitt ausblenden'
|
|
1951
|
+
: 'Abschnitt einblenden'
|
|
1952
|
+
: expanded
|
|
1953
|
+
? `${title}: ausblenden`
|
|
1954
|
+
: `${title}: einblenden`,
|
|
1955
|
+
rowsEmpty: () => 'Keine Zeilen.',
|
|
1956
|
+
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.',
|
|
1957
|
+
rowRemoved: (count) => count === 0
|
|
1958
|
+
? 'Zeile entfernt. Die Liste ist leer.'
|
|
1959
|
+
: countForm('de', count, {
|
|
1960
|
+
one: 'Zeile entfernt. Es bleibt 1 Zeile.',
|
|
1961
|
+
other: `Zeile entfernt. Es bleiben ${String(count)} Zeilen.`,
|
|
1962
|
+
}),
|
|
1963
|
+
rowAtPosition: (position) => `an Position ${String(position)}`,
|
|
1964
|
+
addRow: () => 'Zeile hinzufügen',
|
|
1965
|
+
removeRow: (name) => `Zeile ${name} entfernen`,
|
|
1966
|
+
rowRemoveFailed: () => 'Die Zeile wurde nicht entfernt.',
|
|
1967
|
+
rowAddFailed: () => 'Die Zeile wurde nicht hinzugefügt.',
|
|
1968
|
+
rowRefused: () => 'der Datensatz hat die Änderung abgelehnt',
|
|
1969
|
+
captureSignature: (label) => `${label} unterschreiben`,
|
|
1970
|
+
captureFailed: () => 'Es wurde keine Unterschrift erfasst.',
|
|
1971
|
+
signerFailed: () => 'Das Signaturfeld reagiert nicht mehr.',
|
|
1972
|
+
attachMedia: () => 'Datei anhängen',
|
|
1973
|
+
removeMedia: (name) => `${name} entfernen`,
|
|
1974
|
+
mediaFailed: () => 'Die Datei wurde nicht angehängt.',
|
|
1975
|
+
positionCapture: (label) => `Meinen Standort für ${label} verwenden`,
|
|
1976
|
+
positionRequesting: () => 'Standort wird abgefragt…',
|
|
1977
|
+
positionDenied: () => 'Der Standortzugriff wurde abgelehnt. Geben Sie die Koordinaten unten ein.',
|
|
1978
|
+
positionUnavailable: () => 'Dieses Gerät kann keinen Standort liefern. Geben Sie die Koordinaten unten ein.',
|
|
1979
|
+
positionTimedOut: () => 'Die Standortabfrage hat zu lange gedauert. Geben Sie die Koordinaten unten ein.',
|
|
1980
|
+
positionFailed: () => 'Der Standort konnte nicht gelesen werden.',
|
|
1981
|
+
positionInvalidReading: () => 'Das Gerät hat eine Position außerhalb des gültigen Bereichs geliefert. Geben Sie die Koordinaten unten ein.',
|
|
1982
|
+
screenUnavailable: (screenId) => `Dieses Formular kann nicht abgesendet werden (${screenId}).`,
|
|
1983
|
+
buffer: (reason, params) => bufferText('de', reason, params),
|
|
1984
|
+
display: displayFor('de'),
|
|
1985
|
+
requiredMarker: () => 'erforderlich',
|
|
1986
|
+
rankMoveUp: (label) => `${label} nach oben verschieben`,
|
|
1987
|
+
rankMoveDown: (label) => `${label} nach unten verschieben`,
|
|
1988
|
+
rankRemove: (label) => `${label} entfernen`,
|
|
1989
|
+
addressLine1: () => 'Adresszeile 1',
|
|
1990
|
+
addressLine2: () => 'Adresszeile 2',
|
|
1991
|
+
addressCity: () => 'Ort',
|
|
1992
|
+
addressRegion: () => 'Region / Bundesland',
|
|
1993
|
+
addressPostalCode: () => 'Postleitzahl',
|
|
1994
|
+
addressCountry: () => 'Land',
|
|
1995
|
+
cacheLoading: () => 'Das gespeicherte Formular wird geöffnet…',
|
|
1996
|
+
cacheOpenFailed: () => 'Dieses Formular kann nicht aus dem lokalen Speicher geöffnet werden.',
|
|
1997
|
+
cacheOpenFailedDetail: () => 'Die gespeicherte Kopie konnte nicht gelesen werden. Versuchen Sie es erneut und suchen Sie nach einer Aktualisierung, wenn es weiter fehlschlägt.',
|
|
1998
|
+
cacheOffline: () => 'Dieses Formular kann offline nicht geöffnet werden.',
|
|
1999
|
+
cacheRetry: () => 'Erneut versuchen',
|
|
2000
|
+
cacheSubmit: () => 'Absenden',
|
|
2001
|
+
cacheSubmitWriteFailed: () => 'Der lokale Speicher hat das Schreiben abgelehnt. Ihre Antworten bleiben auf diesem Bildschirm; versuchen Sie es erneut.',
|
|
2002
|
+
cacheSubmitInvalid: () => 'Das Formular konnte nicht abgesendet werden. Prüfen Sie die markierten Felder und versuchen Sie es erneut.',
|
|
2003
|
+
cacheSavedQueued: () => 'Auf diesem Gerät gespeichert. Es wird gesendet, sobald Sie wieder online sind.',
|
|
2004
|
+
cacheSavedExisting: () => 'Dies war bereits auf diesem Gerät gespeichert. Es wird gesendet, sobald Sie wieder online sind.',
|
|
2005
|
+
cacheDraftTitle: () => 'Gespeicherte Antworten fortsetzen?',
|
|
2006
|
+
cacheDraftBody: (updatedAt) => `Sie haben gespeicherte Antworten vom ${formatDraftTimestamp(updatedAt, 'de')}. Sie können sie fortsetzen oder neu beginnen.`,
|
|
2007
|
+
cacheDraftResume: () => 'Gespeicherte Antworten fortsetzen',
|
|
2008
|
+
cacheDraftDiscard: () => 'Neu beginnen',
|
|
2009
|
+
signatureUnavailable: (label) => `${label} kann auf diesem Gerät nicht unterschrieben werden.`,
|
|
2010
|
+
cacheRefusal: (refusal) => {
|
|
2011
|
+
switch (refusal.reason) {
|
|
2012
|
+
case 'artifact_hash':
|
|
2013
|
+
return 'Das gespeicherte Formular stimmt nicht mit der erwarteten Kopie überein. Suchen Sie nach einer Aktualisierung und versuchen Sie es erneut.';
|
|
2014
|
+
case 'no_record_date':
|
|
2015
|
+
return 'Dieses Formular benötigt ein Datensatzdatum, um offline geöffnet werden zu können. Öffnen Sie es mit einem gesetzten Datum.';
|
|
2016
|
+
case 'table_digest_missing':
|
|
2017
|
+
return 'Eine Tabelle, die dieses Formular benötigt, kann auf diesem Gerät nicht geprüft werden. Suchen Sie nach einer Aktualisierung und versuchen Sie es erneut.';
|
|
2018
|
+
case 'table_digest_mismatch':
|
|
2019
|
+
return 'Eine gespeicherte Tabelle stimmt nicht mit dem Formular überein, das sie bindet. Suchen Sie nach einer Aktualisierung und versuchen Sie es erneut.';
|
|
2020
|
+
case 'table_missing':
|
|
2021
|
+
return 'Eine Tabelle, die dieses Formular benötigt, ist auf diesem Gerät noch nicht gespeichert. Suchen Sie nach einer Aktualisierung und versuchen Sie es erneut.';
|
|
2022
|
+
case 'table_stale':
|
|
2023
|
+
return 'Eine gespeicherte Tabelle ist für diesen Datensatz veraltet. Suchen Sie nach einer Aktualisierung und versuchen Sie es erneut.';
|
|
2024
|
+
}
|
|
2025
|
+
},
|
|
2026
|
+
cachePublishRefusal: (refusal) => {
|
|
2027
|
+
switch (refusal.reason) {
|
|
2028
|
+
case 'artifact_digest_mismatch':
|
|
2029
|
+
return 'Das gespeicherte Formular stimmt nicht mit der erwarteten Kopie überein, daher wurde es nicht installiert. Suchen Sie nach einer Aktualisierung und versuchen Sie es erneut.';
|
|
2030
|
+
case 'artifact_conflict':
|
|
2031
|
+
return 'Eine andere Kopie dieses Formulars ist bereits auf diesem Gerät gespeichert. Suchen Sie nach einer Aktualisierung und versuchen Sie es erneut.';
|
|
2032
|
+
case 'dataset_digest_mismatch':
|
|
2033
|
+
return 'Eine Tabelle stimmt nicht mit dem Formular überein, das sie bindet, daher wurde nichts installiert. Suchen Sie nach einer Aktualisierung und versuchen Sie es erneut.';
|
|
2034
|
+
case 'dataset_conflict':
|
|
2035
|
+
return 'Eine andere Kopie einer Tabelle ist bereits auf diesem Gerät gespeichert. Suchen Sie nach einer Aktualisierung und versuchen Sie es erneut.';
|
|
2036
|
+
case 'dataset_unpinned':
|
|
2037
|
+
return 'Die Aktualisierung enthält eine Tabelle, die dieses Formular nicht verwendet, daher wurde nichts installiert. Suchen Sie nach einer Aktualisierung und versuchen Sie es erneut.';
|
|
2038
|
+
}
|
|
2039
|
+
},
|
|
2040
|
+
},
|
|
2041
|
+
// The shared sentences come from the pending translation draft. The cache frame is not in that
|
|
2042
|
+
// draft: it is written here so the device never falls back to English, and is reported for
|
|
2043
|
+
// native review with the catalogue. Shared ambiguities: the decimal separator, `signerFailed`
|
|
2044
|
+
// naming a component, `nestedListRefused` assuming a form top level.
|
|
2045
|
+
it: {
|
|
2046
|
+
required: (label, rowName) => rowName === undefined
|
|
2047
|
+
? `${label}: campo obbligatorio`
|
|
2048
|
+
: `${label} in ${rowName}: campo obbligatorio`,
|
|
2049
|
+
cardinality: (label, bound, count, limit) => {
|
|
2050
|
+
if (bound === 'minItems' && limit === 0)
|
|
2051
|
+
return undefined;
|
|
2052
|
+
const limitNoun = countForm('it', limit, { one: 'riga', other: 'righe' });
|
|
2053
|
+
const countNoun = countForm('it', count, { one: 'riga', other: 'righe' });
|
|
2054
|
+
return bound === 'minItems'
|
|
2055
|
+
? `${label} richiede almeno ${String(limit)} ${limitNoun}. Ne ha ${String(count)} ${countNoun}.`
|
|
2056
|
+
: `${label} consente al massimo ${String(limit)} ${limitNoun}. Ne ha ${String(count)} ${countNoun}.`;
|
|
2057
|
+
},
|
|
2058
|
+
mediaConstraint: (label, member, limit, value) => {
|
|
2059
|
+
if (member === 'accept') {
|
|
2060
|
+
const admitted = Array.isArray(limit)
|
|
2061
|
+
? limit.map((entry) => mediaTypePluralIn('it', entry)).join(mediaSeparatorIn('it'))
|
|
2062
|
+
: String(limit);
|
|
2063
|
+
return `${label} accetta ${admitted}. Il file è ${mediaTypeNameIn('it', String(value))}.`;
|
|
2064
|
+
}
|
|
2065
|
+
const { size, bound } = mediaSizeParts(limit, value, 'it');
|
|
2066
|
+
return member === 'minBytes'
|
|
2067
|
+
? `${label}: ${size}; il minimo è ${bound}.`
|
|
2068
|
+
: `${label}: ${size}; il massimo è ${bound}.`;
|
|
2069
|
+
},
|
|
2070
|
+
rowCount: (label, expected, actual, source, reason, ceiling) => {
|
|
2071
|
+
const expectedClause = countForm('it', expected, {
|
|
2072
|
+
one: `da ${source} ci si aspettava ${String(expected)} riga`,
|
|
2073
|
+
other: `da ${source} ci si aspettavano ${String(expected)} righe`,
|
|
2074
|
+
});
|
|
2075
|
+
const actualNoun = countForm('it', actual, { one: 'riga', other: 'righe' });
|
|
2076
|
+
return reason === undefined
|
|
2077
|
+
? `${label}: ${expectedClause} e la registrazione ne ha ${String(actual)} ${actualNoun}.`
|
|
2078
|
+
: reason === 'ceiling'
|
|
2079
|
+
? `${label}: il numero di righe da ${source} supera il limite di ${String(ceiling ?? expected)}.`
|
|
2080
|
+
: `${label}: il numero di righe da ${source} non è un numero intero valido.`;
|
|
2081
|
+
},
|
|
2082
|
+
invalidValue: (label) => `${label}: questo valore non è più tra le opzioni`,
|
|
2083
|
+
unavailableOption: (label) => `${label}: questa opzione non è selezionabile per questa registrazione`,
|
|
2084
|
+
emptyOptions: () => 'Nessuna opzione disponibile.',
|
|
2085
|
+
optionsNeedDependencies: (labels) => labels.length === 0
|
|
2086
|
+
? 'Compila prima i campi precedenti necessari per vedere le opzioni.'
|
|
2087
|
+
: `Rispondi prima a ${labels.join(LIST_SEPARATOR.it)} per vedere le opzioni.`,
|
|
2088
|
+
undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
|
|
2089
|
+
? `Non è stato possibile verificare se ${optionLabel} è disponibile per ${label}. Il server non ha ancora risposto.`
|
|
2090
|
+
: `Non è stato possibile verificare se ${optionLabel} è disponibile per ${label}. Il controllo non è stato risolto qui.`,
|
|
2091
|
+
loadMoreOptions: () => 'Carica altre opzioni',
|
|
2092
|
+
deferredValue: () => "Rinviato: il server ha trattenuto questo valore, quindi qui non c'è una risposta.",
|
|
2093
|
+
notEditable: (label, access) => {
|
|
2094
|
+
switch (access) {
|
|
2095
|
+
case 'masked':
|
|
2096
|
+
return `${label}: il valore non ti è visibile`;
|
|
2097
|
+
case 'hidden':
|
|
2098
|
+
return `${label}: il valore non viene mostrato`;
|
|
2099
|
+
case 'write_only':
|
|
2100
|
+
return `${label}: puoi inserire un valore ma non rileggerlo`;
|
|
2101
|
+
case 'read_only':
|
|
2102
|
+
case 'read_write':
|
|
2103
|
+
return `${label} non è modificabile`;
|
|
2104
|
+
}
|
|
2105
|
+
},
|
|
2106
|
+
rowKey: (label, rowName) => rowName === undefined
|
|
2107
|
+
? `${label}: due righe usano la stessa chiave. Cambiane una perché ogni riga sia distinta.`
|
|
2108
|
+
: `${label}: un'altra riga usa già ${rowName}. Scegline una diversa.`,
|
|
2109
|
+
sectionToggle: (title, expanded) => title === undefined
|
|
2110
|
+
? expanded
|
|
2111
|
+
? 'Nascondi la sezione'
|
|
2112
|
+
: 'Mostra la sezione'
|
|
2113
|
+
: expanded
|
|
2114
|
+
? `${title}: nascondi`
|
|
2115
|
+
: `${title}: mostra`,
|
|
2116
|
+
rowsEmpty: () => 'Nessuna riga.',
|
|
2117
|
+
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.',
|
|
2118
|
+
rowRemoved: (count) => count === 0
|
|
2119
|
+
? 'Riga rimossa. La lista è vuota.'
|
|
2120
|
+
: countForm('it', count, {
|
|
2121
|
+
one: 'Riga rimossa. Resta 1 riga.',
|
|
2122
|
+
other: `Riga rimossa. Restano ${String(count)} righe.`,
|
|
2123
|
+
}),
|
|
2124
|
+
rowAtPosition: (position) => `in posizione ${String(position)}`,
|
|
2125
|
+
addRow: () => 'Aggiungi riga',
|
|
2126
|
+
removeRow: (name) => `Rimuovi la riga ${name}`,
|
|
2127
|
+
rowRemoveFailed: () => 'La riga non è stata rimossa.',
|
|
2128
|
+
rowAddFailed: () => 'La riga non è stata aggiunta.',
|
|
2129
|
+
rowRefused: () => 'la registrazione ha rifiutato la modifica',
|
|
2130
|
+
captureSignature: (label) => `Firma ${label}`,
|
|
2131
|
+
captureFailed: () => 'Nessuna firma è stata acquisita.',
|
|
2132
|
+
signerFailed: () => 'Il riquadro della firma non risponde più.',
|
|
2133
|
+
attachMedia: () => 'Allega file',
|
|
2134
|
+
removeMedia: (name) => `Rimuovi ${name}`,
|
|
2135
|
+
mediaFailed: () => 'Il file non è stato allegato.',
|
|
2136
|
+
positionCapture: (label) => `Usa la mia posizione per ${label}`,
|
|
2137
|
+
positionRequesting: () => 'Richiesta della posizione…',
|
|
2138
|
+
positionDenied: () => "L'accesso alla posizione è stato negato. Inserisci le coordinate qui sotto.",
|
|
2139
|
+
positionUnavailable: () => 'Questo dispositivo non può fornire la posizione. Inserisci le coordinate qui sotto.',
|
|
2140
|
+
positionTimedOut: () => 'La richiesta della posizione è scaduta. Inserisci le coordinate qui sotto.',
|
|
2141
|
+
positionFailed: () => 'Non è stato possibile leggere la posizione.',
|
|
2142
|
+
positionInvalidReading: () => "Il dispositivo ha restituito una posizione fuori dall'intervallo valido. Inserisci le coordinate qui sotto.",
|
|
2143
|
+
screenUnavailable: (screenId) => `Questo modulo non può essere inviato (${screenId}).`,
|
|
2144
|
+
buffer: (reason, params) => bufferText('it', reason, params),
|
|
2145
|
+
display: displayFor('it'),
|
|
2146
|
+
requiredMarker: () => 'obbligatorio',
|
|
2147
|
+
rankMoveUp: (label) => `Sposta ${label} in alto`,
|
|
2148
|
+
rankMoveDown: (label) => `Sposta ${label} in basso`,
|
|
2149
|
+
rankRemove: (label) => `Rimuovi ${label}`,
|
|
2150
|
+
addressLine1: () => 'Indirizzo, riga 1',
|
|
2151
|
+
addressLine2: () => 'Indirizzo, riga 2',
|
|
2152
|
+
addressCity: () => 'Città',
|
|
2153
|
+
addressRegion: () => 'Regione / provincia',
|
|
2154
|
+
addressPostalCode: () => 'Codice postale',
|
|
2155
|
+
addressCountry: () => 'Paese',
|
|
2156
|
+
cacheLoading: () => 'Apertura del modulo salvato…',
|
|
2157
|
+
cacheOpenFailed: () => "Questo modulo non può essere aperto dall'archivio locale.",
|
|
2158
|
+
cacheOpenFailedDetail: () => 'Non è stato possibile leggere la copia salvata. Riprova e cerca un aggiornamento se il problema continua.',
|
|
2159
|
+
cacheOffline: () => 'Questo modulo non può essere aperto senza connessione.',
|
|
2160
|
+
cacheRetry: () => 'Riprova',
|
|
2161
|
+
cacheSubmit: () => 'Invia',
|
|
2162
|
+
cacheSubmitWriteFailed: () => "L'archivio locale ha rifiutato il salvataggio. Le tue risposte sono ancora su questa schermata, quindi riprova.",
|
|
2163
|
+
cacheSubmitInvalid: () => 'Il modulo non è stato inviato. Controlla i campi evidenziati e riprova.',
|
|
2164
|
+
cacheSavedQueued: () => 'Salvato su questo dispositivo. Sarà inviato quando torni online.',
|
|
2165
|
+
cacheSavedExisting: () => 'Era già salvato su questo dispositivo. Sarà inviato quando torni online.',
|
|
2166
|
+
cacheDraftTitle: () => 'Riprendere le risposte salvate?',
|
|
2167
|
+
cacheDraftBody: (updatedAt) => `Hai risposte salvate del ${formatDraftTimestamp(updatedAt, 'it')}. Puoi riprenderle o ricominciare.`,
|
|
2168
|
+
cacheDraftResume: () => 'Riprendi le risposte salvate',
|
|
2169
|
+
cacheDraftDiscard: () => 'Ricomincia',
|
|
2170
|
+
signatureUnavailable: (label) => `${label}: firma non disponibile su questo dispositivo.`,
|
|
2171
|
+
cacheRefusal: (refusal) => {
|
|
2172
|
+
switch (refusal.reason) {
|
|
2173
|
+
case 'artifact_hash':
|
|
2174
|
+
return 'Il modulo salvato non corrisponde alla copia prevista. Cerca un aggiornamento e riprova.';
|
|
2175
|
+
case 'no_record_date':
|
|
2176
|
+
return 'Questo modulo richiede una data di registrazione per aprirsi offline. Aprilo dopo aver impostato una data.';
|
|
2177
|
+
case 'table_digest_missing':
|
|
2178
|
+
return 'Una tabella necessaria a questo modulo non può essere verificata su questo dispositivo. Cerca un aggiornamento e riprova.';
|
|
2179
|
+
case 'table_digest_mismatch':
|
|
2180
|
+
return 'Una tabella salvata non corrisponde al modulo che la usa. Cerca un aggiornamento e riprova.';
|
|
2181
|
+
case 'table_missing':
|
|
2182
|
+
return 'Una tabella necessaria a questo modulo non è ancora salvata su questo dispositivo. Cerca un aggiornamento e riprova.';
|
|
2183
|
+
case 'table_stale':
|
|
2184
|
+
return 'Una tabella salvata non è aggiornata per questa registrazione. Cerca un aggiornamento e riprova.';
|
|
2185
|
+
}
|
|
2186
|
+
},
|
|
2187
|
+
cachePublishRefusal: (refusal) => {
|
|
2188
|
+
switch (refusal.reason) {
|
|
2189
|
+
case 'artifact_digest_mismatch':
|
|
2190
|
+
return 'Il modulo salvato non corrisponde alla copia prevista, quindi non è stato installato. Cerca un aggiornamento e riprova.';
|
|
2191
|
+
case 'artifact_conflict':
|
|
2192
|
+
return "Un'altra copia di questo modulo è già salvata su questo dispositivo. Cerca un aggiornamento e riprova.";
|
|
2193
|
+
case 'dataset_digest_mismatch':
|
|
2194
|
+
return 'Una tabella non corrisponde al modulo che la usa, quindi non è stato installato nulla. Cerca un aggiornamento e riprova.';
|
|
2195
|
+
case 'dataset_conflict':
|
|
2196
|
+
return "Un'altra copia di una tabella è già salvata su questo dispositivo. Cerca un aggiornamento e riprova.";
|
|
2197
|
+
case 'dataset_unpinned':
|
|
2198
|
+
return "L'aggiornamento contiene una tabella che questo modulo non usa, quindi non è stato installato nulla. Cerca un aggiornamento e riprova.";
|
|
2199
|
+
}
|
|
2200
|
+
},
|
|
2201
|
+
},
|
|
2202
|
+
// The shared sentences come from the pending translation draft. The cache frame is not in that
|
|
2203
|
+
// draft: it is written here so the device never falls back to English, and is reported for
|
|
2204
|
+
// native review with the catalogue. Shared ambiguities: the decimal separator, `seal` as
|
|
2205
|
+
// `заверить`, `signerFailed` naming a component, `nestedListRefused` assuming a form top level.
|
|
2206
|
+
ru: {
|
|
2207
|
+
required: (label, rowName) => rowName === undefined
|
|
2208
|
+
? `${label}: обязательное поле`
|
|
2209
|
+
: `${label} в строке ${rowName}: обязательное поле`,
|
|
2210
|
+
cardinality: (label, bound, count, limit) => {
|
|
2211
|
+
if (bound === 'minItems' && limit === 0)
|
|
2212
|
+
return undefined;
|
|
2213
|
+
const limitNoun = countForm('ru', limit, {
|
|
2214
|
+
one: 'строки',
|
|
2215
|
+
few: 'строк',
|
|
2216
|
+
many: 'строк',
|
|
2217
|
+
other: 'строк',
|
|
2218
|
+
});
|
|
2219
|
+
const countNoun = countForm('ru', count, {
|
|
2220
|
+
one: 'строка',
|
|
2221
|
+
few: 'строки',
|
|
2222
|
+
many: 'строк',
|
|
2223
|
+
other: 'строк',
|
|
2224
|
+
});
|
|
2225
|
+
return bound === 'minItems'
|
|
2226
|
+
? `${label}: нужно не меньше ${String(limit)} ${limitNoun}. Сейчас в записи ${String(count)} ${countNoun}.`
|
|
2227
|
+
: `${label}: допускается не больше ${String(limit)} ${limitNoun}. Сейчас в записи ${String(count)} ${countNoun}.`;
|
|
2228
|
+
},
|
|
2229
|
+
mediaConstraint: (label, member, limit, value) => {
|
|
2230
|
+
if (member === 'accept') {
|
|
2231
|
+
const admitted = Array.isArray(limit)
|
|
2232
|
+
? limit.map((entry) => mediaTypePluralIn('ru', entry)).join(mediaSeparatorIn('ru'))
|
|
2233
|
+
: String(limit);
|
|
2234
|
+
return `${label} принимает ${admitted}. Этот файл: ${mediaTypeNameIn('ru', String(value))}.`;
|
|
2235
|
+
}
|
|
2236
|
+
const { size, bound } = mediaSizeParts(limit, value, 'ru');
|
|
2237
|
+
return member === 'minBytes'
|
|
2238
|
+
? `${label}: ${size}; минимум ${bound}.`
|
|
2239
|
+
: `${label}: ${size}; максимум ${bound}.`;
|
|
2240
|
+
},
|
|
2241
|
+
rowCount: (label, expected, actual, source, reason, ceiling) => {
|
|
2242
|
+
// The reference frame, mirrored: a count of one takes the feminine singular verb and noun,
|
|
2243
|
+
// every other category takes `ожидалось` and the counting form the registry selected, so
|
|
2244
|
+
// `21 строка` and `22 строки` agree the way the language does rather than the way English
|
|
2245
|
+
// would. The parity gate holds this key equal to `FormCopy`, so the two cannot drift.
|
|
2246
|
+
const one = cardinalCategory('ru', expected) === 'one';
|
|
2247
|
+
const noun = countForm('ru', expected, {
|
|
2248
|
+
one: 'строка',
|
|
2249
|
+
few: 'строки',
|
|
2250
|
+
many: 'строк',
|
|
2251
|
+
other: 'строк',
|
|
2252
|
+
});
|
|
2253
|
+
const verb = one ? 'ожидалась' : 'ожидалось';
|
|
2254
|
+
const actualNoun = countForm('ru', actual, {
|
|
2255
|
+
one: 'строка',
|
|
2256
|
+
few: 'строки',
|
|
2257
|
+
many: 'строк',
|
|
2258
|
+
other: 'строк',
|
|
2259
|
+
});
|
|
2260
|
+
return reason === undefined
|
|
2261
|
+
? `${label}: по выражению ${source} ${verb} ${String(expected)} ${noun}, в записи ${String(actual)} ${actualNoun}.`
|
|
2262
|
+
: reason === 'ceiling'
|
|
2263
|
+
? `${label}: число строк по выражению ${source} больше предела ${String(ceiling ?? expected)}.`
|
|
2264
|
+
: `${label}: число строк по выражению ${source} не является целым числом.`;
|
|
2265
|
+
},
|
|
2266
|
+
invalidValue: (label) => `${label}: такое значение больше не предлагается`,
|
|
2267
|
+
unavailableOption: (label) => `${label}: этот вариант нельзя выбрать в этой записи`,
|
|
2268
|
+
emptyOptions: () => 'Варианты не предлагаются.',
|
|
2269
|
+
optionsNeedDependencies: (labels) => labels.length === 0
|
|
2270
|
+
? 'Сначала заполните необходимые предыдущие поля, чтобы увидеть варианты.'
|
|
2271
|
+
: `Сначала заполните ${labels.join(LIST_SEPARATOR.ru)}, чтобы увидеть варианты.`,
|
|
2272
|
+
undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
|
|
2273
|
+
? `Не удалось проверить, доступен ли ${optionLabel} для ${label}. Сервер ещё не ответил.`
|
|
2274
|
+
: `Не удалось проверить, доступен ли ${optionLabel} для ${label}. Здесь проверку выполнить нельзя.`,
|
|
2275
|
+
loadMoreOptions: () => 'Загрузить ещё варианты',
|
|
2276
|
+
deferredValue: () => 'Отложено: сервер не передал это значение, поэтому здесь ответа нет.',
|
|
2277
|
+
notEditable: (label, access) => {
|
|
2278
|
+
switch (access) {
|
|
2279
|
+
case 'masked':
|
|
2280
|
+
return `${label}: значение скрыто от вас`;
|
|
2281
|
+
case 'hidden':
|
|
2282
|
+
return `${label}: значение не отображается`;
|
|
2283
|
+
case 'write_only':
|
|
2284
|
+
return `${label}: значение можно ввести, но нельзя прочитать`;
|
|
2285
|
+
case 'read_only':
|
|
2286
|
+
case 'read_write':
|
|
2287
|
+
return `${label}: изменить нельзя`;
|
|
2288
|
+
}
|
|
2289
|
+
},
|
|
2290
|
+
rowKey: (label, rowName) => rowName === undefined
|
|
2291
|
+
? `${label}: две строки используют один ключ. Измените одну, чтобы строки различались.`
|
|
2292
|
+
: `${label}: другая строка уже использует ${rowName}. Выберите другой.`,
|
|
2293
|
+
sectionToggle: (title, expanded) => title === undefined
|
|
2294
|
+
? expanded
|
|
2295
|
+
? 'Свернуть раздел'
|
|
2296
|
+
: 'Развернуть раздел'
|
|
2297
|
+
: expanded
|
|
2298
|
+
? `${title}: свернуть`
|
|
2299
|
+
: `${title}: развернуть`,
|
|
2300
|
+
rowsEmpty: () => 'Строк нет.',
|
|
2301
|
+
nestedListRefused: () => 'В этом списке есть строки внутри строк, а эта версия пока не умеет их показывать. Перенесите внутренний список на верхний уровень формы.',
|
|
2302
|
+
rowRemoved: (count) => count === 0
|
|
2303
|
+
? 'Строка удалена. Список пуст.'
|
|
2304
|
+
: countForm('ru', count, {
|
|
2305
|
+
one: `Строка удалена. Осталась ${String(count)} строка.`,
|
|
2306
|
+
few: `Строка удалена. Осталось ${String(count)} строки.`,
|
|
2307
|
+
many: `Строка удалена. Осталось ${String(count)} строк.`,
|
|
2308
|
+
other: `Строка удалена. Осталось ${String(count)} строк.`,
|
|
2309
|
+
}),
|
|
2310
|
+
rowAtPosition: (position) => `на позиции ${String(position)}`,
|
|
2311
|
+
addRow: () => 'Добавить строку',
|
|
2312
|
+
removeRow: (name) => `Удалить строку: ${name}`,
|
|
2313
|
+
rowRemoveFailed: () => 'Строка не удалена.',
|
|
2314
|
+
rowAddFailed: () => 'Строка не добавлена.',
|
|
2315
|
+
rowRefused: () => 'запись отклонила изменение',
|
|
2316
|
+
captureSignature: (label) => `Подписать: ${label}`,
|
|
2317
|
+
captureFailed: () => 'Подпись не получена.',
|
|
2318
|
+
signerFailed: () => 'Поле подписи перестало отвечать.',
|
|
2319
|
+
attachMedia: () => 'Прикрепить файл',
|
|
2320
|
+
removeMedia: (name) => `Удалить: ${name}`,
|
|
2321
|
+
mediaFailed: () => 'Файл не прикреплён.',
|
|
2322
|
+
positionCapture: (label) => `Использовать моё местоположение: ${label}`,
|
|
2323
|
+
positionRequesting: () => 'Запрашиваем местоположение…',
|
|
2324
|
+
positionDenied: () => 'Доступ к местоположению запрещён. Укажите координаты ниже.',
|
|
2325
|
+
positionUnavailable: () => 'Это устройство не может определить местоположение. Укажите координаты ниже.',
|
|
2326
|
+
positionTimedOut: () => 'Время ожидания местоположения истекло. Укажите координаты ниже.',
|
|
2327
|
+
positionFailed: () => 'Не удалось получить местоположение.',
|
|
2328
|
+
positionInvalidReading: () => 'Устройство вернуло координаты вне допустимого диапазона. Укажите координаты ниже.',
|
|
2329
|
+
screenUnavailable: (screenId) => `Эту форму нельзя отправить (${screenId}).`,
|
|
2330
|
+
buffer: (reason, params) => bufferText('ru', reason, params),
|
|
2331
|
+
display: displayFor('ru'),
|
|
2332
|
+
requiredMarker: () => 'обязательно',
|
|
2333
|
+
rankMoveUp: (label) => `Переместить выше: ${label}`,
|
|
2334
|
+
rankMoveDown: (label) => `Переместить ниже: ${label}`,
|
|
2335
|
+
rankRemove: (label) => `Удалить: ${label}`,
|
|
2336
|
+
addressLine1: () => 'Строка адреса 1',
|
|
2337
|
+
addressLine2: () => 'Строка адреса 2',
|
|
2338
|
+
addressCity: () => 'Город',
|
|
2339
|
+
addressRegion: () => 'Регион / область',
|
|
2340
|
+
addressPostalCode: () => 'Почтовый индекс',
|
|
2341
|
+
addressCountry: () => 'Страна',
|
|
2342
|
+
cacheLoading: () => 'Открываем сохранённую форму…',
|
|
2343
|
+
cacheOpenFailed: () => 'Эту форму нельзя открыть из локального хранилища.',
|
|
2344
|
+
cacheOpenFailedDetail: () => 'Не удалось прочитать сохранённую копию. Повторите попытку и проверьте наличие обновлений, если ошибка останется.',
|
|
2345
|
+
cacheOffline: () => 'Эту форму нельзя открыть без сети.',
|
|
2346
|
+
cacheRetry: () => 'Повторить',
|
|
2347
|
+
cacheSubmit: () => 'Отправить',
|
|
2348
|
+
cacheSubmitWriteFailed: () => 'Локальное хранилище отказало в записи. Ваши ответы остаются на этом экране, поэтому повторите попытку.',
|
|
2349
|
+
cacheSubmitInvalid: () => 'Форму не удалось отправить. Проверьте отмеченные поля и повторите попытку.',
|
|
2350
|
+
cacheSavedQueued: () => 'Сохранено на этом устройстве. Отправим, когда появится связь.',
|
|
2351
|
+
cacheSavedExisting: () => 'Это уже было сохранено на этом устройстве. Отправим, когда появится связь.',
|
|
2352
|
+
cacheDraftTitle: () => 'Продолжить сохранённые ответы?',
|
|
2353
|
+
cacheDraftBody: (updatedAt) => `У вас есть сохранённые ответы от ${formatDraftTimestamp(updatedAt, 'ru')}. Их можно продолжить или начать заново.`,
|
|
2354
|
+
cacheDraftResume: () => 'Продолжить сохранённые ответы',
|
|
2355
|
+
cacheDraftDiscard: () => 'Начать заново',
|
|
2356
|
+
signatureUnavailable: (label) => `Подписать ${label} на этом устройстве нельзя.`,
|
|
2357
|
+
cacheRefusal: (refusal) => {
|
|
2358
|
+
switch (refusal.reason) {
|
|
2359
|
+
case 'artifact_hash':
|
|
2360
|
+
return 'Сохранённая форма не совпадает с ожидаемой копией. Проверьте наличие обновлений и повторите попытку.';
|
|
2361
|
+
case 'no_record_date':
|
|
2362
|
+
return 'Этой форме нужна дата записи, чтобы открыться без сети. Откройте её с указанной датой.';
|
|
2363
|
+
case 'table_digest_missing':
|
|
2364
|
+
return 'Таблицу, которая нужна этой форме, нельзя проверить на этом устройстве. Проверьте наличие обновлений и повторите попытку.';
|
|
2365
|
+
case 'table_digest_mismatch':
|
|
2366
|
+
return 'Сохранённая таблица не совпадает с формой, которая её использует. Проверьте наличие обновлений и повторите попытку.';
|
|
2367
|
+
case 'table_missing':
|
|
2368
|
+
return 'Таблица, которая нужна этой форме, ещё не сохранена на этом устройстве. Проверьте наличие обновлений и повторите попытку.';
|
|
2369
|
+
case 'table_stale':
|
|
2370
|
+
return 'Сохранённая таблица устарела для этой записи. Проверьте наличие обновлений и повторите попытку.';
|
|
2371
|
+
}
|
|
2372
|
+
},
|
|
2373
|
+
cachePublishRefusal: (refusal) => {
|
|
2374
|
+
switch (refusal.reason) {
|
|
2375
|
+
case 'artifact_digest_mismatch':
|
|
2376
|
+
return 'Сохранённая форма не совпадает с ожидаемой копией, поэтому не установлена. Проверьте наличие обновлений и повторите попытку.';
|
|
2377
|
+
case 'artifact_conflict':
|
|
2378
|
+
return 'Другая копия этой формы уже сохранена на этом устройстве. Проверьте наличие обновлений и повторите попытку.';
|
|
2379
|
+
case 'dataset_digest_mismatch':
|
|
2380
|
+
return 'Таблица не совпадает с формой, которая её использует, поэтому ничего не установлено. Проверьте наличие обновлений и повторите попытку.';
|
|
2381
|
+
case 'dataset_conflict':
|
|
2382
|
+
return 'Другая копия таблицы уже сохранена на этом устройстве. Проверьте наличие обновлений и повторите попытку.';
|
|
2383
|
+
case 'dataset_unpinned':
|
|
2384
|
+
return 'Обновление содержит таблицу, которую эта форма не использует, поэтому ничего не установлено. Проверьте наличие обновлений и повторите попытку.';
|
|
2385
|
+
}
|
|
2386
|
+
},
|
|
2387
|
+
},
|
|
2388
|
+
// The shared sentences come from the pending translation draft. The cache frame is not in that
|
|
2389
|
+
// draft: it is written here so it never falls back to English, and is reported for native review
|
|
2390
|
+
// with the catalogue. Shared ambiguities: Chinese punctuation and spacing, `signerFailed`
|
|
2391
|
+
// naming a component, `nestedListRefused` assuming a form top level.
|
|
2392
|
+
zh: {
|
|
2393
|
+
required: (label, rowName) => rowName === undefined ? `${label}为必填项` : `${rowName}中的${label}为必填项`,
|
|
2394
|
+
cardinality: (label, bound, count, limit) => {
|
|
2395
|
+
if (bound === 'minItems' && limit === 0)
|
|
2396
|
+
return undefined;
|
|
2397
|
+
const noun = (value) => countForm('zh', value, { other: '行' });
|
|
2398
|
+
return bound === 'minItems'
|
|
2399
|
+
? `${label}至少需要 ${String(limit)} ${noun(limit)}。当前有 ${String(count)} ${noun(count)}。`
|
|
2400
|
+
: `${label}最多允许 ${String(limit)} ${noun(limit)}。当前有 ${String(count)} ${noun(count)}。`;
|
|
2401
|
+
},
|
|
2402
|
+
mediaConstraint: (label, member, limit, value) => {
|
|
2403
|
+
if (member === 'accept') {
|
|
2404
|
+
const admitted = Array.isArray(limit)
|
|
2405
|
+
? limit.map((entry) => mediaTypePluralIn('zh', entry)).join(mediaSeparatorIn('zh'))
|
|
2406
|
+
: String(limit);
|
|
2407
|
+
return `${label}接受${admitted}。此文件是${mediaTypeNameIn('zh', String(value))}。`;
|
|
2408
|
+
}
|
|
2409
|
+
const { size, bound } = mediaSizeParts(limit, value, 'zh');
|
|
2410
|
+
return member === 'minBytes'
|
|
2411
|
+
? `${label}:${size},最小为 ${bound}。`
|
|
2412
|
+
: `${label}:${size},最大为 ${bound}。`;
|
|
2413
|
+
},
|
|
2414
|
+
rowCount: (label, expected, actual, source, reason, ceiling) => {
|
|
2415
|
+
const noun = (value) => countForm('zh', value, { other: '行' });
|
|
2416
|
+
return reason === undefined
|
|
2417
|
+
? `${label}:按 ${source} 应为 ${String(expected)} ${noun(expected)},当前记录有 ${String(actual)} ${noun(actual)}。`
|
|
2418
|
+
: reason === 'ceiling'
|
|
2419
|
+
? `${label}:按 ${source} 计算的行数超过上限 ${String(ceiling ?? expected)}。`
|
|
2420
|
+
: `${label}:按 ${source} 计算的行数不是有效的整数。`;
|
|
2421
|
+
},
|
|
2422
|
+
invalidValue: (label) => `${label}:不再提供该值`,
|
|
2423
|
+
unavailableOption: (label) => `${label}:此记录不能选择该选项`,
|
|
2424
|
+
emptyOptions: () => '没有可用的选项。',
|
|
2425
|
+
optionsNeedDependencies: (labels) => labels.length === 0
|
|
2426
|
+
? '请先填写所需的前置字段以查看选项。'
|
|
2427
|
+
: `请先填写${labels.join(LIST_SEPARATOR.zh)}以查看选项。`,
|
|
2428
|
+
undeterminedOption: (label, optionLabel, cause) => cause === 'deferred'
|
|
2429
|
+
? `无法确认${optionLabel}是否可用于${label}。服务器尚未答复。`
|
|
2430
|
+
: `无法确认${optionLabel}是否可用于${label}。此处无法完成这项检查。`,
|
|
2431
|
+
loadMoreOptions: () => '加载更多选项',
|
|
2432
|
+
deferredValue: () => '已延后:服务器未提供该值,因此此处尚无答复。',
|
|
2433
|
+
notEditable: (label, access) => {
|
|
2434
|
+
switch (access) {
|
|
2435
|
+
case 'masked':
|
|
2436
|
+
return `${label}:该值对你不可见。`;
|
|
2437
|
+
case 'hidden':
|
|
2438
|
+
return `${label}:该值不显示。`;
|
|
2439
|
+
case 'write_only':
|
|
2440
|
+
return `${label}:可以填写,但无法读回。`;
|
|
2441
|
+
case 'read_only':
|
|
2442
|
+
case 'read_write':
|
|
2443
|
+
return `${label}不可编辑`;
|
|
2444
|
+
}
|
|
2445
|
+
},
|
|
2446
|
+
rowKey: (label, rowName) => rowName === undefined
|
|
2447
|
+
? `${label}:有两行使用了同一个键。请修改其中一行,使每行各不相同。`
|
|
2448
|
+
: `${label}:另一行已使用${rowName}。请换一个。`,
|
|
2449
|
+
sectionToggle: (title, expanded) => title === undefined
|
|
2450
|
+
? expanded
|
|
2451
|
+
? '收起区块'
|
|
2452
|
+
: '展开区块'
|
|
2453
|
+
: expanded
|
|
2454
|
+
? `${title}:收起`
|
|
2455
|
+
: `${title}:展开`,
|
|
2456
|
+
rowsEmpty: () => '没有行。',
|
|
2457
|
+
nestedListRefused: () => '该列表包含行内行,当前版本尚不支持显示。请将内层列表移到表单的顶层。',
|
|
2458
|
+
rowRemoved: (count) => count === 0
|
|
2459
|
+
? '已删除该行,列表为空。'
|
|
2460
|
+
: countForm('zh', count, { other: `已删除该行,还剩 ${String(count)} 行。` }),
|
|
2461
|
+
rowAtPosition: (position) => `位于第 ${String(position)} 行`,
|
|
2462
|
+
addRow: () => '添加行',
|
|
2463
|
+
removeRow: (name) => `删除该行:${name}`,
|
|
2464
|
+
rowRemoveFailed: () => '未删除该行。',
|
|
2465
|
+
rowAddFailed: () => '未添加行。',
|
|
2466
|
+
rowRefused: () => '记录拒绝了该修改',
|
|
2467
|
+
captureSignature: (label) => `签署${label}`,
|
|
2468
|
+
captureFailed: () => '未获取到签名。',
|
|
2469
|
+
signerFailed: () => '签名面板已停止响应。',
|
|
2470
|
+
attachMedia: () => '添加文件',
|
|
2471
|
+
removeMedia: (name) => `移除${name}`,
|
|
2472
|
+
mediaFailed: () => '文件未添加。',
|
|
2473
|
+
positionCapture: (label) => `使用我的位置填写${label}`,
|
|
2474
|
+
positionRequesting: () => '正在获取位置……',
|
|
2475
|
+
positionDenied: () => '位置权限已被拒绝。请在下方填写坐标。',
|
|
2476
|
+
positionUnavailable: () => '此设备无法提供位置。请在下方填写坐标。',
|
|
2477
|
+
positionTimedOut: () => '获取位置超时。请在下方填写坐标。',
|
|
2478
|
+
positionFailed: () => '无法获取位置。',
|
|
2479
|
+
positionInvalidReading: () => '设备返回的位置超出有效范围。请在下方填写坐标。',
|
|
2480
|
+
screenUnavailable: (screenId) => `无法提交此表单(${screenId})。`,
|
|
2481
|
+
buffer: (reason, params) => bufferText('zh', reason, params),
|
|
2482
|
+
display: displayFor('zh'),
|
|
2483
|
+
requiredMarker: () => '必填',
|
|
2484
|
+
rankMoveUp: (label) => `上移${label}`,
|
|
2485
|
+
rankMoveDown: (label) => `下移${label}`,
|
|
2486
|
+
rankRemove: (label) => `移除${label}`,
|
|
2487
|
+
addressLine1: () => '地址行 1',
|
|
2488
|
+
addressLine2: () => '地址行 2',
|
|
2489
|
+
addressCity: () => '城市',
|
|
2490
|
+
addressRegion: () => '省/州',
|
|
2491
|
+
addressPostalCode: () => '邮政编码',
|
|
2492
|
+
addressCountry: () => '国家',
|
|
2493
|
+
cacheLoading: () => '正在打开已保存的表单……',
|
|
2494
|
+
cacheOpenFailed: () => '无法从本地存储打开此表单。',
|
|
2495
|
+
cacheOpenFailedDetail: () => '无法读取已保存的副本。请重试;如果仍然失败,请检查更新。',
|
|
2496
|
+
cacheOffline: () => '无法离线打开此表单。',
|
|
2497
|
+
cacheRetry: () => '重试',
|
|
2498
|
+
cacheSubmit: () => '提交',
|
|
2499
|
+
cacheSubmitWriteFailed: () => '本地存储拒绝写入。你的回答仍在此屏幕上,请重试。',
|
|
2500
|
+
cacheSubmitInvalid: () => '表单无法提交。请检查标记的字段并重试。',
|
|
2501
|
+
cacheSavedQueued: () => '已保存到此设备,网络恢复后发送。',
|
|
2502
|
+
cacheSavedExisting: () => '此内容之前已保存到此设备,网络恢复后发送。',
|
|
2503
|
+
cacheDraftTitle: () => '继续已保存的回答?',
|
|
2504
|
+
// Native review on 保存过 versus 保存于: `保存过` marks the act (answers saved at some point),
|
|
2505
|
+
// where `保存于 ${updatedAt}` would read as the timestamp being the save instant.
|
|
2506
|
+
cacheDraftBody: (updatedAt) => `你在 ${formatDraftTimestamp(updatedAt, 'zh')} 保存过回答。可以继续,也可以重新开始。`,
|
|
2507
|
+
cacheDraftResume: () => '继续已保存的回答',
|
|
2508
|
+
cacheDraftDiscard: () => '重新开始',
|
|
2509
|
+
signatureUnavailable: (label) => `${label}无法在此设备上签名。`,
|
|
2510
|
+
cacheRefusal: (refusal) => {
|
|
2511
|
+
switch (refusal.reason) {
|
|
2512
|
+
case 'artifact_hash':
|
|
2513
|
+
return '已保存的表单与预期副本不一致。请检查更新并重试。';
|
|
2514
|
+
case 'no_record_date':
|
|
2515
|
+
return '此表单需要记录日期才能离线打开。请在设置日期后打开。';
|
|
2516
|
+
case 'table_digest_missing':
|
|
2517
|
+
return '此表单需要的表格无法在此设备上验证。请检查更新并重试。';
|
|
2518
|
+
case 'table_digest_mismatch':
|
|
2519
|
+
return '已保存的表格与此表单不一致。请检查更新并重试。';
|
|
2520
|
+
case 'table_missing':
|
|
2521
|
+
return '此表单需要的表格尚未保存到此设备。请检查更新并重试。';
|
|
2522
|
+
case 'table_stale':
|
|
2523
|
+
return '已保存的表格对此记录已过期。请检查更新并重试。';
|
|
2524
|
+
}
|
|
2525
|
+
},
|
|
2526
|
+
cachePublishRefusal: (refusal) => {
|
|
2527
|
+
switch (refusal.reason) {
|
|
2528
|
+
case 'artifact_digest_mismatch':
|
|
2529
|
+
return '已保存的表单与预期副本不一致,因此未安装。请检查更新并重试。';
|
|
2530
|
+
case 'artifact_conflict':
|
|
2531
|
+
return '此设备上已存在另一个表单副本。请检查更新并重试。';
|
|
2532
|
+
case 'dataset_digest_mismatch':
|
|
2533
|
+
return '表格与此表单不一致,因此未安装任何内容。请检查更新并重试。';
|
|
2534
|
+
case 'dataset_conflict':
|
|
2535
|
+
return '此设备上已存在另一个表格副本。请检查更新并重试。';
|
|
2536
|
+
case 'dataset_unpinned':
|
|
2537
|
+
return '更新包含此表单未使用的表格,因此未安装任何内容。请检查更新并重试。';
|
|
2538
|
+
}
|
|
2539
|
+
},
|
|
2540
|
+
},
|
|
2541
|
+
};
|
|
2542
|
+
/**
|
|
2543
|
+
* The language subtag a host tag names.
|
|
2544
|
+
*
|
|
2545
|
+
* The shipped resolver, `@azx-pbc/axiom-web`'s `resolveLocale`, is the contract: trim, lowercase,
|
|
2546
|
+
* split on `-` or `_` and take the first non-empty segment. Those five lines are repeated here
|
|
2547
|
+
* because this example must not depend on the DOM renderer; `PT`, `es_MX` and ` es ` therefore
|
|
2548
|
+
* read their language instead of falling through to English.
|
|
2549
|
+
*/
|
|
2550
|
+
function hostCopyLocale(tag) {
|
|
2551
|
+
const base = tag
|
|
2552
|
+
.trim()
|
|
2553
|
+
.toLowerCase()
|
|
2554
|
+
.split(/[-_]/u)
|
|
2555
|
+
.find((segment) => segment !== '') ?? '';
|
|
2556
|
+
for (const carried of HOST_COPY_LOCALES) {
|
|
2557
|
+
if (carried === base)
|
|
2558
|
+
return carried;
|
|
2559
|
+
}
|
|
2560
|
+
return undefined;
|
|
2561
|
+
}
|
|
2562
|
+
/** The host copy for one locale, falling back to English for a locale it does not carry. */
|
|
2563
|
+
export function hostCopy(locale) {
|
|
2564
|
+
if (locale === undefined)
|
|
2565
|
+
return CATALOGUE.en;
|
|
2566
|
+
return CATALOGUE[hostCopyLocale(locale) ?? 'en'];
|
|
2567
|
+
}
|
|
2568
|
+
/** The copy the rendered tree reads; the page supplies the provider for the selected locale. */
|
|
2569
|
+
export const HostCopyContext = createContext(hostCopy(undefined));
|
|
2570
|
+
/** The host copy in force for the tree being rendered. */
|
|
2571
|
+
export function useHostCopy() {
|
|
2572
|
+
return useContext(HostCopyContext);
|
|
2573
|
+
}
|
|
2574
|
+
//# sourceMappingURL=copy.js.map
|