File tree 3 files changed +12
-13
lines changed
3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -15,27 +15,27 @@ import React from 'react';
15
15
16
16
const locales = [
17
17
{
18
- displayName : 'English (United States)' ,
19
18
id : 'en_US' ,
20
19
label : 'en-US' ,
20
+ name : 'English (United States)' ,
21
21
symbol : 'en-us' ,
22
22
} ,
23
23
{
24
- displayName : 'Spanish (Spain)' ,
25
24
id : 'es_ES' ,
26
25
label : 'es-ES' ,
26
+ name : 'Spanish (Spain)' ,
27
27
symbol : 'es-es' ,
28
28
} ,
29
29
{
30
- displayName : 'French (France)' ,
31
30
id : 'fr_FR' ,
32
31
label : 'fr-FR' ,
32
+ name : 'French (France)' ,
33
33
symbol : 'fr-fr' ,
34
34
} ,
35
35
{
36
- displayName : 'Dutch (Netherlands)' ,
37
36
id : 'nl_NL' ,
38
37
label : 'nl-NL' ,
38
+ name : 'Dutch (Netherlands)' ,
39
39
symbol : 'nl-nl' ,
40
40
} ,
41
41
] ;
Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ import {Option, Picker} from '../picker';
15
15
type DisplayType = 'info' | 'secondary' | 'success' | 'warning' ;
16
16
17
17
type Item = {
18
- displayName ?: string ;
19
18
id : string ;
20
19
label : string ;
20
+ name ?: string ;
21
21
symbol : string ;
22
22
} ;
23
23
@@ -171,7 +171,7 @@ const Trigger = React.forwardRef<HTMLButtonElement>(
171
171
< button
172
172
{ ...otherProps }
173
173
aria-label = { sub ( triggerMessage , [
174
- selectedItem ?. displayName || selectedItem ?. label ,
174
+ selectedItem ?. name || selectedItem ?. label ,
175
175
] ) }
176
176
className = { classNames (
177
177
classNamesTrigger ,
@@ -255,7 +255,7 @@ const ClayLanguagePicker = ({
255
255
return (
256
256
< Option
257
257
aria-label = { sub ( messages . option , [
258
- locale . displayName || locale . label ,
258
+ locale . name || locale . label ,
259
259
translationLabel . label ,
260
260
] ) }
261
261
key = { locale . id }
@@ -292,8 +292,7 @@ const ClayLanguagePicker = ({
292
292
293
293
< span className = "sr-only" >
294
294
{ sub ( messages . option , [
295
- locale . displayName ||
296
- locale . label ,
295
+ locale . name || locale . label ,
297
296
translationLabel . label ,
298
297
] ) }
299
298
</ span >
Original file line number Diff line number Diff line change @@ -14,27 +14,27 @@ export default {
14
14
15
15
const locales = [
16
16
{
17
- displayName : 'English (United States)' ,
18
17
id : 'en_US' ,
19
18
label : 'en-US' ,
19
+ name : 'English (United States)' ,
20
20
symbol : 'en-us' ,
21
21
} ,
22
22
{
23
- displayName : 'Arabic (Saudi Arabia)' ,
24
23
id : 'ar_SA' ,
25
24
label : 'ar-SA' ,
25
+ name : 'Arabic (Saudi Arabia)' ,
26
26
symbol : 'ar-sa' ,
27
27
} ,
28
28
{
29
- displayName : 'Catalan (Spain)' ,
30
29
id : 'ca_ES' ,
31
30
label : 'ca-ES' ,
31
+ name : 'Catalan (Spain)' ,
32
32
symbol : 'ca-es' ,
33
33
} ,
34
34
{
35
- displayName : 'Dutch (Netherlands)' ,
36
35
id : 'nl_NL' ,
37
36
label : 'nl-NL' ,
37
+ name : 'Dutch (Netherlands)' ,
38
38
symbol : 'nl-nl' ,
39
39
} ,
40
40
] ;
You can’t perform that action at this time.
0 commit comments