File tree Expand file tree Collapse file tree 3 files changed +39
-4
lines changed Expand file tree Collapse file tree 3 files changed +39
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,27 @@ const choices: {[key: string]: {label: string; helper?: string}} = {
18
18
public : { label : 'Public' } ,
19
19
} ;
20
20
21
+ function getChoicesTranslated (
22
+ t : ( ...args : any ) => any ,
23
+ key : string
24
+ ) : { label : string ; helper ?: string } {
25
+ switch ( key ) {
26
+ default :
27
+ case 'secret' :
28
+ return { label : t ( 'form.privacy.choices.secret' , 'Secret' ) } ;
29
+ case 'private' :
30
+ return {
31
+ label : t ( 'form.privacy.choices.private' , 'Private' ) ,
32
+ helper : t (
33
+ 'form.privacy.choices.helpers.private' ,
34
+ 'Users can request access'
35
+ ) ,
36
+ } ;
37
+ case 'public' :
38
+ return { label : t ( 'form.privacy.choices.public' , 'Public' ) } ;
39
+ }
40
+ }
41
+
21
42
function getValue ( value : string , workspace : boolean , auth : boolean ) : number {
22
43
switch ( value ) {
23
44
default :
@@ -161,8 +182,10 @@ export default function PrivacyWidget({
161
182
}
162
183
>
163
184
< ListItemText
164
- primary = { choices [ k ] . label }
165
- secondary = { choices [ k ] . helper }
185
+ primary = { getChoicesTranslated ( t , k ) . label }
186
+ secondary = {
187
+ getChoicesTranslated ( t , k ) ?. helper
188
+ }
166
189
/>
167
190
</ MenuItem >
168
191
) ;
Original file line number Diff line number Diff line change @@ -81,7 +81,10 @@ export default function SaveAsTemplateForm({
81
81
< SwitchWidget
82
82
control = { control }
83
83
name = { 'override' }
84
- label = { `Replace applied template` }
84
+ label = { t (
85
+ 'save_as_template_form.replace' ,
86
+ `Replace applied template`
87
+ ) }
85
88
/>
86
89
</ FormRow >
87
90
) }
Original file line number Diff line number Diff line change 580
580
"dialog" : {
581
581
"intro" : " Select the renditions you want to export:" ,
582
582
"submit" : " Export" ,
583
- "title_one" : " Export {{count}} assets " ,
583
+ "title_one" : " Export {{count}} asset " ,
584
584
"title_other" : " Export {{count}} assets"
585
585
}
586
586
},
869
869
"label" : " Permissions"
870
870
},
871
871
"privacy" : {
872
+ "choices" : {
873
+ "helpers" : {
874
+ "private" : " Users can request access"
875
+ },
876
+ "private" : " Private" ,
877
+ "public" : " Public" ,
878
+ "secret" : " Secret"
879
+ },
872
880
"inherited" : " This collection cannot be more restricted than its parent collection." ,
873
881
"label" : " Privacy"
874
882
},
1243
1251
"remember_attributes" : " Remember Attributes" ,
1244
1252
"remember_privacy" : " Remember Privacy" ,
1245
1253
"remember_tags" : " Remember Tags" ,
1254
+ "replace" : " Replace applied template" ,
1246
1255
"save_values_as_template_for_reuse" : " Save values as template for reuse" ,
1247
1256
"template_name" : " Template name"
1248
1257
},
You can’t perform that action at this time.
0 commit comments