fix: i18n

This commit is contained in:
Vlad Stan
2026-07-08 11:54:58 +03:00
parent 4cba73c183
commit 63050dbbbd
3 changed files with 15 additions and 4 deletions
+9 -1
View File
@@ -723,11 +723,19 @@ window.PageExtensions = {
resolve(grantedPermissions)
}
},
permissionI18nKey(permission) {
return `extension_permission_${permission.id.replace(/[^A-Za-z0-9]/g, '_')}`
},
permissionLabel(permission) {
const key = `extension_permission_${permission.id.replace(/[^A-Za-z0-9]/g, '_')}`
const key = this.permissionI18nKey(permission)
const label = this.$t(key)
return label === key ? permission.id : label
},
permissionDescription(permission) {
const key = `${this.permissionI18nKey(permission)}_desc`
const description = this.$t(key)
return description === key ? permission.description : description
},
async selectAllUpdatableExtensionss() {
this.updatableExtensions.forEach(e => (e.selectedForUpdate = true))
},