diff options
-rw-r--r-- | res/values-es/strings.xml | 14 | ||||
-rw-r--r-- | res/values/strings.xml | 2 | ||||
-rw-r--r-- | src/eu/siacs/conversations/ui/ConversationActivity.java | 2 | ||||
-rw-r--r-- | src/eu/siacs/conversations/ui/ConversationFragment.java | 2 | ||||
-rw-r--r-- | src/eu/siacs/conversations/utils/UIHelper.java | 12 |
5 files changed, 18 insertions, 14 deletions
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index 78d40c23..c4330d5d 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -15,6 +15,8 @@ <string name="action_delete_contact">Eliminar contacto de la lista</string> <string name="title_activity_contacts">Contactos</string> <string name="just_now">ahora</string> + <string name="minutes_ago">min</string> + <string name="unread_conversations">conversaciones por leer</string> <string name="sending">enviando…</string> <string name="announce_pgp">Renovar anuncio PGP</string> <string name="encrypted_message">Desencriptando mensaje. Espera por favor…</string> @@ -31,7 +33,7 @@ <string name="share_with">Compartir con</string> <string name="ask_again"><u>Pulsa para preguntar otra vez</u></string> <string name="show_otr_key">Huella dactilar OTR</string> - <string name="no_otr_fingerprint">No se ha generado una huella dactilar OTR. Simplemente continúa y comienza una conversación encriptada</string> + <string name="no_otr_fingerprint">No se ha generado una huella dactilar OTR. Continúa y comienza una conversación encriptada</string> <string name="start_conversation">Comenzar conversación</string> <string name="invite_contacts">Invitar contactos</string> <string name="invite_contacts_to_existing">Invitar a conferencia existente</string> @@ -89,8 +91,8 @@ <string name="offering">ofreciendo…</string> <string name="no_pgp_key">Clave openPGP no encontrada</string> <string name="contact_has_no_pgp_key">Conversations no ha podido encriptar tus mensajes porque tu contacto no está anunciando su clave publica.\n\n<small>Por favor, pide a tu contacto que configure openPGP.</small></string> - <string name="encrypted_message_received"><i>Mensaje encriptado recibido. Pulsa para desencriptar y ver.</i></string> - <string name="encrypted_image_received"><i>Imagen encriptada recibida. Pulsa para desencriptar y ver.</i></string> + <string name="encrypted_message_received"><i>Mensaje encriptado recibido. Pulsa para ver.</i></string> + <string name="encrypted_image_received"><i>Imagen encriptada recibida. Pulsa para ver.</i></string> <string name="image_file"><i>Imagen recibida. Pulsa para ver</i></string> <string name="otr_file_transfer">Encriptación con OTR no disponible</string> <string name="otr_file_transfer_msg">Desafortunadamente la encriptación con OTR no está disponible para transferencia de archivos. Puedes selecionar encriptación con openPGP o no usar encriptación.</string> @@ -124,7 +126,7 @@ <string name="accept">Aceptar</string> <string name="error">Ha ocurrido un error</string> <string name="pref_grant_presence_updates">Suscripción de presencia</string> - <string name="pref_grant_presence_updates_summary">Por defecto otorgar y pedir suscripciones de presencia de los contactos que ha creado</string> + <string name="pref_grant_presence_updates_summary">Por defecto otorgar y pedir suscripciones de presencia de los contactos que has creado</string> <string name="subscriptions">Suscripciones</string> <string name="your_account">Tu cuenta</string> <string name="keys">Claves</string> @@ -138,7 +140,7 @@ <string name="error_compressing_image">Error convirtiendo el archivo de imagen</string> <string name="error_file_not_found">Archivo no encontrado</string> <string name="error_io_exception">Error I/O general. ¿Puede que te hayas quedado sin espacio en disco?</string> - <string name="error_security_exception_during_image_copy">La aplicación que usas para seleccionar imágenes no nos proporciona suficientes permisos para leer el archivo.\n\n<small>Utiliza un explorador de ficheros diferente para seleccionar la imagen</small></string> + <string name="error_security_exception_during_image_copy">La aplicación que usas para seleccionar imágenes no proporciona suficientes permisos para leer el archivo.\n\n<small>Utiliza un explorador de ficheros diferente para seleccionar la imagen</small></string> <string name="account_status">Estado:</string> <string name="account_status_unknown">Desconocido</string> <string name="account_status_disabled">Deshabilitado temporalmente</string> @@ -167,5 +169,5 @@ <string name="account_settings">Configuración de cuenta</string> <string name="save">Guardar</string> <string name="passwords_do_not_match">Las contraseñas no coinciden</string> - <string name="invalid_jid">Éste no es un identificador de Jabber válido</string> + <string name="invalid_jid">El identificador no es un identificador de Jabber válido</string> </resources>
\ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index 2b5c25f2..9db67fdf 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -15,6 +15,8 @@ <string name="action_delete_contact">Delete from roster</string> <string name="title_activity_contacts">Contacts</string> <string name="just_now">just now</string> + <string name="minutes_ago">min ago</string> + <string name="unread_conversations">unread Conversations</string> <string name="sending">sending…</string> <string name="announce_pgp">Renew PGP announcement</string> <string name="encrypted_message">Decrypting message. Please wait…</string> diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index 346cd2fc..f1995935 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -223,7 +223,7 @@ public class ConversationActivity extends XmppActivity { } ((TextView) view.findViewById(R.id.conversation_lastupdate)) - .setText(UIHelper.readableTimeDifference(conv + .setText(UIHelper.readableTimeDifference(getContext(), conv .getLatestMessage().getTimeSent())); ImageView profilePicture = (ImageView) view diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index 7ab01936..41837d8f 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -233,7 +233,7 @@ public class ConversationFragment extends Fragment { viewHolder.indicator.setVisibility(View.VISIBLE); } - String formatedTime = UIHelper.readableTimeDifference(message + String formatedTime = UIHelper.readableTimeDifference(getContext(), message .getTimeSent()); if (message.getStatus() <= Message.STATUS_RECIEVED) { if ((filesize != null) && (info != null)) { diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java index ff99c091..d626d421 100644 --- a/src/eu/siacs/conversations/utils/UIHelper.java +++ b/src/eu/siacs/conversations/utils/UIHelper.java @@ -50,16 +50,16 @@ public class UIHelper { private static final int FG_COLOR = 0xFFE5E5E5; private static final int TRANSPARENT = 0x00000000; - public static String readableTimeDifference(long time) { + public static String readableTimeDifference(Context context, long time) { if (time == 0) { - return "just now"; + return context.getString(R.string.just_now); } Date date = new Date(time); long difference = (System.currentTimeMillis() - time) / 1000; if (difference < 60) { - return "just now"; + return context.getString(R.string.just_now); } else if (difference < 60 * 10) { - return difference / 60 + " min ago"; + return difference / 60 + " " + context.getString(R.string.minutes_ago); } else if (difference < 60 * 60 * 24) { SimpleDateFormat sdf = new SimpleDateFormat("HH:mm",Locale.US); return sdf.format(date); @@ -395,7 +395,7 @@ public class UIHelper { .bigText(bigText.toString())); } else { NotificationCompat.InboxStyle style = new NotificationCompat.InboxStyle(); - style.setBigContentTitle(unread.size() + " unread Conversations"); + style.setBigContentTitle(unread.size() + " " + context.getString(R.string.unread_conversations)); StringBuilder names = new StringBuilder(); for (int i = 0; i < unread.size(); ++i) { targetUuid = unread.get(i).getUuid(); @@ -407,7 +407,7 @@ public class UIHelper { style.addLine(Html.fromHtml("<b>" + unread.get(i).getName(useSubject) + "</b> " + unread.get(i).getLatestMessage().getReadableBody(context))); } - mBuilder.setContentTitle(unread.size() + " unread Conversations"); + mBuilder.setContentTitle(unread.size() + " " + context.getString(R.string.unread_conversations)); mBuilder.setContentText(names.toString()); mBuilder.setStyle(style); } |