11#include <KLocalizedString>
13namespace KUnitConversion
15UnitCategory Time::makeCategory()
17 auto c = UnitCategoryPrivate::makeCategory(TimeCategory,
i18n(
"Time"),
i18n(
"Time"));
18 auto d = UnitCategoryPrivate::get(c);
21 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
24 i18nc(
"time unit symbol",
"Ys"),
25 i18nc(
"unit description in lists",
"yottaseconds"),
26 i18nc(
"unit synonyms for matching user input",
"yottasecond;yottaseconds;Ys"),
28 ki18nc(
"amount in units (real)",
"%1 yottaseconds"),
29 ki18ncp(
"amount in units (integer)",
"%1 yottasecond",
"%1 yottaseconds")));
31 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
34 i18nc(
"time unit symbol",
"Zs"),
35 i18nc(
"unit description in lists",
"zettaseconds"),
36 i18nc(
"unit synonyms for matching user input",
"zettasecond;zettaseconds;Zs"),
38 ki18nc(
"amount in units (real)",
"%1 zettaseconds"),
39 ki18ncp(
"amount in units (integer)",
"%1 zettasecond",
"%1 zettaseconds")));
41 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
44 i18nc(
"time unit symbol",
"Es"),
45 i18nc(
"unit description in lists",
"exaseconds"),
46 i18nc(
"unit synonyms for matching user input",
"exasecond;exaseconds;Es"),
48 ki18nc(
"amount in units (real)",
"%1 exaseconds"),
49 ki18ncp(
"amount in units (integer)",
"%1 exasecond",
"%1 exaseconds")));
51 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
54 i18nc(
"time unit symbol",
"Ps"),
55 i18nc(
"unit description in lists",
"petaseconds"),
56 i18nc(
"unit synonyms for matching user input",
"petasecond;petaseconds;Ps"),
58 ki18nc(
"amount in units (real)",
"%1 petaseconds"),
59 ki18ncp(
"amount in units (integer)",
"%1 petasecond",
"%1 petaseconds")));
61 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
64 i18nc(
"time unit symbol",
"Ts"),
65 i18nc(
"unit description in lists",
"teraseconds"),
66 i18nc(
"unit synonyms for matching user input",
"terasecond;teraseconds;Ts"),
68 ki18nc(
"amount in units (real)",
"%1 teraseconds"),
69 ki18ncp(
"amount in units (integer)",
"%1 terasecond",
"%1 teraseconds")));
71 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
74 i18nc(
"time unit symbol",
"Gs"),
75 i18nc(
"unit description in lists",
"gigaseconds"),
76 i18nc(
"unit synonyms for matching user input",
"gigasecond;gigaseconds;Gs"),
78 ki18nc(
"amount in units (real)",
"%1 gigaseconds"),
79 ki18ncp(
"amount in units (integer)",
"%1 gigasecond",
"%1 gigaseconds")));
81 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
84 i18nc(
"time unit symbol",
"Ms"),
85 i18nc(
"unit description in lists",
"megaseconds"),
86 i18nc(
"unit synonyms for matching user input",
"megasecond;megaseconds;Ms"),
88 ki18nc(
"amount in units (real)",
"%1 megaseconds"),
89 ki18ncp(
"amount in units (integer)",
"%1 megasecond",
"%1 megaseconds")));
91 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
94 i18nc(
"time unit symbol",
"ks"),
95 i18nc(
"unit description in lists",
"kiloseconds"),
96 i18nc(
"unit synonyms for matching user input",
"kilosecond;kiloseconds;ks"),
98 ki18nc(
"amount in units (real)",
"%1 kiloseconds"),
99 ki18ncp(
"amount in units (integer)",
"%1 kilosecond",
"%1 kiloseconds")));
101 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
104 i18nc(
"time unit symbol",
"hs"),
105 i18nc(
"unit description in lists",
"hectoseconds"),
106 i18nc(
"unit synonyms for matching user input",
"hectosecond;hectoseconds;hs"),
108 ki18nc(
"amount in units (real)",
"%1 hectoseconds"),
109 ki18ncp(
"amount in units (integer)",
"%1 hectosecond",
"%1 hectoseconds")));
111 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
114 i18nc(
"time unit symbol",
"das"),
115 i18nc(
"unit description in lists",
"decaseconds"),
116 i18nc(
"unit synonyms for matching user input",
"decasecond;decaseconds;das"),
118 ki18nc(
"amount in units (real)",
"%1 decaseconds"),
119 ki18ncp(
"amount in units (integer)",
"%1 decasecond",
"%1 decaseconds")));
121 d->addDefaultUnit(UnitPrivate::makeUnit(TimeCategory,
124 i18nc(
"time unit symbol",
"s"),
125 i18nc(
"unit description in lists",
"seconds"),
126 i18nc(
"unit synonyms for matching user input",
"second;seconds;s"),
128 ki18nc(
"amount in units (real)",
"%1 seconds"),
129 ki18ncp(
"amount in units (integer)",
"%1 second",
"%1 seconds")));
131 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
134 i18nc(
"time unit symbol",
"ds"),
135 i18nc(
"unit description in lists",
"deciseconds"),
136 i18nc(
"unit synonyms for matching user input",
"decisecond;deciseconds;ds"),
138 ki18nc(
"amount in units (real)",
"%1 deciseconds"),
139 ki18ncp(
"amount in units (integer)",
"%1 decisecond",
"%1 deciseconds")));
141 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
144 i18nc(
"time unit symbol",
"cs"),
145 i18nc(
"unit description in lists",
"centiseconds"),
146 i18nc(
"unit synonyms for matching user input",
"centisecond;centiseconds;cs"),
148 ki18nc(
"amount in units (real)",
"%1 centiseconds"),
149 ki18ncp(
"amount in units (integer)",
"%1 centisecond",
"%1 centiseconds")));
151 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
154 i18nc(
"time unit symbol",
"ms"),
155 i18nc(
"unit description in lists",
"milliseconds"),
156 i18nc(
"unit synonyms for matching user input",
"millisecond;milliseconds;ms"),
158 ki18nc(
"amount in units (real)",
"%1 milliseconds"),
159 ki18ncp(
"amount in units (integer)",
"%1 millisecond",
"%1 milliseconds")));
161 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
164 i18nc(
"time unit symbol",
"µs"),
165 i18nc(
"unit description in lists",
"microseconds"),
166 i18nc(
"unit synonyms for matching user input",
"microsecond;microseconds;µs;us"),
168 ki18nc(
"amount in units (real)",
"%1 microseconds"),
169 ki18ncp(
"amount in units (integer)",
"%1 microsecond",
"%1 microseconds")));
171 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
174 i18nc(
"time unit symbol",
"ns"),
175 i18nc(
"unit description in lists",
"nanoseconds"),
176 i18nc(
"unit synonyms for matching user input",
"nanosecond;nanoseconds;ns"),
178 ki18nc(
"amount in units (real)",
"%1 nanoseconds"),
179 ki18ncp(
"amount in units (integer)",
"%1 nanosecond",
"%1 nanoseconds")));
181 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
184 i18nc(
"time unit symbol",
"ps"),
185 i18nc(
"unit description in lists",
"picoseconds"),
186 i18nc(
"unit synonyms for matching user input",
"picosecond;picoseconds;ps"),
188 ki18nc(
"amount in units (real)",
"%1 picoseconds"),
189 ki18ncp(
"amount in units (integer)",
"%1 picosecond",
"%1 picoseconds")));
191 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
194 i18nc(
"time unit symbol",
"fs"),
195 i18nc(
"unit description in lists",
"femtoseconds"),
196 i18nc(
"unit synonyms for matching user input",
"femtosecond;femtoseconds;fs"),
198 ki18nc(
"amount in units (real)",
"%1 femtoseconds"),
199 ki18ncp(
"amount in units (integer)",
"%1 femtosecond",
"%1 femtoseconds")));
201 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
204 i18nc(
"time unit symbol",
"as"),
205 i18nc(
"unit description in lists",
"attoseconds"),
206 i18nc(
"unit synonyms for matching user input",
"attosecond;attoseconds;as"),
208 ki18nc(
"amount in units (real)",
"%1 attoseconds"),
209 ki18ncp(
"amount in units (integer)",
"%1 attosecond",
"%1 attoseconds")));
211 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
214 i18nc(
"time unit symbol",
"zs"),
215 i18nc(
"unit description in lists",
"zeptoseconds"),
216 i18nc(
"unit synonyms for matching user input",
"zeptosecond;zeptoseconds;zs"),
218 ki18nc(
"amount in units (real)",
"%1 zeptoseconds"),
219 ki18ncp(
"amount in units (integer)",
"%1 zeptosecond",
"%1 zeptoseconds")));
221 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
224 i18nc(
"time unit symbol",
"ys"),
225 i18nc(
"unit description in lists",
"yoctoseconds"),
226 i18nc(
"unit synonyms for matching user input",
"yoctosecond;yoctoseconds;ys"),
228 ki18nc(
"amount in units (real)",
"%1 yoctoseconds"),
229 ki18ncp(
"amount in units (integer)",
"%1 yoctosecond",
"%1 yoctoseconds")));
231 d->addCommonUnit(UnitPrivate::makeUnit(TimeCategory,
234 i18nc(
"time unit symbol",
"min"),
235 i18nc(
"unit description in lists",
"minutes"),
236 i18nc(
"unit synonyms for matching user input",
"minute;minutes;min"),
238 ki18nc(
"amount in units (real)",
"%1 minutes"),
239 ki18ncp(
"amount in units (integer)",
"%1 minute",
"%1 minutes")));
241 d->addCommonUnit(UnitPrivate::makeUnit(TimeCategory,
244 i18nc(
"time unit symbol",
"h"),
245 i18nc(
"unit description in lists",
"hours"),
246 i18nc(
"unit synonyms for matching user input",
"hour;hours;h"),
248 ki18nc(
"amount in units (real)",
"%1 hours"),
249 ki18ncp(
"amount in units (integer)",
"%1 hour",
"%1 hours")));
251 d->addCommonUnit(UnitPrivate::makeUnit(TimeCategory,
254 i18nc(
"time unit symbol",
"d"),
255 i18nc(
"unit description in lists",
"days"),
256 i18nc(
"unit synonyms for matching user input",
"day;days;d"),
258 ki18nc(
"amount in units (real)",
"%1 days"),
259 ki18ncp(
"amount in units (integer)",
"%1 day",
"%1 days")));
261 d->addCommonUnit(UnitPrivate::makeUnit(TimeCategory,
264 i18nc(
"time unit symbol",
"w"),
265 i18nc(
"unit description in lists",
"weeks"),
266 i18nc(
"unit synonyms for matching user input",
"week;weeks"),
268 ki18nc(
"amount in units (real)",
"%1 weeks"),
269 ki18ncp(
"amount in units (integer)",
"%1 week",
"%1 weeks")));
271 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
274 i18nc(
"time unit symbol",
"a"),
275 i18nc(
"unit description in lists",
"Julian years"),
276 i18nc(
"unit synonyms for matching user input",
"Julian year;Julian years;a"),
278 ki18nc(
"amount in units (real)",
"%1 Julian years"),
279 ki18ncp(
"amount in units (integer)",
"%1 Julian year",
"%1 Julian years")));
281 d->addUnit(UnitPrivate::makeUnit(TimeCategory,
284 i18nc(
"time unit symbol",
"lpy"),
285 i18nc(
"unit description in lists",
"leap years"),
286 i18nc(
"unit synonyms for matching user input",
"leap year;leap years"),
288 ki18nc(
"amount in units (real)",
"%1 leap years"),
289 ki18ncp(
"amount in units (integer)",
"%1 leap year",
"%1 leap years")));
292 d->addCommonUnit(UnitPrivate::makeUnit(TimeCategory,
295 i18nc(
"time unit symbol",
"y"),
296 i18nc(
"unit description in lists",
"year"),
297 i18nc(
"unit synonyms for matching user input",
"year;years;y"),
299 ki18nc(
"amount in units (real)",
"%1 year"),
300 ki18ncp(
"amount in units (integer)",
"%1 year",
"%1 years")));
QString i18nc(const char *context, const char *text, const TYPE &arg...)
KLocalizedString KI18N_EXPORT ki18ncp(const char *context, const char *singular, const char *plural)
KLocalizedString KI18N_EXPORT ki18nc(const char *context, const char *text)
QString i18n(const char *text, const TYPE &arg...)