@@ -17,7 +17,7 @@ import (
17
17
18
18
"github.com/snivilised/pixa/src/app/proxy"
19
19
"github.com/snivilised/pixa/src/app/proxy/common"
20
- "github.com/snivilised/pixa/src/i18n "
20
+ "github.com/snivilised/pixa/src/locale "
21
21
)
22
22
23
23
// We define all the options here, even the ones inherited from the root
@@ -83,11 +83,11 @@ type shrinkParameterSetPtr = *assistant.ParamSet[common.ShrinkParameterSet]
83
83
func (b * Bootstrap ) buildShrinkCommand (container * assistant.CobraContainer ) * cobra.Command {
84
84
shrinkCommand := & cobra.Command {
85
85
Use : "shrink" ,
86
- Short : i18n .LeadsWith (
86
+ Short : locale .LeadsWith (
87
87
"shrink" ,
88
- xi18n .Text (i18n .ShrinkCmdShortDefinitionTemplData {}),
88
+ xi18n .Text (locale .ShrinkCmdShortDefinitionTemplData {}),
89
89
),
90
- Long : xi18n .Text (i18n .ShrinkLongDefinitionTemplData {}),
90
+ Long : xi18n .Text (locale .ShrinkLongDefinitionTemplData {}),
91
91
92
92
RunE : func (cmd * cobra.Command , args []string ) error {
93
93
var appErr error
@@ -168,7 +168,7 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob
168
168
169
169
paramSet .BindValidatedString (
170
170
newShrinkFlagInfoWithShort (
171
- xi18n .Text (i18n .ShrinkCmdOutputPathParamUsageTemplData {}),
171
+ xi18n .Text (locale .ShrinkCmdOutputPathParamUsageTemplData {}),
172
172
defaultOutputPath ,
173
173
),
174
174
& paramSet .Native .OutputPath , func (_ string , _ * pflag.Flag ) error {
@@ -190,7 +190,7 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob
190
190
191
191
paramSet .BindValidatedString (
192
192
newShrinkFlagInfoWithShort (
193
- xi18n .Text (i18n .ShrinkCmdTrashPathParamUsageTemplData {}),
193
+ xi18n .Text (locale .ShrinkCmdTrashPathParamUsageTemplData {}),
194
194
defaultTrashPath ,
195
195
),
196
196
& paramSet .Native .TrashPath , func (_ string , _ * pflag.Flag ) error {
@@ -212,7 +212,7 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob
212
212
213
213
paramSet .BindBool (
214
214
newShrinkFlagInfoWithShort (
215
- xi18n .Text (i18n .ShrinkCmdCuddleParamUsageTemplData {}),
215
+ xi18n .Text (locale .ShrinkCmdCuddleParamUsageTemplData {}),
216
216
defaultCuddle ,
217
217
),
218
218
& paramSet .Native .Cuddle ,
@@ -228,7 +228,7 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob
228
228
229
229
paramSet .BindValidatedFloat32Within (
230
230
newShrinkFlagInfoWithShort (
231
- xi18n .Text (i18n .ShrinkCmdGaussianBlurParamUsageTemplData {}),
231
+ xi18n .Text (locale .ShrinkCmdGaussianBlurParamUsageTemplData {}),
232
232
defaultBlur ,
233
233
),
234
234
& paramSet .Native .ThirdPartySet .GaussianBlur ,
@@ -246,15 +246,15 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob
246
246
247
247
paramSet .BindValidatedEnum (
248
248
newShrinkFlagInfoWithShort (
249
- xi18n .Text (i18n .ShrinkCmdSamplingFactorParamUsageTemplData {}),
249
+ xi18n .Text (locale .ShrinkCmdSamplingFactorParamUsageTemplData {}),
250
250
defaultSamplingFactor ,
251
251
),
252
252
& paramSet .Native .ThirdPartySet .SamplingFactorEn .Source ,
253
253
func (value string , f * pflag.Flag ) error {
254
254
if f .Changed && ! (common .SamplingFactorEnumInfo .IsValid (value )) {
255
255
acceptableSet := common .SamplingFactorEnumInfo .AcceptablePrimes ()
256
256
257
- return i18n .NewInvalidSamplingFactorError (value , acceptableSet )
257
+ return locale .NewInvalidSamplingFactorError (value , acceptableSet )
258
258
}
259
259
260
260
return nil
@@ -271,15 +271,15 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob
271
271
272
272
paramSet .BindValidatedEnum (
273
273
newShrinkFlagInfoWithShort (
274
- xi18n .Text (i18n .ShrinkCmdInterlaceParamUsageTemplData {}),
274
+ xi18n .Text (locale .ShrinkCmdInterlaceParamUsageTemplData {}),
275
275
defaultInterlace ,
276
276
),
277
277
& paramSet .Native .ThirdPartySet .InterlaceEn .Source ,
278
278
func (value string , f * pflag.Flag ) error {
279
279
if f .Changed && ! (common .InterlaceEnumInfo .IsValid (value )) {
280
280
acceptableSet := common .InterlaceEnumInfo .AcceptablePrimes ()
281
281
282
- return i18n .NewInterlaceError (value , acceptableSet )
282
+ return locale .NewInterlaceError (value , acceptableSet )
283
283
}
284
284
285
285
return nil
@@ -294,7 +294,7 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob
294
294
295
295
paramSet .BindBool (
296
296
newShrinkFlagInfoWithShort (
297
- xi18n .Text (i18n .ShrinkCmdStripParamUsageTemplData {}),
297
+ xi18n .Text (locale .ShrinkCmdStripParamUsageTemplData {}),
298
298
defaultStrip ,
299
299
),
300
300
& paramSet .Native .ThirdPartySet .Strip ,
@@ -310,7 +310,7 @@ func (b *Bootstrap) buildShrinkCommand(container *assistant.CobraContainer) *cob
310
310
311
311
paramSet .BindValidatedIntWithin (
312
312
newShrinkFlagInfoWithShort (
313
- xi18n .Text (i18n .ShrinkCmdQualityParamUsageTemplData {}),
313
+ xi18n .Text (locale .ShrinkCmdQualityParamUsageTemplData {}),
314
314
defaultQuality ,
315
315
),
316
316
& paramSet .Native .ThirdPartySet .Quality ,
0 commit comments