Sayonara Player
Language.h
1/* Language.h */
2
3/* Copyright (C) 2011-2020 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 Clear,
91 ClearSelection,
92 Close,
93 CloseOthers,
94 CloseTab,
95 CreateDirectory,
96 Created,
97 CreateNewLibrary,
98 DarkMode,
99 Date,
100 Days,
101 DaysShort,
102 Default,
103 Delete,
104 Descending,
105 Directory,
106 Directories,
107 Disc,
108 Duration,
109 DurationShort,
110 DynamicPlayback,
111 Edit,
112 EmptyInput,
113 EnterName,
114 EnterNewName,
115 EnterUrl,
116 Entries,
117 Entry,
118 Error,
119 Fast,
120 File,
121 Filename,
122 Files,
123 Filesize,
124 Filetype,
125 Filter,
126 First,
127 Font,
128 Fonts,
129 Fulltext,
130 GaplessPlayback,
131 GB,
132 Genre,
133 Genres,
134 Hide,
135 Hours,
136 HoursShort,
137 IgnoreSpecialChars,
138 IgnoreAccents,
139 ImportDir,
140 ImportFiles,
141 Inactive,
142 Info,
143 InvalidChars,
144 KB,
145 Key_Find,
146 Key_Delete,
147 Key_Escape,
148 Key_Control,
149 Key_Alt,
150 Key_Shift,
151 Key_Backspace,
152 Key_Tab,
153 Library,
154 LibraryPath,
155 LibraryView,
156 Listen,
157 LiveSearch,
158 Loading,
159 LoadingArg,
160 Logger,
161 LogLevel,
162 Lyrics,
163 MB,
164 Menu,
165 Minimize,
166 Minutes,
167 MinutesShort,
168 Missing,
169 Modified,
170 Months,
171 MoveDown,
172 MoveUp,
173 MuteOn,
174 MuteOff,
175 Name,
176 New,
177 NextPage,
178 NextTrack,
179 No,
180 NoAlbums,
181 NumTracks,
182 OK,
183 On,
184 Open,
185 OpenDir,
186 OpenFile,
187 Or,
188 Overwrite,
189 Pause,
190 Play,
191 PlayingTime,
192 PlayInNewTab,
193 Playlist,
194 Playlists,
195 PlayNext,
196 PlayPause,
197 Plugin,
198 Podcasts,
199 Preferences,
200 PreviousPage,
201 PreviousTrack,
202 PurchaseUrl,
203 Quit,
204 Radio,
206 Rating,
207 Really,
208 Refresh,
209 ReloadLibrary,
210 Remove,
211 Rename,
212 Repeat1,
213 RepeatAll,
214 Replace,
215 Reset,
216 Retry,
217 ReverseOrder,
218 Sampler,
219 Save,
220 SaveAs,
221 SaveToFile,
222 ScanForFiles,
223 SearchNoun,
224 SearchVerb,
225 SearchNext,
226 SearchPrev,
227 Second,
228 Seconds,
229 SecondsShort,
230 SeekForward,
231 SeekBackward,
232 Show,
233 ShowAlbumArtists,
234 ShowCovers,
235 ShowLibrary,
236 Shuffle,
237 ShufflePlaylist,
238 Shutdown,
239 SimilarArtists,
240 SmartPlaylists,
241 SortBy,
242 Stop,
243 Streams,
244 StreamUrl,
245 Success,
246 Th,
247 Third,
248 Title,
249 Track,
250 TrackOn,
251 TrackNo,
252 Tracks,
253 Tree,
254 Undo,
255 UnknownAlbum,
256 UnknownArtist,
257 UnknownTitle,
258 UnknownGenre,
259 UnknownYear,
260 UnknownPlaceholder,
261 Various,
262 VariousAlbums,
263 VariousArtists,
264 VariousTracks,
265 Version,
266 VolumeDown,
267 VolumeUp,
268 Warning,
269 Weeks,
270 Year,
271 Years,
272 Yes,
273 Zoom,
274 NUMBER_OF_LANGUAGE_KEYS
275 };
276
277 enum TermNr
278 {
279 NrDirectories = 0,
280 NrFiles,
281 NrPlaylists,
282 NrTracks,
283 NrTracksFound,
284 NUMBER_OF_LANGUAGE_PARAM_KEYS
285 };
286
287 public:
288 Lang();
289 ~Lang();
290
291 static LanguageString get(Lang::Term term, bool* ok = nullptr);
292
293 static LanguageString getWithNumber(Lang::TermNr term, int param, bool* ok = nullptr);
294};
295
296#endif // LANGUAGE_H
Definition: Album.h:37
Definition: Application.h:32
Definition: Artist.h:34
The Bookmarks logic class.
Definition: Bookmarks.h:39
Definition: Genre.h:31
Definition: Language.h:54
The LanguageString class.
Definition: Language.h:35
The Logger class.
Definition: Logger.h:62
An interface class needed when implementing a library plugin.
Definition: LocalLibraryWatcher.h:31
Definition: RadioStation.h:36