Prepare translating

Fix some problems I forgot about earlier, Move more strings to the 
string resource xml
This commit is contained in:
Finn M Glas 2020-05-19 16:37:05 +02:00
parent 9dd663d279
commit ca5b6878d9
No known key found for this signature in database
GPG key ID: 25037A2E81AB459C
4 changed files with 19 additions and 14 deletions

View file

@ -7,7 +7,6 @@ import android.os.Bundle
import android.provider.Settings
import android.view.View
import android.view.WindowManager
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
@ -73,8 +72,8 @@ class SettingsActivity : AppCompatActivity() {
startActivity(intent)
}
fun openFinnWebsite(view: View) { openNewTabWindow("https://www.finnmglas.com/", this) }
fun openGithubRepo(view: View) { openNewTabWindow("https://github.com/finnmglas/Launcher#en", this) }
fun openFinnWebsite(view: View) { openNewTabWindow(getString(R.string.settings_footer_web), this) }
fun openGithubRepo(view: View) { openNewTabWindow(getString(R.string.settings_footer_repo), this) }
fun backHome(view: View) { finish() }
fun setLauncher(view: View) {
@ -86,8 +85,8 @@ class SettingsActivity : AppCompatActivity() {
// on older sdk: manage app details
else {
AlertDialog.Builder(this)
.setTitle("App Info")
.setMessage("Your device does not support this feature. Manage application details instead?")
.setTitle(getString(R.string.alert_cant_choose_launcher))
.setMessage(getString(R.string.alert_cant_choose_launcher_message))
.setPositiveButton(android.R.string.yes,
DialogInterface.OnClickListener { dialog, which ->
try {
@ -106,8 +105,8 @@ class SettingsActivity : AppCompatActivity() {
// Show a dialog prompting for confirmation
fun resetSettingsClick(view: View) {
AlertDialog.Builder(this)
.setTitle("Reset Settings")
.setMessage("This will discard all your App Choices. Sure you want to continue?")
.setTitle(getString(R.string.settings_reset))
.setMessage(getString(R.string.settings_reset_message))
.setPositiveButton(android.R.string.yes,
DialogInterface.OnClickListener { dialog, which ->
resetSettings(this.getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE), this)

View file

@ -281,7 +281,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.95">
app:layout_constraintVertical_bias="0.98">
<TextView
android:layout_width="wrap_content"

View file

@ -1,6 +1,6 @@
<resources>
<string name="fa_icon_calendar">&#xf133;</string>
<string name="fa_icon_home">&#xf015;</string>
<string name="fa_icon_globe">&#xf0ac;</string>
<string name="fa_icon_bars">&#xf0c9;</string>
<string name="fa_icon_calendar" translatable="false">&#xf133;</string>
<string name="fa_icon_home" translatable="false">&#xf015;</string>
<string name="fa_icon_globe" translatable="false">&#xf0ac;</string>
<string name="fa_icon_bars" translatable="false">&#xf0c9;</string>
</resources>

View file

@ -1,7 +1,7 @@
<resources>
<!-- General -->
<string name="app_name">Launcher</string>
<string name="preference_file_key">V3RYR4ND0MK3YCR4P</string>
<string name="app_name" translatable="false">Launcher</string>
<string name="preference_file_key" translatable="false">V3RYR4ND0MK3YCR4P</string>
<!-- Errors, Exceptions (Alerts, Toasts ...) -->
<string name="none_found">None found</string>
@ -10,6 +10,9 @@
<string name="alert_cant_open_message">Want to change its settings (\'add it to the apps screen\')?</string>
<string name="toast_cant_open_message">Open settings to choose an app for this action</string>
<string name="alert_cant_choose_launcher">App Info</string>
<string name="alert_cant_choose_launcher_message">Your device does not support this feature. Manage application details instead?</string>
<!-- Settings -->
<string name="settings_title">Settings</string>
<string name="settings_sub_title1">Applications</string>
@ -25,11 +28,14 @@
<string name="settings_select_launcher">Select Launcher</string>
<string name="settings_reset">Reset Settings</string>
<string name="settings_reset_message">You are going to discard all your preferences. Continue?</string>
<string name="settings_launch">Launch Apps</string>
<string name="settings_uninstall">Uninstall Apps</string>
<string name="settings_home">Back Home</string>
<string name="settings_footer_by">By</string>
<string name="settings_footer_repo">https://github.com/finnmglas/Launcher#en</string>
<string name="settings_footer_web">https://www.finnmglas.com</string>
<!-- Choose Activity -->
<string name="choose_title">Choose App</string>