Merge pull request #5061 from nextcloud/fixWrongPluralsTranslation

fix wrong plurals implementation
This commit is contained in:
Marcel Hibbe 2025-06-17 07:33:03 +00:00 committed by GitHub
commit bc29c67269
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 6 deletions

View File

@ -1245,8 +1245,9 @@ class ChatActivity :
val deleteNoticeText = binding.conversationDeleteNotice.findViewById<TextView>(R.id.deletion_message)
viewThemeUtils.material.themeCardView(binding.conversationDeleteNotice)
deleteNoticeText.text = String.format(
resources.getString(R.string.nc_conversation_auto_delete_notice),
deleteNoticeText.text = resources.getQuantityString(
R.plurals.nc_conversation_auto_delete_info,
retentionPeriod,
retentionPeriod
)
viewThemeUtils.material.colorMaterialButtonPrimaryTonal(

View File

@ -19,7 +19,6 @@
android:id="@+id/deletion_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nc_conversation_auto_delete_notice"
android:textSize="14sp"
android:lineSpacingExtra="4dp"
android:gravity="center"

View File

@ -520,12 +520,11 @@ How to translate with transifex:
<string name="nc_forward_message">Forward</string>
<string name="nc_reply">Reply</string>
<string name="nc_reply_privately">Reply privately</string>
<string name="nc_delete_message">Delete</string>
<plurals name="nc_conversation_auto_delete_notice">
<plurals name="nc_conversation_auto_delete_info">
<item quantity="one">This conversation will be automatically deleted for everyone in %1$d day of no activity</item>
<item quantity="other">This conversation will be automatically deleted for everyone in %1$d days of no activity</item>
</plurals>
<string name="nc_conversation_auto_delete_notice">This conversation will be automatically deleted for everyone in %1$d days of no activity</string>
<string name="nc_delete_message">Delete</string>
<string name="nc_delete_now">Delete now</string>
<string name="nc_keep">Keep</string>
<string name="nc_delete_message_leaked_to_matterbridge">Message deleted successfully, but it might have been leaked to other services</string>