Skip to content

fix(i18n): advertise every shipped language, complete the Italian strings - #39

Merged
Pasithea0 merged 1 commit into
mainfrom
fix/i18n-coverage
Nov 24, 2026
Merged

Pasithea0 merged 1 commit into
mainfrom
fix/i18n-coverage

Conversation

@Pasithea0

@Pasithea0 Pasithea0 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Why

Post-merge pass over the three PRs that landed on main today — #36 (late-metadata retry), #37 (Romanian), #38 (Italian). Two of them left the tree inconsistent with what they added, and the pass turned up two dead links and a stale manifest mirror:

  • Add Romanian language #37 shipped a strings.po with no addon.xml metadata. A language folder translates the dialogs; the add-on manager keeps describing the add-on in English until <summary lang="xx_YY"> and <description lang="xx_YY"> are there. Romanian was invisible in the add-ons list.
  • Italian translation added #38 branched before (feat)Retry metadata id lookup for late-tagged streams #36 added its setting. Italian is missing #32051, the label of the new retry_late_ids setting (settings.xml labels a setting with $ADDON[plugin.video.tidb 32051]), so Italian installs showed English/untranslated text for it.
  • addons.xml no longer mirrored plugin.video.tidb/addon.xml. Italian translation added #38 changed the plugin manifest and left the mirror behind.
  • docs/index.html linked two files that do not exist: repository.tidb.repo-2.0.1.zip (never built; docs/ holds 2.0.0) and plugin.video.tidb-2.2.0.zip (deleted by the 2.2.1 bump in 1f51b0f).

