translate encryption settings
This commit is contained in:
@@ -20,6 +20,7 @@ import java.util.List;
|
||||
|
||||
import ru.vtosters.lite.encryption.EncryptProvider;
|
||||
import ru.vtosters.lite.encryption.base.IMProcessor;
|
||||
import ru.vtosters.lite.utils.AndroidUtils;
|
||||
import ru.vtosters.lite.utils.ThemesUtils;
|
||||
|
||||
public class CryptImHook{
|
||||
@@ -40,7 +41,7 @@ public class CryptImHook{
|
||||
int enabledPosition = 0;
|
||||
|
||||
String[] titles = new String[processors.size() + 1];
|
||||
titles[0] = "Отключить шифрование";
|
||||
titles[0] = AndroidUtils.getString("encryption_disable");
|
||||
|
||||
for (int i = 0; i < processors.size(); i++) {
|
||||
IMProcessor proc = processors.get(i);
|
||||
@@ -57,7 +58,7 @@ public class CryptImHook{
|
||||
|
||||
IMProcessor finalEnabled = enabled;
|
||||
new AlertDialog.Builder(getCurrentActivity())
|
||||
.setTitle("Настройки шифрования")
|
||||
.setTitle(AndroidUtils.getString("encryption_sett"))
|
||||
.setSingleChoiceItems(titles, enabledPosition, (dialog, which) -> {
|
||||
if (which == 0) {
|
||||
if (finalEnabled != null) finalEnabled.disableEncryptFor(peerId);
|
||||
@@ -86,7 +87,7 @@ public class CryptImHook{
|
||||
}
|
||||
|
||||
if (enabled != null && enabled.isPublic()) {
|
||||
sendToast("Выбранный алгоритм публичный и не имеет настроек!");
|
||||
sendToast(AndroidUtils.getString("encryption_public_algorithm_error"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -106,8 +107,8 @@ public class CryptImHook{
|
||||
|
||||
IMProcessor finalEnabled = enabled;
|
||||
new AlertDialog.Builder(ctx)
|
||||
.setTitle("Введите ключ шифрования")
|
||||
.setMessage("Используемый алгоритм: " + enabled.getUIName() + ".\nУчтите, что если поле будет пустым, то будет использоваться ключ по умолчанию.")
|
||||
.setTitle(AndroidUtils.getString("encryption_enter_key"))
|
||||
.setMessage(String.format(AndroidUtils.getString("encryption_current_algorithm_title"), enabled.getUIName()))
|
||||
.setView(linearLayout)
|
||||
.setPositiveButton(android.R.string.ok, (dialog, which) -> {
|
||||
Editable edit = editText.getText();
|
||||
|
||||
@@ -6154,4 +6154,9 @@
|
||||
|
||||
<string name="encryption">Метод шифрования</string>
|
||||
<string name="encryption_sett">Настройки шифрования</string>
|
||||
<string name="encryption_disable">Отключить шифрование</string>
|
||||
<string name="encryption_settings_title">Настройки шифрования</string>
|
||||
<string name="encryption_public_algorithm_error">Выбранный алгоритм публичный и не имеет настроек!</string>
|
||||
<string name="encryption_enter_key">Введите ключ шифрования</string>
|
||||
<string name="encryption_current_algorithm_title">Используемый алгоритм: %1$s.\nУчтите, что если поле будет пустым, то будет использоваться ключ по умолчанию.</string>
|
||||
</resources>
|
||||
@@ -6292,4 +6292,9 @@ May look like a fake leaving the online"</string>
|
||||
|
||||
<string name="encryption">Encryption method</string>
|
||||
<string name="encryption_sett">Encryption settings</string>
|
||||
<string name="encryption_disable">Disable encryption</string>
|
||||
<string name="encryption_settings_title">Encryption settings</string>
|
||||
<string name="encryption_public_algorithm_error">The selected algorithm is public and has no settings!</string>
|
||||
<string name="encryption_enter_key">Enter encryption key</string>
|
||||
<string name="encryption_current_algorithm_title">Algorithm used: %1$s.\nPlease note that if the field is empty, the default key will be used.</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user