Skip to content

Commit

Permalink
perf: update i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Aug 13, 2024
1 parent 243ce5b commit 79e6b93
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 12 deletions.
26 changes: 15 additions & 11 deletions ui/src/components/GuacamoleConnect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,6 @@ export default {
actionPerm: 'writable',
users: []
},
expiredOptions: [
{ label: this.getMinuteLabel(1), value: 1 },
{ label: this.getMinuteLabel(5), value: 5 },
{ label: this.getMinuteLabel(10), value: 10 },
{ label: this.getMinuteLabel(20), value: 20 },
{ label: this.getMinuteLabel(60), value: 60 }
],
actionsPermOptions: [
{ label: i18n.t('Writable'), value: 'writable' },
{ label: i18n.t('ReadOnly'), value: 'readonly' }
],
userOptions: [],
userLoading: false,
shareCode: null,
Expand All @@ -268,6 +257,21 @@ export default {
width: this.displayWidth + 'px'
}
},
expiredOptions() {
return [
{ label: this.getMinuteLabel(1), value: 1 },
{ label: this.getMinuteLabel(5), value: 5 },
{ label: this.getMinuteLabel(10), value: 10 },
{ label: this.getMinuteLabel(20), value: 20 },
{ label: this.getMinuteLabel(60), value: 60 }
]
},
actionsPermOptions() {
return [
{ label: i18n.t('Writable'), value: 'writable' },
{ label: i18n.t('ReadOnly'), value: 'readonly' }
]
},
scaleValue() {
return Math.floor(this.scale * 100)
},
Expand Down
16 changes: 15 additions & 1 deletion ui/src/i18n/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,21 @@ export default {
hour: 'numeric', minute: 'numeric'
}
},
'cn': {
'zh': {
short: {
year: 'numeric', month: 'short', day: 'numeric'
},
medium: {
year: 'numeric', month: '2-digit', day: '2-digit',
hour: '2-digit', minute: '2-digit', second: '2-digit',
hourCycle: 'h23', hour12: false
},
long: {
year: 'numeric', month: 'short', day: 'numeric',
hour: 'numeric', minute: 'numeric', hour12: true
}
},
'zh_hant': {
short: {
year: 'numeric', month: 'short', day: 'numeric'
},
Expand Down

0 comments on commit 79e6b93

Please sign in to comment.