Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize laptop-mode-tools to support internationalization #170

Open
wants to merge 3 commits into
base: lmt-upstream
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------

Expand Down
2 changes: 1 addition & 1 deletion gui/lmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions pylupdate.sh
Original file line number Diff line number Diff line change
@@ -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/

Binary file modified usr/share/laptop-mode-tools/locale/zh_CN.qm
Binary file not shown.
Loading