Browse Source

Merge "Use ordinal rules for retries"

changes/87/794987/1
Zuul 1 week ago
committed by Gerrit Code Review
parent
commit
9ffb66ed01
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      web/src/containers/status/ChangePanel.jsx

+ 8
- 1
web/src/containers/status/ChangePanel.jsx View File

@ -253,8 +253,15 @@ class ChangePanel extends React.Component {
renderJob (job) {
const { tenant } = this.props
let job_name = job.name
let ordinal_rules = new Intl.PluralRules('en', {type: 'ordinal'})
const suffixes = {
one: 'st',
two: 'nd',
few: 'rd',
other: 'th'
}
if (job.tries > 1) {
job_name = job_name + ' (' + job.tries + '. attempt)'
job_name = job_name + ' (' + job.tries + suffixes[ordinal_rules.select(job.tries)] + ' attempt)'
}
let name = ''
if (job.result !== null) {


Loading…
Cancel
Save