Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix strings for banning #4060

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1311,7 +1311,7 @@ class ConversationInfoActivity :
items.add(
BasicListItemWithImage(
R.drawable.baseline_block_24,
"Ban Participant"
context.getString(R.string.ban_participant)
)
)
}
Expand Down Expand Up @@ -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)
Expand All @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
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
android:layout_width="match_parent"
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"
Expand Down Expand Up @@ -55,15 +55,15 @@
</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"
android:layout_margin="@dimen/standard_margin"
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"
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Loading