|
7 | 7 |
|
8 | 8 | import Foundation |
9 | 9 |
|
10 | | -class UnitsLocalizator: Localizator { |
| 10 | +public class UnitsLocalizator: Localizator { |
11 | 11 | // MARK: Area |
12 | | - var ha: Localization { |
| 12 | + public var ha: Localization { |
13 | 13 | return .init( |
14 | 14 | short: self.localized("ha"), |
15 | 15 | full: self.localized("ha_full") |
16 | 16 | ) |
17 | 17 | } |
18 | | - var acre: Localization { |
| 18 | + public var acre: Localization { |
19 | 19 | return .init( |
20 | 20 | short: self.localized("acre"), |
21 | 21 | full: self.localized("acre_full") |
22 | 22 | ) |
23 | 23 | } |
24 | | - var decare: Localization { |
| 24 | + public var decare: Localization { |
25 | 25 | return .init( |
26 | 26 | short: self.localized("decare"), |
27 | 27 | full: self.localized("decare_full") |
28 | 28 | ) |
29 | 29 | } |
30 | 30 |
|
31 | 31 | // MARK: Length |
32 | | - var `in`: Localization { |
| 32 | + public var `in`: Localization { |
33 | 33 | return .init( |
34 | 34 | short: self.localized("in"), |
35 | 35 | full: self.localized("in_full") |
36 | 36 | ) |
37 | 37 | } |
38 | | - var ft: Localization { |
| 38 | + public var ft: Localization { |
39 | 39 | return .init( |
40 | 40 | short: self.localized("ft"), |
41 | 41 | full: self.localized("ft_full") |
42 | 42 | ) |
43 | 43 | } |
44 | | - var mile: Localization { |
| 44 | + public var mile: Localization { |
45 | 45 | return .init( |
46 | 46 | short: self.localized("mile"), |
47 | 47 | full: self.localized("mile_full") |
48 | 48 | ) |
49 | 49 | } |
50 | | - var mm: Localization { |
| 50 | + public var mm: Localization { |
51 | 51 | return .init( |
52 | 52 | short: self.localized("mm"), |
53 | 53 | full: self.localized("mm_full") |
54 | 54 | ) |
55 | 55 | } |
56 | | - var cm: Localization { |
| 56 | + public var cm: Localization { |
57 | 57 | return .init( |
58 | 58 | short: self.localized("cm"), |
59 | 59 | full: self.localized("cm_full") |
60 | 60 | ) |
61 | 61 | } |
62 | | - var m: Localization { |
| 62 | + public var m: Localization { |
63 | 63 | return .init( |
64 | 64 | short: self.localized("m"), |
65 | 65 | full: self.localized("m_full") |
66 | 66 | ) |
67 | 67 | } |
68 | | - var km: Localization { |
| 68 | + public var km: Localization { |
69 | 69 | return .init( |
70 | 70 | short: self.localized("km"), |
71 | 71 | full: self.localized("km_full") |
72 | 72 | ) |
73 | 73 | } |
74 | 74 |
|
75 | 75 | // MARK: Weight |
76 | | - var pound: Localization { |
| 76 | + public var pound: Localization { |
77 | 77 | return .init( |
78 | 78 | short: self.localized("pound"), |
79 | 79 | full: self.localized("pound_full") |
80 | 80 | ) |
81 | 81 | } |
82 | | - var kg: Localization { |
| 82 | + public var kg: Localization { |
83 | 83 | return .init( |
84 | 84 | short: self.localized("kg"), |
85 | 85 | full: self.localized("kg_full") |
86 | 86 | ) |
87 | 87 | } |
88 | | - var centner: Localization { |
| 88 | + public var centner: Localization { |
89 | 89 | return .init( |
90 | 90 | short: self.localized("centner"), |
91 | 91 | full: self.localized("centner_full") |
92 | 92 | ) |
93 | 93 | } |
94 | | - var ton: Localization { |
| 94 | + public var ton: Localization { |
95 | 95 | return .init( |
96 | 96 | short: self.localized("ton"), |
97 | 97 | full: self.localized("ton_full") |
98 | 98 | ) |
99 | 99 | } |
100 | 100 |
|
101 | 101 | // MARK: Liquids |
102 | | - var pint: Localization { |
| 102 | + public var pint: Localization { |
103 | 103 | return .init( |
104 | 104 | short: self.localized("pint"), |
105 | 105 | full: self.localized("pint_full") |
106 | 106 | ) |
107 | 107 | } |
108 | | - var liter: Localization { |
| 108 | + public var liter: Localization { |
109 | 109 | return .init( |
110 | 110 | short: self.localized("liter"), |
111 | 111 | full: self.localized("liter_full") |
112 | 112 | ) |
113 | 113 | } |
114 | | - var bushel: Localization { |
| 114 | + public var bushel: Localization { |
115 | 115 | return .init( |
116 | 116 | short: self.localized("bushel"), |
117 | 117 | full: self.localized("bushel_full") |
118 | 118 | ) |
119 | 119 | } |
120 | | - var quart: Localization { |
| 120 | + public var quart: Localization { |
121 | 121 | return .init( |
122 | 122 | short: self.localized("quart"), |
123 | 123 | full: self.localized("quart_full") |
124 | 124 | ) |
125 | 125 | } |
126 | | - var americanGallon: Localization { |
| 126 | + public var americanGallon: Localization { |
127 | 127 | return .init( |
128 | 128 | short: self.localized("american_gallon"), |
129 | 129 | full: self.localized("american_gallon_full") |
130 | 130 | ) |
131 | 131 | } |
132 | | - var britishGallon: Localization { |
| 132 | + public var britishGallon: Localization { |
133 | 133 | return .init( |
134 | 134 | short: self.localized("british_gallon"), |
135 | 135 | full: self.localized("british_gallon_full") |
136 | 136 | ) |
137 | 137 | } |
138 | 138 |
|
139 | 139 | // MARK: Temperature |
140 | | - var celsius: Localization { |
| 140 | + public var celsius: Localization { |
141 | 141 | return .init( |
142 | 142 | short: self.localized("celsius"), |
143 | 143 | full: self.localized("celsius_full") |
144 | 144 | ) |
145 | 145 | } |
146 | | - var fahrenheit: Localization { |
| 146 | + public var fahrenheit: Localization { |
147 | 147 | return .init( |
148 | 148 | short: self.localized("fahrenheit"), |
149 | 149 | full: self.localized("fahrenheit_full") |
150 | 150 | ) |
151 | 151 | } |
152 | 152 |
|
153 | 153 | // MARK: Productivity |
154 | | - var bushelPerAcre: Localization { |
| 154 | + public var bushelPerAcre: Localization { |
155 | 155 | return .init( |
156 | 156 | short: self.localized("bushel_per_acre"), |
157 | 157 | full: self.localized("bushel_per_acre_full") |
158 | 158 | ) |
159 | 159 | } |
160 | | - var usTonPerAcre: Localization { |
| 160 | + public var usTonPerAcre: Localization { |
161 | 161 | return .init( |
162 | 162 | short: self.localized("us_ton_per_acre"), |
163 | 163 | full: self.localized("us_ton_per_acre_full") |
164 | 164 | ) |
165 | 165 | } |
166 | | - var tonPerHa: Localization { |
| 166 | + public var tonPerHa: Localization { |
167 | 167 | return .init( |
168 | 168 | short: self.localized("ton_per_ha"), |
169 | 169 | full: self.localized("ton_per_ha_full") |
170 | 170 | ) |
171 | 171 | } |
172 | | - var centnerPerHa: Localization { |
| 172 | + public var centnerPerHa: Localization { |
173 | 173 | return .init( |
174 | 174 | short: self.localized("centner_per_ha"), |
175 | 175 | full: self.localized("centner_per_ha_full") |
176 | 176 | ) |
177 | 177 | } |
178 | | - var kgPerDecare: Localization { |
| 178 | + public var kgPerDecare: Localization { |
179 | 179 | return .init( |
180 | 180 | short: self.localized("kg_per_decare"), |
181 | 181 | full: self.localized("kg_per_decare_full") |
182 | 182 | ) |
183 | 183 | } |
184 | 184 |
|
185 | 185 | // MARK: Speed |
186 | | - var mPerSec: Localization { |
| 186 | + public var mPerSec: Localization { |
187 | 187 | return .init( |
188 | 188 | short: self.localized("m_per_sec"), |
189 | 189 | full: self.localized("m_per_sec_full") |
190 | 190 | ) |
191 | 191 | } |
192 | | - var milePerHour: Localization { |
| 192 | + public var milePerHour: Localization { |
193 | 193 | return .init( |
194 | 194 | short: self.localized("mile_per_hour"), |
195 | 195 | full: self.localized("mile_per_hour_full") |
196 | 196 | ) |
197 | 197 | } |
198 | | - var kmPerHour: Localization { |
| 198 | + public var kmPerHour: Localization { |
199 | 199 | return .init( |
200 | 200 | short: self.localized("km_per_hour"), |
201 | 201 | full: self.localized("km_per_hour_full") |
202 | 202 | ) |
203 | 203 | } |
204 | 204 |
|
205 | 205 | // MARK: FuelConsumption |
206 | | - var americanPintPerAcre: Localization { |
| 206 | + public var americanPintPerAcre: Localization { |
207 | 207 | return .init( |
208 | 208 | short: self.localized("american_pint_per_acre"), |
209 | 209 | full: self.localized("american_pint_per_acre_full") |
210 | 210 | ) |
211 | 211 | } |
212 | | - var americanQuart: Localization { |
| 212 | + public var americanQuart: Localization { |
213 | 213 | return .init( |
214 | 214 | short: self.localized("american_quart"), |
215 | 215 | full: self.localized("american_quart_full") |
216 | 216 | ) |
217 | 217 | } |
218 | | - var literPerHa: Localization { |
| 218 | + public var literPerHa: Localization { |
219 | 219 | return .init( |
220 | 220 | short: self.localized("liter_per_ha"), |
221 | 221 | full: self.localized("liter_per_ha_full") |
222 | 222 | ) |
223 | 223 | } |
224 | 224 |
|
225 | | - var milePerUsGallon: Localization { |
| 225 | + public var milePerUsGallon: Localization { |
226 | 226 | return .init( |
227 | 227 | short: self.localized("mile_per_us_gallon"), |
228 | 228 | full: self.localized("mile_per_us_gallon_full") |
229 | 229 | ) |
230 | 230 | } |
231 | | - var kmPerLiter: Localization { |
| 231 | + public var kmPerLiter: Localization { |
232 | 232 | return .init( |
233 | 233 | short: self.localized("km_per_liter"), |
234 | 234 | full: self.localized("km_per_liter_full") |
235 | 235 | ) |
236 | 236 | } |
237 | | - var literPer100km: Localization { |
| 237 | + public var literPer100km: Localization { |
238 | 238 | return .init( |
239 | 239 | short: self.localized("liter_per_100km"), |
240 | 240 | full: self.localized("liter_per_100km_full") |
241 | 241 | ) |
242 | 242 | } |
243 | | - var milePerUkGallon: Localization { |
| 243 | + public var milePerUkGallon: Localization { |
244 | 244 | return .init( |
245 | 245 | short: self.localized("mile_per_uk_gallon"), |
246 | 246 | full: self.localized("mile_per_uk_gallon_full") |
|
0 commit comments