Added l10n for message trimmer

//FREEBIE

Closes #2079
Closes #1868
This commit is contained in:
McLoo 2014-11-07 22:10:07 +01:00 committed by Moxie Marlinspike
parent cd5feccdbf
commit 49f77c9c06
2 changed files with 10 additions and 3 deletions

View File

@ -879,6 +879,12 @@
<!-- media_preview_activity --> <!-- media_preview_activity -->
<string name="media_preview_activity__image_content_description">Image Preview</string> <string name="media_preview_activity__image_content_description">Image Preview</string>
<!-- Trimmer -->
<string name="trimmer__deleting">Deleting...</string>
<string name="trimmer__deleting_old_messages">Deleting old messages...</string>
<string name="trimmer__old_messages_successfully_deleted">Old messages successfully deleted</string>
<!-- EOF --> <!-- EOF -->
</resources> </resources>

View File

@ -5,6 +5,7 @@ import android.content.Context;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.widget.Toast; import android.widget.Toast;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.DatabaseFactory;
import org.thoughtcrime.securesms.database.ThreadDatabase; import org.thoughtcrime.securesms.database.ThreadDatabase;
@ -28,8 +29,8 @@ public class Trimmer {
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
progressDialog.setCancelable(false); progressDialog.setCancelable(false);
progressDialog.setIndeterminate(false); progressDialog.setIndeterminate(false);
progressDialog.setTitle("Deleting..."); progressDialog.setTitle(R.string.trimmer__deleting);
progressDialog.setMessage("Deleting old messages..."); progressDialog.setMessage(context.getString(R.string.trimmer__deleting_old_messages));
progressDialog.setMax(100); progressDialog.setMax(100);
progressDialog.show(); progressDialog.show();
} }
@ -52,7 +53,7 @@ public class Trimmer {
protected void onPostExecute(Void result) { protected void onPostExecute(Void result) {
progressDialog.dismiss(); progressDialog.dismiss();
Toast.makeText(context, Toast.makeText(context,
"Old messages successfully deleted!", R.string.trimmer__old_messages_successfully_deleted,
Toast.LENGTH_LONG).show(); Toast.LENGTH_LONG).show();
} }