mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-13 21:14:50 +00:00
utils: never translate systemd unit states
Translating unit states might be counter productive in case of debugging, opt for not translating them and drop usage of the translation helper. This was spotted by several devs on doing translations in languages they know, so it really seems not right to add. Signed-off-by: Christian Ebner <c.ebner@proxmox.com> [ TL: add last sentence to add some weight to not doing that ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
2686922392
commit
461298d80a
12
src/Utils.js
12
src/Utils.js
@ -306,18 +306,6 @@ utilities: {
|
||||
return Ext.htmlEncode(username);
|
||||
},
|
||||
|
||||
systemdStates: {
|
||||
'enabled': gettext('enabled'),
|
||||
'disabled': gettext('disabled'),
|
||||
'running': gettext('running'),
|
||||
'dead': gettext('dead'),
|
||||
'not-found': gettext('not installed'),
|
||||
'static': gettext('static'),
|
||||
'reload': gettext('reload'),
|
||||
'start': gettext('starting'),
|
||||
'stop': gettext('stopping'),
|
||||
},
|
||||
|
||||
getStoredAuth: function() {
|
||||
let storedAuth = JSON.parse(window.localStorage.getItem('ProxmoxUser'));
|
||||
return storedAuth || {};
|
||||
|
@ -201,10 +201,7 @@ Ext.define('Proxmox.node.ServiceView', {
|
||||
width: 100,
|
||||
sortable: true,
|
||||
dataIndex: 'state',
|
||||
renderer: (value, meta, rec) => {
|
||||
const state = rec.get('state');
|
||||
return Proxmox.Utils.systemdStates[state] ?? state;
|
||||
},
|
||||
renderer: (value, meta, rec) => rec.get('state'),
|
||||
},
|
||||
{
|
||||
header: gettext('Active'),
|
||||
@ -219,10 +216,7 @@ Ext.define('Proxmox.node.ServiceView', {
|
||||
sortable: true,
|
||||
hidden: !Ext.Array.contains(['PVEAuthCookie', 'PBSAuthCookie'], Proxmox?.Setup?.auth_cookie_name),
|
||||
dataIndex: 'unit-state',
|
||||
renderer: (value, meta, rec) => {
|
||||
const unitState = rec.get('unit-state');
|
||||
return Proxmox.Utils.systemdStates[unitState] ?? unitState;
|
||||
},
|
||||
renderer: (value, meta, rec) => rec.get('unit-state'),
|
||||
},
|
||||
{
|
||||
header: gettext('Description'),
|
||||
|
Loading…
Reference in New Issue
Block a user