Updated translations
This commit is contained in:
parent
232fa51ea8
commit
914453d051
130 changed files with 27603 additions and 16775 deletions
|
@ -11,6 +11,7 @@ import androidx.recyclerview.widget.DefaultItemAnimator
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||
import code.name.monkey.retromusic.App
|
||||
import code.name.monkey.retromusic.Constants.APP_INSTAGRAM_LINK
|
||||
import code.name.monkey.retromusic.Constants.APP_TELEGRAM_LINK
|
||||
import code.name.monkey.retromusic.Constants.APP_TWITTER_LINK
|
||||
|
@ -106,6 +107,7 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener {
|
|||
openSource.setOnClickListener(this)
|
||||
pinterestLink.setOnClickListener(this)
|
||||
bugReportLink.setOnClickListener(this)
|
||||
translators.setOnClickListener(this)
|
||||
}
|
||||
|
||||
override fun onClick(view: View) {
|
||||
|
@ -123,6 +125,7 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener {
|
|||
R.id.changelog -> showChangeLogOptions()
|
||||
R.id.openSource -> NavigationUtil.goToOpenSource(this)
|
||||
R.id.bugReportLink -> NavigationUtil.bugReport(this)
|
||||
R.id.translators -> openUrl("");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -141,8 +144,9 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener {
|
|||
|
||||
private fun getAppVersion(): String {
|
||||
return try {
|
||||
val isPro = if (App.isProVersion()) "Pro" else "Free"
|
||||
val packageInfo = packageManager.getPackageInfo(packageName, 0)
|
||||
packageInfo.versionName
|
||||
"${packageInfo.versionName} $isPro"
|
||||
} catch (e: PackageManager.NameNotFoundException) {
|
||||
e.printStackTrace()
|
||||
"0.0.0"
|
||||
|
@ -156,11 +160,10 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener {
|
|||
}
|
||||
|
||||
private fun loadContributors() {
|
||||
val data = assetJsonData
|
||||
val type = object : TypeToken<List<Contributor>>() {
|
||||
|
||||
}.type
|
||||
val contributors = Gson().fromJson<List<Contributor>>(data, type)
|
||||
val contributors = Gson().fromJson<List<Contributor>>(assetJsonData, type)
|
||||
|
||||
val contributorAdapter = ContributorAdapter(contributors)
|
||||
recyclerView.layoutManager = LinearLayoutManager(this)
|
||||
|
|
|
@ -216,7 +216,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C
|
|||
if (lastFmAlbum.album.wiki != null) {
|
||||
aboutAlbumText.show()
|
||||
aboutAlbumTitle.show()
|
||||
aboutAlbumTitle.text = String.format("About %s", lastFmAlbum.album.name)
|
||||
aboutAlbumTitle.text = String.format(getString(R.string.about_album_label), lastFmAlbum.album.name)
|
||||
aboutAlbumText.text = lastFmAlbum.album.wiki.content
|
||||
}
|
||||
if (lastFmAlbum.album.listeners.isNotEmpty()) {
|
||||
|
|
|
@ -51,6 +51,7 @@ import org.jetbrains.annotations.Nullable;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import code.name.monkey.appthemehelper.util.ATHUtil;
|
||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
|
||||
|
@ -308,7 +309,8 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
|
|||
key.equals(PreferenceUtil.TOGGLE_HOME_BANNER) || key.equals(PreferenceUtil.TOGGLE_ADD_CONTROLS) ||
|
||||
key.equals(PreferenceUtil.ALBUM_COVER_STYLE) || key.equals(PreferenceUtil.HOME_ARTIST_GRID_STYLE) ||
|
||||
key.equals(PreferenceUtil.ALBUM_COVER_TRANSFORM) || key.equals(PreferenceUtil.DESATURATED_COLOR) ||
|
||||
key.equals(PreferenceUtil.TAB_TEXT_MODE) || key.equals(PreferenceUtil.LIBRARY_CATEGORIES)
|
||||
key.equals(PreferenceUtil.TAB_TEXT_MODE) || key.equals(PreferenceUtil.LANGUAGE_NAME) ||
|
||||
key.equals(PreferenceUtil.LIBRARY_CATEGORIES)
|
||||
) {
|
||||
postRecreate();
|
||||
}
|
||||
|
@ -768,5 +770,11 @@ public class MainActivity extends AbsSlidingMusicPanelActivity
|
|||
setTitle(R.string.action_search);
|
||||
}
|
||||
}, 3000);
|
||||
|
||||
Locale[] locales = Locale.getAvailableLocales();
|
||||
|
||||
for (Locale l : locales) {
|
||||
Log.d(TAG, "setupToolbar: " + l.toLanguageTag());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ abstract class AbsBaseActivity : AbsThemeActivity() {
|
|||
return super.dispatchKeyEvent(event)
|
||||
}
|
||||
|
||||
protected fun showOverflowMenu() {
|
||||
private fun showOverflowMenu() {
|
||||
}
|
||||
|
||||
protected open fun requestPermissions() {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package code.name.monkey.retromusic.activities.base
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Bundle
|
||||
|
@ -17,10 +18,12 @@ import code.name.monkey.appthemehelper.util.ATHUtil
|
|||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.appthemehelper.util.TintHelper
|
||||
import code.name.monkey.appthemehelper.util.VersionUtils
|
||||
import code.name.monkey.retromusic.LanguageContextWrapper
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
import code.name.monkey.retromusic.util.RetroUtil
|
||||
import code.name.monkey.retromusic.util.theme.ThemeManager
|
||||
import java.util.*
|
||||
|
||||
abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
|
||||
|
||||
|
@ -35,6 +38,7 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
|
|||
toggleScreenOn()
|
||||
}
|
||||
|
||||
|
||||
private fun updateTheme() {
|
||||
setTheme(ThemeManager.getThemeResValue(this))
|
||||
setDefaultNightMode(ThemeManager.getNightMode(this))
|
||||
|
@ -206,4 +210,11 @@ abstract class AbsThemeActivity : ATHToolbarActivity(), Runnable {
|
|||
}
|
||||
return super.onKeyDown(keyCode, event)
|
||||
}
|
||||
|
||||
override fun attachBaseContext(newBase: Context?) {
|
||||
val code = PreferenceUtil.getInstance(newBase).languageCode
|
||||
if (code != "auto") {
|
||||
super.attachBaseContext(LanguageContextWrapper.wrap(newBase, Locale(code)))
|
||||
} else super.attachBaseContext(newBase)
|
||||
}
|
||||
}
|
|
@ -9,6 +9,7 @@ import android.os.Build;
|
|||
import androidx.annotation.IntRange;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||
|
||||
|
@ -57,6 +58,7 @@ public class DeviceInfo {
|
|||
private final int versionCode;
|
||||
|
||||
private final String versionName;
|
||||
private final String selectedLang;
|
||||
|
||||
public DeviceInfo(Context context) {
|
||||
PackageInfo packageInfo;
|
||||
|
@ -76,6 +78,7 @@ public class DeviceInfo {
|
|||
baseTheme = PreferenceUtil.getInstance(context).getBaseTheme();
|
||||
nowPlayingTheme = context.getString(PreferenceUtil.getInstance(context).getNowPlayingScreen().getTitleRes());
|
||||
isAdaptive = PreferenceUtil.getInstance(context).getAdaptiveColor();
|
||||
selectedLang = PreferenceUtil.getInstance(context).getLanguageCode();
|
||||
}
|
||||
|
||||
public String toMarkdown() {
|
||||
|
@ -97,6 +100,7 @@ public class DeviceInfo {
|
|||
+ "<tr><td>ABIs</td><td>" + Arrays.toString(abis) + "</td></tr>\n"
|
||||
+ "<tr><td>ABIs (32bit)</td><td>" + Arrays.toString(abis32Bits) + "</td></tr>\n"
|
||||
+ "<tr><td>ABIs (64bit)</td><td>" + Arrays.toString(abis64Bits) + "</td></tr>\n"
|
||||
+ "<tr><td>Language</td><td>" + selectedLang + "</td></tr>\n"
|
||||
+ "</table>\n";
|
||||
}
|
||||
|
||||
|
@ -119,6 +123,8 @@ public class DeviceInfo {
|
|||
+ "ABIs (64bit): " + Arrays.toString(abis64Bits) + "\n"
|
||||
+ "Base theme: " + baseTheme + "\n"
|
||||
+ "Now playing theme: " + nowPlayingTheme + "\n"
|
||||
+ "Adaptive: " + isAdaptive;
|
||||
+ "Adaptive: " + isAdaptive + "\n"
|
||||
+ "System language: " + Locale.getDefault().toLanguageTag() + "\n"
|
||||
+ "In-App Language: " + selectedLang;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue