Skip to content

Commit c9c14b6

Browse files
committed
fix: add translation for more images in gallery
1 parent b5601fe commit c9c14b6

File tree

13 files changed

+33
-1
lines changed

13 files changed

+33
-1
lines changed

package/src/components/Attachment/Gallery.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { getGalleryImageBorderRadius } from './utils/getGalleryImageBorderRadius
1212
import { openUrlSafely } from './utils/openUrlSafely';
1313

1414
import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
15+
import { useTranslationContext } from '../../contexts';
1516
import { useChatConfigContext } from '../../contexts/chatConfigContext/ChatConfigContext';
1617
import {
1718
ImageGalleryContextValue,
@@ -310,6 +311,7 @@ const GalleryThumbnail = <
310311
},
311312
},
312313
} = useTheme();
314+
const { t } = useTranslationContext();
313315

314316
const openImageViewer = () => {
315317
if (!legacyImageViewerSwipeBehaviour && message) {
@@ -416,7 +418,7 @@ const GalleryThumbnail = <
416418
]}
417419
>
418420
<Text style={[styles.moreImagesText, moreImagesText]}>
419-
{`+${imagesAndVideos.length - 4}`}
421+
{String(t('+{{count}}', { count: imagesAndVideos.length - 4 }))}
420422
</Text>
421423
</View>
422424
) : null}

package/src/i18n/en.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"+{{count}}_many": "+{{count}}",
3+
"+{{count}}_one": "+{{count}}",
4+
"+{{count}}_other": "+{{count}}",
25
"1 Reply": "1 Reply",
36
"1 Thread Reply": "1 Thread Reply",
47
"Add a comment": "Add a comment",

package/src/i18n/es.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"+{{count}}_many": "+{{count}}",
3+
"+{{count}}_one": "+{{count}}",
4+
"+{{count}}_other": "+{{count}}",
25
"1 Reply": "1 respuesta",
36
"1 Thread Reply": "1 respuesta de hilo",
47
"Add a comment": "Agregar un comentario",

package/src/i18n/fr.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"+{{count}}_many": "+{{count}}",
3+
"+{{count}}_one": "+{{count}}",
4+
"+{{count}}_other": "+{{count}}",
25
"1 Reply": "1 Réponse",
36
"1 Thread Reply": "Réponse à 1 fil",
47
"Add a comment": "Ajouter un commentaire",

package/src/i18n/he.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"+{{count}}_one": "+{{count}}",
3+
"+{{count}}_other": "+{{count}}",
4+
"+{{count}}_two": "",
25
"1 Reply": "תגובה אחת",
36
"1 Thread Reply": "תגובה אחת לשרשור",
47
"Add a comment": "הוסף תגובה",

package/src/i18n/hi.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"+{{count}}_one": "+{{count}}",
3+
"+{{count}}_other": "+{{count}}",
24
"1 Reply": "1 रिप्लाई",
35
"1 Thread Reply": "1 धागा उत्तर",
46
"Add a comment": "एक टिप्पणी जोड़ें",

package/src/i18n/it.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"+{{count}}_many": "+{{count}}",
3+
"+{{count}}_one": "+{{count}}",
4+
"+{{count}}_other": "+{{count}}",
25
"1 Reply": "1 Risposta",
36
"1 Thread Reply": "1 Risposta alla Discussione",
47
"Add a comment": "Aggiungi un commento",

package/src/i18n/ja.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"+{{count}}_other": "+{{count}}",
23
"1 Reply": "1件の返信",
34
"1 Thread Reply": "1件のスレッド返信",
45
"Add a comment": "コメントを追加",

package/src/i18n/ko.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"+{{count}}_other": "+{{count}}",
23
"1 Reply": "답장 1개",
34
"1 Thread Reply": "1개의 스레드\u3000답글",
45
"Add a comment": "댓글 추가",

package/src/i18n/nl.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"+{{count}}_one": "+{{count}}",
3+
"+{{count}}_other": "+{{count}}",
24
"1 Reply": "1 Antwoord",
35
"1 Thread Reply": "1 thread antwoord",
46
"Add a comment": "Voeg een reactie toe",

0 commit comments

Comments
 (0)