forked from Boria138/PortProtonQt
Move repo from git to gitea
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
80
documentation/localization_guide/README.md
Normal file
80
documentation/localization_guide/README.md
Normal file
@ -0,0 +1,80 @@
|
||||
📘 Эта документация также доступна на [русском.](README.ru.md)
|
||||
|
||||
---
|
||||
|
||||
## 📋 Contents
|
||||
- [Overview](#overview)
|
||||
- [Adding a New Translation](#adding-a-new-translation)
|
||||
- [Updating Existing Translations](#updating-existing-translations)
|
||||
- [Compiling Translations](#compiling-translations)
|
||||
|
||||
---
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
Localization in `PortProtonQT` is powered by `Babel` using `.po/.mo` files stored under `LC_MESSAGES/messages.po` for each language.
|
||||
|
||||
Current translation status:
|
||||
|
||||
<!-- Auto-generated coverage table -->
|
||||
|
||||
| Locale | Progress | Translated |
|
||||
| :----- | -------: | ---------: |
|
||||
| [de_DE](./de_DE/LC_MESSAGES/messages.po) | 0% | 0 of 152 |
|
||||
| [es_ES](./es_ES/LC_MESSAGES/messages.po) | 0% | 0 of 152 |
|
||||
| [ru_RU](./ru_RU/LC_MESSAGES/messages.po) | 100% | 152 of 152 |
|
||||
|
||||
---
|
||||
|
||||
|
||||
## 🏁 Adding a New Translation
|
||||
|
||||
1. Run:
|
||||
|
||||
```bash
|
||||
uv python install 3.10
|
||||
uv sync --all-extras --dev
|
||||
source .venv/bin/activate
|
||||
python dev-scripts/l10n.py --create-new <locale_code>
|
||||
```
|
||||
|
||||
2. Edit the file `portprotonqt/locales/<locale>/LC_MESSAGES/messages.po` in Poedit or any text editor.
|
||||
|
||||
---
|
||||
|
||||
## 🔄 Updating Existing Translations
|
||||
|
||||
If you’ve added new strings to the code:
|
||||
|
||||
```bash
|
||||
uv python install 3.10
|
||||
uv sync --all-extras --dev
|
||||
source .venv/bin/activate
|
||||
python dev-scripts/l10n.py --update-all
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🧵 Compiling Translations
|
||||
|
||||
```bash
|
||||
uv python install 3.10
|
||||
uv sync --all-extras --dev
|
||||
source .venv/bin/activate
|
||||
python dev-scripts/l10n.py
|
||||
```
|
||||
|
||||
|
||||
## 🔍 Spell Check
|
||||
|
||||
To check spelling, run the following commands:
|
||||
|
||||
```bash
|
||||
uv python install 3.10
|
||||
uv sync --all-extras --dev
|
||||
source .venv/bin/activate
|
||||
python dev-scripts/l10n.py --spellcheck
|
||||
```
|
||||
|
||||
The script performs parallel spellchecking of strings in `.po` and `.pot` files. For each file, it prints the list of strings being checked and highlights any spelling errors with suggestions. Words listed in `dev-scripts/.spellignore` are ignored and not treated as typos.
|
||||
|
78
documentation/localization_guide/README.ru.md
Normal file
78
documentation/localization_guide/README.ru.md
Normal file
@ -0,0 +1,78 @@
|
||||
📘 This documentation is also available in [English](README.md)
|
||||
|
||||
---
|
||||
|
||||
## 📋 Содержание
|
||||
- [Обзор](#обзор)
|
||||
- [Добавление нового перевода](#добавление-нового-перевода)
|
||||
- [Обновление существующих переводов](#обновление-существующих-переводов)
|
||||
- [Компиляция переводов](#компиляция-переводов)
|
||||
|
||||
---
|
||||
|
||||
## 📖 Обзор
|
||||
|
||||
Локализация в `PortProtonQT` осуществляется через систему `.po/.mo` файлов и управляется утилитой `Babel`. Все переводы находятся в подкаталогах вида `LC_MESSAGES/messages.po` для каждой поддерживаемой локали.
|
||||
|
||||
Текущий статус перевода:
|
||||
|
||||
<!-- Сгенерировано автоматически! -->
|
||||
|
||||
| Локаль | Прогресс | Переведено |
|
||||
| :----- | -------: | ---------: |
|
||||
| [de_DE](./de_DE/LC_MESSAGES/messages.po) | 0% | 0 из 152 |
|
||||
| [es_ES](./es_ES/LC_MESSAGES/messages.po) | 0% | 0 из 152 |
|
||||
| [ru_RU](./ru_RU/LC_MESSAGES/messages.po) | 100% | 152 из 152 |
|
||||
|
||||
---
|
||||
|
||||
|
||||
## 🏁 Добавление нового перевода
|
||||
|
||||
1. Выполните:
|
||||
|
||||
```bash
|
||||
uv python install 3.10
|
||||
uv sync --all-extras --dev
|
||||
source .venv/bin/activate
|
||||
python dev-scripts/l10n.py --create-new <код_локали>
|
||||
```
|
||||
|
||||
2. Отредактируйте файл `portprotonqt/locales/<локаль>/LC_MESSAGES/messages.po` в Poedit или любом текстовом редакторе.
|
||||
|
||||
---
|
||||
|
||||
## 🔄 Обновление существующих переводов
|
||||
|
||||
Если вы добавили новые строки в код:
|
||||
|
||||
```bash
|
||||
uv python install 3.10
|
||||
uv sync --all-extras --dev
|
||||
source .venv/bin/activate
|
||||
python dev-scripts/l10n.py --update-all
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🧵 Компиляция переводов
|
||||
|
||||
```bash
|
||||
uv python install 3.10
|
||||
uv sync --all-extras --dev
|
||||
source .venv/bin/activate
|
||||
python dev-scripts/l10n.py
|
||||
```
|
||||
|
||||
## 🔍 Проверка орфографии
|
||||
|
||||
Для проверки орфографии используйте команду:
|
||||
|
||||
```bash
|
||||
uv python install 3.10
|
||||
uv sync --all-extras --dev
|
||||
source .venv/bin/activate
|
||||
python dev-scripts/l10n.py --spellcheck
|
||||
```
|
||||
|
||||
Скрипт выполняет параллельную проверку строк в `.po` и `.pot` файлах, выводит для каждого файла список проверяемых строк и ошибки с предложениями исправлений. Игнорирует слова, указанные в файле `dev-scripts/.spellignore`, чтобы не считать их опечатками.
|
110
documentation/metadata_override/README.md
Normal file
110
documentation/metadata_override/README.md
Normal file
@ -0,0 +1,110 @@
|
||||
📘 Эта документация также доступна на [русском](README.ru.md)
|
||||
|
||||
---
|
||||
|
||||
## 📋 Contents
|
||||
- [Overview](#overview)
|
||||
- [How It Works](#how-it-works)
|
||||
- [Data Priorities](#data-priorities)
|
||||
- [File Structure](#file-structure)
|
||||
- [For Users](#for-users)
|
||||
- [Creating User Overrides](#creating-user-overrides)
|
||||
- [Example](#example)
|
||||
- [For Developers](#for-developers)
|
||||
- [Adding Built-In Overrides](#adding-built-in-overrides)
|
||||
|
||||
---
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
In `PortProtonQT`, you can change:
|
||||
|
||||
- Game title
|
||||
- Description
|
||||
- Cover image
|
||||
|
||||
Override types:
|
||||
|
||||
| Type | Location | Priority |
|
||||
|-----------------|--------------------------------------------------|----------|
|
||||
| User | `~/.local/share/PortProtonQT/custom_data/` | Highest |
|
||||
| Built-in | `portprotonqt/custom_data/` | Lower |
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ How It Works
|
||||
|
||||
### Data Priorities
|
||||
|
||||
Data is used in the following order:
|
||||
|
||||
1. **User Overrides**
|
||||
2. **Built-in Overrides**
|
||||
3. **Steam Metadata**
|
||||
4. **`.desktop` file info**
|
||||
|
||||
### File Structure
|
||||
|
||||
Each `<exe_name>` folder can include:
|
||||
|
||||
- `metadata.txt` — contains name and description:
|
||||
```txt
|
||||
name=My Game Title
|
||||
description=My Game Description
|
||||
```
|
||||
- `cover.<extension>` — image file (`.png`, `.jpg`, `.jpeg`, `.bmp`)
|
||||
|
||||
---
|
||||
|
||||
## 👤 For Users
|
||||
|
||||
### Creating User Overrides
|
||||
|
||||
1. **Create a folder for your game**:
|
||||
```bash
|
||||
mkdir -p ~/.local/share/PortProtonQT/custom_data/mygame
|
||||
```
|
||||
|
||||
2. **Add overrides**:
|
||||
- **Metadata file**:
|
||||
```bash
|
||||
echo -e "name=My Game\ndescription=Exciting game" > ~/.local/share/PortProtonQT/custom_data/mygame/metadata.txt
|
||||
```
|
||||
- **Cover image**:
|
||||
```bash
|
||||
cp ~/Images/custom_cover.png ~/.local/share/PortProtonQT/custom_data/mygame/cover.png
|
||||
```
|
||||
|
||||
3. **Restart PortProtonQT**.
|
||||
|
||||
## 🛠 For Developers
|
||||
|
||||
### Adding Built-In Overrides
|
||||
|
||||
1. **Create a folder in the project**:
|
||||
```bash
|
||||
mkdir -p portprotonqt/custom_data/mygame
|
||||
```
|
||||
|
||||
2. **Add files**:
|
||||
|
||||
- `metadata.txt`:
|
||||
```txt
|
||||
name=Default Title
|
||||
description=Default Description
|
||||
```
|
||||
|
||||
- Cover image (`cover.png`, for example):
|
||||
```bash
|
||||
cp path/to/cover.png portprotonqt/custom_data/mygame/cover.png
|
||||
```
|
||||
|
||||
3. **Commit changes to repository**:
|
||||
```bash
|
||||
git add portprotonqt/custom_data/mygame
|
||||
git commit -m "Added built-in overrides for mygame"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Done! Your games will now look exactly how you want 🎮✨
|
110
documentation/metadata_override/README.ru.md
Normal file
110
documentation/metadata_override/README.ru.md
Normal file
@ -0,0 +1,110 @@
|
||||
📘 This documentation is also available in [English](README.md)
|
||||
|
||||
---
|
||||
|
||||
## 📋 Содержание
|
||||
- [Обзор](#обзор)
|
||||
- [Как это работает](#как-это-работает)
|
||||
- [Приоритеты данных](#приоритеты-данных)
|
||||
- [Структура файлов](#структура-файлов)
|
||||
- [Для пользователей](#для-пользователей)
|
||||
- [Создание пользовательских переопределений](#создание-пользовательских-переопределений)
|
||||
- [Пример](#пример)
|
||||
- [Для разработчиков](#для-разработчиков)
|
||||
- [Добавление встроенных переопределений](#добавление-встроенных-переопределений)
|
||||
|
||||
---
|
||||
|
||||
## 📖 Обзор
|
||||
|
||||
В `PortProtonQT` можно изменить:
|
||||
|
||||
- Название игры
|
||||
- Описание
|
||||
- Обложку
|
||||
|
||||
Типы переопределений:
|
||||
|
||||
| Тип | Расположение | Приоритет |
|
||||
|----------------|---------------------------------------------------|-----------|
|
||||
| Пользовательские | `~/.local/share/PortProtonQT/custom_data/` | Высший |
|
||||
| Встроенные | `portprotonqt/custom_data/` | Ниже |
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ Как это работает
|
||||
|
||||
### Приоритеты данных
|
||||
|
||||
Данные берутся в следующем порядке:
|
||||
|
||||
1. **Пользовательские переопределения**
|
||||
2. **Встроенные переопределения**
|
||||
3. **Данные Steam**
|
||||
4. **Информация из `.desktop` файла**
|
||||
|
||||
### Структура файлов
|
||||
|
||||
В каждой папке `<имя_exe>` могут быть следующие файлы:
|
||||
|
||||
- `metadata.txt` — имя и описание в формате:
|
||||
```txt
|
||||
name=Моё название игры
|
||||
description=Описание моей игры
|
||||
```
|
||||
- `cover.<расширение>` — обложка (`.png`, `.jpg`, `.jpeg`, `.bmp`)
|
||||
|
||||
---
|
||||
|
||||
## 👤 Для пользователей
|
||||
|
||||
### Создание пользовательских переопределений
|
||||
|
||||
1. **Создайте папку для игры**:
|
||||
```bash
|
||||
mkdir -p ~/.local/share/PortProtonQT/custom_data/mygame
|
||||
```
|
||||
|
||||
2. **Добавьте переопределения**:
|
||||
- **Файл метаданных**:
|
||||
```bash
|
||||
echo -e "name=Моя игра\ndescription=Захватывающая игра" > ~/.local/share/PortProtonQT/custom_data/mygame/metadata.txt
|
||||
```
|
||||
- **Обложку**:
|
||||
```bash
|
||||
cp ~/Images/custom_cover.png ~/.local/share/PortProtonQT/custom_data/mygame/cover.png
|
||||
```
|
||||
|
||||
3. **Перезапустите PortProtonQT**.
|
||||
|
||||
## 🛠 Для разработчиков
|
||||
|
||||
### Добавление встроенных переопределений
|
||||
|
||||
1. **Создайте папку в проекте**:
|
||||
```bash
|
||||
mkdir -p portprotonqt/custom_data/mygame
|
||||
```
|
||||
|
||||
2. **Добавьте файлы**:
|
||||
|
||||
- `metadata.txt`:
|
||||
```txt
|
||||
name=Стандартное название
|
||||
description=Стандартное описание игры
|
||||
```
|
||||
|
||||
- Обложка (`cover.png`, например):
|
||||
```bash
|
||||
cp path/to/cover.png portprotonqt/custom_data/mygame/cover.png
|
||||
```
|
||||
|
||||
3. **Добавьте изменения в репозиторий**:
|
||||
```bash
|
||||
git add portprotonqt/custom_data/mygame
|
||||
git commit -m "Добавлены встроенные переопределения для mygame"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> Готово! Теперь ваши игры будут выглядеть именно так, как вы хотите 🎮✨
|
71
documentation/theme_guide/README.md
Normal file
71
documentation/theme_guide/README.md
Normal file
@ -0,0 +1,71 @@
|
||||
📘 Эта документация также доступна на [русском](README.ru.md)
|
||||
|
||||
---
|
||||
|
||||
## 📋 Contents
|
||||
- [Overview](#overview)
|
||||
- [Creating the Theme Folder](#creating-the-theme-folder)
|
||||
- [Style File](#style-file)
|
||||
- [Metadata](#metadata)
|
||||
- [Screenshots](#screenshots)
|
||||
- [Fonts and Icons](#fonts-and-icons)
|
||||
|
||||
---
|
||||
|
||||
## 📖 Overview
|
||||
|
||||
Themes in `PortProtonQT` allow customizing the UI appearance. Themes are stored under:
|
||||
|
||||
- `~/.local/share/PortProtonQT/themes`.
|
||||
|
||||
---
|
||||
|
||||
## 📁 Creating the Theme Folder
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.local/share/PortProtonQT/themes/my_custom_theme
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🎨 Style File (`styles.py`)
|
||||
|
||||
Create a `styles.py` in the theme root. It should define variables or functions that return CSS.
|
||||
|
||||
**Example:**
|
||||
```python
|
||||
def custom_button_style(color1, color2):
|
||||
return f"""
|
||||
QPushButton {{
|
||||
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
|
||||
stop:0 {color1}, stop:1 {color2});
|
||||
}}
|
||||
"""
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📝 Metadata (`metainfo.ini`)
|
||||
|
||||
```ini
|
||||
[Metainfo]
|
||||
name = My Custom Theme
|
||||
author = Your Name
|
||||
author_link = https://example.com
|
||||
description = Description of your theme.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🖼 Screenshots
|
||||
|
||||
Folder: `images/screenshots/` — place UI screenshots there.
|
||||
|
||||
---
|
||||
|
||||
## 🔡 Fonts and Icons (optional)
|
||||
|
||||
- Fonts: `fonts/*.ttf` or `.otf`
|
||||
- Icons: `images/icons/*.svg/.png`
|
||||
|
||||
---
|
71
documentation/theme_guide/README.ru.md
Normal file
71
documentation/theme_guide/README.ru.md
Normal file
@ -0,0 +1,71 @@
|
||||
📘 This documentation is also available in [English](README.md)
|
||||
|
||||
---
|
||||
|
||||
## 📋 Содержание
|
||||
- [Обзор](#обзор)
|
||||
- [Создание папки темы](#создание-папки-темы)
|
||||
- [Файл стилей](#файл-стилей)
|
||||
- [Метаинформация](#метаинформация)
|
||||
- [Скриншоты](#скриншоты)
|
||||
- [Шрифты и иконки](#шрифты-и-иконки)
|
||||
|
||||
---
|
||||
|
||||
## 📖 Обзор
|
||||
|
||||
Темы в `PortProtonQT` позволяют изменить внешний вид интерфейса. Все темы хранятся в папке:
|
||||
|
||||
- `~/.local/share/PortProtonQT/themes`.
|
||||
|
||||
---
|
||||
|
||||
## 📁 Создание папки темы
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.local/share/PortProtonQT/themes/my_custom_theme
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🎨 Файл стилей (`styles.py`)
|
||||
|
||||
Создайте `styles.py` в корне темы. В нём определите переменные и/или функции, возвращающие CSS-оформление.
|
||||
|
||||
**Пример функции:**
|
||||
```python
|
||||
def custom_button_style(color1, color2):
|
||||
return f"""
|
||||
QPushButton {{
|
||||
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
|
||||
stop:0 {color1}, stop:1 {color2});
|
||||
}}
|
||||
"""
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📝 Метаинформация (`metainfo.ini`)
|
||||
|
||||
```ini
|
||||
[Metainfo]
|
||||
name = My Custom Theme
|
||||
author = Ваше имя
|
||||
author_link = https://example.com
|
||||
description = Описание вашей темы.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🖼 Скриншоты
|
||||
|
||||
Папка: `images/screenshots/` — любые изображения оформления темы.
|
||||
|
||||
---
|
||||
|
||||
## 🔡 Шрифты и иконки (опционально)
|
||||
|
||||
- Шрифты: `fonts/*.ttf` или `.otf`
|
||||
- Иконки: `images/icons/*.svg/.png`
|
||||
|
||||
---
|
Reference in New Issue
Block a user