Merge pull request #4725 from nextcloud/fix/noid/lintPlurals

fix(lint): Use plurals string instead of simple string
This commit is contained in:
Andy Scherzinger 2025-02-16 16:35:34 +01:00 committed by GitHub
commit 28c512e269
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 4 deletions

View File

@ -109,8 +109,9 @@ class SystemMessageViewHolder(itemView: View) : MessageHolders.IncomingTextMessa
binding.expandCollapseIcon.visibility = View.VISIBLE binding.expandCollapseIcon.visibility = View.VISIBLE
if (!message.isExpanded) { if (!message.isExpanded) {
val similarMessages = String.format( val similarMessages = sharedApplication!!.resources.getQuantityString(
sharedApplication!!.resources.getString(R.string.see_similar_system_messages), R.plurals.see_similar_system_messages,
message.expandableChildrenAmount,
message.expandableChildrenAmount message.expandableChildrenAmount
) )

View File

@ -442,7 +442,10 @@ How to translate with transifex:
<string name="nc_add_attachment">Add attachment</string> <string name="nc_add_attachment">Add attachment</string>
<string name="emoji_category_recent">Recent</string> <string name="emoji_category_recent">Recent</string>
<string name="emoji_backspace">Backspace</string> <string name="emoji_backspace">Backspace</string>
<string name="see_similar_system_messages">See %1$d similar messages</string> <plurals name="see_similar_system_messages">
<item quantity="one">See %d similar message</item>
<item quantity="other">See %d similar messages</item>
</plurals>
<!-- Conversation info guest access --> <!-- Conversation info guest access -->
<string name="nc_guest_access">Guest access</string> <string name="nc_guest_access">Guest access</string>

View File

@ -1,2 +1,2 @@
DO NOT TOUCH; GENERATED BY DRONE DO NOT TOUCH; GENERATED BY DRONE
<span class="mdl-layout-title">Lint Report: 9 errors and 106 warnings</span> <span class="mdl-layout-title">Lint Report: 9 errors and 105 warnings</span>