Merge pull request #4060 from nextcloud/fixStringsForBanning

Fix strings for banning
This commit is contained in:
Marcel Hibbe 2024-08-09 14:16:05 +02:00 committed by GitHub
commit a9593f25b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 14 deletions

View file

@ -48,7 +48,7 @@ import com.nextcloud.talk.conversationinfo.viewmodel.ConversationInfoViewModel
import com.nextcloud.talk.conversationinfoedit.ConversationInfoEditActivity
import com.nextcloud.talk.data.user.model.User
import com.nextcloud.talk.databinding.ActivityConversationInfoBinding
import com.nextcloud.talk.databinding.DialogBanActorBinding
import com.nextcloud.talk.databinding.DialogBanParticipantBinding
import com.nextcloud.talk.events.EventStatus
import com.nextcloud.talk.extensions.loadConversationAvatar
import com.nextcloud.talk.extensions.loadNoteToSelfAvatar
@ -1311,7 +1311,7 @@ class ConversationInfoActivity :
items.add(
BasicListItemWithImage(
R.drawable.baseline_block_24,
"Ban Participant"
context.getString(R.string.ban_participant)
)
)
}
@ -1375,7 +1375,7 @@ class ConversationInfoActivity :
private fun MaterialDialog.handleBan(participant: Participant) {
val apiVersion = ApiUtils.getConversationApiVersion(conversationUser, intArrayOf(ApiUtils.API_V4, 1))
val binding = DialogBanActorBinding.inflate(layoutInflater)
val binding = DialogBanParticipantBinding.inflate(layoutInflater)
val actorTypeConverter = EnumActorTypeConverter()
val dialog = MaterialAlertDialogBuilder(context)
.setView(binding.root)
@ -1391,13 +1391,13 @@ class ConversationInfoActivity :
banActor(
actorTypeConverter.convertToString(participant.actorType!!),
participant.actorId!!,
binding.banActorEdit.text.toString()
binding.banParticipantEdit.text.toString()
)
removeAttendeeFromConversation(apiVersion, participant)
dialog.dismiss()
}
binding.buttonClose.setOnClickListener { dialog.dismiss() }
viewThemeUtils.material.colorTextInputLayout(binding.banActorEditLayout)
viewThemeUtils.material.colorTextInputLayout(binding.banParticipantEditLayout)
viewThemeUtils.material.colorMaterialButtonPrimaryFilled(binding.buttonBan)
viewThemeUtils.material.colorMaterialButtonText(binding.buttonClose)
dialog.show()

View file

@ -16,7 +16,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/standard_margin"
android:text="@string/ban_actor"
android:text="@string/ban_participant"
android:textSize="@dimen/md_title_textsize" />
<com.google.android.material.divider.MaterialDivider
@ -24,7 +24,7 @@
android:layout_height="wrap_content" />
<RelativeLayout
android:id="@+id/ban_actor_profile"
android:id="@+id/ban_participant_profile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/standard_margin"
@ -55,7 +55,7 @@
</RelativeLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/ban_actor_edit_layout"
android:id="@+id/ban_participant_edit_layout"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -63,7 +63,7 @@
android:hint="@string/internal_note">
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/ban_actor_edit"
android:id="@+id/ban_participant_edit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textShortMessage"

View file

@ -792,12 +792,12 @@ How to translate with transifex:
<string name="message_last_edited_by">Edited by %1$s</string>
<string name="share_link_to_conversation">Join conversation %1$s at %2$s</string>
<string name="nc_conversation_settings">Conversation settings</string>
<string name="show_banned_participants">Show Banned Participants</string>
<string name="bans_list">Bans List</string>
<string name="ban_participant">Ban participant</string>
<string name="show_banned_participants">Show banned participants</string>
<string name="bans_list">Bans list</string>
<string name="unban">Unban</string>
<string name="internal_note">Internal Note</string>
<string name="ban_actor">Ban Actor</string>
<string name="internal_note">Internal note</string>
<string name="ban">Ban</string>
<string name="show_ban_reason">Show ban reason</string>
<string name="error_unbanning">Error occured when unbanning actor</string>
<string name="error_unbanning">Error occurred when unbanning participant</string>
</resources>