@@ -66,17 +66,21 @@ export type BucketLoaderContext = {
6666} ;
6767
6868export type Bucket = {
69+ displayName : string ;
6970 supportsFormatter : boolean ;
7071 supportsInjectLocale : boolean ;
7172 supportsLockedKeys : boolean ;
7273 supportsIgnoredKeys : boolean ;
7374 supportsLockedPatterns : boolean ;
7475 supportsLocalePlaceholder : boolean ;
75- createLoader : ( ctx : BucketLoaderContext ) => ILoader < void , Record < string , any > > ;
76+ createLoader : (
77+ ctx : BucketLoaderContext ,
78+ ) => ILoader < void , Record < string , any > > ;
7679} ;
7780
7881export const BUCKETS : Record < string , Bucket > = {
7982 android : {
83+ displayName : "Android XML" ,
8084 supportsFormatter : false ,
8185 supportsInjectLocale : false ,
8286 supportsLockedKeys : true ,
@@ -97,6 +101,7 @@ export const BUCKETS: Record<string, Bucket> = {
97101 ) ,
98102 } ,
99103 csv : {
104+ displayName : "CSV" ,
100105 supportsFormatter : false ,
101106 supportsInjectLocale : false ,
102107 supportsLockedKeys : true ,
@@ -117,6 +122,7 @@ export const BUCKETS: Record<string, Bucket> = {
117122 ) ,
118123 } ,
119124 html : {
125+ displayName : "HTML" ,
120126 supportsFormatter : true ,
121127 supportsInjectLocale : false ,
122128 supportsLockedKeys : true ,
@@ -126,7 +132,11 @@ export const BUCKETS: Record<string, Bucket> = {
126132 createLoader : ( ctx ) =>
127133 composeLoaders (
128134 createTextFileLoader ( ctx . bucketPathPattern ) ,
129- createFormatterLoader ( ctx . options . formatter , "html" , ctx . bucketPathPattern ) ,
135+ createFormatterLoader (
136+ ctx . options . formatter ,
137+ "html" ,
138+ ctx . bucketPathPattern ,
139+ ) ,
130140 createLockedPatternsLoader ( ctx . lockedPatterns ) ,
131141 createHtmlLoader ( ) ,
132142 createLockedKeysLoader ( ctx . lockedKeys || [ ] ) ,
@@ -136,6 +146,7 @@ export const BUCKETS: Record<string, Bucket> = {
136146 ) ,
137147 } ,
138148 ejs : {
149+ displayName : "EJS" ,
139150 supportsFormatter : false ,
140151 supportsInjectLocale : false ,
141152 supportsLockedKeys : true ,
@@ -154,6 +165,7 @@ export const BUCKETS: Record<string, Bucket> = {
154165 ) ,
155166 } ,
156167 json : {
168+ displayName : "JSON" ,
157169 supportsFormatter : true ,
158170 supportsInjectLocale : true ,
159171 supportsLockedKeys : true ,
@@ -163,7 +175,11 @@ export const BUCKETS: Record<string, Bucket> = {
163175 createLoader : ( ctx ) =>
164176 composeLoaders (
165177 createTextFileLoader ( ctx . bucketPathPattern ) ,
166- createFormatterLoader ( ctx . options . formatter , "json" , ctx . bucketPathPattern ) ,
178+ createFormatterLoader (
179+ ctx . options . formatter ,
180+ "json" ,
181+ ctx . bucketPathPattern ,
182+ ) ,
167183 createLockedPatternsLoader ( ctx . lockedPatterns ) ,
168184 createJsonLoader ( ) ,
169185 createEnsureKeyOrderLoader ( ) ,
@@ -176,6 +192,7 @@ export const BUCKETS: Record<string, Bucket> = {
176192 ) ,
177193 } ,
178194 json5 : {
195+ displayName : "JSON5" ,
179196 supportsFormatter : false ,
180197 supportsInjectLocale : true ,
181198 supportsLockedKeys : true ,
@@ -197,6 +214,7 @@ export const BUCKETS: Record<string, Bucket> = {
197214 ) ,
198215 } ,
199216 jsonc : {
217+ displayName : "JSONC" ,
200218 supportsFormatter : false ,
201219 supportsInjectLocale : true ,
202220 supportsLockedKeys : true ,
@@ -218,6 +236,7 @@ export const BUCKETS: Record<string, Bucket> = {
218236 ) ,
219237 } ,
220238 markdown : {
239+ displayName : "Markdown" ,
221240 supportsFormatter : true ,
222241 supportsInjectLocale : false ,
223242 supportsLockedKeys : true ,
@@ -227,7 +246,11 @@ export const BUCKETS: Record<string, Bucket> = {
227246 createLoader : ( ctx ) =>
228247 composeLoaders (
229248 createTextFileLoader ( ctx . bucketPathPattern ) ,
230- createFormatterLoader ( ctx . options . formatter , "markdown" , ctx . bucketPathPattern ) ,
249+ createFormatterLoader (
250+ ctx . options . formatter ,
251+ "markdown" ,
252+ ctx . bucketPathPattern ,
253+ ) ,
231254 createLockedPatternsLoader ( ctx . lockedPatterns ) ,
232255 createMarkdownLoader ( ) ,
233256 createLockedKeysLoader ( ctx . lockedKeys || [ ] ) ,
@@ -237,6 +260,7 @@ export const BUCKETS: Record<string, Bucket> = {
237260 ) ,
238261 } ,
239262 markdoc : {
263+ displayName : "Markdoc" ,
240264 supportsFormatter : false ,
241265 supportsInjectLocale : false ,
242266 supportsLockedKeys : true ,
@@ -257,6 +281,7 @@ export const BUCKETS: Record<string, Bucket> = {
257281 ) ,
258282 } ,
259283 mdx : {
284+ displayName : "MDX" ,
260285 supportsFormatter : true ,
261286 supportsInjectLocale : false ,
262287 supportsLockedKeys : true ,
@@ -266,7 +291,11 @@ export const BUCKETS: Record<string, Bucket> = {
266291 createLoader : ( ctx ) =>
267292 composeLoaders (
268293 createTextFileLoader ( ctx . bucketPathPattern ) ,
269- createFormatterLoader ( ctx . options . formatter , "mdx" , ctx . bucketPathPattern ) ,
294+ createFormatterLoader (
295+ ctx . options . formatter ,
296+ "mdx" ,
297+ ctx . bucketPathPattern ,
298+ ) ,
270299 createMdxCodePlaceholderLoader ( ) ,
271300 createLockedPatternsLoader ( ctx . lockedPatterns ) ,
272301 createMdxFrontmatterSplitLoader ( ) ,
@@ -281,6 +310,7 @@ export const BUCKETS: Record<string, Bucket> = {
281310 ) ,
282311 } ,
283312 po : {
313+ displayName : "PO" ,
284314 supportsFormatter : false ,
285315 supportsInjectLocale : false ,
286316 supportsLockedKeys : true ,
@@ -302,6 +332,7 @@ export const BUCKETS: Record<string, Bucket> = {
302332 ) ,
303333 } ,
304334 properties : {
335+ displayName : "Properties" ,
305336 supportsFormatter : false ,
306337 supportsInjectLocale : false ,
307338 supportsLockedKeys : true ,
@@ -320,6 +351,7 @@ export const BUCKETS: Record<string, Bucket> = {
320351 ) ,
321352 } ,
322353 "xcode-strings" : {
354+ displayName : "Xcode Strings" ,
323355 supportsFormatter : false ,
324356 supportsInjectLocale : false ,
325357 supportsLockedKeys : true ,
@@ -338,6 +370,7 @@ export const BUCKETS: Record<string, Bucket> = {
338370 ) ,
339371 } ,
340372 "xcode-stringsdict" : {
373+ displayName : "Xcode Stringsdict" ,
341374 supportsFormatter : false ,
342375 supportsInjectLocale : false ,
343376 supportsLockedKeys : true ,
@@ -358,6 +391,7 @@ export const BUCKETS: Record<string, Bucket> = {
358391 ) ,
359392 } ,
360393 "xcode-xcstrings" : {
394+ displayName : "Xcode XCStrings" ,
361395 supportsFormatter : false ,
362396 supportsInjectLocale : false ,
363397 supportsLockedKeys : true ,
@@ -381,6 +415,7 @@ export const BUCKETS: Record<string, Bucket> = {
381415 ) ,
382416 } ,
383417 "xcode-xcstrings-v2" : {
418+ displayName : "Xcode XCStrings (v2)" ,
384419 supportsFormatter : false ,
385420 supportsInjectLocale : false ,
386421 supportsLockedKeys : true ,
@@ -405,6 +440,7 @@ export const BUCKETS: Record<string, Bucket> = {
405440 ) ,
406441 } ,
407442 yaml : {
443+ displayName : "YAML" ,
408444 supportsFormatter : true ,
409445 supportsInjectLocale : false ,
410446 supportsLockedKeys : true ,
@@ -414,7 +450,11 @@ export const BUCKETS: Record<string, Bucket> = {
414450 createLoader : ( ctx ) =>
415451 composeLoaders (
416452 createTextFileLoader ( ctx . bucketPathPattern ) ,
417- createFormatterLoader ( ctx . options . formatter , "yaml" , ctx . bucketPathPattern ) ,
453+ createFormatterLoader (
454+ ctx . options . formatter ,
455+ "yaml" ,
456+ ctx . bucketPathPattern ,
457+ ) ,
418458 createLockedPatternsLoader ( ctx . lockedPatterns ) ,
419459 createYamlLoader ( ) ,
420460 createFlatLoader ( ) ,
@@ -426,6 +466,7 @@ export const BUCKETS: Record<string, Bucket> = {
426466 ) ,
427467 } ,
428468 "yaml-root-key" : {
469+ displayName : "YAML Root Key" ,
429470 supportsFormatter : true ,
430471 supportsInjectLocale : false ,
431472 supportsLockedKeys : true ,
@@ -435,7 +476,11 @@ export const BUCKETS: Record<string, Bucket> = {
435476 createLoader : ( ctx ) =>
436477 composeLoaders (
437478 createTextFileLoader ( ctx . bucketPathPattern ) ,
438- createFormatterLoader ( ctx . options . formatter , "yaml" , ctx . bucketPathPattern ) ,
479+ createFormatterLoader (
480+ ctx . options . formatter ,
481+ "yaml" ,
482+ ctx . bucketPathPattern ,
483+ ) ,
439484 createLockedPatternsLoader ( ctx . lockedPatterns ) ,
440485 createYamlLoader ( ) ,
441486 createRootKeyLoader ( true ) ,
@@ -448,6 +493,7 @@ export const BUCKETS: Record<string, Bucket> = {
448493 ) ,
449494 } ,
450495 flutter : {
496+ displayName : "Flutter ARB" ,
451497 supportsFormatter : true ,
452498 supportsInjectLocale : false ,
453499 supportsLockedKeys : true ,
@@ -457,7 +503,11 @@ export const BUCKETS: Record<string, Bucket> = {
457503 createLoader : ( ctx ) =>
458504 composeLoaders (
459505 createTextFileLoader ( ctx . bucketPathPattern ) ,
460- createFormatterLoader ( ctx . options . formatter , "json" , ctx . bucketPathPattern ) ,
506+ createFormatterLoader (
507+ ctx . options . formatter ,
508+ "json" ,
509+ ctx . bucketPathPattern ,
510+ ) ,
461511 createLockedPatternsLoader ( ctx . lockedPatterns ) ,
462512 createJsonLoader ( ) ,
463513 createEnsureKeyOrderLoader ( ) ,
@@ -470,6 +520,7 @@ export const BUCKETS: Record<string, Bucket> = {
470520 ) ,
471521 } ,
472522 xliff : {
523+ displayName : "XLIFF" ,
473524 supportsFormatter : false ,
474525 supportsInjectLocale : false ,
475526 supportsLockedKeys : true ,
@@ -490,6 +541,7 @@ export const BUCKETS: Record<string, Bucket> = {
490541 ) ,
491542 } ,
492543 xml : {
544+ displayName : "XML" ,
493545 supportsFormatter : false ,
494546 supportsInjectLocale : false ,
495547 supportsLockedKeys : true ,
@@ -510,6 +562,7 @@ export const BUCKETS: Record<string, Bucket> = {
510562 ) ,
511563 } ,
512564 srt : {
565+ displayName : "SRT" ,
513566 supportsFormatter : false ,
514567 supportsInjectLocale : false ,
515568 supportsLockedKeys : true ,
@@ -528,6 +581,7 @@ export const BUCKETS: Record<string, Bucket> = {
528581 ) ,
529582 } ,
530583 dato : {
584+ displayName : "DatoCMS" ,
531585 supportsFormatter : false ,
532586 supportsInjectLocale : false ,
533587 supportsLockedKeys : true ,
@@ -546,6 +600,7 @@ export const BUCKETS: Record<string, Bucket> = {
546600 ) ,
547601 } ,
548602 vtt : {
603+ displayName : "WebVTT" ,
549604 supportsFormatter : false ,
550605 supportsInjectLocale : false ,
551606 supportsLockedKeys : true ,
@@ -564,6 +619,7 @@ export const BUCKETS: Record<string, Bucket> = {
564619 ) ,
565620 } ,
566621 php : {
622+ displayName : "PHP" ,
567623 supportsFormatter : false ,
568624 supportsInjectLocale : false ,
569625 supportsLockedKeys : true ,
@@ -584,6 +640,7 @@ export const BUCKETS: Record<string, Bucket> = {
584640 ) ,
585641 } ,
586642 "vue-json" : {
643+ displayName : "Vue I18n" ,
587644 supportsFormatter : false ,
588645 supportsInjectLocale : false ,
589646 supportsLockedKeys : true ,
@@ -604,6 +661,7 @@ export const BUCKETS: Record<string, Bucket> = {
604661 ) ,
605662 } ,
606663 typescript : {
664+ displayName : "TypeScript" ,
607665 supportsFormatter : true ,
608666 supportsInjectLocale : false ,
609667 supportsLockedKeys : true ,
@@ -629,6 +687,7 @@ export const BUCKETS: Record<string, Bucket> = {
629687 ) ,
630688 } ,
631689 txt : {
690+ displayName : "Plain text" ,
632691 supportsFormatter : false ,
633692 supportsInjectLocale : false ,
634693 supportsLockedKeys : true ,
@@ -647,6 +706,7 @@ export const BUCKETS: Record<string, Bucket> = {
647706 ) ,
648707 } ,
649708 "json-dictionary" : {
709+ displayName : "JSON Dictionary" ,
650710 supportsFormatter : true ,
651711 supportsInjectLocale : true ,
652712 supportsLockedKeys : true ,
@@ -656,7 +716,11 @@ export const BUCKETS: Record<string, Bucket> = {
656716 createLoader : ( ctx ) =>
657717 composeLoaders (
658718 createTextFileLoader ( ctx . bucketPathPattern ) ,
659- createFormatterLoader ( ctx . options . formatter , "json" , ctx . bucketPathPattern ) ,
719+ createFormatterLoader (
720+ ctx . options . formatter ,
721+ "json" ,
722+ ctx . bucketPathPattern ,
723+ ) ,
660724 createLockedPatternsLoader ( ctx . lockedPatterns ) ,
661725 createJsonLoader ( ) ,
662726 createJsonKeysLoader ( ) ,
0 commit comments