Skip to content

Commit

Permalink
👻 Refactor archetype table app column text (konveyor#1553)
Browse files Browse the repository at this point in the history
On the archetype table, applications column, update the translation key
used to be plural aware via i18next:
  - When `count == 1`, use key `archetypeApplicationCount`
  - When `count != 1`, use key `archetypeApplicationCount_plural`

Net result is "1 application" and "3 applications" will be rendered. The
"(s)" suffix is no longer required.

Note: The app is currently using `i18next` v19. In current versions, and
therefore current docs, the count suffixes are different.

Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
  • Loading branch information
sjd78 committed Nov 16, 2023
1 parent 924ef4e commit 4445104
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@
"small": "Small"
},
"message": {
"archetypeApplicationCount": "{{count}} applications",
"archetypeApplicationCount": "{{count}} application",
"archetypeApplicationCount_plural": "{{count}} applications",
"archetypeNoApplications": "No applications currently match the criteria tags.",
"appNotAssesedTitle": "Assessment has not been completed",
"appNotAssessedBody": "In order to review an application it must be assessed first. Assess the application and try again.",
Expand Down

0 comments on commit 4445104

Please sign in to comment.