Sayonara Player
Loading...
Searching...
No Matches
Language.h
1/* Language.h */
2
3/* Copyright (C) 2011-2024 Michael Lugmair (Lucio Carreras)
4 *
5 * This file is part of sayonara player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef LANGUAGE_H
22#define LANGUAGE_H
23
24#include <QObject>
25#include <QList>
26#include <QMap>
27#include <QLocale>
28
34 public QString
35{
36 public:
37 LanguageString(const QString& other);
38 LanguageString(const LanguageString& other) = default;
39
40 LanguageString& operator=(const QString& other);
41 LanguageString& operator=(const LanguageString& other) = default;
42
43 LanguageString& toFirstUpper();
44
45 LanguageString& space();
46
47 LanguageString& question();
48
49 LanguageString& triplePt();
50};
51
52class Lang :
53 public QObject
54{
55 Q_OBJECT
56
57 public:
58 enum Term
59 {
60 About = 0,
61 Action,
62 Actions,
63 Activate,
64 Active,
65 Add,
66 AddArtist,
67 AddTab,
68 Album,
69 AlbumArtist,
70 AlbumArtists,
71 Albums,
72 All,
73 Append,
75 Apply,
76 Artist,
77 Artists,
78 Ascending,
79 Automatic,
80 Bitrate,
82 Broadcast,
83 By,
84 Cancel,
85 CannotFindLame,
86 CaseInsensitive,
87 Comment,
88 Continue,
89 Covers,
90 CoverProvider,
91 Clear,
92 ClearSelection,
93 Close,
94 CloseOthers,
95 CloseTab,
96 CoverView,
97 CreateDirectory,
98 Created,
99 CreateNewLibrary,
100 DarkMode,
101 Date,
102 Days,
103 DaysShort,
104 Default,
105 Delete,
106 Descending,
107 Directory,
108 Directories,
109 Disc,
110 Duration,
111 DurationShort,
112 DynamicPlayback,
113 Edit,
114 EmptyInput,
115 EnterName,
116 EnterNewName,
117 EnterUrl,
118 Entries,
119 Entry,
120 Error,
121 Fast,
122 File,
123 Filename,
124 Files,
125 Filesize,
126 Filetype,
127 Filter,
128 First,
129 Font,
130 Fonts,
131 Fulltext,
132 GaplessPlayback,
133 GB,
134 Genre,
135 Genres,
136 Hide,
137 Hours,
138 HoursShort,
139 IgnoreSpecialChars,
140 IgnoreAccents,
141 ImportDir,
142 ImportFiles,
143 Inactive,
144 Info,
145 InvalidChars,
146 KB,
147 Key_Find,
148 Key_Delete,
149 Key_Escape,
150 Key_Control,
151 Key_Alt,
152 Key_Shift,
153 Key_Backspace,
154 Key_Tab,
155 Library,
156 LibraryPath,
157 LibraryView,
158 Listen,
159 LiveSearch,
160 Loading,
161 LoadingArg,
162 LockPlaylist,
163 Logger,
164 LogLevel,
165 Lyrics,
166 LyricsProvider,
167 MB,
168 Menu,
169 Minimize,
170 Minutes,
171 MinutesShort,
172 Missing,
173 Modified,
174 Months,
175 MoveDown,
176 MoveUp,
177 MuteOn,
178 MuteOff,
179 Name,
180 New,
181 NextPage,
182 NextTrack,
183 No,
184 NoAlbums,
185 NumTracks,
186 OK,
187 On,
188 Open,
189 OpenDir,
190 OpenFile,
191 Or,
192 Overwrite,
193 Pause,
194 Play,
195 PlayingTime,
196 PlayInNewTab,
197 Playlist,
198 Playlists,
199 PlayNext,
200 PlayPause,
201 Plugin,
202 Podcasts,
203 Preferences,
204 PreviousPage,
205 PreviousTrack,
206 Provider,
207 PurchaseUrl,
208 Quit,
209 Radio,
211 Rating,
212 Really,
213 Refresh,
214 ReloadLibrary,
215 Remove,
216 Rename,
217 Repeat1,
218 RepeatAll,
219 Replace,
220 Reset,
221 Retry,
222 ReverseOrder,
223 Sampler,
224 Save,
225 SaveAs,
226 SaveToFile,
227 ScanForFiles,
228 SearchNoun,
229 SearchVerb,
230 SearchNext,
231 SearchPrev,
232 Second,
233 Seconds,
234 SecondsShort,
235 SeekForward,
236 SeekBackward,
237 Show,
238 ShowAlbumArtists,
239 ShowCovers,
240 ShowLibrary,
241 Shuffle,
242 ShufflePlaylist,
243 Shutdown,
244 SimilarArtists,
245 SmartPlaylists,
246 SortBy,
247 Stop,
248 Streams,
249 StreamUrl,
250 Success,
251 Th,
252 Third,
253 Title,
254 Track,
255 TrackOn,
256 TrackNo,
257 Tracks,
258 Tree,
259 Undo,
260 UnknownAlbum,
261 UnknownArtist,
262 UnknownTitle,
263 UnknownGenre,
264 UnknownYear,
265 UnknownPlaceholder,
266 UnlockPlaylist,
267 Various,
268 VariousAlbums,
269 VariousArtists,
270 VariousTracks,
271 Version,
272 VolumeDown,
273 VolumeUp,
274 Warning,
275 Weeks,
276 Year,
277 Years,
278 Yes,
279 Zoom,
280 NUMBER_OF_LANGUAGE_KEYS
281 };
282
283 enum TermNr
284 {
285 NrDirectories = 0,
286 NrFiles,
287 NrPlaylists,
288 NrTracks,
289 NrTracksFound,
290 NUMBER_OF_LANGUAGE_PARAM_KEYS
291 };
292
293 public:
294 Lang();
295 ~Lang();
296
297 static LanguageString get(Lang::Term term, bool* ok = nullptr);
298
299 static LanguageString getWithNumber(Lang::TermNr term, int param, bool* ok = nullptr);
300};
301
302#endif // LANGUAGE_H
Definition Album.h:37
Definition Application.h:32
Definition Artist.h:34
Definition Bookmarks.h:35
Definition Genre.h:31
Definition Language.h:54
The LanguageString class.
Definition Language.h:35
The Logger class.
Definition Logger.h:62
Definition Shutdown.h:33
Definition RadioStation.h:36