Skip to content

Commit

Permalink
Translating ShowMore component to portuguese (#251)
Browse files Browse the repository at this point in the history
* Translating ShowMore component to portuguese

* Fixing Lint

* Improving pattern code

* Removing unnecessary code

* Fixing Lint

* Update messages/en.json

Co-authored-by: Camila Vieira Coutinho <[email protected]>

* add new messages translations

---------

Co-authored-by: Camila Vieira Coutinho <[email protected]>
Co-authored-by: Camila Vieira Coutinho <[email protected]>
  • Loading branch information
3 people authored Aug 9, 2023
1 parent 5f4c3a9 commit 6b09ba2
Show file tree
Hide file tree
Showing 17 changed files with 55 additions and 41 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Added
- Translation of the ShowMore component.

## [3.13.1] - 2023-06-13

### Fixed
Expand Down
4 changes: 3 additions & 1 deletion messages/ar-SA.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,7 @@
"store/reviews.list.filterOptions.two-stars": "نجمتين",
"store/reviews.list.filterOptions.three-stars": "3 نجوم",
"store/reviews.list.filterOptions.four-stars": "4 نجوم",
"store/reviews.list.filterOptions.five-stars": "5 نجوم"
"store/reviews.list.filterOptions.five-stars": "5 نجوم",
"store/reviews.list.showMore": "اعرض المزيد",
"store/reviews.list.showLess": "اعرض أقل"
}
4 changes: 3 additions & 1 deletion messages/bg-BG.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,7 @@
"store/reviews.list.filterOptions.two-stars": "2 звезди",
"store/reviews.list.filterOptions.three-stars": "3 звезди",
"store/reviews.list.filterOptions.four-stars": "4 звезди",
"store/reviews.list.filterOptions.five-stars": "5 звезди"
"store/reviews.list.filterOptions.five-stars": "5 звезди",
"store/reviews.list.showMore": "Показване на повече",
"store/reviews.list.showLess": "Показване на по-малко"
}
4 changes: 3 additions & 1 deletion messages/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,7 @@
"store/reviews.list.filterOptions.two-stars": "store/reviews.list.filterOptions.two-stars",
"store/reviews.list.filterOptions.three-stars": "store/reviews.list.filterOptions.three-stars",
"store/reviews.list.filterOptions.four-stars": "store/reviews.list.filterOptions.four-stars",
"store/reviews.list.filterOptions.five-stars": "store/reviews.list.filterOptions.five-stars"
"store/reviews.list.filterOptions.five-stars": "store/reviews.list.filterOptions.five-stars",
"store/reviews.list.showMore": "store/reviews.list.showMore",
"store/reviews.list.showLess": "store/reviews.list.showLess"
}
4 changes: 3 additions & 1 deletion messages/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,7 @@
"store/reviews.list.filterOptions.two-stars": "2 Sterne",
"store/reviews.list.filterOptions.three-stars": "3 Sterne",
"store/reviews.list.filterOptions.four-stars": "4 Sterne",
"store/reviews.list.filterOptions.five-stars": "5 Sterne"
"store/reviews.list.filterOptions.five-stars": "5 Sterne",
"store/reviews.list.showMore": "Mehr anzeigen",
"store/reviews.list.showLess": "Weniger anzeigen"
}
4 changes: 3 additions & 1 deletion messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,7 @@
"store/reviews.list.filterOptions.two-stars": "2 stars",
"store/reviews.list.filterOptions.three-stars": "3 stars",
"store/reviews.list.filterOptions.four-stars": "4 stars",
"store/reviews.list.filterOptions.five-stars": "5 stars"
"store/reviews.list.filterOptions.five-stars": "5 stars",
"store/reviews.list.showMore": "Show more",
"store/reviews.list.showLess": "Show less"
}
4 changes: 3 additions & 1 deletion messages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,7 @@
"store/reviews.list.filterOptions.two-stars": "2 estrellas",
"store/reviews.list.filterOptions.three-stars": "3 estrellas",
"store/reviews.list.filterOptions.four-stars": "4 estrellas",
"store/reviews.list.filterOptions.five-stars": "5 estrellas"
"store/reviews.list.filterOptions.five-stars": "5 estrellas",
"store/reviews.list.showMore": "Mostrar más",
"store/reviews.list.showLess": "Mostrar menos"
}
4 changes: 3 additions & 1 deletion messages/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,7 @@
"store/reviews.list.filterOptions.two-stars": "2 étoiles",
"store/reviews.list.filterOptions.three-stars": "3 étoiles",
"store/reviews.list.filterOptions.four-stars": "4 étoiles",
"store/reviews.list.filterOptions.five-stars": "5 étoiles"
"store/reviews.list.filterOptions.five-stars": "5 étoiles",
"store/reviews.list.showMore": "Afficher davantage",
"store/reviews.list.showLess": "Afficher moins"
}
4 changes: 3 additions & 1 deletion messages/id-ID.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,7 @@
"store/reviews.list.filterOptions.two-stars": "2 bintang",
"store/reviews.list.filterOptions.three-stars": "3 bintang",
"store/reviews.list.filterOptions.four-stars": "4 bintang",
"store/reviews.list.filterOptions.five-stars": "5 bintang"
"store/reviews.list.filterOptions.five-stars": "5 bintang",
"store/reviews.list.showMore": "Tampilkan lebih banyak",
"store/reviews.list.showLess": "Tampilkan lebih sedikit"
}
4 changes: 3 additions & 1 deletion messages/it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,7 @@
"store/reviews.list.filterOptions.two-stars": "2 stelle",
"store/reviews.list.filterOptions.three-stars": "3 stelle",
"store/reviews.list.filterOptions.four-stars": "4 stelle",
"store/reviews.list.filterOptions.five-stars": "5 stelle"
"store/reviews.list.filterOptions.five-stars": "5 stelle",
"store/reviews.list.showMore": "Mostra di più",
"store/reviews.list.showLess": "Mostra meno"
}
4 changes: 3 additions & 1 deletion messages/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,7 @@
"store/reviews.list.filterOptions.two-stars": "2つ星",
"store/reviews.list.filterOptions.three-stars": "3つ星",
"store/reviews.list.filterOptions.four-stars": "4つ星",
"store/reviews.list.filterOptions.five-stars": "5つ星"
"store/reviews.list.filterOptions.five-stars": "5つ星",
"store/reviews.list.showMore": "表示を増やす",
"store/reviews.list.showLess": "表示を減らす"
}
4 changes: 3 additions & 1 deletion messages/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,7 @@
"store/reviews.list.filterOptions.two-stars": "별 2개",
"store/reviews.list.filterOptions.three-stars": "별 3개",
"store/reviews.list.filterOptions.four-stars": "별 4개",
"store/reviews.list.filterOptions.five-stars": "별 5개"
"store/reviews.list.filterOptions.five-stars": "별 5개",
"store/reviews.list.showMore": "더 보기",
"store/reviews.list.showLess": "간략히 보기"
}
4 changes: 3 additions & 1 deletion messages/nl-NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,7 @@
"store/reviews.list.filterOptions.two-stars": "2 sterren",
"store/reviews.list.filterOptions.three-stars": "3 sterren",
"store/reviews.list.filterOptions.four-stars": "4 sterren",
"store/reviews.list.filterOptions.five-stars": "5 sterren"
"store/reviews.list.filterOptions.five-stars": "5 sterren",
"store/reviews.list.showMore": "Meer weergeven",
"store/reviews.list.showLess": "Toon minder"
}
2 changes: 2 additions & 0 deletions messages/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@
"store/reviews.list.anonymous": "Anônimo",
"store/reviews.list.pagination.textOf": "de",
"store/reviews.list.graph.stars": "{value, plural, =0{0 estrelas} =1{1 estrela} other{# estrelas}}",
"store/reviews.list.showMore": "Mostrar mais",
"store/reviews.list.showLess": "Mostrar menos",
"store/reviews.summary.add.login": "Faça login para escrever uma avaliação.",
"store/reviews.summary.add.title": "Adicionar avaliação",
"store/reviews.list.loadingReviews": "Carregando avaliações...",
Expand Down
4 changes: 3 additions & 1 deletion messages/ro-RO.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,7 @@
"store/reviews.list.filterOptions.two-stars": "2 stele",
"store/reviews.list.filterOptions.three-stars": "3 stele",
"store/reviews.list.filterOptions.four-stars": "4 stele",
"store/reviews.list.filterOptions.five-stars": "5 stele"
"store/reviews.list.filterOptions.five-stars": "5 stele",
"store/reviews.list.showMore": "Arată mai mult",
"store/reviews.list.showLess": "Arată mai puțin"
}
4 changes: 3 additions & 1 deletion messages/th-TH.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,7 @@
"store/reviews.list.filterOptions.two-stars": "2 ดาว",
"store/reviews.list.filterOptions.three-stars": "3 ดาว",
"store/reviews.list.filterOptions.four-stars": "4 ดาว",
"store/reviews.list.filterOptions.five-stars": "5 ดาว"
"store/reviews.list.filterOptions.five-stars": "5 ดาว",
"store/reviews.list.showMore": "แสดงเพิ่มขึ้น",
"store/reviews.list.showLess": "แสดงน้อยลง"
}
35 changes: 8 additions & 27 deletions react/Reviews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,88 +228,69 @@ const reducer = (state: State, action: ReducerActions) => {
const messages = defineMessages({
sortPlaceholder: {
id: 'store/reviews.list.sortOptions.placeholder',
defaultMessage: 'Sort by:',
},
filterPlaceholder: {
id: 'store/reviews.list.filterOptions.placeholder',
defaultMessage: 'Filter by:',
},
sortMostRecent: {
id: 'store/reviews.list.sortOptions.mostRecent',
defaultMessage: 'Most Recent',
},
sortOldest: {
id: 'store/reviews.list.sortOptions.oldest',
defaultMessage: 'Oldest',
},
sortHighestRated: {
id: 'store/reviews.list.sortOptions.highestRated',
defaultMessage: 'Highest Rated',
},
sortLowestRated: {
id: 'store/reviews.list.sortOptions.lowestRated',
defaultMessage: 'Lowest Rated',
},
all: {
id: 'store/reviews.list.filterOptions.all',
defaultMessage: 'All',
},
oneStar: {
id: 'store/reviews.list.filterOptions.one-star',
defaultMessage: '1 star',
},
twoStars: {
id: 'store/reviews.list.filterOptions.two-stars',
defaultMessage: '2 stars',
},
threeStars: {
id: 'store/reviews.list.filterOptions.three-stars',
defaultMessage: '3 stars',
},
fourStars: {
id: 'store/reviews.list.filterOptions.four-stars',
defaultMessage: '4 stars',
},
fiveStars: {
id: 'store/reviews.list.filterOptions.five-stars',
defaultMessage: '5 stars',
},
timeAgoYears: {
id: 'store/reviews.list.timeAgo.years',
defaultMessage:
'{timeUnits} {timeUnits, plural, =1 {year} other {years}} ago',
},
timeAgoMonths: {
id: 'store/reviews.list.timeAgo.months',
defaultMessage:
'{timeUnits} {timeUnits, plural, =1 {month} other {months}} ago',
},
timeAgoDays: {
id: 'store/reviews.list.timeAgo.days',
defaultMessage:
'{timeUnits} {timeUnits, plural, =1 {day} other {days}} ago',
},
timeAgoHours: {
id: 'store/reviews.list.timeAgo.hours',
defaultMessage:
'{timeUnits} {timeUnits, plural, =1 {hour} other {hours}} ago',
},
timeAgoMinutes: {
id: 'store/reviews.list.timeAgo.minutes',
defaultMessage:
'{timeUnits} {timeUnits, plural, =1 {minute} other {minutes}} ago',
},
timeAgoJustNow: {
id: 'store/reviews.list.timeAgo.justNow',
defaultMessage: 'just now',
},
anonymous: {
id: 'store/reviews.list.anonymous',
defaultMessage: 'Anonymous',
},
textOf: {
id: 'store/reviews.list.pagination.textOf',
defaultMessage: 'of',
},
showMore: {
id: 'store/reviews.list.showMore',
},
showLess: {
id: 'store/reviews.list.showLess',
},
})

Expand Down Expand Up @@ -859,8 +840,8 @@ function Reviews() {
>
<ShowMore
lines={3}
more="Show more"
less="Show less"
more={intl.formatMessage(messages.showMore)}
less={intl.formatMessage(messages.showLess)}
anchorClass={`${handles.showMoreButton}`}
>
{review.text}
Expand Down

0 comments on commit 6b09ba2

Please sign in to comment.