Skip to content

Commit

Permalink
fix: the remaining time display in Nervos DAO is abnormal (#3239)
Browse files Browse the repository at this point in the history
* fix: the remaining time display is abnormal

* fix

* fix

* fix
  • Loading branch information
devchenyan authored Aug 27, 2024
1 parent e9eab5e commit 5c11fff
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
8 changes: 6 additions & 2 deletions packages/neuron-ui/src/components/NervosDAORecord/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ export const DAORecord = ({
break
}
case CellStatus.Deposited: {
if (leftHours) {
if (!compensationEndEpochValue) {
message = t('nervos-dao.compensation-period.stage-messages.calculating-the-compensation-cycle')
} else if (leftHours) {
message = t('nervos-dao.compensation-period.stage-messages.next-compensation-cycle-hours', {
hours: leftHours || '--',
})
Expand All @@ -149,7 +151,9 @@ export const DAORecord = ({
break
}
case CellStatus.Locked: {
if (leftHours) {
if (!compensationEndEpochValue) {
message = t('nervos-dao.compensation-period.stage-messages.calculating-the-compensation-cycle')
} else if (leftHours) {
message = t('nervos-dao.compensation-period.stage-messages.compensation-cycle-will-end-hours', {
hours: leftHours || '--',
})
Expand Down
3 changes: 2 additions & 1 deletion packages/neuron-ui/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,8 @@
"compensation-cycle-will-end": "Compensation cycle ends in approximately {{days}} days",
"compensation-cycle-will-end-hours": "Compensation cycle ends in approximately {{hours}} hours",
"compensation-cycle-has-ended": "Cycle has ended, CKB is ready to be unlocked",
"unlocking": "Unlocking..."
"unlocking": "Unlocking...",
"calculating-the-compensation-cycle": "Calculating the compensation cycle"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion packages/neuron-ui/src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,8 @@
"compensation-cycle-will-end": "El ciclo de compensación termina en aproximadamente {{days}} días",
"compensation-cycle-will-end-hours": "El ciclo de compensación termina en aproximadamente {{hours}} horas",
"compensation-cycle-has-ended": "El ciclo ha terminado, CKB está listo para ser desbloqueado",
"unlocking": "Desbloqueando..."
"unlocking": "Desbloqueando...",
"calculating-the-compensation-cycle": "Calculando el ciclo de compensación"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion packages/neuron-ui/src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,8 @@
"compensation-cycle-will-end": "La période de compensation se termine dans environ {{days}} jours",
"compensation-cycle-will-end-hours": "La période de compensation se termine dans environ {{hours}} heures",
"compensation-cycle-has-ended": "Le cycle est terminé, les CKB sont prêts à être déverrouillés",
"unlocking": "Déverrouillage en cours..."
"unlocking": "Déverrouillage en cours...",
"calculating-the-compensation-cycle": "Calculer le cycle de compensation"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion packages/neuron-ui/src/locales/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,8 @@
"compensation-cycle-will-end": "補償週期約在 {{days}} 天后結束",
"compensation-cycle-will-end-hours": "補償週期約在 {{hours}} 小時后結束",
"compensation-cycle-has-ended": "補償週期已結束, 可以解鎖 CKB",
"unlocking": "解鎖中..."
"unlocking": "解鎖中...",
"calculating-the-compensation-cycle": "正在計算補償週期"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion packages/neuron-ui/src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,8 @@
"compensation-cycle-will-end": "补偿周期约在 {{days}} 天后结束",
"compensation-cycle-will-end-hours": "补偿周期约在 {{hours}} 小时后结束",
"compensation-cycle-has-ended": "补偿周期已结束, 可以解锁 CKB",
"unlocking": "解锁中..."
"unlocking": "解锁中...",
"calculating-the-compensation-cycle": "正在计算补偿周期"
}
}
},
Expand Down

2 comments on commit 5c11fff

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 10569425880

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 10569427393

Please sign in to comment.