Skip to content

Change to display in English when no locale file exists - #10

Open
S-Del wants to merge 1 commit into
iFedix:masterfrom
S-Del:fix/language-fallback
Open

Change to display in English when no locale file exists#10
S-Del wants to merge 1 commit into
iFedix:masterfrom
S-Del:fix/language-fallback

Conversation

@S-Del

@S-Del S-Del commented Aug 4, 2026

Copy link
Copy Markdown

Thank you for providing such a useful add-on.
For the reason described below I have modified part of the code, and I would be grateful if you would consider merging it.

Motivation for this request

When the game client's language does not exist in the Language/ directory, many of the labels in this add-on's settings panel were blank.
blank labels

Benefit of merging this request

Even when the language does not exist in Language/, English labels will be displayed.


This is unrelated to this PR, but the APIVersion in the manifest (Dustman.txt) has been left at 101039, which is out of date.
If you do decide to accept this pull request, I would be grateful if you could update that as well.

Before this change, the manifest loaded only Language/$(language).lua.
Because of this, on clients using a language with no locale file
(jp, es, it, br, zh, and so on), none of the DUSTMAN_* string IDs were
obtained at all.
Therefore no error occurred and the addon still loaded, but most of the
labels in the settings panel were not displayed.

This commit loads Language/en.lua first as the default, so that all IDs
are set.
After that, the file for each language overrides what it defines there.

As a result, labels that are defined in a language's locale file are
displayed in that language, and labels that are not defined there are
displayed in English.
@S-Del S-Del mentioned this pull request Aug 4, 2026
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