Commit b44306ea authored by Ricki Hirner's avatar Ricki Hirner 🐑

Rewrite startup strings

parent abb08508
......@@ -30,7 +30,7 @@ import at.bitfire.davdroid.R
import at.bitfire.davdroid.log.Logger
import at.bitfire.davdroid.resource.LocalTaskList
import at.bitfire.davdroid.settings.ISettings
import org.apache.commons.lang3.StringUtils
import org.apache.commons.lang3.text.WordUtils
import java.util.*
import java.util.logging.Level
......@@ -130,15 +130,15 @@ class StartupDialogFragment: DialogFragment(), LoaderManager.LoaderCallbacks<ISe
Mode.AUTOSTART_PERMISSIONS ->
AlertDialog.Builder(activity)
.setIcon(R.drawable.ic_error_dark)
.setTitle(getString(R.string.startup_autostart_permission, StringUtils.capitalize(Build.MANUFACTURER)))
.setMessage(R.string.startup_autostart_permission_message)
.setTitle(R.string.startup_autostart_permission)
.setMessage(getString(R.string.startup_autostart_permission_message, WordUtils.capitalize(Build.MANUFACTURER.toLowerCase())))
.setPositiveButton(R.string.startup_more_info) { _, _ ->
val intent = Intent(Intent.ACTION_VIEW, App.homepageUrl(requireActivity()).buildUpon()
.appendPath("faq").appendEncodedPath("automatic-synchronization-is-not-run-as-expected/").build())
if (intent.resolveActivity(activity.packageManager) != null)
activity.startActivity(intent)
}
.setNeutralButton(android.R.string.ok) { _, _ -> }
.setNeutralButton(R.string.startup_not_now) { _, _ -> }
.setNegativeButton(R.string.startup_dont_show_again) { _, _ ->
settings?.putBoolean(HINT_AUTOSTART_PERMISSIONS, false)
}
......@@ -155,7 +155,7 @@ class StartupDialogFragment: DialogFragment(), LoaderManager.LoaderCallbacks<ISe
if (intent.resolveActivity(activity.packageManager) != null)
activity.startActivity(intent)
}
.setNeutralButton(android.R.string.ok) { _, _ -> }
.setNeutralButton(R.string.startup_not_now) { _, _ -> }
.setNegativeButton(R.string.startup_dont_show_again) { _: DialogInterface, _: Int ->
settings?.putBoolean(HINT_BATTERY_OPTIMIZATIONS, false)
}
......@@ -178,7 +178,7 @@ class StartupDialogFragment: DialogFragment(), LoaderManager.LoaderCallbacks<ISe
if (intent.resolveActivity(activity.packageManager) != null)
activity.startActivity(intent)
}
.setNeutralButton(android.R.string.ok) { _, _ -> }
.setNeutralButton(R.string.startup_not_now) { _, _ -> }
.setNegativeButton(R.string.startup_dont_show_again) { _, _ ->
settings?.putBoolean(HINT_GOOGLE_PLAY_ACCOUNTS_REMOVED, false)
}
......@@ -200,7 +200,7 @@ class StartupDialogFragment: DialogFragment(), LoaderManager.LoaderCallbacks<ISe
else
Logger.log.warning("No market app available, can't install OpenTasks")
}
.setNeutralButton(android.R.string.ok) { _, _ -> }
.setNeutralButton(R.string.startup_not_now) { _, _ -> }
.setNegativeButton(R.string.startup_dont_show_again) { _: DialogInterface, _: Int ->
settings?.putBoolean(HINT_OPENTASKS_NOT_INSTALLED, false)
}
......
......@@ -44,6 +44,7 @@
android:layout_gravity="center"
android:padding="1sp"
android:background="@android:color/transparent"
android:layout_marginLeft="4dp"
app:srcCompat="@drawable/ic_content_copy_dark"
android:contentDescription="@string/collection_properties_copy_url" />
......
......@@ -32,12 +32,13 @@
<string name="notification_channel_sync_status">Status messages</string>
<!-- startup dialogs -->
<string name="startup_autostart_permission">%s auto-start permission</string>
<string name="startup_autostart_permission_message">Device firmware may prevent automatic synchronization. You may have to allow automatic synchronization manually.</string>
<string name="startup_battery_optimization">Battery Optimization</string>
<string name="startup_battery_optimization_message">Android may disable/reduce DAVdroid synchronization after a few days. To prevent this, turn off battery optimization.</string>
<string name="startup_autostart_permission">Automatic synchronization</string>
<string name="startup_autostart_permission_message">%s firmware often blocks automatic synchronization. In this case, allow automatic synchronization in your Android settings.</string>
<string name="startup_battery_optimization">Scheduled synchronization</string>
<string name="startup_battery_optimization_message">Your device will restrain DAVdroid synchronization. To enforce regular DAVdroid sync intervals, turn off \"battery optimization\".</string>
<string name="startup_battery_optimization_disable">Turn off for DAVdroid</string>
<string name="startup_dont_show_again">Don\'t show again</string>
<string name="startup_not_now">Not now</string>
<string name="startup_donate">Open-Source Information</string>
<string name="startup_donate_message">We\'re happy that you use DAVdroid, which is open-source software (GPLv3). Because developing DAVdroid is hard work and took us thousands of working hours, please consider a donation.</string>
<string name="startup_donate_now">Show donation page</string>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment