@localizeaso/cli 0.1.0-preview.0
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/README.md +24 -0
- package/package.json +35 -0
- package/packages/asc-shared/dist/app-store-review.d.ts +610 -0
- package/packages/asc-shared/dist/app-store-review.d.ts.map +1 -0
- package/packages/asc-shared/dist/app-store-review.js +242 -0
- package/packages/asc-shared/dist/aso-keyword-map.d.ts +94 -0
- package/packages/asc-shared/dist/aso-keyword-map.d.ts.map +1 -0
- package/packages/asc-shared/dist/aso-keyword-map.js +292 -0
- package/packages/asc-shared/dist/constants.d.ts +15 -0
- package/packages/asc-shared/dist/constants.d.ts.map +1 -0
- package/packages/asc-shared/dist/constants.js +130 -0
- package/packages/asc-shared/dist/cross-localization.d.ts +29 -0
- package/packages/asc-shared/dist/cross-localization.d.ts.map +1 -0
- package/packages/asc-shared/dist/cross-localization.js +189 -0
- package/packages/asc-shared/dist/dedupe.d.ts +17 -0
- package/packages/asc-shared/dist/dedupe.d.ts.map +1 -0
- package/packages/asc-shared/dist/dedupe.js +104 -0
- package/packages/asc-shared/dist/design-tokens.d.ts +83 -0
- package/packages/asc-shared/dist/design-tokens.d.ts.map +1 -0
- package/packages/asc-shared/dist/design-tokens.js +73 -0
- package/packages/asc-shared/dist/index.d.ts +16 -0
- package/packages/asc-shared/dist/index.d.ts.map +1 -0
- package/packages/asc-shared/dist/index.js +16 -0
- package/packages/asc-shared/dist/keywords.d.ts +48 -0
- package/packages/asc-shared/dist/keywords.d.ts.map +1 -0
- package/packages/asc-shared/dist/keywords.js +376 -0
- package/packages/asc-shared/dist/limits.d.ts +11 -0
- package/packages/asc-shared/dist/limits.d.ts.map +1 -0
- package/packages/asc-shared/dist/limits.js +9 -0
- package/packages/asc-shared/dist/locales.d.ts +10 -0
- package/packages/asc-shared/dist/locales.d.ts.map +1 -0
- package/packages/asc-shared/dist/locales.js +314 -0
- package/packages/asc-shared/dist/monetization-boundary.d.ts +148 -0
- package/packages/asc-shared/dist/monetization-boundary.d.ts.map +1 -0
- package/packages/asc-shared/dist/monetization-boundary.js +365 -0
- package/packages/asc-shared/dist/post-approval-paths.d.ts +30 -0
- package/packages/asc-shared/dist/post-approval-paths.d.ts.map +1 -0
- package/packages/asc-shared/dist/post-approval-paths.js +25 -0
- package/packages/asc-shared/dist/review-gate-summary.d.ts +166 -0
- package/packages/asc-shared/dist/review-gate-summary.d.ts.map +1 -0
- package/packages/asc-shared/dist/review-gate-summary.js +354 -0
- package/packages/asc-shared/dist/reviewer-feedback.d.ts +19 -0
- package/packages/asc-shared/dist/reviewer-feedback.d.ts.map +1 -0
- package/packages/asc-shared/dist/reviewer-feedback.js +94 -0
- package/packages/asc-shared/dist/screenshot-review.d.ts +478 -0
- package/packages/asc-shared/dist/screenshot-review.d.ts.map +1 -0
- package/packages/asc-shared/dist/screenshot-review.js +17 -0
- package/packages/asc-shared/dist/supabase.types.d.ts +541 -0
- package/packages/asc-shared/dist/supabase.types.d.ts.map +1 -0
- package/packages/asc-shared/dist/supabase.types.js +5 -0
- package/packages/asc-shared/dist/validation.d.ts +42 -0
- package/packages/asc-shared/dist/validation.d.ts.map +1 -0
- package/packages/asc-shared/dist/validation.js +113 -0
- package/scripts/ensure-shared-build.mjs +76 -0
- package/scripts/export-astro-mcp-apps.mjs +841 -0
- package/scripts/localizeaso.mjs +2100 -0
- package/scripts/review-agent.mjs +9092 -0
- package/scripts/review-mcp.mjs +5931 -0
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import { normalizeLocale, resolveStoreLocale } from './locales.js';
|
|
2
|
+
export const ASO_KEYWORD_IMPORT_FIELDS = [
|
|
3
|
+
'locale',
|
|
4
|
+
'keyword',
|
|
5
|
+
'popularity',
|
|
6
|
+
'difficulty',
|
|
7
|
+
'isPreferred',
|
|
8
|
+
];
|
|
9
|
+
const REQUIRED_ASO_KEYWORD_FIELDS = ['locale', 'keyword'];
|
|
10
|
+
const ASO_HEADER_CANDIDATES = {
|
|
11
|
+
locale: [
|
|
12
|
+
'locale',
|
|
13
|
+
'locales',
|
|
14
|
+
'storedomain',
|
|
15
|
+
'storelocale',
|
|
16
|
+
'store',
|
|
17
|
+
'storefront',
|
|
18
|
+
'country',
|
|
19
|
+
'market',
|
|
20
|
+
'territory',
|
|
21
|
+
'lang',
|
|
22
|
+
'language',
|
|
23
|
+
'languagecode',
|
|
24
|
+
'localecode',
|
|
25
|
+
'localecode',
|
|
26
|
+
],
|
|
27
|
+
localeHighPriority: [
|
|
28
|
+
'store',
|
|
29
|
+
'storefront',
|
|
30
|
+
'storelocale',
|
|
31
|
+
'country',
|
|
32
|
+
'market',
|
|
33
|
+
'territory',
|
|
34
|
+
'storedomain',
|
|
35
|
+
],
|
|
36
|
+
keyword: [
|
|
37
|
+
'keyword',
|
|
38
|
+
'keywords',
|
|
39
|
+
'keywordname',
|
|
40
|
+
'term',
|
|
41
|
+
'terms',
|
|
42
|
+
'searchterm',
|
|
43
|
+
'searchterms',
|
|
44
|
+
'query',
|
|
45
|
+
'queries',
|
|
46
|
+
'phrase',
|
|
47
|
+
'searchquery',
|
|
48
|
+
],
|
|
49
|
+
popularity: [
|
|
50
|
+
'popularity',
|
|
51
|
+
'pop',
|
|
52
|
+
'searchvolume',
|
|
53
|
+
'volume',
|
|
54
|
+
'traffic',
|
|
55
|
+
'score',
|
|
56
|
+
'rank',
|
|
57
|
+
'impressions',
|
|
58
|
+
],
|
|
59
|
+
difficulty: ['difficulty', 'competition', 'hardness', 'comp', 'kd', 'diff'],
|
|
60
|
+
isPreferred: ['preferred', 'ispreferred', 'favorite', 'favourite', 'primary', 'main'],
|
|
61
|
+
};
|
|
62
|
+
export function parseKeywordList(input) {
|
|
63
|
+
return input
|
|
64
|
+
.split(/[,\n]+/)
|
|
65
|
+
.map((value) => value.trim())
|
|
66
|
+
.filter(Boolean);
|
|
67
|
+
}
|
|
68
|
+
export function parseCsvRows(input) {
|
|
69
|
+
const rows = [];
|
|
70
|
+
let row = [];
|
|
71
|
+
let field = '';
|
|
72
|
+
let inQuotes = false;
|
|
73
|
+
const pushField = () => {
|
|
74
|
+
row.push(field);
|
|
75
|
+
field = '';
|
|
76
|
+
};
|
|
77
|
+
const pushRow = () => {
|
|
78
|
+
if (row.length > 0 || field.length > 0) {
|
|
79
|
+
pushField();
|
|
80
|
+
rows.push(row.map((value) => value.trim()));
|
|
81
|
+
row = [];
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
for (let i = 0; i < input.length; i += 1) {
|
|
85
|
+
const char = input[i];
|
|
86
|
+
if (inQuotes) {
|
|
87
|
+
if (char === '"') {
|
|
88
|
+
const next = input[i + 1];
|
|
89
|
+
if (next === '"') {
|
|
90
|
+
field += '"';
|
|
91
|
+
i += 1;
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
inQuotes = false;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
field += char;
|
|
99
|
+
}
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
if (char === '"') {
|
|
103
|
+
inQuotes = true;
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
if (char === ',') {
|
|
107
|
+
pushField();
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (char === '\n') {
|
|
111
|
+
pushRow();
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
if (char === '\r') {
|
|
115
|
+
if (input[i + 1] === '\n')
|
|
116
|
+
i += 1;
|
|
117
|
+
pushRow();
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
field += char;
|
|
121
|
+
}
|
|
122
|
+
pushRow();
|
|
123
|
+
return rows.filter((r) => r.some((cell) => cell.length > 0));
|
|
124
|
+
}
|
|
125
|
+
export function parseCsvTable(csv) {
|
|
126
|
+
const rows = parseCsvRows(csv);
|
|
127
|
+
if (!rows.length) {
|
|
128
|
+
return { header: [], rows: [] };
|
|
129
|
+
}
|
|
130
|
+
const [header, ...bodyRows] = rows;
|
|
131
|
+
return {
|
|
132
|
+
header: header.map((value) => value.trim()),
|
|
133
|
+
rows: bodyRows,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function normalizeHeader(value) {
|
|
137
|
+
return value.toLowerCase().replace(/[^a-z0-9]/g, '');
|
|
138
|
+
}
|
|
139
|
+
function findHeaderIndex(header, candidates) {
|
|
140
|
+
const normalizedHeader = header.map((value) => normalizeHeader(value));
|
|
141
|
+
for (const candidate of candidates) {
|
|
142
|
+
const normalizedCandidate = normalizeHeader(candidate);
|
|
143
|
+
if (!normalizedCandidate)
|
|
144
|
+
continue;
|
|
145
|
+
const index = normalizedHeader.findIndex((value) => value === normalizedCandidate);
|
|
146
|
+
if (index >= 0)
|
|
147
|
+
return index;
|
|
148
|
+
}
|
|
149
|
+
return -1;
|
|
150
|
+
}
|
|
151
|
+
function parseOptionalNumeric(value) {
|
|
152
|
+
let trimmed = value.trim();
|
|
153
|
+
if (!trimmed)
|
|
154
|
+
return undefined;
|
|
155
|
+
trimmed = trimmed
|
|
156
|
+
.replace(/[%\s]/g, '')
|
|
157
|
+
.replace(/^[^\d+-.]+/, '')
|
|
158
|
+
.replace(/[^\d,.-]+$/, '');
|
|
159
|
+
if (!trimmed)
|
|
160
|
+
return undefined;
|
|
161
|
+
const hasComma = trimmed.includes(',');
|
|
162
|
+
const hasDot = trimmed.includes('.');
|
|
163
|
+
if (hasComma && hasDot) {
|
|
164
|
+
const lastComma = trimmed.lastIndexOf(',');
|
|
165
|
+
const lastDot = trimmed.lastIndexOf('.');
|
|
166
|
+
trimmed =
|
|
167
|
+
lastComma > lastDot
|
|
168
|
+
? trimmed.replace(/\./g, '').replace(',', '.')
|
|
169
|
+
: trimmed.replace(/,/g, '');
|
|
170
|
+
}
|
|
171
|
+
else if (hasComma) {
|
|
172
|
+
const parts = trimmed.split(',');
|
|
173
|
+
const last = parts.at(-1) ?? '';
|
|
174
|
+
trimmed =
|
|
175
|
+
parts.length > 2 || last.length === 3
|
|
176
|
+
? parts.join('')
|
|
177
|
+
: trimmed.replace(',', '.');
|
|
178
|
+
}
|
|
179
|
+
const parsed = Number(trimmed);
|
|
180
|
+
return Number.isFinite(parsed) ? parsed : undefined;
|
|
181
|
+
}
|
|
182
|
+
function parseOptionalBoolean(value) {
|
|
183
|
+
const trimmed = value.trim().toLowerCase();
|
|
184
|
+
if (!trimmed)
|
|
185
|
+
return undefined;
|
|
186
|
+
if (['true', '1', 'yes', 'y'].includes(trimmed))
|
|
187
|
+
return true;
|
|
188
|
+
if (['false', '0', 'no', 'n'].includes(trimmed))
|
|
189
|
+
return false;
|
|
190
|
+
return undefined;
|
|
191
|
+
}
|
|
192
|
+
function asCell(row, index) {
|
|
193
|
+
if (index === null || index < 0)
|
|
194
|
+
return '';
|
|
195
|
+
return String(row[index] ?? '').trim();
|
|
196
|
+
}
|
|
197
|
+
function mapAsoColumnsFromHeader(header) {
|
|
198
|
+
const normalizeIndex = (index) => (index >= 0 ? index : null);
|
|
199
|
+
// Explicitly check for high-priority locale headers first (country/storefront)
|
|
200
|
+
let localeIndex = findHeaderIndex(header, ASO_HEADER_CANDIDATES.localeHighPriority);
|
|
201
|
+
if (localeIndex === -1) {
|
|
202
|
+
localeIndex = findHeaderIndex(header, ASO_HEADER_CANDIDATES.locale);
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
205
|
+
locale: normalizeIndex(localeIndex),
|
|
206
|
+
keyword: normalizeIndex(findHeaderIndex(header, ASO_HEADER_CANDIDATES.keyword)),
|
|
207
|
+
popularity: normalizeIndex(findHeaderIndex(header, ASO_HEADER_CANDIDATES.popularity)),
|
|
208
|
+
difficulty: normalizeIndex(findHeaderIndex(header, ASO_HEADER_CANDIDATES.difficulty)),
|
|
209
|
+
isPreferred: normalizeIndex(findHeaderIndex(header, ASO_HEADER_CANDIDATES.isPreferred)),
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
export function suggestAsoKeywordColumnMapping(header) {
|
|
213
|
+
const direct = mapAsoColumnsFromHeader(header);
|
|
214
|
+
const used = new Set();
|
|
215
|
+
const next = {
|
|
216
|
+
locale: null,
|
|
217
|
+
keyword: null,
|
|
218
|
+
popularity: null,
|
|
219
|
+
difficulty: null,
|
|
220
|
+
isPreferred: null,
|
|
221
|
+
};
|
|
222
|
+
const findBestAvailable = (field) => {
|
|
223
|
+
const existing = direct[field];
|
|
224
|
+
if (existing !== null && !used.has(existing)) {
|
|
225
|
+
return existing;
|
|
226
|
+
}
|
|
227
|
+
const candidates = ASO_HEADER_CANDIDATES[field].map(normalizeHeader);
|
|
228
|
+
let bestIndex = null;
|
|
229
|
+
let bestScore = -1;
|
|
230
|
+
for (let index = 0; index < header.length; index += 1) {
|
|
231
|
+
if (used.has(index))
|
|
232
|
+
continue;
|
|
233
|
+
const normalized = normalizeHeader(header[index] ?? '');
|
|
234
|
+
if (!normalized)
|
|
235
|
+
continue;
|
|
236
|
+
let score = -1;
|
|
237
|
+
for (const candidate of candidates) {
|
|
238
|
+
if (!candidate)
|
|
239
|
+
continue;
|
|
240
|
+
if (normalized === candidate) {
|
|
241
|
+
score = Math.max(score, 1000);
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
if (normalized.startsWith(candidate) || candidate.startsWith(normalized)) {
|
|
245
|
+
score = Math.max(score, 700);
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
if (normalized.includes(candidate) || candidate.includes(normalized)) {
|
|
249
|
+
score = Math.max(score, 500);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
if (score > bestScore) {
|
|
253
|
+
bestScore = score;
|
|
254
|
+
bestIndex = index;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (bestScore < 0)
|
|
258
|
+
return null;
|
|
259
|
+
return bestIndex;
|
|
260
|
+
};
|
|
261
|
+
for (const field of ['locale', 'keyword', 'popularity', 'difficulty', 'isPreferred']) {
|
|
262
|
+
const index = findBestAvailable(field);
|
|
263
|
+
if (index === null) {
|
|
264
|
+
next[field] = null;
|
|
265
|
+
continue;
|
|
266
|
+
}
|
|
267
|
+
used.add(index);
|
|
268
|
+
next[field] = index;
|
|
269
|
+
}
|
|
270
|
+
return next;
|
|
271
|
+
}
|
|
272
|
+
export function mapCsvTableToAsoKeywordRows(table, mapping, options) {
|
|
273
|
+
const errors = [];
|
|
274
|
+
const results = [];
|
|
275
|
+
const skippedRows = [];
|
|
276
|
+
const resolveLocale = options?.localeResolver ?? resolveStoreLocale;
|
|
277
|
+
const allowUnmappedLocales = options?.allowUnmappedLocales === true;
|
|
278
|
+
for (const field of REQUIRED_ASO_KEYWORD_FIELDS) {
|
|
279
|
+
const index = mapping[field];
|
|
280
|
+
if (index === null || index < 0 || index >= table.header.length) {
|
|
281
|
+
if (field === 'keyword') {
|
|
282
|
+
errors.push('Missing keyword column.');
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
errors.push("Missing locale column. Include header like 'locale' or 'store domain'.");
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
if (errors.length > 0) {
|
|
290
|
+
return { rows: [], errors };
|
|
291
|
+
}
|
|
292
|
+
for (const [rowIndex, row] of table.rows.entries()) {
|
|
293
|
+
const keyword = asCell(row, mapping.keyword);
|
|
294
|
+
if (!keyword)
|
|
295
|
+
continue;
|
|
296
|
+
const localeRaw = asCell(row, mapping.locale);
|
|
297
|
+
const locale = localeRaw ? resolveLocale(localeRaw) : '';
|
|
298
|
+
if (!locale) {
|
|
299
|
+
if (allowUnmappedLocales) {
|
|
300
|
+
skippedRows.push({
|
|
301
|
+
rowNumber: rowIndex + 2,
|
|
302
|
+
reason: 'unmapped_locale',
|
|
303
|
+
localeRaw,
|
|
304
|
+
keyword,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
else {
|
|
308
|
+
errors.push(`Row ${rowIndex + 2}: Unable to map locale "${localeRaw}".`);
|
|
309
|
+
}
|
|
310
|
+
continue;
|
|
311
|
+
}
|
|
312
|
+
const popularity = parseOptionalNumeric(asCell(row, mapping.popularity));
|
|
313
|
+
const difficulty = parseOptionalNumeric(asCell(row, mapping.difficulty));
|
|
314
|
+
const isPreferred = parseOptionalBoolean(asCell(row, mapping.isPreferred));
|
|
315
|
+
results.push({
|
|
316
|
+
locale: normalizeLocale(locale),
|
|
317
|
+
keyword,
|
|
318
|
+
popularity,
|
|
319
|
+
difficulty,
|
|
320
|
+
isPreferred,
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
return { rows: results, errors, ...(skippedRows.length ? { skippedRows } : {}) };
|
|
324
|
+
}
|
|
325
|
+
export function parseKeywordCSV(csv) {
|
|
326
|
+
const rows = parseCsvRows(csv);
|
|
327
|
+
if (!rows.length)
|
|
328
|
+
return [];
|
|
329
|
+
const header = rows[0].map((value) => value.toLowerCase());
|
|
330
|
+
const localeIndex = header.indexOf('locale');
|
|
331
|
+
const keywordIndex = header.indexOf('keyword');
|
|
332
|
+
const popularityIndex = header.indexOf('popularity');
|
|
333
|
+
const difficultyIndex = header.indexOf('difficulty');
|
|
334
|
+
if (keywordIndex === -1)
|
|
335
|
+
return [];
|
|
336
|
+
const results = [];
|
|
337
|
+
for (const row of rows.slice(1)) {
|
|
338
|
+
const keyword = row[keywordIndex]?.trim();
|
|
339
|
+
if (!keyword)
|
|
340
|
+
continue;
|
|
341
|
+
const localeValue = localeIndex >= 0 ? row[localeIndex] : '';
|
|
342
|
+
const locale = localeValue ? normalizeLocale(localeValue) : '';
|
|
343
|
+
const popularityRaw = popularityIndex >= 0 ? row[popularityIndex] : '';
|
|
344
|
+
const difficultyRaw = difficultyIndex >= 0 ? row[difficultyIndex] : '';
|
|
345
|
+
const popularity = parseOptionalNumeric(popularityRaw);
|
|
346
|
+
const difficulty = parseOptionalNumeric(difficultyRaw);
|
|
347
|
+
results.push({
|
|
348
|
+
locale,
|
|
349
|
+
keyword,
|
|
350
|
+
popularity,
|
|
351
|
+
difficulty,
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
return results;
|
|
355
|
+
}
|
|
356
|
+
export function groupKeywordsByLocale(rows) {
|
|
357
|
+
const grouped = {};
|
|
358
|
+
for (const row of rows) {
|
|
359
|
+
const locale = row.locale || '*';
|
|
360
|
+
if (!grouped[locale])
|
|
361
|
+
grouped[locale] = [];
|
|
362
|
+
grouped[locale].push({
|
|
363
|
+
keyword: row.keyword,
|
|
364
|
+
popularity: row.popularity,
|
|
365
|
+
difficulty: row.difficulty,
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
return grouped;
|
|
369
|
+
}
|
|
370
|
+
export function parseAsoKeywordCSV(csv) {
|
|
371
|
+
const table = parseCsvTable(csv);
|
|
372
|
+
if (!table.header.length)
|
|
373
|
+
return { rows: [], errors: [] };
|
|
374
|
+
const mapping = mapAsoColumnsFromHeader(table.header);
|
|
375
|
+
return mapCsvTableToAsoKeywordRows(table, mapping);
|
|
376
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const FIELD_LIMITS: {
|
|
2
|
+
readonly title: 30;
|
|
3
|
+
readonly subtitle: 30;
|
|
4
|
+
readonly keywords: 100;
|
|
5
|
+
readonly promotionalText: 170;
|
|
6
|
+
readonly description: 4000;
|
|
7
|
+
readonly whatsNew: 4000;
|
|
8
|
+
readonly releaseNotes: 4000;
|
|
9
|
+
};
|
|
10
|
+
export type FieldLimitKey = keyof typeof FIELD_LIMITS;
|
|
11
|
+
//# sourceMappingURL=limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../src/limits.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;CAQf,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,YAAY,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const ASC_LOCALES: readonly ["ar-SA", "ca", "cs", "da", "de-DE", "el", "en-AU", "en-CA", "en-GB", "en-US", "es-ES", "es-MX", "fi", "fr-CA", "fr-FR", "he", "hi", "hr", "hu", "id", "it", "ja", "ko", "ms", "nl-NL", "no", "pl", "pt-BR", "pt-PT", "ro", "ru", "sk", "sv", "th", "tr", "uk", "vi", "zh-Hans", "zh-Hant"];
|
|
2
|
+
export type AscLocale = (typeof ASC_LOCALES)[number];
|
|
3
|
+
export declare const LOCALE_LABELS: Record<string, string>;
|
|
4
|
+
export declare function normalizeLocale(input: string): string;
|
|
5
|
+
export declare function normalizeAscLocale(input: string): string;
|
|
6
|
+
export declare function localeLabel(locale: string): string;
|
|
7
|
+
export declare function sortLocales(locales: string[]): string[];
|
|
8
|
+
export declare function sortLocalesWithPriority(locales: string[], priority?: string[]): string[];
|
|
9
|
+
export declare function resolveStoreLocale(input: string): string;
|
|
10
|
+
//# sourceMappingURL=locales.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../src/locales.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,sSAwCd,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAwChD,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,UAqB5C;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,UAG/C;AAMD,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,UAGzC;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,YAE5C;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,GAAE,MAAM,EAAc,YAQxF;AAiLD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,UAyB/C"}
|