├── .gitignore ├── .python-version ├── AppImage ├── .gitignore ├── com.github.d4nj1.tlpui.appdata.xml ├── com.github.d4nj1.tlpui.pkg.yml └── pkg2appimage.sh ├── COPYING.md ├── LICENSE.md ├── README.md ├── docs ├── DEVELOPMENT.md ├── INSTALL.md ├── README.md ├── schema_to_ui.jpg ├── schema_to_ui.xml ├── ui_config.png └── yaml_config.png ├── poetry.lock ├── pyproject.toml ├── screenshots ├── tlpui-01.png ├── tlpui-02.png └── tlpui-03.png ├── tests ├── __init__.py ├── test_tlp_configs.py └── test_tlp_settings.py ├── tlpui.desktop ├── tlpui ├── __init__.py ├── __main__.py ├── config.py ├── configschema │ ├── 1_3.yaml │ ├── 1_4.yaml │ ├── 1_5.yaml │ ├── 1_6.yaml │ ├── 1_7.yaml │ └── 1_8.yaml ├── configui.py ├── constants.py ├── css.py ├── defaults │ ├── tlp-1_3.conf │ ├── tlp-1_4.conf │ ├── tlp-1_5.conf │ ├── tlp-1_6.conf │ ├── tlp-1_7.conf │ └── tlp-1_8.conf ├── errorui.py ├── file.py ├── filehelper.py ├── icons │ ├── ICON-AUTHORS │ ├── OnAC.svg │ ├── OnBAT.svg │ ├── dropin.svg │ ├── flags │ │ ├── de_DE.png │ │ ├── en_EN.png │ │ ├── es_ES.png │ │ ├── fr_FR.png │ │ ├── id_ID.png │ │ ├── pt_BR.png │ │ ├── ru_RU.png │ │ ├── tr_TR.png │ │ ├── zh.png │ │ ├── zh_CN.png │ │ └── zh_TW.png │ ├── themeable │ │ └── hicolor │ │ │ ├── 128x128 │ │ │ └── apps │ │ │ │ └── tlpui.png │ │ │ ├── 16x16 │ │ │ └── apps │ │ │ │ └── tlpui.png │ │ │ ├── 256x256 │ │ │ └── apps │ │ │ │ └── tlpui.png │ │ │ ├── 32x32 │ │ │ └── apps │ │ │ │ └── tlpui.png │ │ │ ├── 48x48 │ │ │ └── apps │ │ │ │ └── tlpui.png │ │ │ ├── 64x64 │ │ │ └── apps │ │ │ │ └── tlpui.png │ │ │ ├── 96x96 │ │ │ └── apps │ │ │ │ └── tlpui.png │ │ │ └── scalable │ │ │ ├── actions │ │ │ ├── dialog-information-symbolic.svg │ │ │ ├── document-save-symbolic.svg │ │ │ ├── edit-symbolic.svg │ │ │ ├── format-indent-more-symbolic.svg │ │ │ ├── list-add-symbolic.svg │ │ │ ├── tlpui-Audio-symbolic.svg │ │ │ ├── tlpui-Disks-symbolic.svg │ │ │ ├── tlpui-Dock-symbolic.svg │ │ │ ├── tlpui-General-symbolic.svg │ │ │ ├── tlpui-Graphics-symbolic.svg │ │ │ ├── tlpui-Network-symbolic.svg │ │ │ ├── tlpui-PCIe-symbolic.svg │ │ │ ├── tlpui-Processor-symbolic.svg │ │ │ ├── tlpui-Radio-Device-Wizard-symbolic.svg │ │ │ ├── tlpui-Radio-symbolic.svg │ │ │ ├── tlpui-ThinkPad-Battery-symbolic.svg │ │ │ ├── tlpui-USB-symbolic.svg │ │ │ └── view-refresh-symbolic.svg │ │ │ └── apps │ │ │ └── tlpui.svg │ └── user.svg ├── lang │ ├── de_DE │ │ └── LC_MESSAGES │ │ │ ├── configdescriptions.mo │ │ │ ├── configdescriptions.po │ │ │ ├── mainui.mo │ │ │ ├── mainui.po │ │ │ ├── statui.mo │ │ │ ├── statui.po │ │ │ ├── uihelper.mo │ │ │ └── uihelper.po │ ├── en_EN │ │ └── LC_MESSAGES │ │ │ ├── configdescriptions.mo │ │ │ ├── configdescriptions.po │ │ │ ├── mainui.mo │ │ │ ├── mainui.po │ │ │ ├── statui.mo │ │ │ ├── statui.po │ │ │ ├── uihelper.mo │ │ │ └── uihelper.po │ ├── es_ES │ │ └── LC_MESSAGES │ │ │ ├── configdescriptions.mo │ │ │ ├── configdescriptions.po │ │ │ ├── mainui.mo │ │ │ ├── mainui.po │ │ │ ├── statui.mo │ │ │ ├── statui.po │ │ │ ├── uihelper.mo │ │ │ └── uihelper.po │ ├── fr_FR │ │ └── LC_MESSAGES │ │ │ ├── configdescriptions.mo │ │ │ ├── configdescriptions.po │ │ │ ├── mainui.mo │ │ │ ├── mainui.po │ │ │ ├── statui.mo │ │ │ ├── statui.po │ │ │ ├── uihelper.mo │ │ │ └── uihelper.po │ ├── id_ID │ │ └── LC_MESSAGES │ │ │ ├── configdescriptions.mo │ │ │ ├── configdescriptions.po │ │ │ ├── mainui.mo │ │ │ ├── mainui.po │ │ │ ├── statui.mo │ │ │ ├── statui.po │ │ │ ├── uihelper.mo │ │ │ └── uihelper.po │ ├── pt_BR │ │ └── LC_MESSAGES │ │ │ ├── configdescriptions.mo │ │ │ ├── configdescriptions.po │ │ │ ├── mainui.mo │ │ │ ├── mainui.po │ │ │ ├── statui.mo │ │ │ ├── statui.po │ │ │ ├── uihelper.mo │ │ │ └── uihelper.po │ ├── ru_RU │ │ └── LC_MESSAGES │ │ │ ├── configdescriptions.mo │ │ │ ├── configdescriptions.po │ │ │ ├── mainui.mo │ │ │ ├── mainui.po │ │ │ ├── statui.mo │ │ │ ├── statui.po │ │ │ ├── uihelper.mo │ │ │ └── uihelper.po │ ├── tr_TR │ │ └── LC_MESSAGES │ │ │ ├── configdescriptions.mo │ │ │ ├── configdescriptions.po │ │ │ ├── mainui.mo │ │ │ ├── mainui.po │ │ │ ├── statui.mo │ │ │ ├── statui.po │ │ │ ├── uihelper.mo │ │ │ └── uihelper.po │ ├── zh_CN │ │ └── LC_MESSAGES │ │ │ ├── configdescriptions.mo │ │ │ ├── configdescriptions.po │ │ │ ├── mainui.mo │ │ │ ├── mainui.po │ │ │ ├── statui.mo │ │ │ ├── statui.po │ │ │ ├── uihelper.mo │ │ │ └── uihelper.po │ └── zh_TW │ │ └── LC_MESSAGES │ │ ├── configdescriptions.mo │ │ ├── configdescriptions.po │ │ ├── mainui.mo │ │ ├── mainui.po │ │ ├── statui.mo │ │ ├── statui.po │ │ ├── uihelper.mo │ │ └── uihelper.po ├── language.py ├── mainui.py ├── settings.py ├── settingshelper.py ├── statui.py ├── styles.css ├── ui_config_objects │ ├── __init__.py │ ├── gtkcheckbutton.py │ ├── gtkdisklist.py │ ├── gtkdisklistview.py │ ├── gtkentry.py │ ├── gtkmultiselection.py │ ├── gtkpcilist.py │ ├── gtkselection.py │ ├── gtkspinbutton.py │ ├── gtkswitch.py │ ├── gtktoggle.py │ └── gtkusblist.py └── uihelper.py ├── tox.ini ├── translationStringsExtractor.py └── translationValidationHelper.py /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | .idea 3 | .tox 4 | .coverage 5 | dist/ 6 | venv/ 7 | tlpui/lang/configschema.yaml.h 8 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.9 2 | 3.10 3 | 3.11 4 | 3.12 5 | 3.13 -------------------------------------------------------------------------------- /AppImage/.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | com.github.d4nj1.tlpui/ 3 | pkg2appimage-*-x86_64.AppImage -------------------------------------------------------------------------------- /AppImage/com.github.d4nj1.tlpui.pkg.yml: -------------------------------------------------------------------------------- 1 | app: com.github.d4nj1.tlpui 2 | ingredients: 3 | dist: mantic 4 | sources: 5 | - deb http://archive.ubuntu.com/ubuntu/ mantic main universe 6 | - deb http://archive.ubuntu.com/ubuntu/ mantic-updates main universe 7 | - deb http://archive.ubuntu.com/ubuntu/ mantic-security main universe 8 | packages: 9 | - python3-venv 10 | - python3-gi 11 | exclude: 12 | 13 | script: 14 | # Get master branch 15 | - wget -c https://codeload.github.com/d4nj1/TLPUI/zip/refs/heads/master && unzip master && rm master 16 | # Add appdata 17 | - mkdir -p usr/share/metainfo/ 18 | - cp TLPUI-master/AppImage/com.github.d4nj1.tlpui.appdata.xml usr/share/metainfo/ 19 | # Add tlpui icon 20 | - cp TLPUI-master/tlpui/icons/themeable/hicolor/scalable/apps/tlpui.svg com.github.d4nj1.tlpui.svg 21 | - mkdir -p ./usr/share/icons/hicolor/scalable/apps/ 22 | - cp com.github.d4nj1.tlpui.svg ./usr/share/icons/hicolor/scalable/apps/com.github.d4nj1.tlpui.svg 23 | # Add .desktop file and change icon name 24 | - cp TLPUI-master/tlpui.desktop com.github.d4nj1.tlpui.desktop 25 | - desktop-file-edit --set-icon=com.github.d4nj1.tlpui com.github.d4nj1.tlpui.desktop 26 | - mkdir -p usr/share/applications 27 | - cp com.github.d4nj1.tlpui.desktop usr/share/applications/com.github.d4nj1.tlpui.desktop 28 | # Move Python scripts to proper location 29 | - mv TLPUI-master/tlpui . 30 | # Add tlpui starter script with execute permission 31 | - cat > usr/bin/tlpui <<\EOF 32 | # Remove PYTHONPATH and PYTHONHOME to avoid Python encoding error bug 33 | - unset PYTHONPATH 34 | - unset PYTHONHOME 35 | - cd ../ && python3 -m tlpui 36 | - EOF 37 | - chmod +x usr/bin/tlpui 38 | # Clean unused data 39 | - rm -rf TLPUI-master 40 | # Fix undefined symbol: g_string_free_and_steal 41 | - rm -rf usr/share/glib-2.0/schemas/ 42 | -------------------------------------------------------------------------------- /AppImage/pkg2appimage.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Download pkg2appimage tool and use it 3 | wget -c $(wget -q https://api.github.com/repos/AppImageCommunity/pkg2appimage/releases -O - | grep "pkg2appimage-.*-x86_64.AppImage" | grep browser_download_url | head -n 1 | cut -d '"' -f 4) 4 | chmod +x ./pkg2appimage-*.AppImage 5 | ARCH=x86_64 ./pkg2appimage-*.AppImage com.github.d4nj1.tlpui.pkg.yml 6 | mv out/TLP_UI-.glibc2.38-x86_64.AppImage out/TLP_UI-x86_64.AppImage 7 | -------------------------------------------------------------------------------- /COPYING.md: -------------------------------------------------------------------------------- 1 | Author: 2 | 3 | Daniel Christophis - 4 | 5 | Copyrights: 6 | 7 | Copyright (c) 2025 Daniel Christophis 8 | 9 | Descriptions were adapted from 10 | - TLP (https://github.com/linrunner/TLP) 11 | Copyright (c) 2024 by Thomas Koch 12 | 13 | License: 14 | 15 | This software is licensed under the GPL v2 or later, 16 | see '/usr/share/common-licenses/GPL-2' 17 | 18 | TLPUI logo icon is licensed under 19 | https://creativecommons.org/licenses/by-sa/4.0/ 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | TLP UI 3 | 4 | ## TLP UI 5 | 6 | The Python scripts in this project generate a GTK-UI to change [TLP](https://github.com/linrunner/TLP) configuration files easily. 7 | It has the aim to protect users from setting bad configuration and to deliver a basic overview of all the valid configuration values. 8 | 9 | Screenshot 10 | 11 | ### Install and run instructions :ledger: 12 | 13 | * [PyPI](https://github.com/d4nj1/TLPUI/blob/master/docs/INSTALL.md#pypi) 14 | * [Poetry](https://github.com/d4nj1/TLPUI/blob/master/docs/INSTALL.md#poetry) 15 | * [Python 3](https://github.com/d4nj1/TLPUI/blob/master/docs/INSTALL.md#python-3) 16 | * [Arch Linux](https://github.com/d4nj1/TLPUI/blob/master/docs/INSTALL.md#arch-linux) 17 | 18 | Download on Flathub 19 | 20 | ### Current status :sunrise_over_mountains: 21 | 22 | * Supports TLP versions 1.3-1.8 - _older TLP versions are supported by [1.6.1](https://github.com/d4nj1/TLPUI/releases/tag/tlpui-1.6.1)_ 23 | * Requires Python 3.9 or greater 24 | * Configuration can be read and displayed 25 | * Shows information about configuration changes (defaults/unsaved and drop-in/user config) 26 | * Changes can be saved with user and sudo permissions (/etc/tlp.conf) 27 | * tlp-stat can be load in ui (simple and complete) 28 | 29 | ### To be done :building_construction: 30 | 31 | * Weblate translations - [#121](https://github.com/d4nj1/TLPUI/issues/121) 32 | * Mobile UI - [#111](https://github.com/d4nj1/TLPUI/issues/111) 33 | * Implement package build pipeline - [#90](https://github.com/d4nj1/TLPUI/issues/90) 34 | -------------------------------------------------------------------------------- /docs/DEVELOPMENT.md: -------------------------------------------------------------------------------- 1 | This documentation has the aim to enable future development of features and improvements for the TLP-UI project. 2 | It consists the idea behind the UI and a description of the internal structure. 3 | 4 | # Idea 5 | 6 | The idea of this projects was and is to build a graphical application which has the ability to be created on runtime for 7 | any supported version of the TLP configuration file. Many UIs contain the weakness that they have to be rebuild 8 | whenever there haven been changes to the main application even though the base configuration has not changed much. 9 | 10 | # Solution 11 | 12 | TLP-UI tries to solve this with a different approach. It supports an easy way to enable version updates to the UI 13 | without touching the code itself. By creating the config objects on-the-fly, the UI has the ability to be created 14 | for updated TLP configuration files only by providing an updated schema file. This file describes the configuration 15 | items and it's supported values. 16 | 17 | # Configuration schema 18 | 19 | The schema file contains multiple nested items. Categories contain groups of configs or configs directly. Categories are 20 | visualized as Gtk.Viewport within a Gtk.Notebook that contains a Gtk.Box with all related config group and items. 21 | Groups contain multiple config items that belong to each other and is translated into a Gtk.Label for better visibility. 22 | 23 | **Categories -> Configs/Config-groups -> Configs** 24 | 25 | Every config item contains: 26 | 27 | ## id: 28 | 29 | The name of the config file which matches the exact value in the TLP config file. 30 | 31 | ## type: 32 | 33 | The type of the config item which on the one hand defines the config options and on the other hand translates 34 | to a specific Gtk config object or set of GTK objects. 35 | 36 | ### Basic config items 37 | 38 | | type | GTK widget | Description | 39 | |--|------------|-------------------------------------------| 40 | | bselect | GTK.Switch | Activate or deactivate config state. First value is disable, second one enable | 41 | | select | Gtk.ComboBoxText | Select box for pre defined values. Only one can be selected | 42 | | multiselect | Gtk.ToggleButton | Multiple toggle buttons which can be selected independently | 43 | | check | Gtk.CheckButton | Multiple check buttons which can be selected independently | 44 | | numeric | Gtk.SpinButton | Number selection for numeric config items | 45 | | entry | Gtk.Entry | Free text field for too complex values or if no complex config item has been created yet | 46 | 47 | ### Complex config items 48 | 49 | | type | Description | 50 | |--|--------------------------------| 51 | | disklist | Collection of multiple Gtk widgets that create a local disk overview | 52 | | disklistview | Label for disklist item values | 53 | | pcilist | Collection of multiple Gtk widgets that create a local pci device overview | 54 | | usblist | Collection of multiple Gtk widgets that create a local usb device overview | 55 | 56 | ## values: 57 | 58 | Values are used to define ranges or to specify available configs. 59 | 60 | ## Schema to UI transition 61 | 62 | The image below shows how the items from the configschema.yaml files translate to UI objects in Gtk. 63 | 64 | ![schema-to-ui](schema_to_ui.jpg "Schema to UI") 65 | -------------------------------------------------------------------------------- /docs/INSTALL.md: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | 3 | In order to use Tlp-ui, make sure Tlp is installed first. 4 | 5 | *Debian* 6 | ```sh 7 | sudo apt install tlp tlp-rdw 8 | ``` 9 | 10 | *Arch / Manjaro* 11 | ```shell 12 | sudo pacman -S tlp tlp-rdw 13 | ``` 14 | 15 | 16 | # Prepacked runtimes 17 | 18 | ## PyPI 19 | 20 | Tlp-ui is available on [pypi.org](https://pypi.org/project/tlp-ui/) and can simple be installed via. 21 | 22 | ```shell 23 | pip3 install tlp-ui 24 | ``` 25 | 26 | ## Flatpak 27 | 28 | Instructions on how to install Flatpak version of Tlp-ui can be found [here](https://flathub.org/apps/com.github.d4nj1.tlpui). 29 | 30 | ## Arch Linux 31 | 32 | [tlpui](https://aur.archlinux.org/packages/tlpui/) - Stable release. 33 | 34 | [tlpui-git](https://aur.archlinux.org/packages/tlpui-git) - If you always want to use the latest and greatest master branch version from Tlp-ui repository. 35 | 36 | 37 | # Run from sources 38 | 39 | If you want to run Tlp-ui from sources you have to install Gtk libraries first. 40 | 41 | *Debian* 42 | ```shell 43 | sudo apt install libcairo2-dev libgirepository1.0-dev 44 | ``` 45 | 46 | *Arch / Manjaro* 47 | ```shell 48 | sudo pacman -S cairo gobject-introspection gtk3 49 | ``` 50 | 51 | * Download and extract ZIP or pull repository 52 | * Open terminal and go to project folder 53 | 54 | ## Poetry 55 | 56 | Make sure Poetry is installed on your system then install and run Tlp-ui with it's dependencies. 57 | 58 | ```shell 59 | poetry install 60 | poetry run tlpui 61 | ``` 62 | 63 | ## Python 3 64 | 65 | If you want to run Tlp-ui as a Python module just execute 66 | 67 | ```shell 68 | python3 -m tlpui 69 | ``` 70 | 71 | If you run in to issues when calling Tlp-ui like this, please try to solve by installing the following dependencies. 72 | 73 | ```shell 74 | pip3 install 'PyGObject>=3.46.0' 'PyYAML>=6.0.1' 'toml>=0.10.2' 75 | ``` 76 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | In this place you will find all documentation in regards to installing, developing or contributing to TLP-UI. 2 | 3 | # Install 4 | 5 | This can be found in [install docs](INSTALL.md). 6 | 7 | # Development 8 | 9 | Please see [development docs](DEVELOPMENT.md) for implementation and technical details. 10 | 11 | # Contributions 12 | 13 | Contributions in the form of fixes and improvements are always welcome. Please feel free to open an issue request 14 | whenever you want to discuss any subject. 15 | 16 | # Translations 17 | 18 | Existing translations are handled by [Weblate](https://hosted.weblate.org/projects/tlpui/). If you want to add a new 19 | language please open a issue request and I will go ahead and create the necessary stubs on Weblate for it. 20 | -------------------------------------------------------------------------------- /docs/schema_to_ui.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/docs/schema_to_ui.jpg -------------------------------------------------------------------------------- /docs/ui_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/docs/ui_config.png -------------------------------------------------------------------------------- /docs/yaml_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/docs/yaml_config.png -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "tlp-ui" 3 | version = "1.8.0" 4 | description = "GTK UI for tlp" 5 | license = "GPL-2.0-or-later" 6 | authors = ["Daniel Christophis "] 7 | readme = "README.md" 8 | homepage = "https://github.com/d4nj1/TLPUI" 9 | repository = "https://github.com/d4nj1/TLPUI" 10 | documentation = "https://github.com/d4nj1/TLPUI/docs" 11 | keywords = ["battery", "power", "config"] 12 | classifiers = ["Topic :: Utilities"] 13 | packages = [{include = "tlpui"}] 14 | 15 | [tool.poetry.build] 16 | generate-setup-file = true 17 | 18 | [tool.poetry.scripts] 19 | tlpui = "tlpui.__main__:main" 20 | 21 | [tool.poetry.dependencies] 22 | python = "^3.9.0" 23 | pygobject = "^3.46.0" 24 | pyyaml = "^6.0.1" 25 | 26 | [tool.poetry.group.dev.dependencies] 27 | tox = "^4.12.1" 28 | pytest = "^7.4.4" 29 | pytest-cov = "^4.1.0" 30 | pylint = "^3.0.3" 31 | pycodestyle = "^2.11.1" 32 | pydocstyle = "^6.3.0" 33 | 34 | [build-system] 35 | requires = ["poetry-core"] 36 | build-backend = "poetry.core.masonry.api" 37 | -------------------------------------------------------------------------------- /screenshots/tlpui-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/screenshots/tlpui-01.png -------------------------------------------------------------------------------- /screenshots/tlpui-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/screenshots/tlpui-02.png -------------------------------------------------------------------------------- /screenshots/tlpui-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/screenshots/tlpui-03.png -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tests/__init__.py -------------------------------------------------------------------------------- /tests/test_tlp_configs.py: -------------------------------------------------------------------------------- 1 | from tlpui.filehelper import extract_default_tlp_configs, get_yaml_schema_object_from_file 2 | from os import path 3 | 4 | 5 | def get_config_count(categories): 6 | configcount = 0 7 | for category in categories: 8 | configs = category['configs'] 9 | for config in configs: 10 | if 'group' in config: 11 | groupitems = config['ids'] 12 | configcount += len(groupitems) 13 | else: 14 | configcount += 1 15 | return configcount 16 | 17 | 18 | class TlpConfigTest: 19 | jsoncategories_count = 0 20 | tlpconfig_count = 0 21 | yamlconfig_count = 0 22 | 23 | def __init__(self, version: str): 24 | tlpuipath = f"{path.dirname(path.abspath(__file__))}/../tlpui" 25 | jsoncategories = get_yaml_schema_object_from_file('categories', f'{tlpuipath}/configschema/{version}.yaml') 26 | self.jsoncategories_count = len(jsoncategories) 27 | self.tlpconfig_count = len(extract_default_tlp_configs(f'{tlpuipath}/defaults/tlp-{version}.conf')) 28 | self.yamlconfig_count = get_config_count(jsoncategories) 29 | 30 | 31 | def test_tlp_version_1_3(): 32 | config_test = TlpConfigTest('1_3') 33 | assert config_test.jsoncategories_count == 11 34 | assert config_test.tlpconfig_count == 99 35 | assert config_test.tlpconfig_count == config_test.yamlconfig_count 36 | 37 | 38 | def test_tlp_version_1_4(): 39 | config_test = TlpConfigTest('1_4') 40 | assert config_test.jsoncategories_count == 11 41 | assert config_test.tlpconfig_count == 107 42 | assert config_test.tlpconfig_count == config_test.yamlconfig_count 43 | 44 | 45 | def test_tlp_version_1_5(): 46 | config_test = TlpConfigTest('1_5') 47 | assert config_test.jsoncategories_count == 11 48 | assert config_test.tlpconfig_count == 107 49 | assert config_test.tlpconfig_count == config_test.yamlconfig_count 50 | 51 | 52 | def test_tlp_version_1_6(): 53 | config_test = TlpConfigTest('1_6') 54 | assert config_test.jsoncategories_count == 11 55 | assert config_test.tlpconfig_count == 109 56 | assert config_test.tlpconfig_count == config_test.yamlconfig_count 57 | 58 | 59 | def test_tlp_version_1_7(): 60 | config_test = TlpConfigTest('1_7') 61 | assert config_test.jsoncategories_count == 11 62 | assert config_test.tlpconfig_count == 106 63 | assert config_test.tlpconfig_count == config_test.yamlconfig_count -------------------------------------------------------------------------------- /tests/test_tlp_settings.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import linecache 3 | import shutil 4 | import os 5 | from tlpui import settingshelper 6 | 7 | 8 | @pytest.fixture 9 | def with_broken_config(request): 10 | settings_path = os.path.dirname(os.path.abspath(__file__)) + '/settings_default' 11 | os.environ['XDG_CONFIG_HOME'] = settings_path 12 | userconfig = settingshelper.UserConfig() 13 | userconfig.userconfigfile.write_text("[default]") 14 | userconfig.read_user_config() 15 | 16 | def clean_config_file(): 17 | shutil.rmtree(settings_path) 18 | 19 | request.addfinalizer(clean_config_file) 20 | return userconfig.userconfigfile 21 | 22 | 23 | @pytest.fixture 24 | def with_new_config(request): 25 | settings_path = os.path.dirname(os.path.abspath(__file__)) + '/settings_creation' 26 | os.environ['XDG_CONFIG_HOME'] = settings_path 27 | userconfig = settingshelper.UserConfig() 28 | 29 | def clean_config_file(): 30 | shutil.rmtree(settings_path) 31 | 32 | request.addfinalizer(clean_config_file) 33 | return userconfig.userconfigfile 34 | 35 | 36 | def test_tlp_settings_recreation(with_broken_config): 37 | assert linecache.getline(str(with_broken_config), 1) == "[default]\n" 38 | assert linecache.getline(str(with_broken_config), 2) == "language = en_EN\n" 39 | assert linecache.getline(str(with_broken_config), 3) == "activeoption = 0\n" 40 | assert linecache.getline(str(with_broken_config), 4) == "activecategory = 0\n" 41 | assert linecache.getline(str(with_broken_config), 5) == "activeposition = 0\n" 42 | assert linecache.getline(str(with_broken_config), 6) == "windowxsize = 900\n" 43 | assert linecache.getline(str(with_broken_config), 7) == "windowysize = 600\n" 44 | 45 | 46 | def test_tlp_settings_creation(with_new_config): 47 | assert linecache.getline(str(with_new_config), 1) == "[default]\n" 48 | assert linecache.getline(str(with_new_config), 2) == "language = en_EN\n" 49 | assert linecache.getline(str(with_new_config), 3) == "activeoption = 0\n" 50 | assert linecache.getline(str(with_new_config), 4) == "activecategory = 0\n" 51 | assert linecache.getline(str(with_new_config), 5) == "activeposition = 0\n" 52 | assert linecache.getline(str(with_new_config), 6) == "windowxsize = 900\n" 53 | assert linecache.getline(str(with_new_config), 7) == "windowysize = 600\n" 54 | 55 | -------------------------------------------------------------------------------- /tlpui.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=TLP UI 3 | Name[de_DE]=TLP UI 4 | Name[pt_BR]=TLP UI 5 | Name[zh_CN]=TLP 设置 6 | Exec=tlpui 7 | Terminal=false 8 | Type=Application 9 | Icon=tlpui 10 | Comment=Configuration interface 11 | Comment[de_DE]=Konfigurationsoberfläche 12 | Comment[pt_BR]=Tlp UI com gtk 13 | Comment[zh_CN]=TLP 的 Gtk 设置界面 14 | Categories=Settings;HardwareSettings;GTK; 15 | -------------------------------------------------------------------------------- /tlpui/__init__.py: -------------------------------------------------------------------------------- 1 | """Init module for TLPUI.""" 2 | __version__ = "1.8.0" 3 | -------------------------------------------------------------------------------- /tlpui/__main__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """Entrypoint for UI.""" 3 | 4 | import gi 5 | gi.require_version('Gtk', '3.0') 6 | from gi.repository import Gtk, Gdk, GLib 7 | 8 | from . import settings 9 | from .css import get_css_provider 10 | from .file import init_tlp_file_config 11 | from .mainui import create_main_box, store_window_size, window_key_events, close_main_window, reset_scroll_position 12 | 13 | Gtk.init() 14 | Gtk.StyleContext.add_provider_for_screen( 15 | Gdk.Screen.get_default(), 16 | get_css_provider(), 17 | Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION 18 | ) 19 | 20 | # Set window properties 21 | GLib.set_prgname('tlpui') 22 | Gdk.set_program_class('Tlp-UI') 23 | 24 | # Apply custom scalable icons to icon theme 25 | Gtk.IconTheme().get_default().append_search_path(settings.icondir + 'themeable') 26 | 27 | 28 | def main() -> None: 29 | """Initiate main window with all sub elements.""" 30 | # init configuration settings 31 | init_tlp_file_config() 32 | 33 | # init application window 34 | window = Gtk.Window() 35 | window.set_title('Tlp-UI') 36 | window.set_icon_name('tlpui') 37 | window.set_default_size(settings.userconfig.windowxsize, settings.userconfig.windowysize) 38 | window.add(create_main_box(window)) 39 | window.connect('check-resize', store_window_size) 40 | window.connect('delete-event', close_main_window) 41 | window.connect('key-press-event', window_key_events) 42 | window.show_all() 43 | reset_scroll_position() 44 | Gtk.main() 45 | 46 | 47 | if __name__ == '__main__': 48 | main() 49 | -------------------------------------------------------------------------------- /tlpui/config.py: -------------------------------------------------------------------------------- 1 | """TLP config.""" 2 | 3 | from enum import Enum 4 | from .uihelper import StateImage 5 | 6 | 7 | class ConfType(Enum): 8 | """Config type enum class.""" 9 | 10 | DEFAULT = 1 11 | DROPIN = 2 12 | USER = 3 13 | ERR = 4 14 | 15 | 16 | class TlpConfig: 17 | """TLP config class.""" 18 | 19 | def __init__(self, enabled: bool, name: str, value: str, conftype: ConfType, confpath=""): 20 | """Init TLP config class parameters.""" 21 | self.enabled = enabled 22 | self.enabledstore = enabled 23 | self.name = name 24 | self.value = value 25 | self.valuestore = value 26 | self.conftype = conftype 27 | self.confpath = confpath 28 | self.stateimage = None # type: StateImage 29 | 30 | def get_name(self) -> str: 31 | """Get config name.""" 32 | return self.name 33 | 34 | def get_conf_type(self) -> ConfType: 35 | """Get config type.""" 36 | return self.conftype 37 | 38 | def get_conf_path(self) -> str: 39 | """Get config path.""" 40 | return self.confpath 41 | 42 | def get_value(self) -> str: 43 | """Get config value.""" 44 | return self.value 45 | 46 | def set_value(self, newvalue: str): 47 | """Get config value.""" 48 | self.value = newvalue 49 | self.refresh_state_image() 50 | 51 | def set_enabled(self, newstate: bool): 52 | """Set config enabled.""" 53 | self.enabled = newstate 54 | self.refresh_state_image() 55 | 56 | def is_enabled(self) -> bool: 57 | """Get config enabled.""" 58 | return self.enabled 59 | 60 | def add_state_image(self, newstateimage: StateImage): 61 | """Add image with state.""" 62 | self.stateimage = newstateimage 63 | self.refresh_state_image() 64 | 65 | def refresh_state_image(self): 66 | """Refresh state image.""" 67 | self.stateimage.refresh(self.value, self.valuestore, self.enabled, self.enabledstore) 68 | -------------------------------------------------------------------------------- /tlpui/constants.py: -------------------------------------------------------------------------------- 1 | """UI constants.""" 2 | ICON_NAME_WARNING = "dialog-warning" 3 | ICON_NAME_INFO = "dialog-information" 4 | ICON_NAME_UNDO = "edit-undo" 5 | -------------------------------------------------------------------------------- /tlpui/css.py: -------------------------------------------------------------------------------- 1 | """Provide CSS support for UI.""" 2 | 3 | from gi.repository import Gtk 4 | from . import settings 5 | 6 | 7 | def get_css_provider() -> Gtk.CssProvider: 8 | """Create css provider from stylesheet file and return it.""" 9 | cssprovider = Gtk.CssProvider() 10 | cssprovider.load_from_path(f'{settings.workdir}/styles.css') 11 | 12 | return cssprovider 13 | -------------------------------------------------------------------------------- /tlpui/errorui.py: -------------------------------------------------------------------------------- 1 | """This module provides error helper functions for the UI.""" 2 | 3 | import gi 4 | gi.require_version('Gtk', '3.0') 5 | from gi.repository import Gtk 6 | 7 | 8 | def show_dialog(error_message) -> None: 9 | """Show error dialog.""" 10 | dialog = Gtk.MessageDialog() 11 | dialog.set_default_size(150, 100) 12 | dialog.add_button(Gtk.STOCK_OK, Gtk.ResponseType.OK) 13 | dialog.format_secondary_markup(error_message) 14 | dialog.run() 15 | dialog.destroy() 16 | -------------------------------------------------------------------------------- /tlpui/file.py: -------------------------------------------------------------------------------- 1 | """Provide file handling.""" 2 | 3 | import copy 4 | import re 5 | from io import open 6 | from os import access, W_OK, close, path 7 | from tempfile import mkstemp 8 | from .config import TlpConfig, ConfType 9 | from . import settings 10 | from . import settingshelper 11 | from .filehelper import get_yaml_schema_object_from_file, extract_default_tlp_configs, TlpDefaults 12 | from .uihelper import get_graphical_sudo 13 | 14 | 15 | def get_yaml_schema_object(objectname) -> dict: 16 | """Get Json schema for installed TLP version.""" 17 | tlpprovidedschema = '/usr/share/tlp-pm/configschema.yaml' 18 | if path.exists(tlpprovidedschema): 19 | return get_yaml_schema_object_from_file(objectname, tlpprovidedschema) 20 | majorminor = settings.tlpbaseversion 21 | return get_yaml_schema_object_from_file(objectname, f"{settings.workdir}/configschema/{majorminor}.yaml") 22 | 23 | 24 | def get_tlp_config_defaults(tlpversion: str): 25 | """Fetch TLP default configs.""" 26 | tlpconfig_defaults = extract_default_tlp_configs(f"{settings.workdir}/defaults/tlp-{tlpversion}.conf") 27 | 28 | # update default values with intrinsic ones 29 | intrinsic_defaults_path = f"{settings.FOLDER_PREFIX}/usr/share/tlp/defaults.conf" 30 | tlpconfig_defaults.update(extract_default_tlp_configs(intrinsic_defaults_path)) 31 | 32 | return tlpconfig_defaults 33 | 34 | 35 | def init_tlp_file_config() -> None: 36 | """Load current TLP config settings.""" 37 | settings.tlpconfig = {} 38 | tlpversion = settings.tlpbaseversion 39 | settings.tlpconfig_defaults = get_tlp_config_defaults(tlpversion) 40 | 41 | # get current settings from tlp itself 42 | tlpstat = settingshelper.exec_command(["tlp-stat", "-c"]) 43 | tlpsettinglines = tlpstat.split('\n') 44 | 45 | extract_tlp_settings(tlpsettinglines) 46 | 47 | # Add default tlp configs not set in current settings 48 | for key, default in settings.tlpconfig_defaults.items(): # type: TlpDefaults 49 | configname = default.get_name() 50 | if configname not in settings.tlpconfig.keys(): 51 | enabled = default.is_enabled() 52 | value = default.get_value() 53 | settings.tlpconfig[configname] = TlpConfig(enabled, configname, value, ConfType.DEFAULT, "") 54 | 55 | # finally store copy for comparing changes 56 | settings.tlpconfig_original = copy.deepcopy(settings.tlpconfig) 57 | 58 | 59 | def extract_tlp_settings(lines: list) -> None: 60 | """Extract TLP config locations and values.""" 61 | propertypattern = re.compile(r'^.+?\.conf\sL\d+\:\s[A-Z_\d]+=') 62 | 63 | for line in lines: 64 | if propertypattern.match(line): 65 | cleanline = line.lstrip().rstrip() 66 | settingsparts = cleanline.split(' ', maxsplit=2) 67 | configfile = settingsparts[0] # type: str 68 | if configfile == 'defaults.conf': 69 | conftype = ConfType.DEFAULT 70 | elif configfile.startswith('/etc/tlp.d/'): 71 | conftype = ConfType.DROPIN 72 | elif configfile == "/etc/tlp.conf": 73 | conftype = ConfType.USER 74 | else: 75 | print(f'Config type not found for file: {configfile}') 76 | conftype = ConfType.ERR 77 | 78 | configproperty = settingsparts[2].split('=', maxsplit=1) 79 | configname = configproperty[0] 80 | configvalue = configproperty[1] 81 | 82 | if configvalue.startswith('\"') and configvalue.endswith('\"'): 83 | configvalue = configvalue.lstrip('\"').rstrip('\"') 84 | 85 | enabled = configvalue != "" 86 | 87 | settings.tlpconfig[configname] = TlpConfig(enabled, configname, configvalue, conftype, configfile) 88 | 89 | 90 | def get_changed_properties() -> dict: 91 | """Evaluate changed settings from UI.""" 92 | changedproperties = {} 93 | 94 | changed = settings.tlpconfig 95 | original = settings.tlpconfig_original 96 | 97 | for configid in changed: 98 | config = changed[configid] # type: TlpConfig 99 | config_original = original[configid] # type: TlpConfig 100 | 101 | statechange = config.is_enabled() != config_original.is_enabled() 102 | configchange = config.get_value() != config_original.get_value() 103 | 104 | if statechange or configchange: 105 | configname = config.get_name() 106 | value = config.get_value() 107 | 108 | if not config.is_enabled() and settings.tlpconfig_defaults[configname].is_enabled(): 109 | enabled = "" 110 | else: 111 | enabled = "" if config.is_enabled() else "#" 112 | 113 | if settings.tlpconfig_defaults[configname].is_quoted(): 114 | value = f"\"{value}\"" 115 | 116 | changedproperties[configname] = f"{enabled}{configname}={value}" 117 | 118 | return changedproperties 119 | 120 | 121 | def create_tmp_tlp_config_file(changedproperties: dict) -> str: 122 | """Create tmp file to prepare writing new config.""" 123 | propertypattern = re.compile(r'^#?[A-Z_\d]+=') 124 | filehandler, tmpfilename = mkstemp(dir=settings.TMP_FOLDER) 125 | newfile = open(tmpfilename, mode='w', encoding='utf-8') 126 | 127 | oldfile = open(settings.tlpconfigfile, encoding='utf-8') 128 | lines = oldfile.readlines() 129 | oldfile.close() 130 | 131 | for line in lines: 132 | if propertypattern.match(line): 133 | cleanline = line.lstrip().lstrip('#') 134 | 135 | configproperty = cleanline.split('=', maxsplit=1) 136 | configname = configproperty[0] 137 | 138 | if configname in changedproperties.keys(): 139 | if cleanline.startswith(configname + "="): 140 | newfile.write(changedproperties[configname] + '\n') 141 | continue 142 | 143 | newfile.write(line) 144 | 145 | newfile.close() 146 | close(filehandler) 147 | oldfile.close() 148 | 149 | return tmpfilename 150 | 151 | 152 | def write_tlp_config(tmpconfigfile: str): 153 | """Write changes to config file.""" 154 | sedtlpconfigfile = "w" + settings.tlpbaseconfigfile 155 | sedcommand = ["sed", "-n", sedtlpconfigfile, tmpconfigfile] 156 | 157 | # check permission and apply sudo if needed 158 | if not access(settings.tlpconfigfile, W_OK): 159 | sudo_cmd = get_graphical_sudo() 160 | if sudo_cmd is None: 161 | return 162 | sedcommand.insert(0, sudo_cmd) 163 | settingshelper.exec_command(sedcommand) 164 | -------------------------------------------------------------------------------- /tlpui/filehelper.py: -------------------------------------------------------------------------------- 1 | """Filehandling helper.""" 2 | 3 | import re 4 | from io import open 5 | from yaml import safe_load 6 | 7 | 8 | def get_yaml_schema_object_from_file(objectname: str, filename: str) -> dict: 9 | """Read Yaml file.""" 10 | with open(filename, encoding='utf-8') as yaml_file: 11 | yaml_object = safe_load(yaml_file) 12 | return yaml_object[objectname] 13 | 14 | 15 | class TlpDefaults: 16 | """TLP defaults class.""" 17 | 18 | def __init__(self, name: str, value: str, enabled: bool, quoted: bool): 19 | """Init TLP defaults class parameters.""" 20 | self.name = name 21 | self.value = value 22 | self.enabled = enabled 23 | self.quoted = quoted 24 | 25 | def get_name(self) -> str: 26 | """Get defaults name.""" 27 | return self.name 28 | 29 | def get_value(self) -> str: 30 | """Get defaults value.""" 31 | return self.value 32 | 33 | def is_enabled(self) -> bool: 34 | """Get defaults enabled.""" 35 | return self.enabled 36 | 37 | def is_quoted(self) -> bool: 38 | """Get defaults quoted.""" 39 | return self.quoted 40 | 41 | 42 | def extract_default_tlp_configs(filename: str) -> dict: 43 | """Fetch TLP defaults from file.""" 44 | propertypattern = re.compile(r'^#?[A-Z_\d]+=') 45 | with open(filename, encoding='utf-8') as defaultsfile: 46 | lines = defaultsfile.readlines() 47 | 48 | tlpconfig_defaults = {} 49 | for line in lines: 50 | if propertypattern.match(line): 51 | cleanline = line.lstrip().rstrip() 52 | 53 | if cleanline.startswith('#'): 54 | enabled = False 55 | cleanline = cleanline.lstrip('#') 56 | else: 57 | enabled = True 58 | 59 | configproperty = cleanline.split('=', maxsplit=1) 60 | configname = configproperty[0] 61 | configvalue = configproperty[1] 62 | quoted = False 63 | 64 | if configvalue.startswith('\"') and configvalue.endswith('\"'): 65 | configvalue = configvalue.lstrip('\"').rstrip('\"') 66 | quoted = True 67 | 68 | tlpconfig_defaults[configname] = TlpDefaults(configname, configvalue, enabled, quoted) 69 | return tlpconfig_defaults 70 | -------------------------------------------------------------------------------- /tlpui/icons/ICON-AUTHORS: -------------------------------------------------------------------------------- 1 | Daniel Foré 2 | Sam Hewitt 3 | 4 | Copyright 2007-2013 elementary LLC. 5 | 6 | These icons are free artwork; you can redistribute them and/or modify 7 | them under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 3, or (at your option) 9 | any later version. 10 | 11 | These icons distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with these icons; if not, see . 18 | 19 | Icons based on Tango sources or taken from the Tango project are public domain. 20 | You can visit the Tango project website here: 21 | 22 | Flag icons based on Linuxmint sources or taken from the Linuxmint project are public domain. 23 | You can visit the GitHub project website here: 24 | -------------------------------------------------------------------------------- /tlpui/icons/OnAC.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 24 | 26 | image/svg+xml 27 | 29 | elementary Symbolic Icon Theme 30 | 31 | 32 | 33 | 68 | 80 | 96 | 97 | elementary Symbolic Icon Theme 99 | 101 | 104 | 108 | 109 | 112 | 116 | 117 | 118 | 125 | 131 | 132 | 138 | 144 | 149 | 155 | 161 | 167 | 168 | -------------------------------------------------------------------------------- /tlpui/icons/OnBAT.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 23 | 24 | 26 | image/svg+xml 27 | 29 | elementary Symbolic Icon Theme 30 | 31 | 32 | 33 | 68 | 80 | 96 | 97 | elementary Symbolic Icon Theme 99 | 101 | 107 | 113 | 119 | 120 | 126 | 131 | 137 | 142 | 148 | 154 | 160 | 166 | 167 | -------------------------------------------------------------------------------- /tlpui/icons/flags/de_DE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/flags/de_DE.png -------------------------------------------------------------------------------- /tlpui/icons/flags/en_EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/flags/en_EN.png -------------------------------------------------------------------------------- /tlpui/icons/flags/es_ES.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/flags/es_ES.png -------------------------------------------------------------------------------- /tlpui/icons/flags/fr_FR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/flags/fr_FR.png -------------------------------------------------------------------------------- /tlpui/icons/flags/id_ID.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/flags/id_ID.png -------------------------------------------------------------------------------- /tlpui/icons/flags/pt_BR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/flags/pt_BR.png -------------------------------------------------------------------------------- /tlpui/icons/flags/ru_RU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/flags/ru_RU.png -------------------------------------------------------------------------------- /tlpui/icons/flags/tr_TR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/flags/tr_TR.png -------------------------------------------------------------------------------- /tlpui/icons/flags/zh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/flags/zh.png -------------------------------------------------------------------------------- /tlpui/icons/flags/zh_CN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/flags/zh_CN.png -------------------------------------------------------------------------------- /tlpui/icons/flags/zh_TW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/flags/zh_TW.png -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/128x128/apps/tlpui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/themeable/hicolor/128x128/apps/tlpui.png -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/16x16/apps/tlpui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/themeable/hicolor/16x16/apps/tlpui.png -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/256x256/apps/tlpui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/themeable/hicolor/256x256/apps/tlpui.png -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/32x32/apps/tlpui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/themeable/hicolor/32x32/apps/tlpui.png -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/48x48/apps/tlpui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/themeable/hicolor/48x48/apps/tlpui.png -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/64x64/apps/tlpui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/themeable/hicolor/64x64/apps/tlpui.png -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/96x96/apps/tlpui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/icons/themeable/hicolor/96x96/apps/tlpui.png -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/dialog-information-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/document-save-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/edit-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/format-indent-more-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/list-add-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/tlpui-Audio-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/tlpui-Dock-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/tlpui-General-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/tlpui-Graphics-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/tlpui-Network-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/tlpui-PCIe-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/tlpui-Processor-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/tlpui-Radio-Device-Wizard-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/tlpui-Radio-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/tlpui-ThinkPad-Battery-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tlpui/icons/themeable/hicolor/scalable/actions/view-refresh-symbolic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | image/svg+xml 9 | 10 | elementary Symbolic Icon Theme 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | elementary Symbolic Icon Theme 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tlpui/lang/de_DE/LC_MESSAGES/configdescriptions.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/de_DE/LC_MESSAGES/configdescriptions.mo -------------------------------------------------------------------------------- /tlpui/lang/de_DE/LC_MESSAGES/mainui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/de_DE/LC_MESSAGES/mainui.mo -------------------------------------------------------------------------------- /tlpui/lang/de_DE/LC_MESSAGES/mainui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2024-01-02 19:11+0100\n" 5 | "PO-Revision-Date: 2024-01-02 19:12+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: \n" 8 | "Language: de\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-SourceCharset: UTF-8\n" 16 | "X-Poedit-KeywordsList: MT_\n" 17 | "X-Poedit-SearchPath-0: mainui.py\n" 18 | 19 | #: mainui.py:87 20 | msgid "Review settings" 21 | msgstr "Überprüfe Einstellungen" 22 | 23 | #: mainui.py:88 24 | msgid "Save these changes?" 25 | msgstr "Änderungen speichern?" 26 | 27 | #: mainui.py:111 28 | msgid "Unsaved settings" 29 | msgstr "Nicht gespeicherte Einstellungen" 30 | 31 | #: mainui.py:112 32 | msgid "Do you really want to quit? No changes will be saved" 33 | msgstr "Wollen Sie das Programm wirklich beenden? Änderungen werden nicht gesichert" 34 | 35 | #: mainui.py:231 36 | msgid "Reload" 37 | msgstr "Neu laden" 38 | 39 | #: mainui.py:235 mainui.py:252 40 | msgid "Save" 41 | msgstr "Speichern" 42 | 43 | #: mainui.py:250 44 | msgid "File" 45 | msgstr "Datei" 46 | 47 | #: mainui.py:255 48 | msgid "Quit" 49 | msgstr "Beenden" 50 | 51 | #: mainui.py:259 52 | msgid "Language" 53 | msgstr "Sprache" 54 | 55 | #: mainui.py:265 56 | msgid "Help" 57 | msgstr "Hilfe" 58 | 59 | #: mainui.py:268 60 | msgid "About" 61 | msgstr "Über" 62 | 63 | #: mainui.py:292 64 | msgid "UI for TLP written in Python/Gtk" 65 | msgstr "UI for TLP written in Python/Gtk" 66 | 67 | #: mainui.py:337 68 | msgid "Configuration" 69 | msgstr "Konfiguration" 70 | 71 | #: mainui.py:340 72 | msgid "Statistics" 73 | msgstr "Statistiken" 74 | -------------------------------------------------------------------------------- /tlpui/lang/de_DE/LC_MESSAGES/statui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/de_DE/LC_MESSAGES/statui.mo -------------------------------------------------------------------------------- /tlpui/lang/de_DE/LC_MESSAGES/statui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:36+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:47+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: \n" 8 | "Language: de\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: ST_\n" 16 | "X-Poedit-SearchPath-0: statui.py\n" 17 | 18 | #: statui.py:37 19 | msgid "Click fetch button to receive results" 20 | msgstr "Drücke Knopf zum Laden der Statistiken" 21 | 22 | #: statui.py:47 23 | msgid "Simple" 24 | msgstr "Einfach" 25 | 26 | #: statui.py:52 27 | msgid "Complete" 28 | msgstr "Komplett" 29 | -------------------------------------------------------------------------------- /tlpui/lang/de_DE/LC_MESSAGES/uihelper.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/de_DE/LC_MESSAGES/uihelper.mo -------------------------------------------------------------------------------- /tlpui/lang/de_DE/LC_MESSAGES/uihelper.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:37+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:37+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: \n" 8 | "Language: de\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: UH_\n" 16 | "X-Poedit-SearchPath-0: uihelper.py\n" 17 | 18 | #: uihelper.py:14 19 | msgid "Expected item missing in config file" 20 | msgstr "Erwarteter Eintrag nicht in Konfigurationsdatei" 21 | 22 | #: uihelper.py:15 23 | msgid "Unknown config value detected" 24 | msgstr "Unbekannter Konfigurationswert gesetzt" 25 | 26 | #: uihelper.py:16 27 | msgid "Install pkexec, gksu, gksudo, kdesu or kdesudo first" 28 | msgstr "Installiere zuerst pkexec, gksu, gksudo, kdesu oder kdesudo" 29 | 30 | #: uihelper.py:17 31 | msgid "Default state:" 32 | msgstr "Standardzustand:" 33 | 34 | #: uihelper.py:18 35 | msgid "Default value:" 36 | msgstr "Standardwert:" 37 | 38 | #: uihelper.py:19 39 | msgid "CHANGED" 40 | msgstr "GEÄNDERT" 41 | -------------------------------------------------------------------------------- /tlpui/lang/en_EN/LC_MESSAGES/configdescriptions.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/en_EN/LC_MESSAGES/configdescriptions.mo -------------------------------------------------------------------------------- /tlpui/lang/en_EN/LC_MESSAGES/mainui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/en_EN/LC_MESSAGES/mainui.mo -------------------------------------------------------------------------------- /tlpui/lang/en_EN/LC_MESSAGES/mainui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2024-01-02 19:12+0100\n" 5 | "PO-Revision-Date: 2024-01-02 19:12+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: \n" 8 | "Language: en\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-SourceCharset: UTF-8\n" 16 | "X-Poedit-KeywordsList: MT_\n" 17 | "X-Poedit-SearchPath-0: mainui.py\n" 18 | 19 | #: mainui.py:87 20 | msgid "Review settings" 21 | msgstr "Review settings" 22 | 23 | #: mainui.py:88 24 | msgid "Save these changes?" 25 | msgstr "Save these changes?" 26 | 27 | #: mainui.py:111 28 | msgid "Unsaved settings" 29 | msgstr "Unsaved settings" 30 | 31 | #: mainui.py:112 32 | msgid "Do you really want to quit? No changes will be saved" 33 | msgstr "Do you really want to quit? No changes will be saved" 34 | 35 | #: mainui.py:231 36 | msgid "Reload" 37 | msgstr "Reload" 38 | 39 | #: mainui.py:235 mainui.py:252 40 | msgid "Save" 41 | msgstr "Save" 42 | 43 | #: mainui.py:250 44 | msgid "File" 45 | msgstr "File" 46 | 47 | #: mainui.py:255 48 | msgid "Quit" 49 | msgstr "Quit" 50 | 51 | #: mainui.py:259 52 | msgid "Language" 53 | msgstr "Language" 54 | 55 | #: mainui.py:265 56 | msgid "Help" 57 | msgstr "Help" 58 | 59 | #: mainui.py:268 60 | msgid "About" 61 | msgstr "About" 62 | 63 | #: mainui.py:292 64 | msgid "UI for TLP written in Python/Gtk" 65 | msgstr "UI for TLP written in Python/Gtk" 66 | 67 | #: mainui.py:337 68 | msgid "Configuration" 69 | msgstr "Configuration" 70 | 71 | #: mainui.py:340 72 | msgid "Statistics" 73 | msgstr "Statistics" 74 | -------------------------------------------------------------------------------- /tlpui/lang/en_EN/LC_MESSAGES/statui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/en_EN/LC_MESSAGES/statui.mo -------------------------------------------------------------------------------- /tlpui/lang/en_EN/LC_MESSAGES/statui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:34+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:47+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: \n" 8 | "Language: en\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: ST_\n" 16 | "X-Poedit-SearchPath-0: statui.py\n" 17 | 18 | #: statui.py:37 19 | msgid "Click fetch button to receive results" 20 | msgstr "Click fetch button to receive results" 21 | 22 | #: statui.py:47 23 | msgid "Simple" 24 | msgstr "Simple" 25 | 26 | #: statui.py:52 27 | msgid "Complete" 28 | msgstr "Complete" 29 | -------------------------------------------------------------------------------- /tlpui/lang/en_EN/LC_MESSAGES/uihelper.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/en_EN/LC_MESSAGES/uihelper.mo -------------------------------------------------------------------------------- /tlpui/lang/en_EN/LC_MESSAGES/uihelper.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:35+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:35+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: \n" 8 | "Language: en\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: UH_\n" 16 | "X-Poedit-SearchPath-0: uihelper.py\n" 17 | 18 | #: uihelper.py:14 19 | msgid "Expected item missing in config file" 20 | msgstr "Expected item missing in config file" 21 | 22 | #: uihelper.py:15 23 | msgid "Unknown config value detected" 24 | msgstr "Unknown config value detected" 25 | 26 | #: uihelper.py:16 27 | msgid "Install pkexec, gksu, gksudo, kdesu or kdesudo first" 28 | msgstr "Install pkexec, gksu, gksudo, kdesu or kdesudo first" 29 | 30 | #: uihelper.py:17 31 | msgid "Default state:" 32 | msgstr "Default state:" 33 | 34 | #: uihelper.py:18 35 | msgid "Default value:" 36 | msgstr "Default value:" 37 | 38 | #: uihelper.py:19 39 | msgid "CHANGED" 40 | msgstr "CHANGED" 41 | -------------------------------------------------------------------------------- /tlpui/lang/es_ES/LC_MESSAGES/configdescriptions.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/es_ES/LC_MESSAGES/configdescriptions.mo -------------------------------------------------------------------------------- /tlpui/lang/es_ES/LC_MESSAGES/mainui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/es_ES/LC_MESSAGES/mainui.mo -------------------------------------------------------------------------------- /tlpui/lang/es_ES/LC_MESSAGES/mainui.po: -------------------------------------------------------------------------------- 1 | # micrococo, 2018. 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: TLPUI\n" 5 | "POT-Creation-Date: 2024-01-02 19:14+0100\n" 6 | "PO-Revision-Date: 2024-01-02 19:14+0100\n" 7 | "Last-Translator: micrococo\n" 8 | "Language-Team: Spanish\n" 9 | "Language: es\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 14 | "X-Generator: Poedit 3.4.1\n" 15 | "X-Poedit-Basepath: ../../..\n" 16 | "X-Poedit-SourceCharset: UTF-8\n" 17 | "X-Poedit-KeywordsList: MT_\n" 18 | "X-Poedit-SearchPath-0: mainui.py\n" 19 | 20 | #: mainui.py:87 21 | msgid "Review settings" 22 | msgstr "Ver la configuración" 23 | 24 | #: mainui.py:88 25 | msgid "Save these changes?" 26 | msgstr "¿Quiere guardar los cambios?" 27 | 28 | #: mainui.py:111 29 | msgid "Unsaved settings" 30 | msgstr "Ajustes sin guardar" 31 | 32 | #: mainui.py:112 33 | msgid "Do you really want to quit? No changes will be saved" 34 | msgstr "¿Seguro que quiere salir? No se guardará ningún cambio" 35 | 36 | #: mainui.py:231 37 | msgid "Reload" 38 | msgstr "Recargar" 39 | 40 | #: mainui.py:235 mainui.py:252 41 | msgid "Save" 42 | msgstr "Guardar" 43 | 44 | #: mainui.py:250 45 | msgid "File" 46 | msgstr "Archivo" 47 | 48 | #: mainui.py:255 49 | msgid "Quit" 50 | msgstr "Salir" 51 | 52 | #: mainui.py:259 53 | msgid "Language" 54 | msgstr "Idioma" 55 | 56 | #: mainui.py:265 57 | msgid "Help" 58 | msgstr "Help" 59 | 60 | #: mainui.py:268 61 | msgid "About" 62 | msgstr "About" 63 | 64 | #: mainui.py:292 65 | msgid "UI for TLP written in Python/Gtk" 66 | msgstr "UI for TLP written in Python/Gtk" 67 | 68 | #: mainui.py:337 69 | msgid "Configuration" 70 | msgstr "Configuración" 71 | 72 | #: mainui.py:340 73 | msgid "Statistics" 74 | msgstr "Estadísticas" 75 | -------------------------------------------------------------------------------- /tlpui/lang/es_ES/LC_MESSAGES/statui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/es_ES/LC_MESSAGES/statui.mo -------------------------------------------------------------------------------- /tlpui/lang/es_ES/LC_MESSAGES/statui.po: -------------------------------------------------------------------------------- 1 | # micrococo, 2018. 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: TLPUI\n" 5 | "POT-Creation-Date: 2023-12-25 16:37+0100\n" 6 | "PO-Revision-Date: 2023-12-25 16:46+0100\n" 7 | "Last-Translator: micrococo\n" 8 | "Language-Team: Spanish\n" 9 | "Language: es\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 14 | "X-Generator: Poedit 3.4.1\n" 15 | "X-Poedit-Basepath: ../../..\n" 16 | "X-Poedit-KeywordsList: ST_\n" 17 | "X-Poedit-SearchPath-0: statui.py\n" 18 | 19 | #: statui.py:37 20 | msgid "Click fetch button to receive results" 21 | msgstr "Haga clic en el botón de búsqueda para recibir los resultados" 22 | 23 | #: statui.py:47 24 | msgid "Simple" 25 | msgstr "Simple" 26 | 27 | #: statui.py:52 28 | msgid "Complete" 29 | msgstr "Completa" 30 | -------------------------------------------------------------------------------- /tlpui/lang/es_ES/LC_MESSAGES/uihelper.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/es_ES/LC_MESSAGES/uihelper.mo -------------------------------------------------------------------------------- /tlpui/lang/es_ES/LC_MESSAGES/uihelper.po: -------------------------------------------------------------------------------- 1 | # micrococo, 2018. 2 | msgid "" 3 | msgstr "" 4 | "Project-Id-Version: TLPUI\n" 5 | "POT-Creation-Date: 2023-12-25 16:38+0100\n" 6 | "PO-Revision-Date: 2023-12-25 16:38+0100\n" 7 | "Last-Translator: micrococo\n" 8 | "Language-Team: Spanish\n" 9 | "Language: es\n" 10 | "MIME-Version: 1.0\n" 11 | "Content-Type: text/plain; charset=UTF-8\n" 12 | "Content-Transfer-Encoding: 8bit\n" 13 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 14 | "X-Generator: Poedit 3.4.1\n" 15 | "X-Poedit-Basepath: ../../..\n" 16 | "X-Poedit-KeywordsList: UH_\n" 17 | "X-Poedit-SearchPath-0: uihelper.py\n" 18 | 19 | #: uihelper.py:14 20 | msgid "Expected item missing in config file" 21 | msgstr "Un elemento esperado falta en el archivo de configuración" 22 | 23 | #: uihelper.py:15 24 | msgid "Unknown config value detected" 25 | msgstr "Unknown config value detected" 26 | 27 | #: uihelper.py:16 28 | msgid "Install pkexec, gksu, gksudo, kdesu or kdesudo first" 29 | msgstr "Instale primero pkexec, gksu, gksudo, kdesu o kdesudo" 30 | 31 | #: uihelper.py:17 32 | msgid "Default state:" 33 | msgstr "Estado por defecto:" 34 | 35 | #: uihelper.py:18 36 | msgid "Default value:" 37 | msgstr "Valor por defecto:" 38 | 39 | #: uihelper.py:19 40 | msgid "CHANGED" 41 | msgstr "MODIFICADO" 42 | -------------------------------------------------------------------------------- /tlpui/lang/fr_FR/LC_MESSAGES/configdescriptions.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/fr_FR/LC_MESSAGES/configdescriptions.mo -------------------------------------------------------------------------------- /tlpui/lang/fr_FR/LC_MESSAGES/mainui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/fr_FR/LC_MESSAGES/mainui.mo -------------------------------------------------------------------------------- /tlpui/lang/fr_FR/LC_MESSAGES/mainui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2024-01-02 19:14+0100\n" 5 | "PO-Revision-Date: 2024-01-02 19:14+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Hellzevir\n" 8 | "Language: fr\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-SourceCharset: UTF-8\n" 16 | "X-Poedit-KeywordsList: MT_\n" 17 | "X-Poedit-SearchPath-0: mainui.py\n" 18 | 19 | #: mainui.py:87 20 | msgid "Review settings" 21 | msgstr "Voir la configuration" 22 | 23 | #: mainui.py:88 24 | msgid "Save these changes?" 25 | msgstr "Enregistrer les modifications ?" 26 | 27 | #: mainui.py:111 28 | msgid "Unsaved settings" 29 | msgstr "Réglages non enregistrés" 30 | 31 | #: mainui.py:112 32 | msgid "Do you really want to quit? No changes will be saved" 33 | msgstr "" 34 | "Voulez-vous vraiment quitter l'application ? Aucune modification ne sera " 35 | "enregistrée" 36 | 37 | #: mainui.py:231 38 | msgid "Reload" 39 | msgstr "Recharger" 40 | 41 | #: mainui.py:235 mainui.py:252 42 | msgid "Save" 43 | msgstr "Enregistrer" 44 | 45 | #: mainui.py:250 46 | msgid "File" 47 | msgstr "Fichier" 48 | 49 | #: mainui.py:255 50 | msgid "Quit" 51 | msgstr "Quitter" 52 | 53 | #: mainui.py:259 54 | msgid "Language" 55 | msgstr "Langue" 56 | 57 | #: mainui.py:265 58 | msgid "Help" 59 | msgstr "Help" 60 | 61 | #: mainui.py:268 62 | msgid "About" 63 | msgstr "About" 64 | 65 | #: mainui.py:292 66 | msgid "UI for TLP written in Python/Gtk" 67 | msgstr "UI for TLP written in Python/Gtk" 68 | 69 | #: mainui.py:337 70 | msgid "Configuration" 71 | msgstr "Configuration" 72 | 73 | #: mainui.py:340 74 | msgid "Statistics" 75 | msgstr "Statistiques" 76 | -------------------------------------------------------------------------------- /tlpui/lang/fr_FR/LC_MESSAGES/statui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/fr_FR/LC_MESSAGES/statui.mo -------------------------------------------------------------------------------- /tlpui/lang/fr_FR/LC_MESSAGES/statui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:38+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:46+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Hellzevir\n" 8 | "Language: fr\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: ST_\n" 16 | "X-Poedit-SourceCharset: UTF-8\n" 17 | "X-Poedit-SearchPath-0: statui.py\n" 18 | 19 | #: statui.py:37 20 | msgid "Click fetch button to receive results" 21 | msgstr "Cliquer sur le bouton de compte-rendu pour obtenir les résultats" 22 | 23 | #: statui.py:47 24 | msgid "Simple" 25 | msgstr "Simple" 26 | 27 | #: statui.py:52 28 | msgid "Complete" 29 | msgstr "Complet" 30 | -------------------------------------------------------------------------------- /tlpui/lang/fr_FR/LC_MESSAGES/uihelper.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/fr_FR/LC_MESSAGES/uihelper.mo -------------------------------------------------------------------------------- /tlpui/lang/fr_FR/LC_MESSAGES/uihelper.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:38+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:39+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Hellzevir\n" 8 | "Language: fr\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: UH_\n" 16 | "X-Poedit-SourceCharset: UTF-8\n" 17 | "X-Poedit-SearchPath-0: uihelper.py\n" 18 | 19 | #: uihelper.py:14 20 | msgid "Expected item missing in config file" 21 | msgstr "Un élément attendu dans le fichier de configuration est manquant" 22 | 23 | #: uihelper.py:15 24 | msgid "Unknown config value detected" 25 | msgstr "Une valeur inconnue de configuration a été détectée" 26 | 27 | #: uihelper.py:16 28 | msgid "Install pkexec, gksu, gksudo, kdesu or kdesudo first" 29 | msgstr "Installer d'abord pkexec, gksu, gksudo, kdesu ou kdesudo" 30 | 31 | #: uihelper.py:17 32 | msgid "Default state:" 33 | msgstr "État par défaut :" 34 | 35 | #: uihelper.py:18 36 | msgid "Default value:" 37 | msgstr "Valeur par défaut :" 38 | 39 | #: uihelper.py:19 40 | msgid "CHANGED" 41 | msgstr "MODIFIÉ" 42 | -------------------------------------------------------------------------------- /tlpui/lang/id_ID/LC_MESSAGES/configdescriptions.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/id_ID/LC_MESSAGES/configdescriptions.mo -------------------------------------------------------------------------------- /tlpui/lang/id_ID/LC_MESSAGES/mainui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/id_ID/LC_MESSAGES/mainui.mo -------------------------------------------------------------------------------- /tlpui/lang/id_ID/LC_MESSAGES/mainui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2024-01-02 19:14+0100\n" 5 | "PO-Revision-Date: 2024-01-02 19:14+0100\n" 6 | "Last-Translator: Sahri Riza Umami \n" 7 | "Language-Team: Bahasa Indonesia \n" 8 | "Language: id_ID\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-SourceCharset: UTF-8\n" 16 | "X-Poedit-KeywordsList: MT_\n" 17 | "X-Poedit-SearchPath-0: mainui.py\n" 18 | 19 | #: mainui.py:87 20 | msgid "Review settings" 21 | msgstr "Review settings" 22 | 23 | #: mainui.py:88 24 | msgid "Save these changes?" 25 | msgstr "Save these changes?" 26 | 27 | #: mainui.py:111 28 | msgid "Unsaved settings" 29 | msgstr "Unsaved settings" 30 | 31 | #: mainui.py:112 32 | msgid "Do you really want to quit? No changes will be saved" 33 | msgstr "Do you really want to quit? No changes will be saved" 34 | 35 | #: mainui.py:231 36 | msgid "Reload" 37 | msgstr "Muat ulang" 38 | 39 | #: mainui.py:235 mainui.py:252 40 | msgid "Save" 41 | msgstr "Simpan" 42 | 43 | #: mainui.py:250 44 | msgid "File" 45 | msgstr "File" 46 | 47 | #: mainui.py:255 48 | msgid "Quit" 49 | msgstr "Berhenti" 50 | 51 | #: mainui.py:259 52 | msgid "Language" 53 | msgstr "Language" 54 | 55 | #: mainui.py:265 56 | msgid "Help" 57 | msgstr "Help" 58 | 59 | #: mainui.py:268 60 | msgid "About" 61 | msgstr "About" 62 | 63 | #: mainui.py:292 64 | msgid "UI for TLP written in Python/Gtk" 65 | msgstr "UI for TLP written in Python/Gtk" 66 | 67 | #: mainui.py:337 68 | msgid "Configuration" 69 | msgstr "Configuration" 70 | 71 | #: mainui.py:340 72 | msgid "Statistics" 73 | msgstr "Statistics" 74 | -------------------------------------------------------------------------------- /tlpui/lang/id_ID/LC_MESSAGES/statui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/id_ID/LC_MESSAGES/statui.mo -------------------------------------------------------------------------------- /tlpui/lang/id_ID/LC_MESSAGES/statui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:39+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:46+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: \n" 8 | "Language: id_ID\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: ST_\n" 16 | "X-Poedit-SourceCharset: UTF-8\n" 17 | "X-Poedit-SearchPath-0: statui.py\n" 18 | 19 | #: statui.py:37 20 | msgid "Click fetch button to receive results" 21 | msgstr "Click fetch button to receive results" 22 | 23 | #: statui.py:47 24 | msgid "Simple" 25 | msgstr "Simple" 26 | 27 | #: statui.py:52 28 | msgid "Complete" 29 | msgstr "Complete" 30 | -------------------------------------------------------------------------------- /tlpui/lang/id_ID/LC_MESSAGES/uihelper.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/id_ID/LC_MESSAGES/uihelper.mo -------------------------------------------------------------------------------- /tlpui/lang/id_ID/LC_MESSAGES/uihelper.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:39+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:39+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: \n" 8 | "Language: id_ID\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: UH_\n" 16 | "X-Poedit-SearchPath-0: uihelper.py\n" 17 | 18 | #: uihelper.py:14 19 | msgid "Expected item missing in config file" 20 | msgstr "Expected item missing in config file" 21 | 22 | #: uihelper.py:15 23 | msgid "Unknown config value detected" 24 | msgstr "Unknown config value detected" 25 | 26 | #: uihelper.py:16 27 | msgid "Install pkexec, gksu, gksudo, kdesu or kdesudo first" 28 | msgstr "Install pkexec, gksu, gksudo, kdesu or kdesudo first" 29 | 30 | #: uihelper.py:17 31 | msgid "Default state:" 32 | msgstr "Default state:" 33 | 34 | #: uihelper.py:18 35 | msgid "Default value:" 36 | msgstr "Default value:" 37 | 38 | #: uihelper.py:19 39 | msgid "CHANGED" 40 | msgstr "CHANGED" 41 | -------------------------------------------------------------------------------- /tlpui/lang/pt_BR/LC_MESSAGES/configdescriptions.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/pt_BR/LC_MESSAGES/configdescriptions.mo -------------------------------------------------------------------------------- /tlpui/lang/pt_BR/LC_MESSAGES/mainui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/pt_BR/LC_MESSAGES/mainui.mo -------------------------------------------------------------------------------- /tlpui/lang/pt_BR/LC_MESSAGES/mainui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2024-01-02 19:15+0100\n" 5 | "PO-Revision-Date: 2024-01-02 19:15+0100\n" 6 | "Last-Translator: tioguda \n" 7 | "Language-Team: Manjariando (manjariando@gmail.com)\n" 8 | "Language: pt_BR\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-SourceCharset: UTF-8\n" 16 | "X-Poedit-KeywordsList: MT_\n" 17 | "X-Poedit-SearchPath-0: mainui.py\n" 18 | 19 | #: mainui.py:87 20 | msgid "Review settings" 21 | msgstr "Rever configurações" 22 | 23 | #: mainui.py:88 24 | msgid "Save these changes?" 25 | msgstr "Salvar essas alterações?" 26 | 27 | #: mainui.py:111 28 | msgid "Unsaved settings" 29 | msgstr "Configurações não salvas" 30 | 31 | #: mainui.py:112 32 | msgid "Do you really want to quit? No changes will be saved" 33 | msgstr "Você realmente quer sair? Nenhuma alteração será salva" 34 | 35 | #: mainui.py:231 36 | msgid "Reload" 37 | msgstr "Recarregar" 38 | 39 | #: mainui.py:235 mainui.py:252 40 | msgid "Save" 41 | msgstr "Salvar" 42 | 43 | #: mainui.py:250 44 | msgid "File" 45 | msgstr "Arquivo" 46 | 47 | #: mainui.py:255 48 | msgid "Quit" 49 | msgstr "Sair" 50 | 51 | #: mainui.py:259 52 | msgid "Language" 53 | msgstr "Idioma" 54 | 55 | #: mainui.py:265 56 | msgid "Help" 57 | msgstr "Help" 58 | 59 | #: mainui.py:268 60 | msgid "About" 61 | msgstr "About" 62 | 63 | #: mainui.py:292 64 | msgid "UI for TLP written in Python/Gtk" 65 | msgstr "UI for TLP written in Python/Gtk" 66 | 67 | #: mainui.py:337 68 | msgid "Configuration" 69 | msgstr "Configuração" 70 | 71 | #: mainui.py:340 72 | msgid "Statistics" 73 | msgstr "Estatisticas" 74 | -------------------------------------------------------------------------------- /tlpui/lang/pt_BR/LC_MESSAGES/statui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/pt_BR/LC_MESSAGES/statui.mo -------------------------------------------------------------------------------- /tlpui/lang/pt_BR/LC_MESSAGES/statui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:40+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:46+0100\n" 6 | "Last-Translator: tioguda \n" 7 | "Language-Team: Manjariando (manjariando@gmail.com)\n" 8 | "Language: pt_BR\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: ST_\n" 16 | "X-Poedit-SourceCharset: UTF-8\n" 17 | "X-Poedit-SearchPath-0: statui.py\n" 18 | 19 | #: statui.py:37 20 | msgid "Click fetch button to receive results" 21 | msgstr "Clique no botão buscar para receber resultados" 22 | 23 | #: statui.py:47 24 | msgid "Simple" 25 | msgstr "Simples" 26 | 27 | #: statui.py:52 28 | msgid "Complete" 29 | msgstr "Completo" 30 | -------------------------------------------------------------------------------- /tlpui/lang/pt_BR/LC_MESSAGES/uihelper.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/pt_BR/LC_MESSAGES/uihelper.mo -------------------------------------------------------------------------------- /tlpui/lang/pt_BR/LC_MESSAGES/uihelper.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:40+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:40+0100\n" 6 | "Last-Translator: tioguda \n" 7 | "Language-Team: Manjariando (manjariando@gmail.com)\n" 8 | "Language: pt_BR\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: UH_\n" 16 | "X-Poedit-SearchPath-0: uihelper.py\n" 17 | 18 | #: uihelper.py:14 19 | msgid "Expected item missing in config file" 20 | msgstr "Item esperado ausente no arquivo de configuração" 21 | 22 | #: uihelper.py:15 23 | msgid "Unknown config value detected" 24 | msgstr "Detectado valor de configuração desconhecido" 25 | 26 | #: uihelper.py:16 27 | msgid "Install pkexec, gksu, gksudo, kdesu or kdesudo first" 28 | msgstr "Instale pkexec, gksu, gksudo, kdesu ou kdesudo primeiro" 29 | 30 | #: uihelper.py:17 31 | msgid "Default state:" 32 | msgstr "Estado padrão:" 33 | 34 | #: uihelper.py:18 35 | msgid "Default value:" 36 | msgstr "Valor padrão:" 37 | 38 | #: uihelper.py:19 39 | msgid "CHANGED" 40 | msgstr "ALTERADO" 41 | -------------------------------------------------------------------------------- /tlpui/lang/ru_RU/LC_MESSAGES/configdescriptions.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/ru_RU/LC_MESSAGES/configdescriptions.mo -------------------------------------------------------------------------------- /tlpui/lang/ru_RU/LC_MESSAGES/mainui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/ru_RU/LC_MESSAGES/mainui.mo -------------------------------------------------------------------------------- /tlpui/lang/ru_RU/LC_MESSAGES/mainui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2024-01-02 19:15+0100\n" 5 | "PO-Revision-Date: 2024-01-02 19:15+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: Nitro138@mail.ru\n" 8 | "Language: ru_RU\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-SourceCharset: UTF-8\n" 16 | "X-Poedit-KeywordsList: MT_\n" 17 | "X-Poedit-SearchPath-0: mainui.py\n" 18 | 19 | #: mainui.py:87 20 | msgid "Review settings" 21 | msgstr "Настройка просмотра" 22 | 23 | #: mainui.py:88 24 | msgid "Save these changes?" 25 | msgstr "Сохранить эти изменения?" 26 | 27 | #: mainui.py:111 28 | msgid "Unsaved settings" 29 | msgstr "Несохранённые изменения" 30 | 31 | #: mainui.py:112 32 | msgid "Do you really want to quit? No changes will be saved" 33 | msgstr "Вы действительно хотите выйти? Никакие изменения не будут сохранены" 34 | 35 | #: mainui.py:231 36 | msgid "Reload" 37 | msgstr "Восстановить настройки" 38 | 39 | #: mainui.py:235 mainui.py:252 40 | msgid "Save" 41 | msgstr "Сохранить" 42 | 43 | #: mainui.py:250 44 | msgid "File" 45 | msgstr "Файл" 46 | 47 | #: mainui.py:255 48 | msgid "Quit" 49 | msgstr "Выход" 50 | 51 | #: mainui.py:259 52 | msgid "Language" 53 | msgstr "Язык" 54 | 55 | #: mainui.py:265 56 | msgid "Help" 57 | msgstr "Help" 58 | 59 | #: mainui.py:268 60 | msgid "About" 61 | msgstr "About" 62 | 63 | #: mainui.py:292 64 | msgid "UI for TLP written in Python/Gtk" 65 | msgstr "UI for TLP written in Python/Gtk" 66 | 67 | #: mainui.py:337 68 | msgid "Configuration" 69 | msgstr "Конфигурация" 70 | 71 | #: mainui.py:340 72 | msgid "Statistics" 73 | msgstr "Статистика" 74 | -------------------------------------------------------------------------------- /tlpui/lang/ru_RU/LC_MESSAGES/statui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/ru_RU/LC_MESSAGES/statui.mo -------------------------------------------------------------------------------- /tlpui/lang/ru_RU/LC_MESSAGES/statui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:41+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:46+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: nitro138@mail.ru\n" 8 | "Language: ru_RU\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: ST_\n" 16 | "X-Poedit-SearchPath-0: statui.py\n" 17 | 18 | #: statui.py:37 19 | msgid "Click fetch button to receive results" 20 | msgstr "Нажмите кнопку для получения результатов" 21 | 22 | #: statui.py:47 23 | msgid "Simple" 24 | msgstr "Простая" 25 | 26 | #: statui.py:52 27 | msgid "Complete" 28 | msgstr "Полная" 29 | -------------------------------------------------------------------------------- /tlpui/lang/ru_RU/LC_MESSAGES/uihelper.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/ru_RU/LC_MESSAGES/uihelper.mo -------------------------------------------------------------------------------- /tlpui/lang/ru_RU/LC_MESSAGES/uihelper.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:41+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:41+0100\n" 6 | "Last-Translator: \n" 7 | "Language-Team: nitro138@mail.ru\n" 8 | "Language: ru_RU\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: UH_\n" 16 | "X-Poedit-SearchPath-0: uihelper.py\n" 17 | 18 | #: uihelper.py:14 19 | msgid "Expected item missing in config file" 20 | msgstr "Ожидаемый элемент отсутствует в файле конфигурации" 21 | 22 | #: uihelper.py:15 23 | msgid "Unknown config value detected" 24 | msgstr "Unknown config value detected" 25 | 26 | #: uihelper.py:16 27 | msgid "Install pkexec, gksu, gksudo, kdesu or kdesudo first" 28 | msgstr "Сначала установите pkexec, gksu, gksudo, kdesu или kdesudo" 29 | 30 | #: uihelper.py:17 31 | msgid "Default state:" 32 | msgstr "Состояние по умолчанию:" 33 | 34 | #: uihelper.py:18 35 | msgid "Default value:" 36 | msgstr "Значение по умолчанию:" 37 | 38 | #: uihelper.py:19 39 | msgid "CHANGED" 40 | msgstr "ИЗМЕНЕНО" 41 | -------------------------------------------------------------------------------- /tlpui/lang/tr_TR/LC_MESSAGES/configdescriptions.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/tr_TR/LC_MESSAGES/configdescriptions.mo -------------------------------------------------------------------------------- /tlpui/lang/tr_TR/LC_MESSAGES/mainui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/tr_TR/LC_MESSAGES/mainui.mo -------------------------------------------------------------------------------- /tlpui/lang/tr_TR/LC_MESSAGES/mainui.po: -------------------------------------------------------------------------------- 1 | # 2 | # Muhammet Emin AKALAN <05akalan57@gmail.com>, 2021. 3 | # 4 | msgid "" 5 | msgstr "" 6 | "Project-Id-Version: TLPUI\n" 7 | "POT-Creation-Date: 2024-01-02 19:15+0100\n" 8 | "PO-Revision-Date: 2024-01-02 19:15+0100\n" 9 | "Last-Translator: Muhammet Emin AKALAN <05akalan57@gmail.com>\n" 10 | "Language-Team: Turkish <05akalan57@gmail.com>\n" 11 | "Language: tr\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Plural-Forms: nplurals=1; plural=0;\n" 16 | "X-Generator: Poedit 3.4.1\n" 17 | "X-Poedit-Basepath: ../../..\n" 18 | "X-Poedit-SourceCharset: UTF-8\n" 19 | "X-Poedit-KeywordsList: MT_\n" 20 | "X-Poedit-SearchPath-0: mainui.py\n" 21 | 22 | #: mainui.py:87 23 | msgid "Review settings" 24 | msgstr "Ayarları inceleyin" 25 | 26 | #: mainui.py:88 27 | msgid "Save these changes?" 28 | msgstr "Bu değişiklikler kaydedilsin mi?" 29 | 30 | #: mainui.py:111 31 | msgid "Unsaved settings" 32 | msgstr "Kaydedilmemiş ayarlar" 33 | 34 | #: mainui.py:112 35 | msgid "Do you really want to quit? No changes will be saved" 36 | msgstr "Gerçekten çıkmak istiyor musun? Hiçbir değişiklik kaydedilmeyecek" 37 | 38 | #: mainui.py:231 39 | msgid "Reload" 40 | msgstr "Yenile" 41 | 42 | #: mainui.py:235 mainui.py:252 43 | msgid "Save" 44 | msgstr "Kaydet" 45 | 46 | #: mainui.py:250 47 | msgid "File" 48 | msgstr "Dosya" 49 | 50 | #: mainui.py:255 51 | msgid "Quit" 52 | msgstr "Çıkış" 53 | 54 | #: mainui.py:259 55 | msgid "Language" 56 | msgstr "Dil" 57 | 58 | #: mainui.py:265 59 | msgid "Help" 60 | msgstr "Help" 61 | 62 | #: mainui.py:268 63 | msgid "About" 64 | msgstr "About" 65 | 66 | #: mainui.py:292 67 | msgid "UI for TLP written in Python/Gtk" 68 | msgstr "UI for TLP written in Python/Gtk" 69 | 70 | #: mainui.py:337 71 | msgid "Configuration" 72 | msgstr "Ayarlar" 73 | 74 | #: mainui.py:340 75 | msgid "Statistics" 76 | msgstr "İstatistik" 77 | -------------------------------------------------------------------------------- /tlpui/lang/tr_TR/LC_MESSAGES/statui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/tr_TR/LC_MESSAGES/statui.mo -------------------------------------------------------------------------------- /tlpui/lang/tr_TR/LC_MESSAGES/statui.po: -------------------------------------------------------------------------------- 1 | # 2 | # Muhammet Emin AKALAN <05akalan57@gmail.com>, 2021. 3 | # 4 | msgid "" 5 | msgstr "" 6 | "Project-Id-Version: TLPUI\n" 7 | "POT-Creation-Date: 2023-12-25 16:41+0100\n" 8 | "PO-Revision-Date: 2023-12-25 16:46+0100\n" 9 | "Last-Translator: Muhammet Emin AKALAN <05akalan57@gmail.com>\n" 10 | "Language-Team: Turkish <05akalan57@gmail.com>\n" 11 | "Language: tr\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Plural-Forms: nplurals=1; plural=0;\n" 16 | "X-Generator: Poedit 3.4.1\n" 17 | "X-Poedit-Basepath: ../../..\n" 18 | "X-Poedit-KeywordsList: ST_\n" 19 | "X-Poedit-SearchPath-0: statui.py\n" 20 | 21 | #: statui.py:37 22 | msgid "Click fetch button to receive results" 23 | msgstr "Sonuçları almak için basit düğmesine tıklayın" 24 | 25 | #: statui.py:47 26 | msgid "Simple" 27 | msgstr "Basit" 28 | 29 | #: statui.py:52 30 | msgid "Complete" 31 | msgstr "Tamamı" 32 | -------------------------------------------------------------------------------- /tlpui/lang/tr_TR/LC_MESSAGES/uihelper.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/tr_TR/LC_MESSAGES/uihelper.mo -------------------------------------------------------------------------------- /tlpui/lang/tr_TR/LC_MESSAGES/uihelper.po: -------------------------------------------------------------------------------- 1 | # 2 | # Muhammet Emin AKALAN <05akalan57@gmail.com>, 2021. 3 | # 4 | msgid "" 5 | msgstr "" 6 | "Project-Id-Version: TLPUI\n" 7 | "POT-Creation-Date: 2023-12-25 16:41+0100\n" 8 | "PO-Revision-Date: 2023-12-25 16:42+0100\n" 9 | "Last-Translator: Muhammet Emin AKALAN <05akalan57@gmail.com>\n" 10 | "Language-Team: Turkish <05akalan57@gmail.com>\n" 11 | "Language: tr\n" 12 | "MIME-Version: 1.0\n" 13 | "Content-Type: text/plain; charset=UTF-8\n" 14 | "Content-Transfer-Encoding: 8bit\n" 15 | "Plural-Forms: nplurals=1; plural=0;\n" 16 | "X-Generator: Poedit 3.4.1\n" 17 | "X-Poedit-Basepath: ../../..\n" 18 | "X-Poedit-KeywordsList: UH_\n" 19 | "X-Poedit-SearchPath-0: uihelper.py\n" 20 | 21 | #: uihelper.py:14 22 | msgid "Expected item missing in config file" 23 | msgstr "Yapılandırma dosyasında beklenen öğe eksik" 24 | 25 | #: uihelper.py:15 26 | msgid "Unknown config value detected" 27 | msgstr "Bilinmeyen yapılandırma değeri algılandı" 28 | 29 | #: uihelper.py:16 30 | msgid "Install pkexec, gksu, gksudo, kdesu or kdesudo first" 31 | msgstr "Önce pkexec, gksu, gksudo, kdesu veya kdesudo'yu kurun" 32 | 33 | #: uihelper.py:17 34 | msgid "Default state:" 35 | msgstr "Varsayılan durum:" 36 | 37 | #: uihelper.py:18 38 | msgid "Default value:" 39 | msgstr "Varsayılan değer:" 40 | 41 | #: uihelper.py:19 42 | msgid "CHANGED" 43 | msgstr "DEĞİŞTİRİLDİ" 44 | -------------------------------------------------------------------------------- /tlpui/lang/zh_CN/LC_MESSAGES/configdescriptions.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/zh_CN/LC_MESSAGES/configdescriptions.mo -------------------------------------------------------------------------------- /tlpui/lang/zh_CN/LC_MESSAGES/mainui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/zh_CN/LC_MESSAGES/mainui.mo -------------------------------------------------------------------------------- /tlpui/lang/zh_CN/LC_MESSAGES/mainui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2024-01-02 19:15+0100\n" 5 | "PO-Revision-Date: 2024-01-02 19:16+0100\n" 6 | "Last-Translator: WhiredPlanck \n" 7 | "Language-Team: \n" 8 | "Language: zh_CN\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=1; plural=0;\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-SourceCharset: UTF-8\n" 16 | "X-Poedit-KeywordsList: MT_\n" 17 | "X-Poedit-SearchPath-0: mainui.py\n" 18 | 19 | #: mainui.py:87 20 | msgid "Review settings" 21 | msgstr "检查设定" 22 | 23 | #: mainui.py:88 24 | msgid "Save these changes?" 25 | msgstr "要保存这些更改吗?" 26 | 27 | #: mainui.py:111 28 | msgid "Unsaved settings" 29 | msgstr "未保存的设定" 30 | 31 | #: mainui.py:112 32 | msgid "Do you really want to quit? No changes will be saved" 33 | msgstr "确定要退出吗?不会保存任何更改" 34 | 35 | #: mainui.py:231 36 | msgid "Reload" 37 | msgstr "重新加载" 38 | 39 | #: mainui.py:235 mainui.py:252 40 | msgid "Save" 41 | msgstr "保存" 42 | 43 | #: mainui.py:250 44 | msgid "File" 45 | msgstr "文件" 46 | 47 | #: mainui.py:255 48 | msgid "Quit" 49 | msgstr "退出" 50 | 51 | #: mainui.py:259 52 | msgid "Language" 53 | msgstr "语言" 54 | 55 | #: mainui.py:265 56 | msgid "Help" 57 | msgstr "Help" 58 | 59 | #: mainui.py:268 60 | msgid "About" 61 | msgstr "About" 62 | 63 | #: mainui.py:292 64 | msgid "UI for TLP written in Python/Gtk" 65 | msgstr "UI for TLP written in Python/Gtk" 66 | 67 | #: mainui.py:337 68 | msgid "Configuration" 69 | msgstr "配置" 70 | 71 | #: mainui.py:340 72 | msgid "Statistics" 73 | msgstr "情况统计" 74 | -------------------------------------------------------------------------------- /tlpui/lang/zh_CN/LC_MESSAGES/statui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/zh_CN/LC_MESSAGES/statui.mo -------------------------------------------------------------------------------- /tlpui/lang/zh_CN/LC_MESSAGES/statui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:42+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:46+0100\n" 6 | "Last-Translator: WhiredPlanck \n" 7 | "Language-Team: \n" 8 | "Language: zh_CN\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=1; plural=0;\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: ST_\n" 16 | "X-Poedit-SearchPath-0: statui.py\n" 17 | 18 | #: statui.py:37 19 | msgid "Click fetch button to receive results" 20 | msgstr "按下按钮以加载统计信息" 21 | 22 | #: statui.py:47 23 | msgid "Simple" 24 | msgstr "简单" 25 | 26 | #: statui.py:52 27 | msgid "Complete" 28 | msgstr "完整" 29 | -------------------------------------------------------------------------------- /tlpui/lang/zh_CN/LC_MESSAGES/uihelper.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/zh_CN/LC_MESSAGES/uihelper.mo -------------------------------------------------------------------------------- /tlpui/lang/zh_CN/LC_MESSAGES/uihelper.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:42+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:42+0100\n" 6 | "Last-Translator: WhiredPlanck \n" 7 | "Language-Team: \n" 8 | "Language: zh_CN\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=1; plural=0;\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: UH_\n" 16 | "X-Poedit-SearchPath-0: uihelper.py\n" 17 | 18 | #: uihelper.py:14 19 | msgid "Expected item missing in config file" 20 | msgstr "预期条目不在配置文件中" 21 | 22 | #: uihelper.py:15 23 | msgid "Unknown config value detected" 24 | msgstr "Unknown config value detected" 25 | 26 | #: uihelper.py:16 27 | msgid "Install pkexec, gksu, gksudo, kdesu or kdesudo first" 28 | msgstr "请先安装 pkexec、gksu、gksudo、kdesu 或 kdesudo" 29 | 30 | #: uihelper.py:17 31 | msgid "Default state:" 32 | msgstr "默认状态:" 33 | 34 | #: uihelper.py:18 35 | msgid "Default value:" 36 | msgstr "默认值:" 37 | 38 | #: uihelper.py:19 39 | msgid "CHANGED" 40 | msgstr "已变更" 41 | -------------------------------------------------------------------------------- /tlpui/lang/zh_TW/LC_MESSAGES/configdescriptions.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/zh_TW/LC_MESSAGES/configdescriptions.mo -------------------------------------------------------------------------------- /tlpui/lang/zh_TW/LC_MESSAGES/mainui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/zh_TW/LC_MESSAGES/mainui.mo -------------------------------------------------------------------------------- /tlpui/lang/zh_TW/LC_MESSAGES/mainui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2024-01-02 19:16+0100\n" 5 | "PO-Revision-Date: 2024-01-02 19:16+0100\n" 6 | "Last-Translator: WhiredPlanck \n" 7 | "Language-Team: \n" 8 | "Language: zh_TW\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=1; plural=0;\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-SourceCharset: UTF-8\n" 16 | "X-Poedit-KeywordsList: MT_\n" 17 | "X-Poedit-SearchPath-0: mainui.py\n" 18 | 19 | #: mainui.py:87 20 | msgid "Review settings" 21 | msgstr "檢查設定" 22 | 23 | #: mainui.py:88 24 | msgid "Save these changes?" 25 | msgstr "要儲存這些更改嗎?" 26 | 27 | #: mainui.py:111 28 | msgid "Unsaved settings" 29 | msgstr "未儲存的設定" 30 | 31 | #: mainui.py:112 32 | msgid "Do you really want to quit? No changes will be saved" 33 | msgstr "確定要退出嗎?不會儲存任何更改" 34 | 35 | #: mainui.py:231 36 | msgid "Reload" 37 | msgstr "重新載入" 38 | 39 | #: mainui.py:235 mainui.py:252 40 | msgid "Save" 41 | msgstr "儲存" 42 | 43 | #: mainui.py:250 44 | msgid "File" 45 | msgstr "文件" 46 | 47 | #: mainui.py:255 48 | msgid "Quit" 49 | msgstr "退出" 50 | 51 | #: mainui.py:259 52 | msgid "Language" 53 | msgstr "語言" 54 | 55 | #: mainui.py:265 56 | msgid "Help" 57 | msgstr "Help" 58 | 59 | #: mainui.py:268 60 | msgid "About" 61 | msgstr "About" 62 | 63 | #: mainui.py:292 64 | msgid "UI for TLP written in Python/Gtk" 65 | msgstr "UI for TLP written in Python/Gtk" 66 | 67 | #: mainui.py:337 68 | msgid "Configuration" 69 | msgstr "配置" 70 | 71 | #: mainui.py:340 72 | msgid "Statistics" 73 | msgstr "情況統計" 74 | -------------------------------------------------------------------------------- /tlpui/lang/zh_TW/LC_MESSAGES/statui.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/zh_TW/LC_MESSAGES/statui.mo -------------------------------------------------------------------------------- /tlpui/lang/zh_TW/LC_MESSAGES/statui.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:43+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:45+0100\n" 6 | "Last-Translator: WhiredPlanck \n" 7 | "Language-Team: \n" 8 | "Language: zh_TW\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=1; plural=0;\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: ST_\n" 16 | "X-Poedit-SearchPath-0: statui.py\n" 17 | 18 | #: statui.py:37 19 | msgid "Click fetch button to receive results" 20 | msgstr "按下按鈕以載入統計訊息" 21 | 22 | #: statui.py:47 23 | msgid "Simple" 24 | msgstr "簡單" 25 | 26 | #: statui.py:52 27 | msgid "Complete" 28 | msgstr "完整" 29 | -------------------------------------------------------------------------------- /tlpui/lang/zh_TW/LC_MESSAGES/uihelper.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/d4nj1/TLPUI/77d7dc5ea520980f14036f1cc446c23fe8d6453e/tlpui/lang/zh_TW/LC_MESSAGES/uihelper.mo -------------------------------------------------------------------------------- /tlpui/lang/zh_TW/LC_MESSAGES/uihelper.po: -------------------------------------------------------------------------------- 1 | msgid "" 2 | msgstr "" 3 | "Project-Id-Version: TLPUI\n" 4 | "POT-Creation-Date: 2023-12-25 16:43+0100\n" 5 | "PO-Revision-Date: 2023-12-25 16:43+0100\n" 6 | "Last-Translator: WhiredPlanck \n" 7 | "Language-Team: \n" 8 | "Language: zh_TW\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=UTF-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "Plural-Forms: nplurals=1; plural=0;\n" 13 | "X-Generator: Poedit 3.4.1\n" 14 | "X-Poedit-Basepath: ../../..\n" 15 | "X-Poedit-KeywordsList: UH_\n" 16 | "X-Poedit-SearchPath-0: uihelper.py\n" 17 | 18 | #: uihelper.py:14 19 | msgid "Expected item missing in config file" 20 | msgstr "預期條目不在配置檔案中" 21 | 22 | #: uihelper.py:15 23 | msgid "Unknown config value detected" 24 | msgstr "Unknown config value detected" 25 | 26 | #: uihelper.py:16 27 | msgid "Install pkexec, gksu, gksudo, kdesu or kdesudo first" 28 | msgstr "請先安裝 pkexec、gksu、gksudo、kdesu 或 kdesudo" 29 | 30 | #: uihelper.py:17 31 | msgid "Default state:" 32 | msgstr "預設狀態:" 33 | 34 | #: uihelper.py:18 35 | msgid "Default value:" 36 | msgstr "預設值:" 37 | 38 | #: uihelper.py:19 39 | msgid "CHANGED" 40 | msgstr "已變更" 41 | -------------------------------------------------------------------------------- /tlpui/language.py: -------------------------------------------------------------------------------- 1 | """Provide translation.""" 2 | 3 | from . import settings 4 | import gettext 5 | 6 | 7 | def load_lang(langfile): 8 | """Load language from file.""" 9 | translation = gettext.translation(langfile, settings.langdir, [settings.userconfig.language]) 10 | 11 | versionlangfile = f"{langfile}{settings.tlpbaseversion}" 12 | if gettext.find(versionlangfile, settings.langdir, [settings.userconfig.language]) is None: 13 | return translation.gettext 14 | 15 | versiontranslation = gettext.translation(versionlangfile, settings.langdir, [settings.userconfig.language]) 16 | versiontranslation.add_fallback(translation) 17 | return versiontranslation.gettext 18 | 19 | 20 | CDT_ = load_lang('configdescriptions') 21 | MT_ = load_lang('mainui') 22 | ST_ = load_lang('statui') 23 | UH_ = load_lang('uihelper') 24 | -------------------------------------------------------------------------------- /tlpui/settings.py: -------------------------------------------------------------------------------- 1 | """Provide runtime application settings.""" 2 | 3 | from os import path, getenv 4 | from pathlib import Path 5 | from . import settingshelper 6 | 7 | # application folder settings 8 | workdir = path.dirname(path.abspath(__file__)) 9 | langdir = f'{workdir}/lang/' 10 | icondir = f'{workdir}/icons/' 11 | 12 | # flatpak related params 13 | IS_FLATPAK = Path("/.flatpak-info").exists() 14 | FOLDER_PREFIX = "/var/run/host" if IS_FLATPAK else "" 15 | TMP_FOLDER = f"{getenv('XDG_RUNTIME_DIR')}/app/{getenv('FLATPAK_ID')}" if IS_FLATPAK else None 16 | 17 | # check for required commands to exist 18 | settingshelper.check_binaries_exist(FOLDER_PREFIX) 19 | 20 | # user config 21 | userconfig = settingshelper.UserConfig() 22 | 23 | # runtime params 24 | tlpversion = settingshelper.get_installed_tlp_version() 25 | tlpbaseversion = tlpversion.replace(".", "_")[0:3] 26 | tlpbaseconfigfile = settingshelper.get_tlp_config_file("") 27 | tlpconfigfile = settingshelper.get_tlp_config_file(FOLDER_PREFIX) 28 | tlpconfig = {} 29 | tlpconfig_original = {} 30 | tlpconfig_defaults = {} 31 | active_scroll = None 32 | -------------------------------------------------------------------------------- /tlpui/settingshelper.py: -------------------------------------------------------------------------------- 1 | """This module provides helper functions for application settings.""" 2 | 3 | import configparser 4 | import re 5 | import sys 6 | from os import getenv 7 | from shutil import which 8 | from subprocess import check_output, CalledProcessError 9 | from pathlib import Path 10 | from . import errorui 11 | 12 | 13 | def exec_command(commands: [str]): 14 | """Execute commands locally.""" 15 | try: 16 | return check_output(commands).decode(sys.stdout.encoding) 17 | except CalledProcessError as error: 18 | errorui.show_dialog(error) 19 | 20 | 21 | def get_tlp_config_file(prefix: str) -> str: 22 | """Select tlp config file by prefix.""" 23 | return f"{prefix}/etc/tlp.conf" 24 | 25 | 26 | def check_binaries_exist(flatpak_folder_prefix: str) -> None: 27 | """Check if required binaries are installed on system.""" 28 | for expected_command in ["tlp", "tlp-stat", "lspci", "lsusb"]: 29 | if flatpak_folder_prefix != "": 30 | command_exists = Path(f"{flatpak_folder_prefix}/usr/bin/{expected_command}").exists() 31 | if not command_exists: 32 | command_exists = Path(f"{flatpak_folder_prefix}/usr/sbin/{expected_command}").exists() 33 | else: 34 | command_exists = which(expected_command) is not None 35 | if not command_exists: 36 | command_exists = Path(f"/usr/sbin/{expected_command}").exists() 37 | 38 | if not command_exists: 39 | errorui.show_dialog(f"{expected_command} not found on system. Please install first.") 40 | sys.exit(1) 41 | 42 | 43 | def get_installed_tlp_version() -> str: 44 | """Fetch tlp version from command.""" 45 | pattern = re.compile(r"TLP ([^\s]+)") 46 | currentconfig = exec_command(["tlp-stat", "-c"]) 47 | matcher = pattern.search(currentconfig) 48 | return matcher.group(1) 49 | 50 | 51 | def get_user_config_file() -> Path: 52 | """Get config path for executing user.""" 53 | userconfighome = getenv("XDG_CONFIG_HOME", "") 54 | if userconfighome == "": 55 | userconfigpath = Path(str(Path.home()) + "/.config/tlpui") 56 | else: 57 | userconfigpath = Path(str(userconfighome) + "/tlpui") 58 | return Path(str(userconfigpath) + "/tlpui.cfg") 59 | 60 | 61 | class UserConfig: 62 | """Class to handle ui config parameters.""" 63 | 64 | def __init__(self): 65 | """Init user config class parameters.""" 66 | self.language = "en_EN" 67 | self.activeoption = 0 68 | self.activecategory = 0 69 | self.activeposition = 0 70 | self.windowxsize = 900 71 | self.windowysize = 600 72 | self.userconfigfile = get_user_config_file() 73 | self.read_user_config() 74 | 75 | def read_user_config(self): 76 | """Read ui config parameters from user home.""" 77 | if self.userconfigfile.exists(): 78 | config = configparser.ConfigParser() 79 | with open(str(self.userconfigfile), encoding='utf-8') as configfile: 80 | config.read_file(configfile) 81 | try: 82 | self.language = config['default']['language'] 83 | self.activeoption = int(config['default']['activeoption']) 84 | self.activecategory = int(config['default']['activecategory']) 85 | self.activeposition = float(config['default']['activeposition']) 86 | self.windowxsize = int(config['default']['windowxsize']) 87 | self.windowysize = int(config['default']['windowysize']) 88 | except KeyError: 89 | # Config key error, override with default values 90 | self.write_user_config() 91 | else: 92 | self.userconfigfile.parent.mkdir(parents=True, exist_ok=True) 93 | self.write_user_config() 94 | 95 | def write_user_config(self): 96 | """Persist ui config parameters to user home.""" 97 | config = configparser.ConfigParser() 98 | config['default'] = {} 99 | config['default']['language'] = self.language 100 | config['default']['activeoption'] = str(self.activeoption) 101 | config['default']['activecategory'] = str(self.activecategory) 102 | config['default']['activeposition'] = str(self.activeposition) 103 | config['default']['windowxsize'] = str(self.windowxsize) 104 | config['default']['windowysize'] = str(self.windowysize) 105 | with open(str(self.userconfigfile), mode='w', encoding='utf-8') as configfile: 106 | config.write(configfile) 107 | -------------------------------------------------------------------------------- /tlpui/statui.py: -------------------------------------------------------------------------------- 1 | """This module provides general tlp-stat functions for the UI.""" 2 | 3 | import gi 4 | gi.require_version('Gtk', '3.0') 5 | from gi.repository import Gtk 6 | 7 | from . import language 8 | from . import settingshelper 9 | from .uihelper import get_theme_image, get_graphical_sudo 10 | 11 | 12 | def fetch_simple_stats(_, textbuffer: Gtk.TextBuffer) -> None: 13 | """Fetch simple tlp-stat information.""" 14 | simple_stat_command = ["tlp-stat", "-r", "-t", "-c", "-s", "-u"] 15 | tlp_stat_output = settingshelper.exec_command(simple_stat_command) 16 | textbuffer.set_text(tlp_stat_output) 17 | 18 | 19 | def fetch_complete_stats(_, textbuffer: Gtk.TextBuffer) -> None: 20 | """Fetch complete tlp-stat information.""" 21 | sudo_cmd = get_graphical_sudo() 22 | 23 | if sudo_cmd is None: 24 | return 25 | 26 | tlp_stat_output = settingshelper.exec_command([sudo_cmd, "tlp-stat"]) 27 | textbuffer.set_text(tlp_stat_output) 28 | 29 | 30 | def create_stat_box() -> Gtk.Box: 31 | """Create box with stat widgets.""" 32 | scrolledwindow = Gtk.ScrolledWindow() 33 | scrolledwindow.set_hexpand(True) 34 | scrolledwindow.set_vexpand(True) 35 | 36 | textbuffer = Gtk.TextBuffer() 37 | textbuffer.set_text(language.ST_('Click fetch button to receive results')) 38 | 39 | textview = Gtk.TextView() 40 | textview.set_buffer(textbuffer) 41 | textview.set_editable(False) 42 | 43 | scrolledwindow.add(textview) 44 | 45 | emptylabel = Gtk.Label() 46 | 47 | fetchsimplebutton = Gtk.Button(label=f" {language.ST_('Simple')}", 48 | image=get_theme_image('dialog-information-symbolic', Gtk.IconSize.BUTTON)) 49 | fetchsimplebutton.connect('clicked', fetch_simple_stats, textbuffer) 50 | fetchsimplebutton.set_always_show_image(True) 51 | 52 | fetchcompletebutton = Gtk.Button(label=f" {language.ST_('Complete')}", 53 | image=get_theme_image('format-indent-more-symbolic', Gtk.IconSize.BUTTON)) 54 | fetchcompletebutton.connect('clicked', fetch_complete_stats, textbuffer) 55 | fetchcompletebutton.set_always_show_image(True) 56 | 57 | buttonbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=12) 58 | buttonbox.pack_start(emptylabel, True, True, 0) 59 | buttonbox.pack_start(fetchsimplebutton, False, False, 0) 60 | buttonbox.pack_start(fetchcompletebutton, False, False, 0) 61 | 62 | statbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12) 63 | statbox.set_margin_top(18) 64 | statbox.set_margin_bottom(18) 65 | statbox.set_margin_left(18) 66 | statbox.set_margin_right(18) 67 | statbox.pack_start(buttonbox, False, False, 0) 68 | statbox.pack_start(scrolledwindow, True, True, 0) 69 | 70 | return statbox 71 | -------------------------------------------------------------------------------- /tlpui/styles.css: -------------------------------------------------------------------------------- 1 | #configNotebook header { 2 | background-color: @theme_focused_bg_color; 3 | } 4 | 5 | #configNotebook tab { 6 | border-radius: 0px; 7 | background-color: @theme_focused_bg_color; 8 | } 9 | 10 | #configNotebook tab:checked { 11 | color: @theme_fg_color; 12 | background-color: @theme_bg_color; 13 | } 14 | 15 | #categoryViewport { 16 | color: @theme_fg_color; 17 | background-color: @theme_bg_color; 18 | } 19 | 20 | #validEntry { 21 | color: white; 22 | background: green; 23 | } 24 | 25 | #invalidEntry { 26 | color: white; 27 | background: red; 28 | } 29 | 30 | #missingConfigLabel { 31 | background: lightyellow; 32 | } -------------------------------------------------------------------------------- /tlpui/ui_config_objects/__init__.py: -------------------------------------------------------------------------------- 1 | """Init module for config widgets.""" 2 | -------------------------------------------------------------------------------- /tlpui/ui_config_objects/gtkcheckbutton.py: -------------------------------------------------------------------------------- 1 | """Checkbutton UI widget.""" 2 | 3 | from gi.repository import Gtk 4 | from .. import settings 5 | 6 | 7 | def create_checkbutton_box(configname: str, values: str) -> Gtk.Box: 8 | """Create checkbutton box.""" 9 | checkbox = Gtk.Box() 10 | checkitems = values.split(',') 11 | configvalue = settings.tlpconfig[configname].get_value() 12 | 13 | checkbuttonitem = 0 14 | for checkitem in checkitems: 15 | checkbutton = Gtk.CheckButton(checkitem) 16 | if checkitem in configvalue: 17 | checkbutton.set_active(True) 18 | checkbutton.connect('toggled', change_check_state, configname, checkitems) 19 | 20 | if checkbuttonitem % 2 == 0: 21 | checkbox.pack_start(checkbutton, False, False, 0) 22 | else: 23 | checkbox.pack_start(checkbutton, False, False, 12) 24 | checkbuttonitem += 1 25 | 26 | return checkbox 27 | 28 | 29 | def change_check_state(self: Gtk.CheckButton, configname: str, checkitems: []): 30 | """Process and store state change.""" 31 | currentitem = self.get_label() 32 | currentstate = self.get_active() 33 | currentvalue = str(settings.tlpconfig[configname].get_value()) 34 | 35 | newvalue = '' 36 | for checkitem in checkitems: 37 | if checkitem == currentitem and currentstate is False: 38 | continue 39 | elif checkitem in currentvalue or checkitem == currentitem: 40 | newvalue = newvalue + " " + checkitem 41 | 42 | settings.tlpconfig[configname].set_value(newvalue.lstrip()) 43 | -------------------------------------------------------------------------------- /tlpui/ui_config_objects/gtkdisklistview.py: -------------------------------------------------------------------------------- 1 | """Disk view UI widget.""" 2 | 3 | from gi.repository import Gtk 4 | from .. import settings 5 | 6 | 7 | def create_view(configname: str) -> Gtk.Box: 8 | """Create disk view.""" 9 | tlpobject = settings.tlpconfig[configname] 10 | label = Gtk.Label(tlpobject.get_value()) 11 | label.set_width_chars(len(tlpobject.get_value()) + 5) 12 | return label 13 | -------------------------------------------------------------------------------- /tlpui/ui_config_objects/gtkentry.py: -------------------------------------------------------------------------------- 1 | """Entry UI widget.""" 2 | 3 | from gi.repository import Gtk 4 | from .. import settings 5 | 6 | 7 | def create_entry(configname: str) -> Gtk.Entry: 8 | """Create entry widget.""" 9 | configvalue = settings.tlpconfig[configname].get_value() 10 | configvaluelength = len(configvalue) 11 | if configvaluelength >= 70: 12 | configvaluelength = 70 13 | 14 | entry = Gtk.Entry() 15 | entry.set_text(configvalue) 16 | entry.set_width_chars(configvaluelength + 5) 17 | entry.connect('changed', change_entry_text, configname) 18 | return entry 19 | 20 | 21 | def change_entry_text(self: Gtk.Entry, configname: str): 22 | """Store state change.""" 23 | settings.tlpconfig[configname].set_value(self.get_text()) 24 | -------------------------------------------------------------------------------- /tlpui/ui_config_objects/gtkmultiselection.py: -------------------------------------------------------------------------------- 1 | """Multiselect UI widget.""" 2 | 3 | from gi.repository import Gtk 4 | from .. import settings 5 | 6 | 7 | def create_multi_selection_box(configname: str, values: str) -> Gtk.ComboBox: 8 | """Create multi select box.""" 9 | multiselectbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) 10 | multiselectitems = values.split(',') 11 | configitems = settings.tlpconfig[configname].get_value().split(' ') 12 | 13 | for selectitem in multiselectitems: 14 | toggle = Gtk.ToggleButton(selectitem) 15 | if selectitem in configitems: 16 | toggle.set_active(True) 17 | toggle.connect('toggled', change_selection_state, configname, multiselectitems) 18 | 19 | multiselectbox.pack_start(toggle, False, False, 2) 20 | 21 | return multiselectbox 22 | 23 | 24 | def change_selection_state(self: Gtk.ToggleButton, configname: str, checkitems: []): 25 | """Process and store state change.""" 26 | currentitem = self.get_label() 27 | currentstate = self.get_active() 28 | currentvalue = str(settings.tlpconfig[configname].get_value()) 29 | 30 | newvalue = '' 31 | for checkitem in checkitems: 32 | if checkitem == currentitem and currentstate is False: 33 | continue 34 | elif checkitem in currentvalue or checkitem == currentitem: 35 | newvalue = newvalue + " " + checkitem 36 | 37 | settings.tlpconfig[configname].set_value(newvalue.lstrip()) 38 | -------------------------------------------------------------------------------- /tlpui/ui_config_objects/gtkpcilist.py: -------------------------------------------------------------------------------- 1 | """PCI UI widget.""" 2 | 3 | import re 4 | from gi.repository import Gtk 5 | 6 | from collections import OrderedDict 7 | from ..uihelper import get_theme_image 8 | from .. import settings 9 | from .. import settingshelper 10 | 11 | 12 | def create_list(configname: str, window: Gtk.Window) -> Gtk.Box: 13 | """Create pci list button.""" 14 | box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) 15 | label = Gtk.Label(settings.tlpconfig[configname].get_value().replace(" ", "\n")) 16 | 17 | button = Gtk.Button(label=' Edit', image=get_theme_image('edit-symbolic', Gtk.IconSize.BUTTON)) 18 | button.connect('clicked', edit_list, configname, label, window) 19 | button.set_always_show_image(True) 20 | 21 | box.pack_start(label, False, False, 0) 22 | box.pack_start(button, False, False, 12) 23 | return box 24 | 25 | 26 | def edit_list(self, configname: str, usblistlabel: Gtk.Label, window: Gtk.Window): 27 | """Create pci list view.""" 28 | tlpobject = settings.tlpconfig[configname] 29 | pcilistpattern = re.compile(r'^([a-f\d]{2}:[a-f\d]{2}\.[a-f\d])(.+?)$') 30 | currentitems = tlpobject.get_value().split(' ') 31 | 32 | tlppcilist = settingshelper.exec_command(["lspci"]) 33 | 34 | pciitems = OrderedDict() 35 | for line in tlppcilist.splitlines(): 36 | matcher = pcilistpattern.match(line) 37 | pciid = matcher.group(1) 38 | description = matcher.group(2).lstrip() 39 | 40 | pciitems[pciid] = [description, (pciid in currentitems)] 41 | 42 | grid = Gtk.Grid() 43 | grid.set_row_homogeneous(True) 44 | grid.set_column_spacing(12) 45 | 46 | grid.attach(Gtk.Label(''), 0, 0, 1, 1) 47 | grid.attach(Gtk.Label(label='ID', halign=Gtk.Align.START), 1, 0, 1, 1) 48 | grid.attach(Gtk.Label(label='Description', halign=Gtk.Align.START), 2, 0, 1, 1) 49 | grid.attach(Gtk.Label(''), 3, 0, 1, 1) 50 | 51 | rowindex = 2 52 | allitems = list() 53 | selecteditems = list() 54 | for key, value in pciitems.items(): 55 | allitems.append(key) 56 | toggle = Gtk.ToggleButton(key) 57 | toggle.connect('toggled', on_button_toggled, key, selecteditems) 58 | 59 | if value[1]: 60 | toggle.set_active(True) 61 | 62 | label = Gtk.Label(value[0]) 63 | label.set_halign(Gtk.Align.START) 64 | 65 | grid.attach(toggle, 1, rowindex, 1, 1) 66 | grid.attach(label, 2, rowindex, 1, 1) 67 | 68 | rowindex += 1 69 | 70 | dialog = Gtk.Dialog('PCI(e) devices', window, 0, ( 71 | Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, 72 | Gtk.STOCK_OK, Gtk.ResponseType.OK 73 | )) 74 | 75 | contentarea = dialog.get_content_area() 76 | contentarea.set_spacing(6) 77 | contentarea.add(grid) 78 | dialog.show_all() 79 | 80 | response = dialog.run() 81 | if response == Gtk.ResponseType.OK: 82 | configvalue = ' '.join(str(item) for item in selecteditems) 83 | tlpobject.set_value(configvalue) 84 | usblistlabel.set_text(configvalue.replace(" ", "\n")) 85 | 86 | dialog.destroy() 87 | 88 | 89 | def on_button_toggled(self: Gtk.ToggleButton, key: str, selecteditems: list): 90 | """Process state change.""" 91 | if self.get_active(): 92 | selecteditems.append(key) 93 | else: 94 | selecteditems.remove(key) 95 | -------------------------------------------------------------------------------- /tlpui/ui_config_objects/gtkselection.py: -------------------------------------------------------------------------------- 1 | """Select UI widget.""" 2 | 3 | from gi.repository import Gtk 4 | from .. import settings 5 | 6 | 7 | def create_selection_box(configname: str, values: str) -> Gtk.ComboBox: 8 | """Create select box.""" 9 | combobox = Gtk.ComboBoxText() 10 | selectitems = values.split(',') 11 | configvalue = settings.tlpconfig[configname].get_value() 12 | 13 | if configvalue not in selectitems: 14 | settings.tlpconfig[configname].stateimage.warn_unknown_config_value(configvalue) 15 | 16 | countid = 0 17 | selectid = 0 18 | 19 | for item in selectitems: 20 | combobox.append_text(item) 21 | if item == configvalue: 22 | selectid = countid 23 | countid += 1 24 | 25 | combobox.set_active(selectid) 26 | combobox.connect('changed', change_selection_state, configname) 27 | return combobox 28 | 29 | 30 | def change_selection_state(self: Gtk.ComboBoxText, configname: str): 31 | """Process and store state change.""" 32 | newvalue = self.get_active_text() 33 | settings.tlpconfig[configname].set_value(newvalue) 34 | -------------------------------------------------------------------------------- /tlpui/ui_config_objects/gtkspinbutton.py: -------------------------------------------------------------------------------- 1 | """Numeric range UI widget.""" 2 | 3 | from gi.repository import Gtk 4 | from .. import settings 5 | 6 | 7 | def create_numeric_spinbutton(configname: str, values: str) -> Gtk.SpinButton: 8 | """Create spin button with range.""" 9 | valuerange = values.split('-') 10 | configvalue = settings.tlpconfig[configname].get_value() 11 | adjustment = Gtk.Adjustment(0, float(valuerange[0]), float(valuerange[1]), 1, 10, 0) 12 | 13 | spinbutton = Gtk.SpinButton() 14 | spinbutton.set_numeric(True) 15 | spinbutton.set_adjustment(adjustment) 16 | if configvalue != "": 17 | spinbutton.set_value(float(configvalue)) 18 | spinbutton.connect('value-changed', change_numeric_spin_value, configname) 19 | return spinbutton 20 | 21 | 22 | def change_numeric_spin_value(self: Gtk.SpinButton, configname: str): 23 | """Process and store state change.""" 24 | newvalue = str(int(self.get_value())) 25 | settings.tlpconfig[configname].set_value(newvalue) 26 | -------------------------------------------------------------------------------- /tlpui/ui_config_objects/gtkswitch.py: -------------------------------------------------------------------------------- 1 | """Switch widget.""" 2 | 3 | from gi.repository import Gtk 4 | from .. import settings 5 | 6 | 7 | def create_state_switch(configname: str, values: str) -> Gtk.Switch: 8 | """Create switch.""" 9 | switch = Gtk.Switch() 10 | 11 | toggleitems = values.split(',') 12 | falseitem = toggleitems[0] 13 | trueitem = toggleitems[1] 14 | 15 | if settings.tlpconfig[configname].get_value() == trueitem: 16 | switch.set_active(True) 17 | else: 18 | switch.set_active(False) 19 | 20 | switch.connect('notify::active', change_switch_state, configname, falseitem, trueitem) 21 | return switch 22 | 23 | 24 | def change_switch_state(self: Gtk.Switch, notify, configname: str, falseitem: str, trueitem: str): 25 | """Process and store state change.""" 26 | tlpobject = settings.tlpconfig[configname] 27 | 28 | if self.get_active(): 29 | tlpobject.set_value(trueitem) 30 | else: 31 | tlpobject.set_value(falseitem) 32 | -------------------------------------------------------------------------------- /tlpui/ui_config_objects/gtktoggle.py: -------------------------------------------------------------------------------- 1 | """Toggle config state.""" 2 | 3 | from gi.repository import Gtk 4 | from .. import mainui 5 | from .. import settings 6 | 7 | 8 | def create_toggle_button(configname: str, configwidget: Gtk.Widget, window: Gtk.Window) -> Gtk.CheckButton: 9 | """Create state toggle.""" 10 | togglebutton = Gtk.CheckButton() 11 | 12 | if settings.tlpconfig[configname].is_enabled(): 13 | togglebutton.set_active(True) 14 | else: 15 | configwidget.set_sensitive(False) 16 | 17 | togglebutton.connect('toggled', on_button_toggled, configname, configwidget, window) 18 | return togglebutton 19 | 20 | 21 | def on_button_toggled(self: Gtk.CheckButton, configname: str, configwidget: Gtk.Widget, window: Gtk.Window): 22 | """Process and store config state.""" 23 | tlpobject = settings.tlpconfig[configname] 24 | 25 | if self.get_active(): 26 | tlpobject.set_enabled(True) 27 | configwidget.set_sensitive(True) 28 | 29 | # Reset to default when intrinsic default gets reactivated 30 | if tlpobject.get_value() == "" and settings.tlpconfig_defaults[configname].is_enabled(): 31 | tlpobject.set_value(settings.tlpconfig_defaults[configname].get_value()) 32 | mainui.load_tlp_config(self, window, False) 33 | else: 34 | tlpobject.set_enabled(False) 35 | configwidget.set_sensitive(False) 36 | 37 | # If intrinsic default gets deactivated we have to remove value 38 | if settings.tlpconfig_defaults[configname].is_enabled(): 39 | tlpobject.set_value("") 40 | -------------------------------------------------------------------------------- /tlpui/ui_config_objects/gtkusblist.py: -------------------------------------------------------------------------------- 1 | """Usb settings UI widget.""" 2 | 3 | import re 4 | from gi.repository import Gtk 5 | 6 | from collections import OrderedDict 7 | from .. import settings 8 | from .. import settingshelper 9 | from ..uihelper import get_theme_image 10 | 11 | global indexstore 12 | 13 | 14 | def create_list(configname: str, window: Gtk.Window) -> Gtk.Box: 15 | """Create usb list button.""" 16 | box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) 17 | label = Gtk.Label(settings.tlpconfig[configname].get_value().replace(" ", "\n")) 18 | 19 | button = Gtk.Button(label=' Edit', image=get_theme_image('edit-symbolic', Gtk.IconSize.BUTTON)) 20 | button.connect('clicked', edit_list, configname, label, window) 21 | button.set_always_show_image(True) 22 | 23 | box.pack_start(label, False, False, 0) 24 | box.pack_start(button, False, False, 12) 25 | return box 26 | 27 | 28 | def edit_list(self, configname: str, usblistlabel: Gtk.Label, window: Gtk.Window): 29 | """Create usb list view.""" 30 | tlpobject = settings.tlpconfig[configname] 31 | usblistpattern = re.compile(r'^.+?([a-f\d]{4}:[a-f\d]{4})(.+?)$') 32 | currentitems = OrderedDict() 33 | if tlpobject.get_value() != '': 34 | for item in tlpobject.get_value().split(' '): 35 | currentitems[item] = ["", True] 36 | 37 | tlpusblist = settingshelper.exec_command(["lsusb"]) 38 | 39 | usbitems = OrderedDict() 40 | for line in tlpusblist.splitlines(): 41 | matcher = usblistpattern.match(line) 42 | usbid = matcher.group(1) 43 | description = matcher.group(2) 44 | active = False 45 | 46 | # only add usb id once 47 | if usbid in usbitems: 48 | continue 49 | 50 | # check if item is selected 51 | if usbid in currentitems: 52 | active = True 53 | del currentitems[usbid] 54 | usbitems[usbid] = [description, active] 55 | 56 | usbitems.update(currentitems) 57 | 58 | grid = Gtk.Grid() 59 | grid.set_row_homogeneous(True) 60 | grid.set_column_spacing(12) 61 | 62 | grid.attach(Gtk.Label(''), 0, 0, 1, 1) 63 | grid.attach(Gtk.Label(label='ID', halign=Gtk.Align.START), 1, 0, 1, 1) 64 | grid.attach(Gtk.Label(label='Description', halign=Gtk.Align.START), 2, 0, 1, 1) 65 | grid.attach(Gtk.Label(''), 3, 0, 1, 1) 66 | 67 | rowindex = 2 68 | allitems = list() 69 | selecteditems = list() 70 | for key, value in usbitems.items(): 71 | allitems.append(key) 72 | toggle = Gtk.ToggleButton(key) 73 | toggle.connect('toggled', on_button_toggled, key, selecteditems) 74 | 75 | if value[1]: 76 | toggle.set_active(True) 77 | 78 | label = Gtk.Label(value[0]) 79 | label.set_halign(Gtk.Align.START) 80 | 81 | grid.attach(toggle, 1, rowindex, 1, 1) 82 | grid.attach(label, 2, rowindex, 1, 1) 83 | 84 | rowindex += 1 85 | 86 | addbutton = Gtk.Button(label=' Add', image=get_theme_image('list-add-symbolic', Gtk.IconSize.BUTTON)) 87 | addbutton.set_sensitive(False) 88 | addbutton.set_always_show_image(True) 89 | 90 | addentry = Gtk.Entry() 91 | addentry.set_width_chars(9) 92 | addentry.set_max_length(9) 93 | addentry.connect('changed', usb_entry_check, addbutton) 94 | 95 | addbutton.connect('clicked', add_usb_item, addentry, grid, allitems, selecteditems) 96 | 97 | addlabel = Gtk.Label(label='Add custom unattached USB IDs:', halign=Gtk.Align.START) 98 | 99 | addbox = Gtk.Box() 100 | addbox.pack_start(addentry, False, False, 0) 101 | addbox.pack_start(addbutton, False, False, 12) 102 | addbox.pack_start(Gtk.Label(''), True, True, 0) 103 | 104 | grid.attach(addlabel, 1, rowindex, 2, 1) 105 | grid.attach(addbox, 1, rowindex + 1, 2, 1) 106 | 107 | global indexstore 108 | indexstore = rowindex + 2 109 | 110 | dialog = Gtk.Dialog('Usb devices', window, 0, ( 111 | Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, 112 | Gtk.STOCK_OK, Gtk.ResponseType.OK 113 | )) 114 | 115 | contentarea = dialog.get_content_area() 116 | contentarea.set_spacing(6) 117 | contentarea.add(grid) 118 | dialog.show_all() 119 | 120 | response = dialog.run() 121 | if response == Gtk.ResponseType.OK: 122 | configvalue = ' '.join(str(item) for item in selecteditems) 123 | tlpobject.set_value(configvalue) 124 | usblistlabel.set_text(configvalue.replace(" ", "\n")) 125 | 126 | dialog.destroy() 127 | 128 | 129 | def on_button_toggled(self: Gtk.ToggleButton, key: str, selecteditems: list): 130 | """Change visibility on toggle.""" 131 | if self.get_active(): 132 | selecteditems.append(key) 133 | else: 134 | selecteditems.remove(key) 135 | 136 | 137 | def usb_entry_check(self: Gtk.Entry, button: Gtk.Button): 138 | """Validate usb entries.""" 139 | usbpattern = re.compile(r'^[a-f\d]{4}:[a-f\d]{4}$') 140 | if usbpattern.match(self.get_text()): 141 | self.set_name('validEntry') 142 | button.set_sensitive(True) 143 | else: 144 | self.set_name('invalidEntry') 145 | button.set_sensitive(False) 146 | 147 | 148 | def add_usb_item(self, entry: Gtk.Entry, grid: Gtk.Grid, allitems: list, selecteditems: list): 149 | """Add usb config item.""" 150 | key = entry.get_text() 151 | if key in allitems: 152 | return 153 | allitems.append(key) 154 | 155 | toggle = Gtk.ToggleButton(key) 156 | toggle.connect('toggled', on_button_toggled, key, selecteditems) 157 | toggle.set_active(True) 158 | 159 | label = Gtk.Label('') 160 | label.set_halign(Gtk.Align.START) 161 | 162 | global indexstore 163 | grid.attach(toggle, 1, indexstore, 1, 1) 164 | grid.attach(label, 2, indexstore, 1, 1) 165 | 166 | indexstore += 1 167 | grid.show_all() 168 | -------------------------------------------------------------------------------- /tlpui/uihelper.py: -------------------------------------------------------------------------------- 1 | """This module provides general helper functions for the UI.""" 2 | 3 | import gi 4 | gi.require_version('Gtk', '3.0') 5 | from gi.repository import Gtk, GdkPixbuf 6 | from shutil import which 7 | from pathlib import Path 8 | from . import language 9 | from . import settings 10 | from . import constants 11 | from . import errorui 12 | 13 | 14 | EXPECTED_ITEM_MISSING_TEXT = language.UH_('Expected item missing in config file') # type: str 15 | UNKNOWN_CONFIG_VALUE_TEXT = language.UH_('Unknown config value detected') # type: str 16 | SUDO_MISSING_TEXT = language.UH_('Install pkexec, gksu, gksudo, kdesu or kdesudo first') # type: str 17 | DEFAULT_STATE_TEXT = language.UH_('Default state:') # type: str 18 | DEFAULT_VALUE_TEXT = language.UH_('Default value:') # type: str 19 | CHANGED_STATE_TEXT = language.UH_('CHANGED') # type: str 20 | 21 | 22 | def get_graphical_sudo() -> str: 23 | """Fetch available graphical sudo command.""" 24 | sudo_list = ["pkexec", "gksu", "gksudo", "kdesu", "kdesudo"] 25 | for sudo in sudo_list: 26 | if settings.IS_FLATPAK: 27 | sudo_exists = Path(f"{settings.FOLDER_PREFIX}/usr/bin/{sudo}").exists() 28 | else: 29 | sudo_exists = which(sudo) is not None 30 | 31 | if sudo_exists: 32 | return sudo 33 | errorui.show_dialog(SUDO_MISSING_TEXT) 34 | return None 35 | 36 | 37 | def get_flag_image(locale: str) -> Gtk.Image: 38 | """Fetch flag image from icons folder.""" 39 | flagpixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(f"{settings.icondir}flags/{locale}.png", width=16, height=16) 40 | return Gtk.Image().new_from_pixbuf(flagpixbuf) 41 | 42 | 43 | def get_theme_image(iconname: str, iconsize: Gtk.IconSize) -> Gtk.Image: 44 | """Fetch image from theme or return fallback if missing.""" 45 | if Gtk.IconTheme.get_default().has_icon(iconname): 46 | return Gtk.Image().new_from_icon_name(iconname, iconsize) 47 | return Gtk.Image().new_from_file(f"{settings.icondir}themeable/hicolor/scalable/actions/{iconname}.svg") 48 | 49 | 50 | class StateImage: 51 | """Class to display configuration item state.""" 52 | 53 | def __init__(self, defaultvalue, defaultstate, stateimage: Gtk.Image): 54 | """Init state image class parameters.""" 55 | self.defaultvalue = str(defaultvalue) 56 | self.defaultstate = bool(defaultstate) 57 | self.stateimage = stateimage 58 | 59 | def warn_unknown_config_value(self, configvalue: str) -> None: 60 | """Add image and tooltip for unknown values.""" 61 | self.stateimage.set_from_icon_name(constants.ICON_NAME_WARNING, Gtk.IconSize.BUTTON) 62 | self.stateimage.set_tooltip_text(f'{UNKNOWN_CONFIG_VALUE_TEXT}: {configvalue}') 63 | 64 | def refresh(self, value: str, store: str, enabled: bool, enabledstore: bool) -> None: 65 | """Refresh image and description by changed state.""" 66 | changed = False 67 | if enabled != enabledstore or value != store: 68 | changed = True 69 | 70 | enabledtext = '' 71 | if enabled != self.defaultstate: 72 | enabledtext += f'{DEFAULT_STATE_TEXT} {str(self.defaultstate)}' 73 | 74 | if value == self.defaultvalue: 75 | if not changed and enabledtext == '': 76 | self.stateimage.clear() 77 | elif not changed and enabledtext != '': 78 | self.stateimage.set_from_icon_name(constants.ICON_NAME_INFO, Gtk.IconSize.BUTTON) 79 | self.stateimage.set_tooltip_text(f'{enabledtext}') 80 | elif changed and enabledtext == '': 81 | self.stateimage.set_from_icon_name(constants.ICON_NAME_UNDO, Gtk.IconSize.BUTTON) 82 | self.stateimage.set_tooltip_text(f'{CHANGED_STATE_TEXT}') 83 | elif changed and enabledtext != '': 84 | self.stateimage.set_from_icon_name(constants.ICON_NAME_UNDO, Gtk.IconSize.BUTTON) 85 | self.stateimage.set_tooltip_text(f'{CHANGED_STATE_TEXT}\n{enabledtext}') 86 | else: 87 | defaulttext = f'{DEFAULT_VALUE_TEXT} {self.defaultvalue}' 88 | if not changed and enabledtext == '': 89 | self.stateimage.set_from_icon_name(constants.ICON_NAME_INFO, Gtk.IconSize.BUTTON) 90 | self.stateimage.set_tooltip_text(defaulttext) 91 | elif not changed and enabledtext != '': 92 | self.stateimage.set_from_icon_name(constants.ICON_NAME_INFO, Gtk.IconSize.BUTTON) 93 | self.stateimage.set_tooltip_text(f'{enabledtext}\n{defaulttext}') 94 | elif changed and enabledtext == '': 95 | self.stateimage.set_from_icon_name(constants.ICON_NAME_UNDO, Gtk.IconSize.BUTTON) 96 | self.stateimage.set_tooltip_text(f'{CHANGED_STATE_TEXT}\n{defaulttext}') 97 | elif changed and enabledtext != '': 98 | self.stateimage.set_from_icon_name(constants.ICON_NAME_UNDO, Gtk.IconSize.BUTTON) 99 | self.stateimage.set_tooltip_text(f'{CHANGED_STATE_TEXT}\n{enabledtext}\n{defaulttext}') 100 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | requires = tox>=4 3 | isolated_build = true 4 | env_list = 5 | py3{9,10,11,12,13} 6 | pycodestyle 7 | pydocstyle 8 | 9 | [testenv] 10 | description = Run tests with pytest 11 | skip_install = true 12 | allowlist_externals = poetry 13 | commands_pre = 14 | poetry install 15 | commands = 16 | poetry run pytest --cov=tlpui tests 17 | 18 | [testenv:pycodestyle] 19 | description = Run codestyle checks 20 | skip_install = true 21 | allowlist_externals = poetry 22 | commands_pre = 23 | poetry install 24 | commands = 25 | poetry run pycodestyle -v tlpui 26 | 27 | [testenv:pydocstyle] 28 | description = Run docstyle checks 29 | skip_install = true 30 | allowlist_externals = poetry 31 | commands_pre = 32 | poetry install 33 | commands = 34 | poetry run pydocstyle -v tlpui 35 | 36 | [testenv:pylint] 37 | description = Run pylint checks 38 | skip_install = true 39 | commands_pre = 40 | poetry install 41 | commands = 42 | poetry run pylint --disable=C0413,C0411 --max-line-length=120 tlpui 43 | 44 | [pycodestyle] 45 | ignore = E402 46 | max-line-length = 120 47 | statistics = True 48 | -------------------------------------------------------------------------------- /translationStringsExtractor.py: -------------------------------------------------------------------------------- 1 | """This module provides helper functions for refreshing config PO files.""" 2 | 3 | import os 4 | from io import open 5 | from tlpui.filehelper import get_yaml_schema_object_from_file 6 | 7 | lastvalue = '' 8 | 9 | 10 | def add_to_list(listobject: list, value: str): 11 | """Add values to list.""" 12 | global lastvalue 13 | if value not in listobject: 14 | if lastvalue in listobject: 15 | lastindex = listobject.index(lastvalue) 16 | listobject.insert(lastindex + 1, value) 17 | else: 18 | listobject.append(value) 19 | 20 | lastvalue = value 21 | 22 | 23 | def create_translateable_strings_header_file(): 24 | """Extract translation items from configschema/*.yaml and put them into a new file with header extension. 25 | 26 | Poedit and other po-tools do not support YAML files right now. 27 | It should be called any time yaml files get added or updated. 28 | 29 | Update or add VERSION.yaml -> run this script -> update po files from header source with utility (e.g. poedit). 30 | """ 31 | translateobjects = list() 32 | 33 | for file in os.listdir('tlpui/configschema'): 34 | if not file.endswith('.yaml'): 35 | continue 36 | 37 | categories = get_yaml_schema_object_from_file('categories', 'tlpui/configschema/' + file) 38 | 39 | for category in categories: 40 | add_to_list(translateobjects, category['name'] + '__CATEGORY_TITLE') 41 | configs = category['configs'] 42 | for config in configs: 43 | if 'group' in config: 44 | # add_to_list(translateobjects, config['group'] + '__GROUP_TITLE') 45 | add_to_list(translateobjects, config['group'] + '__GROUP_DESCRIPTION') 46 | # configitems = config['ids'] 47 | # for configitem in configitems: 48 | # add_to_list(translateobjects, configitem['id'] + '__ID_TITLE') 49 | else: 50 | # add_to_list(translateobjects, config['id'] + '__ID_TITLE') 51 | add_to_list(translateobjects, config['id'] + '__ID_DESCRIPTION') 52 | 53 | newfile = open('tlpui/lang/configschema.yaml.h', 'w+') 54 | for item in translateobjects: 55 | newfile.write('_(\"' + item + '\");\n') 56 | newfile.close() 57 | 58 | 59 | create_translateable_strings_header_file() 60 | -------------------------------------------------------------------------------- /translationValidationHelper.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import gettext 5 | import difflib 6 | from pathlib import Path 7 | from tlpui import settings 8 | from googletrans import Translator 9 | 10 | 11 | def validate_translation(trans: Translator, check_locale: str, language_file: str): 12 | main_lang = "en" 13 | main_locale = "en_EN" 14 | main_translation_catalog = gettext.translation(domain=language_file, localedir=settings.langdir, languages=[main_locale])._catalog 15 | check_translation_catalog = gettext.translation(domain=language_file, localedir=settings.langdir, languages=[check_locale])._catalog 16 | 17 | differ = difflib.HtmlDiff() 18 | charset = 'utf-8' 19 | unknown_items = [] 20 | html = f"Checking locale {check_locale} for {language_file}

