修改Web登录的默认语言
Proxmox VE 7.2.7
参考: https://forum.proxmox.com/threads/how-can-i-change-the-language-in-the-login-mask-to-default.11482/
1
2
3
4
5
6
| Hello, I know this is a very old subject, but I was looking for that option too, and manage to do it by just adding this in the
/etc/pve/datacenter.cfg,
under the "keyboard: fr" just add :
language: fr
save and restart the pveproxy.service.
it did it for me!
|
我希望修改为中文,但不知道中文的代号,于是同样参考上面这篇文章:
1
2
3
4
5
6
| ...
cp /usr/share/pve-manager/locale/pve-lang-de.js /usr/share/pve-manager/locale/pve-lang-en.js
cp /usr/share/pve-manager/ext4/locale/ext-lang-de.js /usr/share/pve-manager/ext4/locale/ext-lang-en.js
cp /usr/share/pve-manager/ext4/locale/ext-lang-de.js /usr/share/pve-manager/ext4/locale/ext-lang-en_GB.js
...
Bye
|
但是pve7.2.7的语言文件的位置改到了/usr/share/pve-i18n/
下
1
2
3
| $ ls /usr/share/pve-i18n/
...
pve-lang-da.js pve-lang-eu.js pve-lang-gl.js pve-lang-it.js pve-lang-nb.js pve-lang-pl.js pve-lang-sl.js pve-lang-zh_CN.js
|
由此可知,简体中文的代号为zh_CN
,于是修改/etc/pve/datacenter.cfg
为:
1
2
3
4
| /etc/pve/datacenter.cfg
-----
keyboard: en-us
language: zh_CN
|
最后重启pveproxy
服务:
1
| service pveproxy restart
|
去除未订阅提示
https://dannyda.com/2020/05/17/how-to-remove-you-do-not-have-a-valid-subscription-for-this-server-from-proxmox-virtual-environment-6-1-2-proxmox-ve-6-1-2-pve-6-1-2/
https://www.cnblogs.com/Sungeek/p/10366035.html
修改/usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
1
2
3
4
5
6
7
8
9
10
11
12
| --- proxmoxlib.js.bak 2022-10-21 16:18:29.107870274 +0800
+++ proxmoxlib.js 2022-10-21 16:23:21.978574954 +0800
@@ -510,8 +510,7 @@
},
success: function(response, opts) {
let res = response.result;
- if (res === null || res === undefined || !res || res
- .data.status.toLowerCase() !== 'active') {
+ if (false) {
Ext.Msg.show({
title: gettext('No valid subscription'),
icon: Ext.Msg.WARNING,
|
最后重启pveproxy服务:
1
| service pveproxy restart
|