More l10n - for decrypting errors

//FREEBIE

Closes #2231
This commit is contained in:
McLoo 2014-12-17 20:21:04 +01:00 committed by Moxie Marlinspike
parent 33d466a5cc
commit 3ec95f7a8e
4 changed files with 12 additions and 3 deletions

View File

@ -367,12 +367,19 @@
<string name="MessageDisplayHelper_decrypting_please_wait">Decrypting, please wait...</string> <string name="MessageDisplayHelper_decrypting_please_wait">Decrypting, please wait...</string>
<string name="MessageDisplayHelper_message_encrypted_for_non_existing_session">Message encrypted for non-existing session...</string> <string name="MessageDisplayHelper_message_encrypted_for_non_existing_session">Message encrypted for non-existing session...</string>
<!-- EncryptingSmsDatabase -->
<string name="EncryptingSmsDatabase_error_decrypting_message">Error decrypting message.</string>
<!-- ThreadDatabase -->
<string name="ThreadDatabase_error_decrypting_message">Error decrypting message.</string>
<!-- MmsDatabase --> <!-- MmsDatabase -->
<string name="MmsDatabase_connecting_to_mms_server">Connecting to MMS server...</string> <string name="MmsDatabase_connecting_to_mms_server">Connecting to MMS server...</string>
<string name="MmsDatabase_downloading_mms">Downloading MMS...</string> <string name="MmsDatabase_downloading_mms">Downloading MMS...</string>
<string name="MmsDatabase_mms_download_failed">MMS download failed!</string> <string name="MmsDatabase_mms_download_failed">MMS download failed!</string>
<string name="MmsDatabase_downloading">Downloading...</string> <string name="MmsDatabase_downloading">Downloading...</string>
<string name="MmsDatabase_mms_pending_download">Tap and configure MMS settings to continue download.</string> <string name="MmsDatabase_mms_pending_download">Tap and configure MMS settings to continue download.</string>
<string name="MmsDatabase_error_decrypting_message">Error decrypting message.</string>
<!-- MmsMessageRecord --> <!-- MmsMessageRecord -->
<string name="MmsMessageRecord_decrypting_mms_please_wait">Decrypting MMS, please wait...</string> <string name="MmsMessageRecord_decrypting_mms_please_wait">Decrypting MMS, please wait...</string>

View File

@ -22,6 +22,7 @@ import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log; import android.util.Log;
import android.util.Pair; import android.util.Pair;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.crypto.AsymmetricMasterCipher; import org.thoughtcrime.securesms.crypto.AsymmetricMasterCipher;
import org.thoughtcrime.securesms.crypto.AsymmetricMasterSecret; import org.thoughtcrime.securesms.crypto.AsymmetricMasterSecret;
import org.thoughtcrime.securesms.database.model.DisplayRecord; import org.thoughtcrime.securesms.database.model.DisplayRecord;
@ -175,7 +176,7 @@ public class EncryptingSmsDatabase extends SmsDatabase {
} }
} catch (InvalidMessageException e) { } catch (InvalidMessageException e) {
Log.w("EncryptingSmsDatabase", e); Log.w("EncryptingSmsDatabase", e);
return new DisplayRecord.Body("Error decrypting message.", true); return new DisplayRecord.Body(context.getString(R.string.EncryptingSmsDatabase_error_decrypting_message), true);
} }
} }
} }

View File

@ -1046,7 +1046,7 @@ public class MmsDatabase extends Database implements MmsSmsColumns {
} }
} catch (InvalidMessageException e) { } catch (InvalidMessageException e) {
Log.w("MmsDatabase", e); Log.w("MmsDatabase", e);
return new DisplayRecord.Body("Error decrypting message.", true); return new DisplayRecord.Body(context.getString(R.string.MmsDatabase_error_decrypting_message), true);
} }
} }

View File

@ -24,6 +24,7 @@ import android.database.sqlite.SQLiteOpenHelper;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.crypto.MasterCipher; import org.thoughtcrime.securesms.crypto.MasterCipher;
import org.thoughtcrime.securesms.database.model.DisplayRecord; import org.thoughtcrime.securesms.database.model.DisplayRecord;
import org.thoughtcrime.securesms.database.model.MessageRecord; import org.thoughtcrime.securesms.database.model.MessageRecord;
@ -469,7 +470,7 @@ public class ThreadDatabase extends Database {
} }
} catch (InvalidMessageException e) { } catch (InvalidMessageException e) {
Log.w("ThreadDatabase", e); Log.w("ThreadDatabase", e);
return new DisplayRecord.Body("Error decrypting message.", true); return new DisplayRecord.Body(context.getString(R.string.ThreadDatabase_error_decrypting_message), true);
} }
} }