From 29ae28b06fe9f80ae0c14358f919e4e5c3c8aa51 Mon Sep 17 00:00:00 2001 From: Juha Heinanen Date: Sat, 31 Aug 2019 11:00:30 +0300 Subject: [PATCH] - Use strings in all config activity alert messages. --- .../com/tutpro/baresip/ConfigActivity.kt | 23 ++++++++++--------- app/src/main/res/values-fi/strings.xml | 7 +++++- app/src/main/res/values/strings.xml | 6 +++++ 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/app/src/main/kotlin/com/tutpro/baresip/ConfigActivity.kt b/app/src/main/kotlin/com/tutpro/baresip/ConfigActivity.kt index 77854448..7a570777 100644 --- a/app/src/main/kotlin/com/tutpro/baresip/ConfigActivity.kt +++ b/app/src/main/kotlin/com/tutpro/baresip/ConfigActivity.kt @@ -165,8 +165,8 @@ class ConfigActivity : AppCompatActivity() { val listenAddr = listenAddr.text.toString().trim() if (listenAddr != oldListenAddr) { if ((listenAddr != "") && !Utils.checkIpPort(listenAddr)) { - Utils.alertView(this, "Notice", - "Invalid Listen Address '$listenAddr'") + Utils.alertView(this, getString(R.string.notice), + "${getString(R.string.invalid_listen_address)}: $listenAddr") return false } Config.remove("sip_listen") @@ -186,8 +186,8 @@ class ConfigActivity : AppCompatActivity() { val dnsServers = addMissingPorts(dnsServers.text.toString().trim().toLowerCase()) if (dnsServers != oldDnsServers) { if (!checkDnsServers(dnsServers)) { - Utils.alertView(this, "Notice", - "Invalid DNS Servers: $dnsServers") + Utils.alertView(this, getString(R.string.notice), + "${getString(R.string.invalid_dns_servers)}: $dnsServers") return false } Config.remove("dyn_dns") @@ -197,8 +197,8 @@ class ConfigActivity : AppCompatActivity() { Config.add("dns_server", server) Config.add("dyn_dns", "no") if (Api.net_use_nameserver(dnsServers) != 0) { - Utils.alertView(this, "Notice", - "Failed to set DNS servers '$dnsServers'") + Utils.alertView(this, getString(R.string.error), + "${getString(R.string.failed_to_set_dns_servers)}: $dnsServers") return false } } else { @@ -263,8 +263,8 @@ class ConfigActivity : AppCompatActivity() { if (aec.isChecked) { Config.add("module", "webrtc_aec.so") if (Api.module_load("webrtc_aec.so") != 0) { - Utils.alertView(this, "Notice", - "Failed to load Acoustic Echo Cancellation module") + Utils.alertView(this, getString(R.string.error), + getString(R.string.failed_to_load_aec_module)) return false } } else { @@ -276,7 +276,8 @@ class ConfigActivity : AppCompatActivity() { val opusBitRate = opusBitRate.text.toString().trim() if (opusBitRate != oldOpusBitrate) { if (!checkOpusBitRate(opusBitRate)) { - Utils.alertView(this, "Notice", "Invalid Opus Bit Rate: $opusBitRate") + Utils.alertView(this, getString(R.string.notice), + "${getString(R.string.invalid_opus_bitrate)}: $opusBitRate.") return false } Config.remove("opus_bitrate") @@ -288,8 +289,8 @@ class ConfigActivity : AppCompatActivity() { val opusPacketLoss = opusPacketLoss.text.toString().trim() if (opusPacketLoss != oldOpusPacketLoss) { if (!checkOpusPacketLoss(opusPacketLoss)) { - Utils.alertView(this, "Notice", - "Invalid Opus Packet Loss Percentage: $opusPacketLoss") + Utils.alertView(this, getString(R.string.notice), + "${getString(R.string.invalid_opus_packet_loss)}: $opusPacketLoss") return false } Config.remove("opus_inbandfec") diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 4c8d3def..0aa59043 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -175,6 +175,7 @@ jolloin baresip kuuntelee porttia 5060 kaikilla käytössä olevilla osoitteilla. + Virheellinen kuunteluosoite Suosi IPv6-protokollaa Jos merkitty, baresip suosii IPv6-protokollaa, mikäli sekä IPv4 että IPv6 ovat käytettävissä. @@ -185,8 +186,11 @@ on IPv6-osoite ja myös portti annetaan, pitää osoite kirjoittaa sulkujen [] sisään. Esimerkiksi luettelo \'8.8.8.8:53,[2001:4860:4860::8888]:53\' osoittaa Googlen julkisiin DNS-palvelijoihin. + Virheelliset DNS-palvelimet + DNS-palvelinten asetus epäonnistui Akustinen kaiun poisto Jos merkitty, kaikua yritetään poistaa puheluiden aikana. + Kaiunpoistomodulin lataaminen epäonnistui. Opus-koodekin bittinopeus Opus-koodekin käyttämä keskimääräinen enimmäisnopeus. Mahdollisia arvoja ovat @@ -196,7 +200,8 @@ Odotettu Opus audio virran pakettihäviö prosentteina. Mahdolliset arvot ovat 0-100. Oletusarvo on 0, jolloin ennakoiva virheenkorjaus ei ole käytössä. - 0 + Virheellinen Opus-koodekin bittinopeus + Virheellinen Opus-koodekin odotettu pakettihäviö ICE Lite-moodi Jos merkitty, ICE Lite-moodi on käytössä. diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6a350f51..f61372bb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -155,6 +155,7 @@ Check Apps → baresip → Permissions → Storage and that file \'accounts.bs\' available addresses. If left empty (factory default), baresip listens at port 5060 of all available addresses. + Invalid Listen Address 0.0.0.0:5060 Prefer IPv6 Prefer IPv6 if both IPv4 and IPv6 are available. @@ -165,6 +166,8 @@ Check Apps → baresip → Permissions → Storage and that file \'accounts.bs\' also port is given, ip must be written inside brackets []. As an example, list \'8.8.8.8:53,[2001:4860:4860::8888]:53\' points to IPv4 and IPv6 addresses of public Google DNS servers. + Invalid DNS Servers + Failed to set DNS servers TLS Certificate File If checked, file \'cert.pem\' containing TLS certificate and private key of this baresip instance has been or will be loaded from @@ -174,6 +177,7 @@ Check Apps → baresip → Permissions → Storage and that file \'accounts.bs\' of Certificate Authorities has been or will be loaded from Download directory. Acoustic Echo Cancellation If checked, echo cancellation is attempted on call audio. + Failed to load Acoustic Echo Cancellation module. Opus Bit Rate Average maximum bit rate used by Opus audio stream. Valid values are 6000-510000. Factory default is 28000. @@ -183,6 +187,8 @@ Check Apps → baresip → Permissions → Storage and that file \'accounts.bs\' Valid values are 0-100. Factory default is 0, which disables Opus Forward Error Correction (FEC). 0 + Invalid Opus bitrate + Invalid Opus Packet Loss Percentage ICE Lite Mode If checked, ICE Lite Mode is used. Default Call Volume