Localize strings
This commit is contained in:
@@ -44,7 +44,7 @@ enum class TetherType(@DrawableRes val icon: Int) {
|
||||
|
||||
private fun Pair<String?, Resources>.getRegexs(name: String) = second.getIdentifier(name, "array", first).let {
|
||||
if (it == 0) {
|
||||
Timber.i("$name is empty")
|
||||
if (name == "config_tether_wigig_regexs") Timber.i("$name is empty") else Timber.w(Exception(name))
|
||||
emptyList()
|
||||
} else second.getStringArray(it).filterNotNull().map { it.toPattern() }
|
||||
}
|
||||
|
||||
@@ -148,7 +148,8 @@ class WifiApDialogFragment : AlertDialogFragment<WifiApDialogFragment.Arg, WifiA
|
||||
if (!arg.readOnly) dialogView.password.addTextChangedListener(this@WifiApDialogFragment)
|
||||
if (!arg.p2pMode && Build.VERSION.SDK_INT < 28) dialogView.autoShutdown.isGone = true
|
||||
if (arg.p2pMode || Build.VERSION.SDK_INT >= 30) {
|
||||
dialogView.timeoutWrapper.helperText = "Default timeout: ${TetherTimeoutMonitor.defaultTimeout}ms"
|
||||
dialogView.timeoutWrapper.helperText = getString(R.string.wifi_hotspot_timeout_default,
|
||||
TetherTimeoutMonitor.defaultTimeout)
|
||||
if (!arg.readOnly) dialogView.timeout.addTextChangedListener(this@WifiApDialogFragment)
|
||||
} else dialogView.timeoutWrapper.isGone = true
|
||||
if (Build.VERSION.SDK_INT >= 23 || arg.p2pMode) dialogView.band.apply {
|
||||
|
||||
Reference in New Issue
Block a user