Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
7775d05f
Unverified
Commit
7775d05f
authored
May 07, 2018
by
Filipe de Lima Brito
Committed by
GitHub
May 07, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1252 from RocketChat/new/mute-unmute-message
[NEW] Add mute and unmute system messages
parents
0312461b
bd8249ef
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
10 deletions
+23
-10
ViewModelMapper.kt
...chat/rocket/android/chatroom/viewmodel/ViewModelMapper.kt
+3
-0
strings.xml
app/src/main/res/values-es/strings.xml
+2
-0
strings.xml
app/src/main/res/values-fr/strings.xml
+2
-0
strings.xml
app/src/main/res/values-hi-rIN/strings.xml
+2
-0
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+12
-10
strings.xml
app/src/main/res/values/strings.xml
+2
-0
No files found.
app/src/main/java/chat/rocket/android/chatroom/viewmodel/ViewModelMapper.kt
View file @
7775d05f
...
...
@@ -313,6 +313,7 @@ class ViewModelMapper @Inject constructor(
}
private
fun
getSystemMessage
(
message
:
Message
):
CharSequence
{
println
(
message
)
val
content
=
when
(
message
.
type
)
{
//TODO: Add implementation for Welcome type.
is
MessageType
.
MessageRemoved
->
context
.
getString
(
R
.
string
.
message_removed
)
...
...
@@ -322,6 +323,8 @@ class ViewModelMapper @Inject constructor(
is
MessageType
.
RoomNameChanged
->
context
.
getString
(
R
.
string
.
message_room_name_changed
,
message
.
message
,
message
.
sender
?.
username
)
is
MessageType
.
UserRemoved
->
context
.
getString
(
R
.
string
.
message_user_removed_by
,
message
.
message
,
message
.
sender
?.
username
)
is
MessageType
.
MessagePinned
->
context
.
getString
(
R
.
string
.
message_pinned
)
is
MessageType
.
UserMuted
->
context
.
getString
(
R
.
string
.
message_muted
,
message
.
message
,
message
.
sender
?.
username
)
is
MessageType
.
UserUnMuted
->
context
.
getString
(
R
.
string
.
message_unmuted
,
message
.
message
,
message
.
sender
?.
username
)
else
->
{
throw
InvalidParameterException
(
"Invalid message type: ${message.type}"
)
}
...
...
app/src/main/res/values-es/strings.xml
View file @
7775d05f
...
...
@@ -122,6 +122,8 @@
<string
name=
"message_welcome"
>
Bienvenido %s
</string>
<string
name=
"message_removed"
>
Mensaje eliminado
</string>
<string
name=
"message_pinned"
>
Fijado una mensaje:
</string>
<string
name=
"message_muted"
>
Usuario %1$s silenciado por %2$s
</string>
<string
name=
"message_unmuted"
>
Usuario %1$s no silenciado por %2$s
</string>
<!-- Message actions -->
<string
name=
"action_msg_reply"
>
Respuesta
</string>
...
...
app/src/main/res/values-fr/strings.xml
View file @
7775d05f
...
...
@@ -122,6 +122,8 @@
<string
name=
"message_welcome"
>
Bienvenue %s
</string>
<string
name=
"message_removed"
>
Message supprimé
</string>
<string
name=
"message_pinned"
>
Épinglé un message:
</string>
<string
name=
"message_muted"
>
Utilisateur %1$s mis en sourdine par %2$s
</string>
<string
name=
"message_unmuted"
>
Utilisateur %1$s non muté par %2$s
</string>
<!-- Message actions -->
<string
name=
"action_msg_reply"
>
Répondre
</string>
...
...
app/src/main/res/values-hi-rIN/strings.xml
View file @
7775d05f
...
...
@@ -124,6 +124,8 @@
<string
name=
"message_welcome"
>
%s का स्वागत करते हैं
</string>
<string
name=
"message_removed"
>
संदेश हटाया गया
</string>
<string
name=
"message_pinned"
>
एक संदेश पिन किया:
</string>
<string
name=
"message_muted"
>
उपयोगकर्ता %1$s %2$s द्वारा म्यूट किया गया
</string>
<string
name=
"message_unmuted"
>
उपयोगकर्ता %1$s %2$s द्वारा अनम्यूट किया गया
</string>
<!-- Message actions -->
<string
name=
"action_msg_reply"
>
जवाब दें
</string>
...
...
app/src/main/res/values-pt-rBR/strings.xml
View file @
7775d05f
...
...
@@ -113,11 +113,13 @@
<string
name=
"message_room_name_changed"
>
Nome da sala alterado para: %1$s por %2$s
</string>
<string
name=
"message_user_added_by"
>
Usuário %1$s adicionado por %2$s
</string>
<string
name=
"message_user_removed_by"
>
Usuário %1$s removido por %2$s
</string>
<string
name=
"message_user_left"
>
Saiu da sala
.
</string>
<string
name=
"message_user_joined_channel"
>
Entrou na sala
.
</string>
<string
name=
"message_user_left"
>
Saiu da sala
</string>
<string
name=
"message_user_joined_channel"
>
Entrou na sala
</string>
<string
name=
"message_welcome"
>
Bem-vindo, %s
</string>
<string
name=
"message_removed"
>
Mensagem removida
</string>
<string
name=
"message_pinned"
>
Pinou uma mensagem:
</string>
<string
name=
"message_muted"
>
Usuário %1$s entrou no modo mudo por %2$s
</string>
<string
name=
"message_unmuted"
>
Usuário %1$s saiu do modo mudo por %2$s
</string>
<!-- Message actions -->
<string
name=
"action_msg_reply"
>
Responder
</string>
...
...
@@ -125,11 +127,11 @@
<string
name=
"action_msg_copy"
>
Copiar
</string>
<string
name=
"action_msg_quote"
>
Citar
</string>
<string
name=
"action_msg_delete"
>
Remover
</string>
<string
name=
"action_msg_pin"
>
Fixar M
ensagem
</string>
<string
name=
"action_msg_unpin"
>
Des
afixar M
ensagem
</string>
<string
name=
"action_msg_star"
>
Favoritar
M
ensagem
</string>
<string
name=
"action_msg_pin"
>
Pinar m
ensagem
</string>
<string
name=
"action_msg_unpin"
>
Des
pinar m
ensagem
</string>
<string
name=
"action_msg_star"
>
Favoritar
m
ensagem
</string>
<string
name=
"action_msg_share"
>
Compartilhar
</string>
<string
name=
"action_title_editing"
>
Editando
M
ensagem
</string>
<string
name=
"action_title_editing"
>
Editando
m
ensagem
</string>
<string
name=
"action_msg_add_reaction"
>
Adicionar reação
</string>
<!-- Permission messages -->
...
...
@@ -150,7 +152,7 @@
<!-- Socket status -->
<string
name=
"status_connected"
>
Conectado
</string>
<string
name=
"status_disconnected"
>
Desconetado
</string>
<string
name=
"status_disconnected"
>
Descone
c
tado
</string>
<string
name=
"status_connecting"
>
Conectando
</string>
<string
name=
"status_authenticating"
>
Autenticando
</string>
<string
name=
"status_disconnecting"
>
Desconectando
</string>
...
...
@@ -167,7 +169,7 @@
<string
name=
"Slash_Tableflip_Description"
>
Exibir (╯°□°)╯︵ ┻━┻
</string>
<string
name=
"Slash_TableUnflip_Description"
>
Exibir ┬─┬ ノ( ゜-゜ノ)
</string>
<string
name=
"Create_A_New_Channel"
>
Criar um novo canal
</string>
<string
name=
"Show_the_keyboard_shortcut_list"
>
Show the keyboard shortcut list
</string>
<string
name=
"Show_the_keyboard_shortcut_list"
>
Exibir a lista de atalhos do teclado
</string>
<string
name=
"Invite_user_to_join_channel_all_from"
>
do [#canal] para entrar neste
</string>
<string
name=
"Invite_user_to_join_channel_all_to"
>
Convidar todos os usuários deste canal para entrar no [#canal]
</string>
<string
name=
"Archive"
>
Arquivar
</string>
...
...
@@ -175,8 +177,8 @@
<string
name=
"Leave_the_current_channel"
>
Sair do canal atual
</string>
<string
name=
"Displays_action_text"
>
Exibir texto de ação
</string>
<string
name=
"Direct_message_someone"
>
Enviar DM para alguém
</string>
<string
name=
"Mute_someone_in_room"
>
Silenciar
alguém
</string>
<string
name=
"Unmute_someone_in_room"
>
De
-silenciar
alguém na sala
</string>
<string
name=
"Mute_someone_in_room"
>
Ativar o modo mudo em
alguém
</string>
<string
name=
"Unmute_someone_in_room"
>
De
sativar o modo mudo em
alguém na sala
</string>
<string
name=
"Invite_user_to_join_channel"
>
Convidar algum usuário para entrar neste canal
</string>
<string
name=
"Unarchive"
>
Desarquivar
</string>
<string
name=
"Join_the_given_channel"
>
Entrar no canal especificado
</string>
...
...
app/src/main/res/values/strings.xml
View file @
7775d05f
...
...
@@ -119,6 +119,8 @@
<string
name=
"message_welcome"
>
Welcome %s
</string>
<string
name=
"message_removed"
>
Message removed
</string>
<string
name=
"message_pinned"
>
Pinned a message:
</string>
<string
name=
"message_muted"
>
User %1$s muted by %2$s
</string>
<string
name=
"message_unmuted"
>
User %1$s unmuted by %2$s
</string>
<!-- Message actions -->
<string
name=
"action_msg_reply"
>
Reply
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment