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

[CI4][Bug]: Language fallback #3994

Open
1 task done
BudsieBuds opened this issue May 13, 2024 · 1 comment
Open
1 task done

[CI4][Bug]: Language fallback #3994

BudsieBuds opened this issue May 13, 2024 · 1 comment
Assignees
Labels
bug CodeIgniter4 Issue relates to the conversion to CodeIgniter 4

Comments

@BudsieBuds
Copy link
Member

BudsieBuds commented May 13, 2024

Bug Description?

Language fallback doesn't work as it did in the CI3 version. Empty strings in the translation files are returned as an empty string instead of falling back to English. If the string is removed from the language file, the fallback kicks in as it should.

Steps to Reproduce?

Change the language on a ci4-branch build to an incomplete language. For example, Dutch translates Welcome to OSPOS! to Welkom bij ! on the login screen because there's no translation for OSPOS. German gives an error on the login screen because of the nested translation and missing translations for both Login.welcome and Common.software_short.

Expected Behavior?

This is the expected behavior for CI4, but a fallback to English should be coded. The same happened here for the CI3 version by @jekkos. Changing the language from en-US to en is also important for it to work correctly, as done here #3995.

OpensourcePOS Version

development (unreleased)

Php version

Php 8.2

What browsers are you seeing the problem on?

Firefox, Chrome

Unmodified copy of OpensourcePOS

  • I agree this copy has not been modified
@BudsieBuds BudsieBuds added bug CodeIgniter4 Issue relates to the conversion to CodeIgniter 4 labels May 13, 2024
@jekkos jekkos self-assigned this May 13, 2024
@jekkos
Copy link
Member

jekkos commented May 23, 2024

@BudsieBuds to avoid a tricky migration I would just drop the language config in the db for 3.4 upgrade. Its only a small annoyance and a user can quickly restore language. so then we do not need to write a lengthy migration that mirrors the renaming you did in the file tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug CodeIgniter4 Issue relates to the conversion to CodeIgniter 4
Projects
None yet
Development

No branches or pull requests

2 participants