What this does

  • plugin.video.tidb/addon.xml: adds ro_RO (the language Add Romanian language #37 shipped) plus es_ES and pl_PL — those two folders have shipped for a long time and were never advertised either. The es/pl/ro text is newly written by me and has not been reviewed by a native speaker, same caveat the translations themselves carry.
  • resource.language.it_it/strings.po: #32051 → Riprova per metadati in ritardo (fino a 30 secondi). Also newly written, not native-speaker reviewed.
  • addons.xml + addons.xml.md5: regenerated from the two manifests (steps 2 and 3 of UPDATING.md), so the mirror is exact again. The version stays 2.2.1 on purpose — the bump, the zip, the news entry and the README/index version links are the release, and I have not touched them.
  • docs/index.html: links now name the files that are actually in docs/.
  • tests/test_language_coverage.py: a new guard for what a shipped language has to carry — every en_gb id, translated, with the same English msgid; every id settings.xml labels a setting with; and a <summary>/<description> pair, in xx_YY casing, for every folder. No Kodi involved, it reads the files.

Tests

PYTHONPATH="$PWD/plugin.video.tidb:$PWD/tests" python3 -m unittest discover -s tests -t tests → 77 tests, OK (71 before).

The new test against the pre-fix tree (current main, same working copy, new file copied in) fails with exactly the three gaps and nothing else:

FAIL: test_every_language_covers_the_english_ids (language='resource.language.it_it')
AssertionError: Lists differ: [32051] != []
FAIL: test_every_settings_label_is_a_string_in_every_language (language='resource.language.it_it')
AssertionError: Lists differ: [32051] != []
FAIL: test_every_shipped_language_is_advertised
AssertionError: Lists differ: ['es_es', 'pl_pl', 'ro_ro'] != []
FAILED (failures=3)

Manifest and XML checks on this branch:

md5sum addons.xml | cut -d' ' -f1   ==  cat addons.xml.md5      # 51b91a96e6f6415f193aa9d5abab1b0c
addons.xml == the two manifests concatenated inside <addons>, byte for byte
python3 -c "xml.etree.ElementTree.parse(...)"                   # all three files parse

kodi-addon-checker --branch=omega|nexus --skip-dependency-checks --allow-folder-id-mismatch plugin.video.tidb/ on this branch reports INFO: PO files are valid and the identical finding set as the pre-merge commit 1f51b0f (2 errors, 1 warning: the start attribute, lang on <news>, the <path> element, the 180x180 icon, and service.py being a complex entry point). No new finding, and the new PO entry is accepted.

Not in this PR

  • The release. Version is still 2.2.1; no new zip, no news entry, no README/index version bump.
  • docs/plugin.video.tidb-2.2.1.zip is stale — it was built at 1f51b0f, so it predates (feat)Retry metadata id lookup for late-tagged streams #36/Add Romanian language #37/Italian translation added #38. Rebuilding it is part of the release (see the reply in the thread).
  • A .gitattributes — addon-check.yml runs awk '/export-ignore/ { print $1 }' .gitattributes, and the file has never existed in this repo, so that step has always no-opped behind continue-on-error: true. Flagging it rather than inventing an export-ignore list.
  • The Language: header in strings.po is it for this file (and ar/es for two others) while the rest use the full locale. Cosmetic — the folder name is what Kodi uses — so left alone.
  • service.py's retry being opt-in: as merged, retry_late_ids defaults to off, so the fix only helps viewers who find the setting.

Summary by CodeRabbit

  • Localization
    • Added Italian, Spanish, Polish, and Romanian summaries and descriptions for the add-on.
    • Added an Italian translation for the late-metadata retry setting.
  • Documentation
    • Updated the download links to the latest repository and add-on versions.

…ings

#37 (Romanian) added a strings.po without the addon.xml metadata that makes the
add-on manager describe the add-on in that language, and #38 (Italian) branched
before #36 added its setting label, so Italian was one string short of en_gb.
Checking the three merges also turned up two dead links on the Pages page and an
addons.xml that no longer mirrored plugin.video.tidb/addon.xml.

- addon.xml: <summary>/<description> in ro_RO. es_ES and pl_PL shipped folders
  were never advertised either, so they get the same treatment. All three are
  newly written and not native-speaker reviewed.
- it_it/strings.po: #32051 (the late-metadata retry label from #36), also newly
  written and not native-speaker reviewed.
- addons.xml + addons.xml.md5: regenerated from the two manifests, which is
  release steps 2 and 3 in UPDATING.md. The version is deliberately left at
  2.2.1: the bump, the zip and the news entry are the release.
- docs/index.html: pointed at repository.tidb.repo-2.0.0.zip and
  plugin.video.tidb-2.2.1.zip. It named repository.tidb.repo-2.0.1.zip, which
  has never existed, and plugin.video.tidb-2.2.0.zip, which the 2.2.1 bump
  deleted.
- tests/test_language_coverage.py: pins what a shipped language has to carry --
  the en_gb string ids (non-empty, same msgid), the ids settings.xml labels, and
  the metadata tag for every folder. Against the pre-fix tree it fails with
  exactly the three gaps above.
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds localized add-on summaries and descriptions, adds an Italian translation, introduces language coverage tests, and updates the documentation download links.

Changes: Localization and release metadata

Layer / File(s) Summary
Localized metadata and language coverage
addons.xml, plugin.video.tidb/addon.xml, plugin.video.tidb/resources/language/resource.language.it_it/strings.po, tests/test_language_coverage.py, addons.xml.md5
Adds localized summaries and descriptions, an Italian translation for string #32051, and tests for translation IDs and text, settings labels, and metadata language consistency. Updates the addons.xml checksum.
Published download references
docs/index.html
Updates the repository and plugin download links to versions 2.0.0 and 2.2.1.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • TheIntroDB/kodi-addon#38: Adds Italian summaries and descriptions for the same add-on and addresses Italian localization metadata.
  • TheIntroDB/kodi-addon#36: Adds the late-metadata retry setting that this pull request translates into Italian and checks in settings-label coverage.
Merge Risk: Minimal · up to 8b48e

This change adds localized metadata, an Italian string, a language coverage test and corrected documentation links. No merge-blocking issue was found. Newly written translations have not been reviewed by native speakers.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the two main parts of the change: advertising every shipped language in the add-on metadata, and completing the Italian strings. The raw summary confirms addons.xml and plugin.video.ti…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the two main parts of the change: advertising every shipped language in the add-on metadata, and completing the Italian strings. The raw summary confirms addons.xml and plugin.video.tidb/addon.xml gained Spanish, Polish, and Romanian summaries and descriptions, and the Italian PO file gained string #32051. The title does not mention the new language coverage test, the regenerated addons.xml.md5, or the docs link fixes, but those are supporting details rather than the main point. The title is concise, specific, and uses the conventional commit style.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 283f8dfc-21fb-48ea-99f8-d502727f10da
Commits

Reviewing files that changed from the base of the PR and between ddd1e2a and 8b48e33.

Files selected for processing: 6

  • addons.xml
  • addons.xml.md5
  • docs/index.html
  • plugin.video.tidb/addon.xml
  • plugin.video.tidb/resources/language/resource.language.it_it/strings.po
  • tests/test_language_coverage.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@Pasithea0

Copy link
Copy Markdown
Member Author

Evidence for the two dead links in docs/index.html — the live Pages site, before this PR:

$ curl -s -o /dev/null -w "%{http_code}\n" https://theintrodb.github.io/kodi-addon/{plugin.video.tidb-2.2.0.zip,repository.tidb.repo-2.0.1.zip}
404
404
$ curl -s https://theintrodb.github.io/kodi-addon/
<a href="repository.tidb.repo-2.0.1.zip">repository.tidb.repo-2.0.1.zip</a>
<a href="plugin.video.tidb-2.2.0.zip">plugin.video.tidb-2.2.0.zip</a>

And the two names that are really in docs/:

$ curl -s -o /dev/null -w "%{http_code} %{size_download}\n" https://theintrodb.github.io/kodi-addon/{plugin.video.tidb-2.2.1.zip,repository.tidb.repo-2.0.0.zip}
200 101378
200 21581

Note this page is not what Kodi's repository client reads — it gets <path> from addons.xml and resolves it under the <datadir> base — so the 404s only hit a human who lands on the Pages root or clicks the links from README.md's Option A. README.md was already pointing at the right 2.0.0/2.2.1 names.

@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.41270% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
tests/test_language_coverage.py 98.41% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Pasithea0
Pasithea0 merged commit fba042d into main Nov 24, 2026
8 checks passed
@Pasithea0
Pasithea0 deleted the fix/i18n-coverage branch November 24, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant