Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Repository Guidelines

## Project Structure & Module Organization
This repository is a Kodi add-on package. Top-level entry points are `navigation.py` and `service.py`. Core Python code lives in `resources/site-packages/elementum/` (add-on logic) and `resources/site-packages/bjsonrpc/` (RPC support).
Web UI source is in `resources/web-src/src/`, and compiled static output is committed under `resources/web/`.
UI assets, skins, and localization files are under `resources/img/`, `resources/skins/`, and `resources/language/<Language>/strings.po`.
Release/build tooling is at the root: `Makefile`, `bundle.sh`, `release.sh`, and translation scripts in `scripts/`.

## Build, Test, and Development Commands
- `pip install -r requirements.txt`: install Python tooling (`flake8`).
- `flake8`: run Python lint checks (configured in `setup.cfg`).
- `./scripts/xgettext.sh`: validate/update translation catalogs.
- `make`: clean and build the main distributable zip.
- `make locales`: merge `resources/language/messages.pot` into each locale file.
- `make zipfiles`: build per-platform zip artifacts.
- `./bundle.sh --binaries=/path/to/elementum/build`: package add-on using prebuilt daemon binaries.
- `cd resources/web-src && npm install && npm start`: run Web UI locally (Node.js 12 recommended).
- `cd resources/web-src && npm run build`: build Web UI into `resources/web/`.

## Coding Style & Naming Conventions
Use 4-space indentation for Python. Prefer `snake_case` for Python files, functions, and variables; keep module names lowercase.
Run `flake8` before committing; project lint rules allow selected exceptions and a high line limit (`max-line-length = 370`).
For Web UI, follow existing TypeScript + React conventions, ESLint (`airbnb-typescript` stack), and Prettier (`singleQuote: true`, `trailingComma: all`, width 140).

## Testing Guidelines
CI primarily enforces lint and localization integrity (`flake8` and `./scripts/xgettext.sh`), plus packaging (`make`).
There is no large in-repo Python unit test suite today; if you add tests, use `pytest` conventions (`test_*.py`) and keep tests outside vendored code.
For UI changes, run `npm test` in `resources/web-src` and include manual verification notes.

## Commit & Pull Request Guidelines
Use focused, imperative commit messages; optional scope prefixes and issue refs are common (example: `proxy: fix no_proxy handling (#1143)`).
Avoid mixing unrelated changes (translations, refactors, behavior fixes) in one commit.
Open PRs against `master` and complete the template: description, related issue, motivation, testing, and change type. Include screenshots for UI changes.

## Security & Configuration Tips
Do not commit secrets, tokens, or machine-specific paths. Keep release credentials in environment variables only.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,6 @@ deps:
rm -rf platform_detect-master && \
rm master.zip

locales:
scripts/xgettext_merge.sh
scripts/xgettext.sh
20 changes: 18 additions & 2 deletions resources/language/Croatian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2132,8 +2132,8 @@ msgid "Downloading required binary file for '%s'"
msgstr "Preuzimanje potrebne binarne datoteku za '%s'"

msgctxt "#30671"
msgid "List of Opennic DNS IPs"
msgstr "Popis Opennic DNS IP adresa"
msgid "List of OpenNIC DNS IPs"
msgstr "Popis OpenNIC DNS IP adresa"

msgctxt "#30672"
msgid "Compact database"
Expand Down Expand Up @@ -2306,3 +2306,19 @@ msgstr ""
msgctxt "#30715"
msgid "Antizapret PAC file URL"
msgstr ""

msgctxt "#30716"
msgid "DNS over HTTPS Server"
msgstr ""

msgctxt "#30717"
msgid "Custom DNS over HTTPS Server"
msgstr ""

msgctxt "#30718"
msgid "Use OpenNIC DNS Servers"
msgstr ""

msgctxt "#30719"
msgid "Use OpenNIC DNS only for OpenNIC zones"
msgstr ""
18 changes: 17 additions & 1 deletion resources/language/Dutch/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2115,7 +2115,7 @@ msgid "Downloading required binary file for '%s'"
msgstr ""

msgctxt "#30671"
msgid "List of Opennic DNS IPs"
msgid "List of OpenNIC DNS IPs"
msgstr ""

msgctxt "#30672"
Expand Down Expand Up @@ -2289,3 +2289,19 @@ msgstr ""
msgctxt "#30715"
msgid "Antizapret PAC file URL"
msgstr ""

msgctxt "#30716"
msgid "DNS over HTTPS Server"
msgstr ""

msgctxt "#30717"
msgid "Custom DNS over HTTPS Server"
msgstr ""

msgctxt "#30718"
msgid "Use OpenNIC DNS Servers"
msgstr ""

