enc-export: localize snackbar strings
This commit is contained in:
@@ -423,7 +423,7 @@ public class BackupCodeFragment extends CryptoOperationFragment<ExportKeyringPar
|
|||||||
File file = new File(Constants.Path.APP_DIR, "backup_" + date + (mExportSecret ? ".gpg" : ".pub.gpg"));
|
File file = new File(Constants.Path.APP_DIR, "backup_" + date + (mExportSecret ? ".gpg" : ".pub.gpg"));
|
||||||
|
|
||||||
if (!overwrite && file.exists()) {
|
if (!overwrite && file.exists()) {
|
||||||
Notify.create(activity, "Backup already exists!", Style.WARN, new ActionListener() {
|
Notify.create(activity, R.string.snack_backup_exists, Style.WARN, new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onAction() {
|
public void onAction() {
|
||||||
saveFile(true);
|
saveFile(true);
|
||||||
@@ -434,9 +434,9 @@ public class BackupCodeFragment extends CryptoOperationFragment<ExportKeyringPar
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
FileHelper.copyUriData(activity, mCachedExportUri, Uri.fromFile(file));
|
FileHelper.copyUriData(activity, mCachedExportUri, Uri.fromFile(file));
|
||||||
Notify.create(activity, "Saved to /sdcard/OpenKeychain", Style.OK).show();
|
Notify.create(activity, R.string.snack_backup_saved_dir, Style.OK).show();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Notify.create(activity, "Error saving backup", Style.ERROR).show();
|
Notify.create(activity, R.string.snack_backup_error_saving, Style.ERROR).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -458,9 +458,9 @@ public class BackupCodeFragment extends CryptoOperationFragment<ExportKeyringPar
|
|||||||
try {
|
try {
|
||||||
Uri outputUri = data.getData();
|
Uri outputUri = data.getData();
|
||||||
FileHelper.copyUriData(activity, mCachedExportUri, outputUri);
|
FileHelper.copyUriData(activity, mCachedExportUri, outputUri);
|
||||||
Notify.create(activity, "Backup saved", Style.OK).show();
|
Notify.create(activity, R.string.snack_backup_saved, Style.OK).show();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Notify.create(activity, "Error saving backup!", Style.ERROR).show();
|
Notify.create(activity, R.string.snack_backup_error_saving, Style.ERROR).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,9 +142,9 @@ public class Notify {
|
|||||||
return create(activity, text, LENGTH_LONG, style);
|
return create(activity, text, LENGTH_LONG, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Showable create(Activity activity, String text, Style style,
|
public static Showable create(Activity activity, int textResId, Style style,
|
||||||
ActionListener actionListener, int actionResId) {
|
ActionListener actionListener, int actionResId) {
|
||||||
return create(activity, text, LENGTH_LONG, style, actionListener, actionResId);
|
return create(activity, textResId, LENGTH_LONG, style, actionListener, actionResId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Showable create(Activity activity, int textResId, int duration, Style style,
|
public static Showable create(Activity activity, int textResId, int duration, Style style,
|
||||||
|
|||||||
@@ -1651,5 +1651,9 @@
|
|||||||
<string name="backup_code_wrong">"The backup code you entered is wrong!\nDid you write it down correctly?"</string>
|
<string name="backup_code_wrong">"The backup code you entered is wrong!\nDid you write it down correctly?"</string>
|
||||||
<string name="btn_backup_share">"Share backup"</string>
|
<string name="btn_backup_share">"Share backup"</string>
|
||||||
<string name="btn_backup_save">"Save backup"</string>
|
<string name="btn_backup_save">"Save backup"</string>
|
||||||
|
<string name="snack_backup_error_saving">"Error saving backup!"</string>
|
||||||
|
<string name="snack_backup_saved">"Backup saved"</string>
|
||||||
|
<string name="snack_backup_exists">"Backup already exists!"</string>
|
||||||
|
<string name="snack_backup_saved_dir">"Saved to OpenKeychain directory"</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user