Skip to content

Read a language add-on's code from its folder - #290

Closed
malard wants to merge 1 commit into
xbmc:masterfrom
malard:fix-language-addon-po-code
Closed

malard wants to merge 1 commit into
xbmc:masterfrom
malard:fix-language-addon-po-code

Conversation

@malard

@malard malard commented Nov 24, 2026

Copy link
Copy Markdown

A language add-on keeps its strings.po in resource.language.<code>/resources. parse_po_file took the language code from everything after the last . of that path, which gave <code>/resources. So every language add-on failed with PO file with invalid language code in the correct path, as in xbmc/repo-resources#694:

ERROR: PO file with invalid language code in the correct path: ./resource.language.az_az/resources/strings.po

The code now comes from the suffix of the last resource.language. folder in the path, which is the same folder for a normal add-on's resources/language/resource.language.<code>. test_check_for_invalid_strings_po_language_addon covers the language add-on layout. The full test suite passes (19 tests).

A language add-on keeps strings.po in resource.language.<code>/resources,
so taking the code from the last "." of that path gave "<code>/resources"
and every language add-on failed with "PO file with invalid language
code". Take the suffix of the last resource.language. folder instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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