msgctxt "#30719"
msgid "Use OpenNIC DNS only for OpenNIC zones"
msgstr ""
18 changes: 17 additions & 1 deletion resources/language/English/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2114,7 +2114,7 @@ msgid "Downloading required binary file for '%s'"
msgstr ""

msgctxt "#30671"
msgid "List of Opennic DNS IPs"
msgid "List of OpenNIC DNS IPs"
msgstr ""

msgctxt "#30672"
Expand Down Expand Up @@ -2288,3 +2288,19 @@ msgstr ""
msgctxt "#30715"
msgid "Antizapret PAC file URL"
msgstr ""

msgctxt "#30716"
msgid "DNS over HTTPS Server"
msgstr ""

msgctxt "#30717"
msgid "Custom DNS over HTTPS Server"
msgstr ""

msgctxt "#30718"
msgid "Use OpenNIC DNS Servers"
msgstr ""

msgctxt "#30719"
msgid "Use OpenNIC DNS only for OpenNIC zones"
msgstr ""
18 changes: 17 additions & 1 deletion resources/language/Finnish/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2114,7 +2114,7 @@ msgid "Downloading required binary file for '%s'"
msgstr ""

msgctxt "#30671"
msgid "List of Opennic DNS IPs"
msgid "List of OpenNIC DNS IPs"
msgstr ""

msgctxt "#30672"
Expand Down Expand Up @@ -2288,3 +2288,19 @@ msgstr ""
msgctxt "#30715"
msgid "Antizapret PAC file URL"
msgstr ""

msgctxt "#30716"
msgid "DNS over HTTPS Server"
msgstr ""

msgctxt "#30717"
msgid "Custom DNS over HTTPS Server"
msgstr ""

msgctxt "#30718"
msgid "Use OpenNIC DNS Servers"
msgstr ""

msgctxt "#30719"
msgid "Use OpenNIC DNS only for OpenNIC zones"
msgstr ""
18 changes: 17 additions & 1 deletion resources/language/French/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2124,7 +2124,7 @@ msgid "Downloading required binary file for '%s'"
msgstr "Téléchargement des fichiers binaires requis pour '%s'"

msgctxt "#30671"
msgid "List of Opennic DNS IPs"
msgid "List of OpenNIC DNS IPs"
msgstr ""

msgctxt "#30672"
Expand Down Expand Up @@ -2298,3 +2298,19 @@ msgstr ""
msgctxt "#30715"
msgid "Antizapret PAC file URL"
msgstr ""

msgctxt "#30716"
msgid "DNS over HTTPS Server"
msgstr ""

msgctxt "#30717"
msgid "Custom DNS over HTTPS Server"
msgstr ""

msgctxt "#30718"
msgid "Use OpenNIC DNS Servers"
msgstr ""

msgctxt "#30719"
msgid "Use OpenNIC DNS only for OpenNIC zones"
msgstr ""
18 changes: 17 additions & 1 deletion resources/language/German/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2118,7 +2118,7 @@ msgid "Downloading required binary file for '%s'"
msgstr ""

msgctxt "#30671"
msgid "List of Opennic DNS IPs"
msgid "List of OpenNIC DNS IPs"
msgstr ""

msgctxt "#30672"
Expand Down Expand Up @@ -2292,3 +2292,19 @@ msgstr ""
msgctxt "#30715"
msgid "Antizapret PAC file URL"
msgstr ""

msgctxt "#30716"
msgid "DNS over HTTPS Server"
msgstr ""

msgctxt "#30717"
msgid "Custom DNS over HTTPS Server"
msgstr ""

msgctxt "#30718"
msgid "Use OpenNIC DNS Servers"
msgstr ""

msgctxt "#30719"
msgid "Use OpenNIC DNS only for OpenNIC zones"
msgstr ""
18 changes: 17 additions & 1 deletion resources/language/Greek/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2118,7 +2118,7 @@ msgid "Downloading required binary file for '%s'"
msgstr ""

msgctxt "#30671"
msgid "List of Opennic DNS IPs"
msgid "List of OpenNIC DNS IPs"
msgstr ""

msgctxt "#30672"
Expand Down Expand Up @@ -2292,3 +2292,19 @@ msgstr ""
msgctxt "#30715"
msgid "Antizapret PAC file URL"
msgstr ""

msgctxt "#30716"
msgid "DNS over HTTPS Server"
msgstr ""

msgctxt "#30717"
msgid "Custom DNS over HTTPS Server"
msgstr ""

msgctxt "#30718"
msgid "Use OpenNIC DNS Servers"
msgstr ""

