add "...sent a location" strings for Conversation list

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2021-05-31 19:12:06 +02:00 committed by Andy Scherzinger
parent 095c13172c
commit e8a9fa6303
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B
2 changed files with 9 additions and 0 deletions

View File

@ -200,6 +200,13 @@ public class ChatMessage implements ExtendedIMessage, MessageContentType, Messag
return (String.format(NextcloudTalkApplication.Companion.getSharedApplication().getResources().getString(R.string.nc_sent_an_attachment), return (String.format(NextcloudTalkApplication.Companion.getSharedApplication().getResources().getString(R.string.nc_sent_an_attachment),
!TextUtils.isEmpty(getActorDisplayName()) ? getActorDisplayName() : NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_guest))); !TextUtils.isEmpty(getActorDisplayName()) ? getActorDisplayName() : NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_guest)));
} }
} else if (getMessageType().equals(MessageType.SINGLE_NC_GEOLOCATION_MESSAGE)) {
if (getActorId().equals(getActiveUser().getUserId())) {
return (NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_sent_location_you));
} else {
return (String.format(NextcloudTalkApplication.Companion.getSharedApplication().getResources().getString(R.string.nc_sent_location),
!TextUtils.isEmpty(getActorDisplayName()) ? getActorDisplayName() : NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_guest)));
}
/*} else if (getMessageType().equals(MessageType.SINGLE_LINK_MESSAGE)) { /*} else if (getMessageType().equals(MessageType.SINGLE_LINK_MESSAGE)) {
if (getActorId().equals(getActiveUser().getUserId())) { if (getActorId().equals(getActiveUser().getUserId())) {
return (NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_sent_a_link_you)); return (NextcloudTalkApplication.Companion.getSharedApplication().getString(R.string.nc_sent_a_link_you));

View File

@ -275,12 +275,14 @@
<string name="nc_sent_an_audio" formatted="true">%1$s sent an audio.</string> <string name="nc_sent_an_audio" formatted="true">%1$s sent an audio.</string>
<string name="nc_sent_a_video" formatted="true">%1$s sent a video.</string> <string name="nc_sent_a_video" formatted="true">%1$s sent a video.</string>
<string name="nc_sent_an_image" formatted="true">%1$s sent an image.</string> <string name="nc_sent_an_image" formatted="true">%1$s sent an image.</string>
<string name="nc_sent_location" formatted="true">%1$s sent a location.</string>
<string name="nc_sent_a_link_you">You sent a link.</string> <string name="nc_sent_a_link_you">You sent a link.</string>
<string name="nc_sent_a_gif_you">You sent a GIF.</string> <string name="nc_sent_a_gif_you">You sent a GIF.</string>
<string name="nc_sent_an_attachment_you">You sent an attachment.</string> <string name="nc_sent_an_attachment_you">You sent an attachment.</string>
<string name="nc_sent_an_audio_you">You sent an audio.</string> <string name="nc_sent_an_audio_you">You sent an audio.</string>
<string name="nc_sent_a_video_you">You sent a video.</string> <string name="nc_sent_a_video_you">You sent a video.</string>
<string name="nc_sent_an_image_you">You sent an image.</string> <string name="nc_sent_an_image_you">You sent an image.</string>
<string name="nc_sent_location_you">You sent a location.</string>
<string name="nc_formatted_message" translatable="false">%1$s: %2$s</string> <string name="nc_formatted_message" translatable="false">%1$s: %2$s</string>
<string name="nc_message_quote_cancel_reply">Cancel reply</string> <string name="nc_message_quote_cancel_reply">Cancel reply</string>
<!-- When translating to German, please use non-formal variant --> <!-- When translating to German, please use non-formal variant -->