Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken list of languages available #51219

Merged
merged 1 commit into from
Sep 1, 2021
Merged

Fix broken list of languages available #51219

merged 1 commit into from
Sep 1, 2021

Conversation

BrettDong
Copy link
Member

@BrettDong BrettDong commented Aug 30, 2021

Summary

Bugfixes "Fix broken list of languages available"

Purpose of change

The list of available languages was broken after the recent file-system change merge. 7f713d6 is the last good commit. 95975cb is the first commit exhibits the problem.

Only two options, "English" and "System Language", are available for selection. All other languages are missing:

Describe the solution

There is an off-by-one error in extracted language code from directory paths:

Change the language code matching algorithm to only match the /LC_MESSAGES suffix so it is now independent of parent directory structure.

Describe alternatives you've considered

Testing

The 25 supported languages show up again:

Additional context

@BrettDong BrettDong added Translation I18n (P2 - High) High priority (for ex. important bugfixes) <Bugfix> This is a fix for a bug (or closes open issue) labels Aug 30, 2021
@andrei8l
Copy link
Contributor

This change seems to break localizations for system installations (-DPREFIX=/usr -DDATA_DIR_PREFIX). Have you tried removing the trailing slash instead from langdir_value?

@BrettDong
Copy link
Member Author

This change seems to break localizations for system installations (-DPREFIX=/usr -DDATA_DIR_PREFIX). Have you tried removing the trailing slash instead from langdir_value?

Is it still the case after GHC file system merge?

@andrei8l

This comment has been minimized.

@BrettDong BrettDong marked this pull request as draft August 30, 2021 09:58
@BrettDong BrettDong removed the (P2 - High) High priority (for ex. important bugfixes) label Aug 30, 2021
@BrettDong BrettDong marked this pull request as ready for review August 30, 2021 19:11
@BrettDong
Copy link
Member Author

Changed to match /LC_MESSAGES suffix only so it should now be parent directories independent.

@kevingranade kevingranade merged commit 1fa1d84 into master Sep 1, 2021
@kevingranade kevingranade deleted the lang-list branch September 1, 2021 00:30
@kevingranade
Copy link
Member

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/translations-not-working-in-release/26944/3

Venera3 pushed a commit to Venera3/Cataclysm-DDA that referenced this pull request Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) Translation I18n
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants