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

Translations are not loaded from this repository #169

Closed
kenjis opened this issue Dec 3, 2020 · 4 comments · Fixed by #172
Closed

Translations are not loaded from this repository #169

kenjis opened this issue Dec 3, 2020 · 4 comments · Fixed by #172

Comments

@kenjis
Copy link
Member

kenjis commented Dec 3, 2020

#144 changes the namespace.

    "autoload": {
        "psr-4": {
-           "Translations\\": ""
+           "CodeIgniter\\Language\\": "Language/"
        }
    },

It causes translations are not loaded from this repository, like codeigniter4/CodeIgniter4#2120.

This is because the new namespace is:

prefix: CodeIgniter\Language
  path: vendor/composer/../codeigniter4/translations/Language/

When CI looks for Language/it/Validation.php, Language::requireFile() and Services::locator()->search() looks for codeigniter4/translations/Language/Language/it/Validation.php. And it can't find the lang file.

@paulbalandan
Copy link
Member

@kenjis I forgot that CI4 autoloader ignores the CodeIgniter namespace from Composer. Can you check if fix solves the issue?

@kenjis
Copy link
Member Author

kenjis commented Dec 3, 2020

Still does not work.

prefix: Translations
  path: vendor/composer/../codeigniter4/translations/Language/

So it looks for codeigniter4/translations/Language/Language/it/Validation.php.

@paulbalandan
Copy link
Member

How about now?

@kenjis
Copy link
Member Author

kenjis commented Dec 4, 2020

@paulbalandan Worked fine!

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 a pull request may close this issue.

2 participants