1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Nikaia\TranslationSheet\Sheet; |
4
|
|
|
|
5
|
|
|
class Styles |
6
|
|
|
{ |
7
|
2 |
|
public function translationsHeader() |
|
|
|
|
8
|
|
|
{ |
9
|
|
|
return [ |
10
|
2 |
|
'backgroundColor' => '#546E7A', |
11
|
|
|
'foregroundColor' => '#ffffff', |
12
|
|
|
'fontSize' => 10, |
13
|
|
|
'fontFamily' => 'Droid Serif', |
14
|
|
|
'bold' => true, |
15
|
|
|
'horizontalAlignment' => 'LEFT', |
16
|
|
|
'verticalAlignment' => 'MIDDLE', |
17
|
|
|
'hyperlinkDisplayType' => 'PLAIN_TEXT', |
18
|
|
|
]; |
19
|
|
|
} |
20
|
|
|
|
21
|
2 |
|
public function fullKeyColumn() |
|
|
|
|
22
|
|
|
{ |
23
|
|
|
return [ |
24
|
2 |
|
'backgroundColor' => '#E1F5FE', |
25
|
|
|
'foregroundColor' => '#9E9E9E', |
26
|
|
|
'fontSize' => 9, |
27
|
|
|
'fontFamily' => 'Consolas', |
28
|
|
|
'bold' => false, |
29
|
|
|
'horizontalAlignment' => 'LEFT', |
30
|
|
|
'verticalAlignment' => 'MIDDLE', |
31
|
|
|
'hyperlinkDisplayType' => 'PLAIN_TEXT', |
32
|
|
|
]; |
33
|
|
|
} |
34
|
|
|
|
35
|
1 |
|
public function lockedTranslationsColumns() |
|
|
|
|
36
|
|
|
{ |
37
|
|
|
return [ |
38
|
1 |
|
'backgroundColor' => '#ffe1e1', |
39
|
|
|
'foregroundColor' => '#000000', |
40
|
|
|
'fontSize' => 9, |
41
|
|
|
'fontFamily' => 'Consolas', |
42
|
|
|
'bold' => false, |
43
|
|
|
'horizontalAlignment' => 'LEFT', |
44
|
|
|
'verticalAlignment' => 'MIDDLE', |
45
|
|
|
'hyperlinkDisplayType' => 'PLAIN_TEXT', |
46
|
|
|
]; |
47
|
|
|
} |
48
|
|
|
|
49
|
3 |
|
public function translationsColumns() |
|
|
|
|
50
|
|
|
{ |
51
|
|
|
return [ |
52
|
3 |
|
'backgroundColor' => '#ffffff', |
53
|
|
|
'foregroundColor' => '#000000', |
54
|
|
|
'fontSize' => 9, |
55
|
|
|
'fontFamily' => 'Droid Serif', |
56
|
|
|
'bold' => false, |
57
|
|
|
'horizontalAlignment' => 'LEFT', |
58
|
|
|
'verticalAlignment' => 'MIDDLE', |
59
|
|
|
'wrapStrategy' => 'WRAP', |
60
|
|
|
'hyperlinkDisplayType' => 'PLAIN_TEXT', |
61
|
|
|
]; |
62
|
|
|
} |
63
|
|
|
|
64
|
2 |
|
public function metaColumns() |
|
|
|
|
65
|
|
|
{ |
66
|
|
|
return [ |
67
|
2 |
|
'backgroundColor' => '#ededed', |
68
|
|
|
'foregroundColor' => '#9E9E9E', |
69
|
|
|
'fontSize' => 8, |
70
|
|
|
'fontFamily' => 'Ubuntu', |
71
|
|
|
'bold' => false, |
72
|
|
|
'horizontalAlignment' => 'LEFT', |
73
|
|
|
'verticalAlignment' => 'MIDDLE', |
74
|
|
|
'hyperlinkDisplayType' => 'PLAIN_TEXT', |
75
|
|
|
]; |
76
|
|
|
} |
77
|
|
|
|
78
|
2 |
|
public function translationSheetTabColor() |
79
|
|
|
{ |
80
|
2 |
|
return '#546E7A'; |
81
|
|
|
} |
82
|
|
|
|
83
|
2 |
|
public function metaSheetTabColor() |
84
|
|
|
{ |
85
|
2 |
|
return [0, 188, 212]; |
86
|
|
|
} |
87
|
|
|
} |
88
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.