@@ -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 : false ,
@@ -94,6 +98,7 @@ export const BUCKETS: Record<string, Bucket> = {
9498 ) ,
9599 } ,
96100 csv : {
101+ displayName : "CSV" ,
97102 supportsFormatter : false ,
98103 supportsInjectLocale : false ,
99104 supportsLockedKeys : false ,
@@ -111,6 +116,7 @@ export const BUCKETS: Record<string, Bucket> = {
111116 ) ,
112117 } ,
113118 html : {
119+ displayName : "HTML" ,
114120 supportsFormatter : true ,
115121 supportsInjectLocale : false ,
116122 supportsLockedKeys : false ,
@@ -120,13 +126,18 @@ export const BUCKETS: Record<string, Bucket> = {
120126 createLoader : ( ctx ) =>
121127 composeLoaders (
122128 createTextFileLoader ( ctx . bucketPathPattern ) ,
123- createFormatterLoader ( ctx . options . formatter , "html" , ctx . bucketPathPattern ) ,
129+ createFormatterLoader (
130+ ctx . options . formatter ,
131+ "html" ,
132+ ctx . bucketPathPattern ,
133+ ) ,
124134 createHtmlLoader ( ) ,
125135 createSyncLoader ( ) ,
126136 createUnlocalizableLoader ( ctx . options . returnUnlocalizedKeys ) ,
127137 ) ,
128138 } ,
129139 ejs : {
140+ displayName : "EJS" ,
130141 supportsFormatter : false ,
131142 supportsInjectLocale : false ,
132143 supportsLockedKeys : false ,
@@ -142,6 +153,7 @@ export const BUCKETS: Record<string, Bucket> = {
142153 ) ,
143154 } ,
144155 json : {
156+ displayName : "JSON" ,
145157 supportsFormatter : true ,
146158 supportsInjectLocale : true ,
147159 supportsLockedKeys : true ,
@@ -151,7 +163,11 @@ export const BUCKETS: Record<string, Bucket> = {
151163 createLoader : ( ctx ) =>
152164 composeLoaders (
153165 createTextFileLoader ( ctx . bucketPathPattern ) ,
154- createFormatterLoader ( ctx . options . formatter , "json" , ctx . bucketPathPattern ) ,
166+ createFormatterLoader (
167+ ctx . options . formatter ,
168+ "json" ,
169+ ctx . bucketPathPattern ,
170+ ) ,
155171 createJsonLoader ( ) ,
156172 createEnsureKeyOrderLoader ( ) ,
157173 createFlatLoader ( ) ,
@@ -163,6 +179,7 @@ export const BUCKETS: Record<string, Bucket> = {
163179 ) ,
164180 } ,
165181 json5 : {
182+ displayName : "JSON5" ,
166183 supportsFormatter : false ,
167184 supportsInjectLocale : true ,
168185 supportsLockedKeys : true ,
@@ -183,6 +200,7 @@ export const BUCKETS: Record<string, Bucket> = {
183200 ) ,
184201 } ,
185202 jsonc : {
203+ displayName : "JSONC" ,
186204 supportsFormatter : false ,
187205 supportsInjectLocale : true ,
188206 supportsLockedKeys : true ,
@@ -203,6 +221,7 @@ export const BUCKETS: Record<string, Bucket> = {
203221 ) ,
204222 } ,
205223 markdown : {
224+ displayName : "Markdown" ,
206225 supportsFormatter : true ,
207226 supportsInjectLocale : false ,
208227 supportsLockedKeys : false ,
@@ -212,13 +231,18 @@ export const BUCKETS: Record<string, Bucket> = {
212231 createLoader : ( ctx ) =>
213232 composeLoaders (
214233 createTextFileLoader ( ctx . bucketPathPattern ) ,
215- createFormatterLoader ( ctx . options . formatter , "markdown" , ctx . bucketPathPattern ) ,
234+ createFormatterLoader (
235+ ctx . options . formatter ,
236+ "markdown" ,
237+ ctx . bucketPathPattern ,
238+ ) ,
216239 createMarkdownLoader ( ) ,
217240 createSyncLoader ( ) ,
218241 createUnlocalizableLoader ( ctx . options . returnUnlocalizedKeys ) ,
219242 ) ,
220243 } ,
221244 markdoc : {
245+ displayName : "Markdoc" ,
222246 supportsFormatter : false ,
223247 supportsInjectLocale : false ,
224248 supportsLockedKeys : false ,
@@ -236,6 +260,7 @@ export const BUCKETS: Record<string, Bucket> = {
236260 ) ,
237261 } ,
238262 mdx : {
263+ displayName : "MDX" ,
239264 supportsFormatter : true ,
240265 supportsInjectLocale : false ,
241266 supportsLockedKeys : true ,
@@ -245,7 +270,11 @@ export const BUCKETS: Record<string, Bucket> = {
245270 createLoader : ( ctx ) =>
246271 composeLoaders (
247272 createTextFileLoader ( ctx . bucketPathPattern ) ,
248- createFormatterLoader ( ctx . options . formatter , "mdx" , ctx . bucketPathPattern ) ,
273+ createFormatterLoader (
274+ ctx . options . formatter ,
275+ "mdx" ,
276+ ctx . bucketPathPattern ,
277+ ) ,
249278 createMdxCodePlaceholderLoader ( ) ,
250279 createMdxLockedPatternsLoader ( ctx . lockedPatterns ) ,
251280 createMdxFrontmatterSplitLoader ( ) ,
@@ -260,6 +289,7 @@ export const BUCKETS: Record<string, Bucket> = {
260289 ) ,
261290 } ,
262291 po : {
292+ displayName : "PO" ,
263293 supportsFormatter : false ,
264294 supportsInjectLocale : false ,
265295 supportsLockedKeys : false ,
@@ -278,6 +308,7 @@ export const BUCKETS: Record<string, Bucket> = {
278308 ) ,
279309 } ,
280310 properties : {
311+ displayName : "Properties" ,
281312 supportsFormatter : false ,
282313 supportsInjectLocale : false ,
283314 supportsLockedKeys : false ,
@@ -293,6 +324,7 @@ export const BUCKETS: Record<string, Bucket> = {
293324 ) ,
294325 } ,
295326 "xcode-strings" : {
327+ displayName : "Xcode Strings" ,
296328 supportsFormatter : false ,
297329 supportsInjectLocale : false ,
298330 supportsLockedKeys : false ,
@@ -308,6 +340,7 @@ export const BUCKETS: Record<string, Bucket> = {
308340 ) ,
309341 } ,
310342 "xcode-stringsdict" : {
343+ displayName : "Xcode Stringsdict" ,
311344 supportsFormatter : false ,
312345 supportsInjectLocale : false ,
313346 supportsLockedKeys : false ,
@@ -325,6 +358,7 @@ export const BUCKETS: Record<string, Bucket> = {
325358 ) ,
326359 } ,
327360 "xcode-xcstrings" : {
361+ displayName : "Xcode XCStrings" ,
328362 supportsFormatter : false ,
329363 supportsInjectLocale : false ,
330364 supportsLockedKeys : true ,
@@ -347,6 +381,7 @@ export const BUCKETS: Record<string, Bucket> = {
347381 ) ,
348382 } ,
349383 "xcode-xcstrings-v2" : {
384+ displayName : "Xcode XCStrings (v2)" ,
350385 supportsFormatter : false ,
351386 supportsInjectLocale : false ,
352387 supportsLockedKeys : true ,
@@ -369,6 +404,7 @@ export const BUCKETS: Record<string, Bucket> = {
369404 ) ,
370405 } ,
371406 yaml : {
407+ displayName : "YAML" ,
372408 supportsFormatter : true ,
373409 supportsInjectLocale : false ,
374410 supportsLockedKeys : true ,
@@ -378,7 +414,11 @@ export const BUCKETS: Record<string, Bucket> = {
378414 createLoader : ( ctx ) =>
379415 composeLoaders (
380416 createTextFileLoader ( ctx . bucketPathPattern ) ,
381- createFormatterLoader ( ctx . options . formatter , "yaml" , ctx . bucketPathPattern ) ,
417+ createFormatterLoader (
418+ ctx . options . formatter ,
419+ "yaml" ,
420+ ctx . bucketPathPattern ,
421+ ) ,
382422 createYamlLoader ( ) ,
383423 createFlatLoader ( ) ,
384424 createEnsureKeyOrderLoader ( ) ,
@@ -389,6 +429,7 @@ export const BUCKETS: Record<string, Bucket> = {
389429 ) ,
390430 } ,
391431 "yaml-root-key" : {
432+ displayName : "YAML Root Key" ,
392433 supportsFormatter : true ,
393434 supportsInjectLocale : false ,
394435 supportsLockedKeys : false ,
@@ -398,7 +439,11 @@ export const BUCKETS: Record<string, Bucket> = {
398439 createLoader : ( ctx ) =>
399440 composeLoaders (
400441 createTextFileLoader ( ctx . bucketPathPattern ) ,
401- createFormatterLoader ( ctx . options . formatter , "yaml" , ctx . bucketPathPattern ) ,
442+ createFormatterLoader (
443+ ctx . options . formatter ,
444+ "yaml" ,
445+ ctx . bucketPathPattern ,
446+ ) ,
402447 createYamlLoader ( ) ,
403448 createRootKeyLoader ( true ) ,
404449 createFlatLoader ( ) ,
@@ -408,6 +453,7 @@ export const BUCKETS: Record<string, Bucket> = {
408453 ) ,
409454 } ,
410455 flutter : {
456+ displayName : "Flutter ARB" ,
411457 supportsFormatter : true ,
412458 supportsInjectLocale : false ,
413459 supportsLockedKeys : false ,
@@ -417,7 +463,11 @@ export const BUCKETS: Record<string, Bucket> = {
417463 createLoader : ( ctx ) =>
418464 composeLoaders (
419465 createTextFileLoader ( ctx . bucketPathPattern ) ,
420- createFormatterLoader ( ctx . options . formatter , "json" , ctx . bucketPathPattern ) ,
466+ createFormatterLoader (
467+ ctx . options . formatter ,
468+ "json" ,
469+ ctx . bucketPathPattern ,
470+ ) ,
421471 createJsonLoader ( ) ,
422472 createEnsureKeyOrderLoader ( ) ,
423473 createFlutterLoader ( ) ,
@@ -427,6 +477,7 @@ export const BUCKETS: Record<string, Bucket> = {
427477 ) ,
428478 } ,
429479 xliff : {
480+ displayName : "XLIFF" ,
430481 supportsFormatter : false ,
431482 supportsInjectLocale : false ,
432483 supportsLockedKeys : false ,
@@ -444,6 +495,7 @@ export const BUCKETS: Record<string, Bucket> = {
444495 ) ,
445496 } ,
446497 xml : {
498+ displayName : "XML" ,
447499 supportsFormatter : false ,
448500 supportsInjectLocale : false ,
449501 supportsLockedKeys : false ,
@@ -461,6 +513,7 @@ export const BUCKETS: Record<string, Bucket> = {
461513 ) ,
462514 } ,
463515 srt : {
516+ displayName : "SRT" ,
464517 supportsFormatter : false ,
465518 supportsInjectLocale : false ,
466519 supportsLockedKeys : false ,
@@ -476,6 +529,7 @@ export const BUCKETS: Record<string, Bucket> = {
476529 ) ,
477530 } ,
478531 dato : {
532+ displayName : "DatoCMS" ,
479533 supportsFormatter : false ,
480534 supportsInjectLocale : false ,
481535 supportsLockedKeys : false ,
@@ -492,6 +546,7 @@ export const BUCKETS: Record<string, Bucket> = {
492546 ) ,
493547 } ,
494548 vtt : {
549+ displayName : "WebVTT" ,
495550 supportsFormatter : false ,
496551 supportsInjectLocale : false ,
497552 supportsLockedKeys : false ,
@@ -507,6 +562,7 @@ export const BUCKETS: Record<string, Bucket> = {
507562 ) ,
508563 } ,
509564 php : {
565+ displayName : "PHP" ,
510566 supportsFormatter : false ,
511567 supportsInjectLocale : false ,
512568 supportsLockedKeys : false ,
@@ -524,6 +580,7 @@ export const BUCKETS: Record<string, Bucket> = {
524580 ) ,
525581 } ,
526582 "vue-json" : {
583+ displayName : "Vue I18n" ,
527584 supportsFormatter : false ,
528585 supportsInjectLocale : false ,
529586 supportsLockedKeys : false ,
@@ -541,6 +598,7 @@ export const BUCKETS: Record<string, Bucket> = {
541598 ) ,
542599 } ,
543600 typescript : {
601+ displayName : "TypeScript" ,
544602 supportsFormatter : true ,
545603 supportsInjectLocale : false ,
546604 supportsLockedKeys : true ,
@@ -565,6 +623,7 @@ export const BUCKETS: Record<string, Bucket> = {
565623 ) ,
566624 } ,
567625 txt : {
626+ displayName : "Plain text" ,
568627 supportsFormatter : false ,
569628 supportsInjectLocale : false ,
570629 supportsLockedKeys : false ,
@@ -580,6 +639,7 @@ export const BUCKETS: Record<string, Bucket> = {
580639 ) ,
581640 } ,
582641 "json-dictionary" : {
642+ displayName : "JSON Dictionary" ,
583643 supportsFormatter : true ,
584644 supportsInjectLocale : true ,
585645 supportsLockedKeys : true ,
@@ -589,7 +649,11 @@ export const BUCKETS: Record<string, Bucket> = {
589649 createLoader : ( ctx ) =>
590650 composeLoaders (
591651 createTextFileLoader ( ctx . bucketPathPattern ) ,
592- createFormatterLoader ( ctx . options . formatter , "json" , ctx . bucketPathPattern ) ,
652+ createFormatterLoader (
653+ ctx . options . formatter ,
654+ "json" ,
655+ ctx . bucketPathPattern ,
656+ ) ,
593657 createJsonLoader ( ) ,
594658 createJsonKeysLoader ( ) ,
595659 createEnsureKeyOrderLoader ( ) ,
0 commit comments