From 1b1927883b2c08a0c062fa0fcd65e97766218c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Sun, 19 Jan 2014 16:06:23 +0100 Subject: more language fixes and cleanup --- .../keychain/pgp/PgpImportExport.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'OpenPGP-Keychain/src') diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java index 2d112cc72..0a4806239 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/pgp/PgpImportExport.java @@ -24,9 +24,6 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; import org.spongycastle.bcpg.ArmoredOutputStream; import org.spongycastle.openpgp.PGPException; @@ -72,6 +69,12 @@ public class PgpImportExport { } } + public void updateProgress(String message, int current, int total) { + if (mProgress != null) { + mProgress.setProgress(message, current, total); + } + } + public void updateProgress(int current, int total) { if (mProgress != null) { mProgress.setProgress(current, total); @@ -194,11 +197,9 @@ public class PgpImportExport { PGPException, IOException { Bundle returnData = new Bundle(); - if (keyRingMasterKeyIds.size() == 1) { - updateProgress(R.string.progress_exporting_key, 0, 100); - } else { - updateProgress(R.string.progress_exporting_keys, 0, 100); - } + updateProgress( + mContext.getResources().getQuantityString(R.plurals.progress_exporting_key, + keyRingMasterKeyIds.size()), 0, 100); if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { throw new PgpGeneralException( -- cgit v1.2.3