diff --git a/README.md b/README.md index f2b3bf3..7a059fc 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,10 @@ GUI Configuration Tool ---------------------- ![lmt-config-gui](https://github.com/rickysarraf/__pr0n/raw/master/LMT%20GUI.png) +Internationalization +---------------------- +Refer to the section Internationalization in https://github.com/rickysarraf/laptop-mode-tools/wiki + References ---------- diff --git a/gui/lmt.py b/gui/lmt.py index b97fcba..209ce1a 100644 --- a/gui/lmt.py +++ b/gui/lmt.py @@ -57,7 +57,7 @@ def __init__(self, parent=None): QMessageBox.warning(self, __doc__ + "- Warning", self.tr( 'This tool is running with root privileges.')) # title, icon and sizes - self.setWindowTitle(__doc__) + self.setWindowTitle(self.tr("Laptop Mode Tools")) self.setMinimumSize(400, 400) self.setMaximumSize(2048, 2048) self.resize(600, 600) diff --git a/pylupdate.sh b/pylupdate.sh new file mode 100755 index 0000000..854b396 --- /dev/null +++ b/pylupdate.sh @@ -0,0 +1,8 @@ +#! /bin/bash + +lang=$LANG +locale=`echo ${lang%%.*}` + +pylupdate5 gui/lmt.py -ts -noobsolete -verbose gui/$locale.ts +mv gui/$locale.ts usr/share/laptop-mode-tools/locale/ + diff --git a/usr/share/laptop-mode-tools/locale/zh_CN.qm b/usr/share/laptop-mode-tools/locale/zh_CN.qm index 39d4b64..605327c 100644 Binary files a/usr/share/laptop-mode-tools/locale/zh_CN.qm and b/usr/share/laptop-mode-tools/locale/zh_CN.qm differ diff --git a/usr/share/laptop-mode-tools/locale/zh_CN.ts b/usr/share/laptop-mode-tools/locale/zh_CN.ts index 1b639c0..265d705 100644 --- a/usr/share/laptop-mode-tools/locale/zh_CN.ts +++ b/usr/share/laptop-mode-tools/locale/zh_CN.ts @@ -3,413 +3,418 @@ MainWidget - + {} is not root, You need to run with root privileges. - 不是管理员,请以管理员身份运行 + {} 不是管理员,请以管理员身份运行 - + This tool is running with root privileges. 该工具以管理员身份运行 - + + Laptop Mode Tools + 笔记本电源管理工具 + + + &File 文件 - + Exit 退出 - + Module configuration 模块配置 - + Configuration settings for board-specific 板级指定配置 - + Configuration settings for ac97-powersave ac97电源节能配置 - + Configuration settings for auto-hibernat 自动待机配置 - + Configuration settings for battery-level-polling 电源电量监控配置 - + Configuration settings for bluetooth 蓝牙配置 - + Configuration settings for configuration-file-control 管理文件控制配置 - + Configuration settings for cpufreq CPU频率配置 - + Configuration settings for cpuhotplug CPU核热切换配置 - + Configuration settings for dpms-standby 显示待机配置 - + Configuration settings for eee-superhe eee-superhe配置 - + Configuration settings for ethernet 网络配置 - + Configuration settings for exec-commands 命令行配置 - + Configuration settings for hal-polling 硬件监控配置 - + Configuration settings for intel_pstate intel_pstate配置 - + Configuration settings for intel-hda-powersave intel-hda电源节能配置 - + Configuration settings for intel-sata-powermgmt intel-sata电源管理配置 - + Configuration settings for kbd-backlight Kbd背光配置 - + Configuration settings for lcd-brightness Lcd亮度配置 - + Configuration settings for nmi-watchdog nmi-watchdog配置 - + Configuration settings for nouveau nouveau配置 - + Configuration settings for pcie-aspm pcie-aspm配置 - + Configuration settings for radeon-dpm radeon-dpm配置 - + Configuration settings for runtime-pm runtime-pm配置 - + Configuration settings for sched-mc-power-savings sched-mc电源节能配置 - + Configuration settings for sched-smt-power-savings sched-smt电源节能配置 - + Configuration settings for start-stop-programs 启动/停止程序配置 - + Configuration settings for terminal-blanking terminal-blanking配置 - + Configuration settings for vgaswitcheroo vgaswitcheroo配置 - + Configuration settings for video-out 视频输出配置 - + Configuration settings for wireless-ipw-power wireless-ipw-power配置 - + Configuration settings for wireless-iwl-power wireless-iwl-power配置 - + Configuration settings for wireless-power wireless-power配置 - + Enable module board-specific 使能板级指定模块 - + Enable module ac97-powersave 使能ac97电源节能模块 - + Enable module auto-hibernat 使能自动休眠模块 - + Enable module battery-level-polling 使能电池电量监控模块 - + Enable module bluetooth 使能蓝牙模块 - + Enable module configuration-file-control 使能配置文件控制模块 - + Enable module cpufreq 使能CPU频率模块 - + Enable module cpuhotplug 使能cpu核热切换模块 - + Enable module dpms-standby 使能显示显示待机模块 - + Enable module eee-superhe 使能eee-superhe模块 - + Enable module ethernet 使能网络模块 - + Enable module exec-commands 使能命令行模块 - + Enable module hal-polling 使能硬件监控模块 - + Enable module intel_pstate 使能intel_pstate模块 - + Enable module intel-hda-powersave 使能intel-hda电源节能模块 - + Enable module intel-sata-powermgmt 使能intel-sata电源管理模块 - + Enable module kbd-backlight 使能Kbd背光模块 - + Enable module lcd-brightness 使能Lcd亮度模块 - + Enable module nmi-watchdog 使能nmi-watchdog模块 - + Enable module nouveau 使能nouveau模块 - + Enable module pcie-aspm 使能pcie-aspm模块 - + Enable module radeon-dpm 使能radeon-dpm模块 - + Enable module runtime-pm 使能runtime-pm模块 - + Enable module sched-mc-power-savings 使能sched-mc电源节能模块 - + Enable module sched-smt-power-savings 使能sched-smt电源节能模块 - + Enable module start-stop-programs 使能启动/停止程序模块 - + Enable module terminal-blanking 使能terminal-blanking模块 - + Enable module vgaswitcheroo 使能vgaswitcheroo模块 - + Enable module video-out 使能视频输出模块 - + Enable module wireless-ipw-power 使能wireless-ipw-power模块 - + Enable module wireless-iwl-power 使能wireless-iwl-power模块 - + Enable module wireless-power 使能wireless-power模块 - + Confirm 确认 - + Hibernate 休眠 - + Trigger Suspend to Disk Hibernate 触发磁盘休眠 - + Sleep 睡眠 - + Trigger Suspend to RAM aka Sleep 触发RAM休眠 - + Close 关闭 - + Help 帮助 - + Quit ?. 停止 ?. - + Error 错误 - + Couldn't apply all requested settings 不能应用所有请求的设置 - + Success 成功 - + Applied all requested settings 应用所有请求的设置 - + If you enable this setting, laptop mode tools will automatically set the powersave mode of AC97 audio chipsets. This setting does not hurt, so there are no AC vs. battery settings: if CONTROL_AC97_POWER is set to 1, @@ -422,7 +427,7 @@ CONTROL_AC97_POWER设置为1, 节电模式始终处于启用状态。 - + Using these settings, you can make laptop mode tools automatically put your computer into hibernation when the battery level goes critically low. @@ -454,7 +459,7 @@ laptop-mode.conf 配置文件中。如果他们仍然存在,那现在的配置 - + This module allows laptop mode to react to battery level changes, even if the battery does not send out frequent ACPI events for such battery level changes. @@ -466,7 +471,7 @@ Note that this does NOT make ACPI-only features work on non-ACPI hardware. - + If you enable this module, laptop mode tools will enable/disable bluetooth depending on the power status of your laptop. Bluetooth uses a considerable amount of power (comparable to wireless networking), and disabling it is @@ -478,7 +483,7 @@ Note that this does NOT make ACPI-only features work on non-ACPI hardware. - + Laptop mode tools can automatically swap out configuration files depending on the power state of your system. @@ -526,7 +531,7 @@ Syslog守护进程倾向于在以下情况下同步它们的日志文件 并且该设置不会迁移。 您必须手动执行此操作。 - + Laptop mode tools can automatically adjust your kernel CPU frequency settings. This includes upper and lower limits and scaling governors. There is also support for CPU throttling, on systems that don't support @@ -552,7 +557,7 @@ laptop-mode.conf 配置文件中。如果他们仍然存在,那现在的配置 - + Laptop mode tools can automatically switch off multiple CPU cores when switching to battery. This can be very useful if your use does not involve CPU intensive @@ -571,7 +576,7 @@ Enalbe it only if you understand what you are doing - + Using these settings, you can let laptop mode tools control the X display standby timeouts. @@ -601,13 +606,13 @@ X设置不会在登录时自动开启,这是 - + Enable this setting if you have an eeepc laptop 如果您有 eeepc 笔记本电脑,请启用此设置 - + There are various ways to save power with ethernet. This section allows you to control the speed of your ethernet connection, and your wakeup-on-LAN settings. Both these things can have quite a power impact if you use Ethernet. @@ -623,7 +628,7 @@ Note: Changing ethernet device speed may require link up/down on some devices. - + If you enable this setting, laptop mode tools will execute the specified commands on mode change. Please double test your commands before adding them here @@ -633,7 +638,7 @@ Note: Changing ethernet device speed may require link up/down on some devices. - + If you enable this module, laptop mode tools will control the polling of your CD/DVD drives by HAL. Disabling polling saves a considerable amount of power, but for some older CD/DVD drives it means that inserted CDs are no @@ -652,7 +657,7 @@ HAL的CD/DVD 驱动器。 禁用轮询可以节省大量电能, - + Laptop mode tools can automatically adjust your kernel CPU frequency settings. This module handles Intel PState driver, that is somewhat different from other cpufreq drivers. @@ -666,12 +671,12 @@ This feature is present only on kernels 3.9 and later. - + Enable this setting to save some power with your Intel HDA Audio Chipset device. 启用此设置可以在使用Intel HDA 音频芯片组设备时节省一些电量。 - + If you enable this setting, laptop mode tools will automatically enable the link power management mode of Intel AHCI compliant SATA chipsets. On newer kernels (4.6+), it can also help enable AHCI Runtime PM savings @@ -680,7 +685,7 @@ Intel AHCI 兼容SATA芯片组的链接电源管理模式。 在较新的内核 (4.6+) 上,它还可以帮助开启AHCI运行时PM节省功能 - + Using these settings, you can make laptop mode tools automatically adjust your keyboard's backlight settings, if your driver supports it. The settings are extremely simple -- they @@ -728,7 +733,52 @@ As far as I understand it the values are between 0 and - + + Using these settings, you can make laptop mode tools automatically adjust + your LCD's brightness settings. The settings are extremely simple -- they + only allow for the execution of a command, nothing more. The reason for this + is that LCD brightness settings are very different between laptop vendors. + +Suggestions for commands: + +* If your system has the file "/proc/acpi/video/VID/LCD/brightness" (VID may + be VID1 or similar), use this file as BRIGHTNESS_OUTPUT, and use + the command "echo <value>". The possible values can be listed using the + command: + + cat "/proc/acpi/video/VID/LCD/brightness + +* If you have a file /sys/class/backlight/.../brightness, then you can use + that file as BRIGHTNESS_OUTPUT, and the command "echo <value>". + +As far as I understand it the values are between 0 and + the value contained in the file "/sys/class/backlight/.../max_brightness. + +* For Toshiba laptops, use the command "toshset" with the -lcd or -inten + command. Read the toshset(1) manual page for more information on the + parameters for this command. If you use this command, set + BRIGHTNESS_OUTPUT to "/dev/null". + 使用这些设置,您可以使笔记本电脑模式工具自动调整 +LCD 的亮度设置。设置很简单——它们 +只需要执行一个命令,仅此而已。这样做是因为不同笔记本电脑供应商之间的 LCD 亮度设置差异很大。 + +命令建议: + * 如果您的系统有文件“/proc/acpi/video/VID/LCD/brightness”(VID 可能 + 是 VID1 或类似),将此文件用作 BRIGHTNESS_OUTPUT,并使用 + 命令“echo+值”。可以使用以下命令列出可能的值 + 命令: + cat /proc/acpi/video/VID/LCD/brightness + * 如果你有一个文件 /sys/class/backlight/.../brightness,那么你可以使用 + 该文件为 BRIGHTNESS_OUTPUT,以及命令“echo+值”。 + 据我了解,值是介于0和包含在文件 /sys/class/backlight/.../max_brightness 中的值。 + * 对于东芝笔记本电脑,使用带有 -lcd 或 -inten 参数“toshset”的 + 命令。阅读 toshset(1) 手册页以了解有关 + 此命令的参数。如果您使用此命令,请设置 + BRIGHTNESS_OUTPUT 到“/dev/null”。 + + + + If you enable this setting, laptop mode tools will automatically configure the NMI Watchdog timer to save power while running on battery mode. @@ -740,12 +790,12 @@ NMI看门狗定时器当运行在电池模式下时,以节省电能。 - + Enable this setting if you have an nvidia card with nouveau driver 如果您有带 nouveau 驱动程序的 nvidia 卡,请启用此设置 - + If you enable this setting, laptop mode tools will automatically configure PCIe ASPM to save power while running on battery mode. @@ -760,12 +810,12 @@ PCIe ASPM 来节省电能当在电池模式下工作时。 - + Enable this setting to save some power on your Radeon VGA card 启用此设置以节省 Radeon VGA 卡的电量 - + If you enable this setting, laptop mode tools will automatically enable the Runtime Power Management feature for all devices. @@ -785,7 +835,7 @@ NOTE: Some devices claim they support autosuspend, but implement it in a - + If you enable this setting, laptop mode tools will automatically configure the Linux scheduler to save power on multi-core processors while running on battery mode. @@ -794,7 +844,7 @@ Linux调度以节省电能,当机器运行在多核处理器的电池模式下 - + If you enable this setting, laptop mode tools will automatically configure the Linux scheduler to save power on SMT processors while running on battery mode. @@ -803,7 +853,7 @@ Linux以节省电能,当机器运行在SMT处理器的电池模式下时。 - + Laptop mode tools can automatically start and stop programs when entering various power modes. Put scripts accepting "start" and "stop" parameters in the directories @@ -856,7 +906,7 @@ laptop-mode.conf 配置文件中。如果他们仍然存在,那现在的配置 - + Using these settings, you can let laptop mode tools control the terminal blanking timeouts. This only works for linux virtual consoles. @@ -874,7 +924,7 @@ laptop-mode.conf 配置文件中。如果他们仍然存在,那现在的配置 - + vga_switcheroo is the Linux subsystem for laptop hybrid graphics. For hybrid graphics machines, the discrete graphics chip usually is idle most of the time. @@ -888,7 +938,7 @@ laptop-mode.conf 配置文件中。如果他们仍然存在,那现在的配置 - + It is not always possible for video hardware to detect if displays are actually connected to VGA out and/or TV out ports. However, an enabled video output port draws power, even if no display is connected. This module allows @@ -900,7 +950,7 @@ laptop-mode.conf 配置文件中。如果他们仍然存在,那现在的配置 - + If you enable this setting, laptop mode tools will automatically set the powersave mode of Intel IPW3945, IPW2200 and IPW2100 wireless adapters. 如果启用此设置,笔记本电脑模式工具将自动设置 @@ -908,7 +958,7 @@ Intel IPW3945、IPW2200 和 IPW2100 无线适配器的省电模式。 - + If you enable this setting, laptop mode tools will automatically set the powersave mode of Intel wireless adapters supported by the iwlagn driver (including 4965, 5100, 5300, 5350, 5150, 1000, and @@ -925,7 +975,7 @@ iwlagn 驱动程序(包括 4965、5100、5300、5350、5150、1000 和 - + If you enable this setting, laptop mode tools will automatically set the power saving mode of wireless interfaces which support power saving using the iwconfig power on/off setting. @@ -933,50 +983,5 @@ iwlagn 驱动程序(包括 4965、5100、5300、5350、5150、1000 和 对于支持通过iwconfig 电源开/关设置的无线网络接口。 - - - Using these settings, you can make laptop mode tools automatically adjust - your LCD's brightness settings. The settings are extremely simple -- they - only allow for the execution of a command, nothing more. The reason for this - is that LCD brightness settings are very different between laptop vendors. - -Suggestions for commands: - -* If your system has the file "/proc/acpi/video/VID/LCD/brightness" (VID may - be VID1 or similar), use this file as BRIGHTNESS_OUTPUT, and use - the command "echo <value>". The possible values can be listed using the - command: - - cat "/proc/acpi/video/VID/LCD/brightness - -* If you have a file /sys/class/backlight/.../brightness, then you can use - that file as BRIGHTNESS_OUTPUT, and the command "echo <value>". - -As far as I understand it the values are between 0 and - the value contained in the file "/sys/class/backlight/.../max_brightness. - -* For Toshiba laptops, use the command "toshset" with the -lcd or -inten - command. Read the toshset(1) manual page for more information on the - parameters for this command. If you use this command, set - BRIGHTNESS_OUTPUT to "/dev/null". - 使用这些设置,您可以使笔记本电脑模式工具自动调整 -LCD 的亮度设置。设置很简单——它们 -只需要执行一个命令,仅此而已。这样做是因为不同笔记本电脑供应商之间的 LCD 亮度设置差异很大。 - -命令建议: - * 如果您的系统有文件“/proc/acpi/video/VID/LCD/brightness”(VID 可能 - 是 VID1 或类似),将此文件用作 BRIGHTNESS_OUTPUT,并使用 - 命令“echo+值”。可以使用以下命令列出可能的值 - 命令: - cat /proc/acpi/video/VID/LCD/brightness - * 如果你有一个文件 /sys/class/backlight/.../brightness,那么你可以使用 - 该文件为 BRIGHTNESS_OUTPUT,以及命令“echo+值”。 - 据我了解,值是介于0和包含在文件 /sys/class/backlight/.../max_brightness 中的值。 - * 对于东芝笔记本电脑,使用带有 -lcd 或 -inten 参数“toshset”的 - 命令。阅读 toshset(1) 手册页以了解有关 - 此命令的参数。如果您使用此命令,请设置 - BRIGHTNESS_OUTPUT 到“/dev/null”。 - -