more lang stuff

This commit is contained in:
LagradOst 2021-09-02 17:45:00 +02:00
parent 3a203d22c0
commit c79397d5ef
5 changed files with 39 additions and 17 deletions

View file

@ -1166,12 +1166,12 @@ class PlayerFragment : Fragment() {
override fun onAnimationEnd(animation: Animation?) {
exo_rew_text.post {
exo_rew_text.text = getString(R.string.rew_text_format).format(fastForwardTime)
exo_rew_text.text = getString(R.string.rew_text_regular_format).format(fastForwardTime)
}
}
})
exo_rew_text.startAnimation(goLeft)
exo_rew_text.text = getString(R.string.rew_text_regular_format).format(fastForwardTime)
exo_rew_text.text = getString(R.string.rew_text_format).format(fastForwardTime)
seekTime(fastForwardTime * -1000L)
}
@ -1191,12 +1191,12 @@ class PlayerFragment : Fragment() {
override fun onAnimationEnd(animation: Animation?) {
exo_ffwd_text.post {
exo_ffwd_text.text = getString(R.string.ffw_text_format).format(fastForwardTime)
exo_ffwd_text.text = getString(R.string.ffw_text_regular_format).format(fastForwardTime)
}
}
})
exo_ffwd_text.startAnimation(goRight)
exo_ffwd_text.text = getString(R.string.ffw_text_regular_format).format(fastForwardTime)
exo_ffwd_text.text = getString(R.string.ffw_text_format).format(fastForwardTime)
seekTime(fastForwardTime * 1000L)
}

View file

@ -154,7 +154,7 @@ class InAppUpdater {
val request = DownloadManager.Request(Uri.parse(url))
.setMimeType("application/vnd.android.package-archive")
.setTitle("CloudStream update")
.setTitle("CloudStream " + getString(R.string.update))
.setDestinationInExternalPublicDir(
Environment.DIRECTORY_DOWNLOADS,
"CloudStream.apk"
@ -234,13 +234,13 @@ class InAppUpdater {
}
val builder: AlertDialog.Builder = AlertDialog.Builder(this)
builder.setTitle("New update found!\n${currentVersion?.versionName} -> ${update.updateVersion}")
builder.setTitle(getString(R.string.new_update_format).format(currentVersion?.versionName,update.updateVersion))
builder.setMessage("${update.changelog}")
val context = this
builder.apply {
setPositiveButton("Update") { _, _ ->
showToast(context, "Download started", Toast.LENGTH_LONG)
setPositiveButton(R.string.update) { _, _ ->
showToast(context, R.string.download_started, Toast.LENGTH_LONG)
thread {
val downloadStatus =
normalSafeApiCall { context.downloadUpdate(update.updateURL) } ?: false
@ -248,7 +248,7 @@ class InAppUpdater {
runOnUiThread {
showToast(
context,
"Download Failed",
R.string.download_failed,
Toast.LENGTH_LONG
)
}
@ -256,10 +256,10 @@ class InAppUpdater {
}
}
setNegativeButton("Cancel") { _, _ -> }
setNegativeButton(R.string.cancel) { _, _ -> }
if (checkAutoUpdate) {
setNeutralButton("Don't show again") { _, _ ->
setNeutralButton(R.string.dont_show_again) { _, _ ->
settingsManager.edit().putBoolean("auto_update", false).apply()
}
}

View file

@ -465,7 +465,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Lock"
android:text="@string/lock"
android:gravity="center"
android:paddingStart="10dp"
android:paddingEnd="10dp"
@ -514,7 +514,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Resize"
android:text="@string/resize"
android:gravity="center"
android:paddingStart="10dp"
android:paddingEnd="10dp"
@ -607,7 +607,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Source"
android:text="@string/source"
android:gravity="center"
android:paddingStart="10dp"
@ -653,7 +653,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Skip OP"
android:text="@string/skip_op"
android:gravity="start|center"
android:paddingStart="10dp"
@ -697,7 +697,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Next Episode"
android:text="@string/next_episode"
android:gravity="start|center"
android:paddingStart="10dp"

View file

@ -1,6 +1,7 @@
<!--https://newbedev.com/concatenate-multiple-strings-in-xml-->
<resources>
<string name="rated_format">Betygsatt: %.1f</string>
<string name="player_speed_text_format">Hastighet (%.2fx)</string>
<string name="app_name">CloudStream</string>
<string name="title_home">Hem</string>
@ -182,4 +183,14 @@
<string name="no_update_found">Ingen uppdatering hittad</string>
<string name="check_for_update">Sök efter uppdatering</string>
<string name="lock">Skärmlås</string>
<string name="resize">Bildförhållande</string>
<string name="source">Källa</string>
<string name="skip_op">Hoppa över OP</string>
<string name="dont_show_again">Visa inte igen</string>
<string name="download_started">Nerladdning startad</string>
<string name="download_failed">Nerladdning Misslyckades</string>
<string name="update">Uppdatering</string>
</resources>

View file

@ -20,8 +20,9 @@
<string name="rew_text_format" translatable="false">-%d</string>
<string name="ffw_text_regular_format" translatable="false">%d</string>
<string name="rew_text_regular_format" translatable="false">%d</string>
<string name="player_speed_text_format" translatable="false">Speed (%fx)</string>
<string name="player_speed_text_format">Speed (%.2fx)</string>
<string name="rated_format">Rated: %.1f</string>
<string name="new_update_format">New update found!\n%s -> %s</string>
<string name="app_name">CloudStream</string>
<string name="title_home">Home</string>
@ -211,4 +212,14 @@
<string name="no_update_found">No Update Found</string>
<string name="check_for_update">Check for Update</string>
<string name="lock">Lock</string>
<string name="resize">Resize</string>
<string name="source">Source</string>
<string name="skip_op">Skip OP</string>
<string name="dont_show_again">Don\'t show again</string>
<string name="download_started">Download started</string>
<string name="download_failed">Download Failed</string>
<string name="update">Update</string>
</resources>