msgctxt "#30719"
msgid "Use OpenNIC DNS only for OpenNIC zones"
msgstr ""
18 changes: 17 additions & 1 deletion resources/language/Hebrew/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2119,7 +2119,7 @@ msgid "Downloading required binary file for '%s'"
msgstr ""

msgctxt "#30671"
msgid "List of Opennic DNS IPs"
msgid "List of OpenNIC DNS IPs"
msgstr ""

msgctxt "#30672"
Expand Down Expand Up @@ -2293,3 +2293,19 @@ msgstr ""
msgctxt "#30715"
msgid "Antizapret PAC file URL"
msgstr ""

msgctxt "#30716"
msgid "DNS over HTTPS Server"
msgstr ""

msgctxt "#30717"
msgid "Custom DNS over HTTPS Server"
msgstr ""

msgctxt "#30718"
msgid "Use OpenNIC DNS Servers"
msgstr ""

msgctxt "#30719"
msgid "Use OpenNIC DNS only for OpenNIC zones"
msgstr ""
18 changes: 17 additions & 1 deletion resources/language/Hungarian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2116,7 +2116,7 @@ msgid "Downloading required binary file for '%s'"
msgstr ""

msgctxt "#30671"
msgid "List of Opennic DNS IPs"
msgid "List of OpenNIC DNS IPs"
msgstr ""

msgctxt "#30672"
Expand Down Expand Up @@ -2290,3 +2290,19 @@ msgstr ""
msgctxt "#30715"
msgid "Antizapret PAC file URL"
msgstr ""

msgctxt "#30716"
msgid "DNS over HTTPS Server"
msgstr ""

msgctxt "#30717"
msgid "Custom DNS over HTTPS Server"
msgstr ""

msgctxt "#30718"
msgid "Use OpenNIC DNS Servers"
msgstr ""

msgctxt "#30719"
msgid "Use OpenNIC DNS only for OpenNIC zones"
msgstr ""
18 changes: 17 additions & 1 deletion resources/language/Italian/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2115,7 +2115,7 @@ msgid "Downloading required binary file for '%s'"
msgstr ""

msgctxt "#30671"
msgid "List of Opennic DNS IPs"
msgid "List of OpenNIC DNS IPs"
msgstr ""

msgctxt "#30672"
Expand Down Expand Up @@ -2289,3 +2289,19 @@ msgstr ""
msgctxt "#30715"
msgid "Antizapret PAC file URL"
msgstr ""

msgctxt "#30716"
msgid "DNS over HTTPS Server"
msgstr ""

msgctxt "#30717"
msgid "Custom DNS over HTTPS Server"
msgstr ""

msgctxt "#30718"
msgid "Use OpenNIC DNS Servers"
msgstr ""

msgctxt "#30719"
msgid "Use OpenNIC DNS only for OpenNIC zones"
msgstr ""
18 changes: 17 additions & 1 deletion resources/language/Portuguese (Brazil)/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2114,7 +2114,7 @@ msgid "Downloading required binary file for '%s'"
msgstr ""

msgctxt "#30671"
msgid "List of Opennic DNS IPs"
msgid "List of OpenNIC DNS IPs"
msgstr ""

msgctxt "#30672"
Expand Down Expand Up @@ -2288,3 +2288,19 @@ msgstr ""
msgctxt "#30715"
msgid "Antizapret PAC file URL"
msgstr ""

msgctxt "#30716"
msgid "DNS over HTTPS Server"
msgstr ""

msgctxt "#30717"
msgid "Custom DNS over HTTPS Server"
msgstr ""

msgctxt "#30718"
msgid "Use OpenNIC DNS Servers"
msgstr ""

msgctxt "#30719"
msgid "Use OpenNIC DNS only for OpenNIC zones"
msgstr ""
18 changes: 17 additions & 1 deletion resources/language/Portuguese/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -2114,7 +2114,7 @@ msgid "Downloading required binary file for '%s'"
msgstr ""

msgctxt "#30671"
msgid "List of Opennic DNS IPs"
msgid "List of OpenNIC DNS IPs"
msgstr ""

msgctxt "#30672"
Expand Down Expand Up @@ -2288,3 +2288,19 @@ msgstr ""
msgctxt "#30715"
msgid "Antizapret PAC file URL"
msgstr ""

msgctxt "#30716"
msgid "DNS over HTTPS Server"
msgstr ""

msgctxt "#30717"
msgid "Custom DNS over HTTPS Server"
msgstr ""

msgctxt "#30718"
msgid "Use OpenNIC DNS Servers"
msgstr ""

msgctxt "#30719"
msgid "Use OpenNIC DNS only for OpenNIC zones"
msgstr ""
Loading