Skip to content

Commit 8a4b900

Browse files
committed
add eng translations for pagination
1 parent 078f218 commit 8a4b900

17 files changed

Lines changed: 86 additions & 3 deletions

client/modules/IDE/components/Pagination.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
33
import classNames from 'classnames';
4+
import { useTranslation } from 'react-i18next';
45

56
const Pagination = ({
67
page,
@@ -12,6 +13,8 @@ const Pagination = ({
1213
}) => {
1314
if (totalPages <= 1) return null;
1415

16+
const { t } = useTranslation();
17+
1518
const startSketch = (page - 1) * limit + 1;
1619
const endSketch = Math.min(page * limit, totalSketches);
1720

@@ -25,7 +28,7 @@ const Pagination = ({
2528
disabled={page === 1}
2629
aria-label="Previous Page"
2730
>
28-
Previous
31+
{t('Pagination.Previous')}
2932
</button>
3033
</li>
3134

@@ -34,7 +37,7 @@ const Pagination = ({
3437
<span className="bold-text">
3538
{startSketch} - {endSketch}
3639
</span>{' '}
37-
of {totalSketches}
40+
{t('Pagination.Of')} {totalSketches}
3841
</span>
3942
</li>
4043
<li
@@ -50,7 +53,7 @@ const Pagination = ({
5053
disabled={page === totalPages}
5154
aria-label="Next Page"
5255
>
53-
Next
56+
{t('Pagination.Next')}
5457
</button>
5558
</li>
5659
</ul>

translations/locales/bn/translations.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,11 @@
538538
"ButtonAddToCollectionARIA": "সংগ্রহে যোগ করুন",
539539
"View": "দেখুন"
540540
},
541+
"Pagination": {
542+
"Next": "Next",
543+
"Previous": "Previous",
544+
"Of": "of"
545+
},
541546
"SketchList": {
542547
"Title": "p5.js ওয়েব এডিটর | আমার স্কেচগুলি",
543548
"AnothersTitle": "p5.js ওয়েব এডিটর | {{anotheruser}} এর স্কেচগুলি",

translations/locales/de/translations.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,11 @@
505505
"ButtonAddToCollectionARIA": "Zur Sammlung hinzufügen",
506506
"View": "Öffnen"
507507
},
508+
"Pagination": {
509+
"Next": "Next",
510+
"Previous": "Previous",
511+
"Of": "of"
512+
},
508513
"SketchList": {
509514
"View": "Öffnen",
510515
"Title": "p5.js Web Editor | Meine Sketche",

translations/locales/en-US/translations.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,11 @@
581581
"ButtonAddToCollectionARIA": "Add to collection",
582582
"View": "View"
583583
},
584+
"Pagination": {
585+
"Next": "Next",
586+
"Previous": "Previous",
587+
"Of": "of"
588+
},
584589
"SketchList": {
585590
"View": "View",
586591
"Title": "p5.js Web Editor | My sketches",

translations/locales/es-419/translations.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,11 @@
514514
"ButtonAddToCollectionARIA": "Agregar a colección",
515515
"View": "Ver"
516516
},
517+
"Pagination": {
518+
"Next": "Next",
519+
"Previous": "Previous",
520+
"Of": "of"
521+
},
517522
"SketchList": {
518523
"View": "Ver",
519524
"Title": "p5.js Web Editor | Mis bosquejos",

translations/locales/fr-CA/translations.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,11 @@
518518
"ButtonAddToCollectionARIA": "Ajouter à la collection",
519519
"View": "Voir"
520520
},
521+
"Pagination": {
522+
"Next": "Next",
523+
"Previous": "Previous",
524+
"Of": "of"
525+
},
521526
"SketchList": {
522527
"View": "Voir",
523528
"Title": "Éditeur web p5.js | Mes croquis",

translations/locales/hi/translations.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,11 @@
576576
"ButtonAddToCollectionARIA": "संग्रह में जोड़ें",
577577
"View": "देखें"
578578
},
579+
"Pagination": {
580+
"Next": "Next",
581+
"Previous": "Previous",
582+
"Of": "of"
583+
},
579584
"SketchList": {
580585
"Title": "p5.js वेब एडिटर | मेरे स्केच",
581586
"AnothersTitle": "p5.js वेब एडिटर | {{anotheruser}} के स्केच",

translations/locales/it/translations.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,11 @@
517517
"ButtonAddToCollectionARIA": "Aggiungi alla collezione",
518518
"View": "Vista"
519519
},
520+
"Pagination": {
521+
"Next": "Next",
522+
"Previous": "Previous",
523+
"Of": "of"
524+
},
520525
"SketchList": {
521526
"View": "Vista",
522527
"Title": "p5.js redattore web | I miei sketch",

translations/locales/ja/translations.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,11 @@
508508
"ButtonAddToCollectionARIA": "コレクションへ追加",
509509
"View": "表示"
510510
},
511+
"Pagination": {
512+
"Next": "Next",
513+
"Previous": "Previous",
514+
"Of": "of"
515+
},
511516
"SketchList": {
512517
"View": "表示",
513518
"Title": "p5.js ウェブエディター | マイスケッチ",

translations/locales/ko/translations.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,11 @@
496496
"ButtonAddToCollectionARIA": "Add to collection",
497497
"View": "View"
498498
},
499+
"Pagination": {
500+
"Next": "Next",
501+
"Previous": "Previous",
502+
"Of": "of"
503+
},
499504
"SketchList": {
500505
"View": "View",
501506
"Title": "p5.js Web Editor | My sketches",

0 commit comments

Comments
 (0)