" 21 | 22 | for item in main_translation_catalog: 23 | if item == '' or '__ID_TITLE' in item or '__GROUP_TITLE' in item: 24 | continue 25 | if item not in check_translation_catalog: 26 | unknown_items.append(item) 27 | continue 28 | if '_DESCRIPTION' in item or '_TITLE' in item: 29 | html += f"

{item}


" 30 | 31 | check_item = check_translation_catalog[item] 32 | translated_item = trans.translate(check_item, dest=main_lang).text 33 | 34 | html += f"{check_item}
" 35 | html += differ.make_table([translated_item], [main_translation_catalog[item]]) 36 | html += "
" 37 | 38 | if len(unknown_items) > 0: 39 | print('Translations missing for:') 40 | print(unknown_items) 41 | 42 | html_output = (differ._file_template % dict( 43 | styles=differ._styles, 44 | legend=differ._legend, 45 | table=html, 46 | charset=charset 47 | )).encode(charset, 'xmlcharrefreplace').decode(charset) 48 | 49 | html_file = open(f"diffresult-{check_locale}-{language_file}.html", "w") 50 | html_file.write(html_output) 51 | html_file.close() 52 | 53 | 54 | if len(sys.argv) < 2: 55 | print('No locale provided. Must be in format like xx_XX') 56 | sys.exit() 57 | 58 | locale = sys.argv[1] 59 | locale_path = Path(f"{settings.langdir}{locale}") 60 | if not locale_path.exists() and not locale_path.is_dir(): 61 | print(f"Locale folder '{locale_path}' does not exist") 62 | sys.exit() 63 | 64 | print(f"Evaluating locale: {locale}") 65 | translator = Translator() 66 | validate_translation(translator, locale, 'configdescriptions') 67 | validate_translation(translator, locale, 'mainui') 68 | validate_translation(translator, locale, 'statui') 69 | validate_translation(translator, locale, 'uihelper') 70 | --------------------------------------------------------------------------------