|
| 1 | +/* |
| 2 | + * SPDX-FileCopyrightText: 2017-2025 NewPipe contributors <https://newpipe.net> |
| 3 | + * SPDX-FileCopyrightText: 2025 NewPipe e.V. <https://newpipe-ev.de> |
| 4 | + * SPDX-License-Identifier: GPL-3.0-or-later |
| 5 | + */ |
| 6 | + |
1 | 7 | package org.schabi.newpipe.util |
2 | 8 |
|
3 | 9 | import android.content.Context |
4 | 10 | import org.schabi.newpipe.R |
5 | 11 |
|
6 | | -/** |
7 | | - * Created by Christian Schabesberger on 28.09.17. |
8 | | - * KioskTranslator.java is part of NewPipe. |
9 | | - * |
10 | | - * |
11 | | - * NewPipe is free software: you can redistribute it and/or modify |
12 | | - * it under the terms of the GNU General Public License as published by |
13 | | - * the Free Software Foundation, either version 3 of the License, or |
14 | | - * (at your option) any later version. |
15 | | - * |
16 | | - * |
17 | | - * |
18 | | - * NewPipe is distributed in the hope that it will be useful, |
19 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
21 | | - * GNU General Public License for more details. |
22 | | - * |
23 | | - * |
24 | | - * |
25 | | - * You should have received a copy of the GNU General Public License |
26 | | - * along with NewPipe. If not, see <http:></http:>//www.gnu.org/licenses/>. |
27 | | - * |
28 | | - */ |
29 | 12 | object KioskTranslator { |
30 | 13 | @JvmStatic |
31 | | - fun getTranslatedKioskName(kioskId: String, c: Context): String { |
| 14 | + fun getTranslatedKioskName(kioskId: String, context: Context): String { |
32 | 15 | return when (kioskId) { |
33 | | - "Trending" -> c.getString(R.string.trending) |
34 | | - "Top 50" -> c.getString(R.string.top_50) |
35 | | - "New & hot" -> c.getString(R.string.new_and_hot) |
36 | | - "Local" -> c.getString(R.string.local) |
37 | | - "Recently added" -> c.getString(R.string.recently_added) |
38 | | - "Most liked" -> c.getString(R.string.most_liked) |
39 | | - "conferences" -> c.getString(R.string.conferences) |
40 | | - "recent" -> c.getString(R.string.recent) |
41 | | - "live" -> c.getString(R.string.duration_live) |
42 | | - "Featured" -> c.getString(R.string.featured) |
43 | | - "Radio" -> c.getString(R.string.radio) |
44 | | - "trending_gaming" -> c.getString(R.string.trending_gaming) |
45 | | - "trending_music" -> c.getString(R.string.trending_music) |
46 | | - "trending_movies_and_shows" -> c.getString(R.string.trending_movies) |
47 | | - "trending_podcasts_episodes" -> c.getString(R.string.trending_podcasts) |
| 16 | + "Trending" -> context.getString(R.string.trending) |
| 17 | + "Top 50" -> context.getString(R.string.top_50) |
| 18 | + "New & hot" -> context.getString(R.string.new_and_hot) |
| 19 | + "Local" -> context.getString(R.string.local) |
| 20 | + "Recently added" -> context.getString(R.string.recently_added) |
| 21 | + "Most liked" -> context.getString(R.string.most_liked) |
| 22 | + "conferences" -> context.getString(R.string.conferences) |
| 23 | + "recent" -> context.getString(R.string.recent) |
| 24 | + "live" -> context.getString(R.string.duration_live) |
| 25 | + "Featured" -> context.getString(R.string.featured) |
| 26 | + "Radio" -> context.getString(R.string.radio) |
| 27 | + "trending_gaming" -> context.getString(R.string.trending_gaming) |
| 28 | + "trending_music" -> context.getString(R.string.trending_music) |
| 29 | + "trending_movies_and_shows" -> context.getString(R.string.trending_movies) |
| 30 | + "trending_podcasts_episodes" -> context.getString(R.string.trending_podcasts) |
48 | 31 | else -> kioskId |
49 | 32 | } |
50 | 33 | } |
|
0 commit comments