Skip to content

Commit

Permalink
Refactor tooltip contents for "increased", "decreased" and "noChanges…
Browse files Browse the repository at this point in the history
…" keys
  • Loading branch information
chimpdev committed Aug 29, 2024
1 parent 52388dd commit 51aaa3b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function LikesGraph({ profile }) {

<Tooltip
side={isMobile ? 'bottom' : 'right'}
content={t(`graph.tooltip.${isIncreased ? 'increased' : isDecreased ? 'decreased' : 'noChange'}`, { difference })}
content={t(`graph.tooltip.${isIncreased ? 'increased' : isDecreased ? 'decreased' : 'noChange'}`, { postProcess: 'interval', count: 0, difference })}
>
<div className={cn(
'select-none flex w-max gap-x-1 px-2 items-center py-1 text-xs font-semibold rounded-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function ViewsGraph({ profile }) {

<Tooltip
side={isMobile ? 'bottom' : 'right'}
content={t(`graph.tooltip.${isIncreased ? 'increased' : isDecreased ? 'decreased' : 'noChange'}`, { difference })}
content={t(`graph.tooltip.${isIncreased ? 'increased' : isDecreased ? 'decreased' : 'noChange'}`, { postProcess: 'interval', count: 0, difference })}
>
<div className={cn(
'select-none flex w-max gap-x-1 px-2 items-center py-1 text-xs font-semibold rounded-lg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function MonthlyVotesGraph({ server }) {

<Tooltip
side={isMobile ? 'bottom' : 'right'}
content={`${isIncreased ? 'Increased' : isDecreased ? 'Decreased' : 'No change'} since last month (${difference})`}
content={t(`graph.tooltip.${isIncreased ? 'increased' : isDecreased ? 'decreased' : 'noChange'}`, { postProcess: 'interval', count: 1, difference})}
>
<div className={cn(
'select-none flex w-max gap-x-1 px-2 items-center py-1 text-xs font-semibold rounded-lg',
Expand Down
6 changes: 3 additions & 3 deletions client/locales/az.json
Original file line number Diff line number Diff line change
Expand Up @@ -882,9 +882,9 @@
},
"graph": {
"tooltip": {
"increased": "Dünəndən artıb ({{difference}})",
"decreased": "Dünəndən azalıb ({{difference}})",
"noChanges": "Dünəndən bəri heç bir dəyişiklik yoxdur",
"increased": "(0)[Dünəndən artıb ({{difference}})];(1)[Keçən aydan artıb ({{difference}})];",
"decreased": "(0)[Dünəndən azalıb ({{difference}})];(1)[Keçən aydan azalıb ({{difference}})];",
"noChanges": "(0)[Dünəndən bəri heç bir dəyişiklik yoxdur];(1)[Keçən aydan bəri heç bir dəyişiklik yoxdur];",
"Total Servers": "{{count}} Serverlər",
"Total Users": "{{count}} İstifadəçilər",
"profileLikes": "{{count}} Bəyənir",
Expand Down
6 changes: 3 additions & 3 deletions client/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -882,9 +882,9 @@
},
"graph": {
"tooltip": {
"increased": "Increased since yesterday ({{difference}})",
"decreased": "Decreased since yesterday ({{difference}})",
"noChanges": "No changes since yesterday",
"increased": "(0)[Increased since yesterday ({{difference}})];(1)[Increased since last month ({{difference}})];",
"decreased": "(0)[Decreased since yesterday ({{difference}})];(1)[Decreased since last month ({{difference}})];",
"noChanges": "(0)[No changes since yesterday];(1)[No changes since last month];",
"Total Servers": "{{count}} Servers",
"Total Users": "{{count}} Users",
"profileLikes": "{{count}} Likes",
Expand Down
6 changes: 3 additions & 3 deletions client/locales/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -882,9 +882,9 @@
},
"graph": {
"tooltip": {
"increased": "Dün'e oranla arttı ({{difference}})",
"decreased": "Dün'e oranla azaldı ({{difference}})",
"noChanges": "Dün'e oranla değişiklik yok",
"increased": "(0)[Dün'e oranla arttı ({{difference}})];(1)[Geçen ay'a oranla arttı ({{difference}})];",
"decreased": "(0)[Dün'e oranla azaldı ({{difference}})];(1)[Geçen ay'a oranla azaldı ({{difference}})];",
"noChanges": "(0)[Dün'e oranla değişiklik yok];(1)[Geçen ay'a oranla değişiklik yok];",
"Total Servers": "{{count}} Sunucu",
"Total Users": "{{count}} Kullanıcı",
"profileLikes": "{{count}} Beğeni",
Expand Down

0 comments on commit 51aaa3b

Please sign in to comment.