|
| 1 | +import $L from '@enact/i18n/$L'; |
| 2 | + |
1 | 3 | export const SUBTITLE_SIZE_OPTIONS = [ |
2 | | - { value: 'small', label: 'Small', fontSize: 36 }, |
3 | | - { value: 'medium', label: 'Medium', fontSize: 44 }, |
4 | | - { value: 'large', label: 'Large', fontSize: 52 }, |
5 | | - { value: 'xlarge', label: 'Extra Large', fontSize: 60 } |
| 4 | + { value: 'small', label: $L('Small'), fontSize: 36 }, |
| 5 | + { value: 'medium', label: $L('Medium'), fontSize: 44 }, |
| 6 | + { value: 'large', label: $L('Large'), fontSize: 52 }, |
| 7 | + { value: 'xlarge', label: $L('Extra Large'), fontSize: 60 } |
6 | 8 | ]; |
7 | 9 |
|
8 | 10 | export const SUBTITLE_COLOR_OPTIONS = [ |
9 | | - { value: '#ffffff', label: 'White' }, |
10 | | - { value: '#ffff00', label: 'Yellow' }, |
11 | | - { value: '#00ffff', label: 'Cyan' }, |
12 | | - { value: '#ff00ff', label: 'Magenta' }, |
13 | | - { value: '#00ff00', label: 'Green' }, |
14 | | - { value: '#ff0000', label: 'Red' }, |
15 | | - { value: '#808080', label: 'Grey' }, |
16 | | - { value: '#404040', label: 'Dark Grey' } |
| 11 | + { value: '#ffffff', label: $L('White') }, |
| 12 | + { value: '#ffff00', label: $L('Yellow') }, |
| 13 | + { value: '#00ffff', label: $L('Cyan') }, |
| 14 | + { value: '#ff00ff', label: $L('Magenta') }, |
| 15 | + { value: '#00ff00', label: $L('Green') }, |
| 16 | + { value: '#ff0000', label: $L('Red') }, |
| 17 | + { value: '#808080', label: $L('Grey') }, |
| 18 | + { value: '#404040', label: $L('Dark Grey') } |
17 | 19 | ]; |
18 | 20 |
|
19 | 21 | export const SUBTITLE_POSITION_OPTIONS = [ |
20 | | - { value: 'bottom', label: 'Bottom', offset: 10 }, |
21 | | - { value: 'lower', label: 'Lower', offset: 20 }, |
22 | | - { value: 'middle', label: 'Middle', offset: 30 }, |
23 | | - { value: 'higher', label: 'Higher', offset: 40 }, |
24 | | - { value: 'absolute', label: 'Absolute', offset: 0 } |
| 22 | + { value: 'bottom', label: $L('Bottom'), offset: 10 }, |
| 23 | + { value: 'lower', label: $L('Lower'), offset: 20 }, |
| 24 | + { value: 'middle', label: $L('Middle'), offset: 30 }, |
| 25 | + { value: 'higher', label: $L('Higher'), offset: 40 }, |
| 26 | + { value: 'absolute', label: $L('Absolute'), offset: 0 } |
25 | 27 | ]; |
26 | 28 |
|
27 | 29 | export const SUBTITLE_SHADOW_COLOR_OPTIONS = [ |
28 | | - { value: '#000000', label: 'Black' }, |
29 | | - { value: '#ffffff', label: 'White' }, |
30 | | - { value: '#808080', label: 'Grey' }, |
31 | | - { value: '#404040', label: 'Dark Grey' }, |
32 | | - { value: '#ff0000', label: 'Red' }, |
33 | | - { value: '#00ff00', label: 'Green' }, |
34 | | - { value: '#0000ff', label: 'Blue' } |
| 30 | + { value: '#000000', label: $L('Black') }, |
| 31 | + { value: '#ffffff', label: $L('White') }, |
| 32 | + { value: '#808080', label: $L('Grey') }, |
| 33 | + { value: '#404040', label: $L('Dark Grey') }, |
| 34 | + { value: '#ff0000', label: $L('Red') }, |
| 35 | + { value: '#00ff00', label: $L('Green') }, |
| 36 | + { value: '#0000ff', label: $L('Blue') } |
35 | 37 | ]; |
36 | 38 |
|
37 | 39 | export const SUBTITLE_BACKGROUND_COLOR_OPTIONS = [ |
38 | | - { value: '#000000', label: 'Black' }, |
39 | | - { value: '#ffffff', label: 'White' }, |
40 | | - { value: '#808080', label: 'Grey' }, |
41 | | - { value: '#404040', label: 'Dark Grey' }, |
42 | | - { value: '#000080', label: 'Navy' } |
| 40 | + { value: '#000000', label: $L('Black') }, |
| 41 | + { value: '#ffffff', label: $L('White') }, |
| 42 | + { value: '#808080', label: $L('Grey') }, |
| 43 | + { value: '#404040', label: $L('Dark Grey') }, |
| 44 | + { value: '#000080', label: $L('Navy') } |
43 | 45 | ]; |
44 | 46 |
|
45 | 47 | const hexOpacity = (opacity) => Math.round((opacity / 100) * 255).toString(16).padStart(2, '0'); |
|
0 commit comments