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

[4.x] Missing Dutch translation in installer error message when DB connection has failed #39218

Open
robhuijben opened this issue Nov 15, 2022 · 5 comments

Comments

@robhuijben
Copy link

Steps to reproduce the issue

  • Open fresh Joomla! 4 installation for the first time
  • Select Dutch as the language for the installer
  • Fill in username and password and continue to database connection step
  • Choose MySQLi as the preffered DB connection
  • Fill in wrong credentials for the database connection and click "Joomla! installeren"

Expected result

The message that is displayed should be:

Kan geen verbinding maken met de database. Foutmelding: Kon geen verbinding met de database maken.

Actual result

The error message shown is:

Kan geen verbinding maken met de database. Foutmelding: Could not connect to database: No such file or directory

System information (as much as possible)

  • Joomla! 4.2.5

Additional comments

The part that says No such file or directory is also misleading, because in this case it has nothing to do with a file or directory unless this is a reference to the configuration.php file?

@brianteeman
Copy link
Contributor

@tecpromotion

@tecpromotion
Copy link
Contributor

@MartijnMaandag can you check this please. Thanks.

@zero-24
Copy link
Contributor

zero-24 commented Nov 15, 2022

Looks like it has nothing to do with the translation package but with the underlying FW Database code which has an hardcoded english error message that includes the error message from the php mysqli driver which is IIRC only aviable in english too. That message will be passed to the error message shown to the users here:

Factory::getApplication()->enqueueMessage(Text::sprintf('INSTL_DATABASE_COULD_NOT_CONNECT', $e->getMessage()), 'error');

and here
Factory::getApplication()->enqueueMessage(Text::sprintf('INSTL_DATABASE_COULD_NOT_CONNECT', $e->getMessage()), 'error');

So we have a few ways to solve this:

  1. Hide the error message comming from the FW database on the CMS level and never pass them to the users
  2. Implement translations for the FW, that would not solve the php drive issue.
  3. When choose by the TT remove the "%s" and set a fixed generic error message and ignore whats comming from the FW database layer on a translation package level.
  4. Implement code which repetes the checks done by the FW or tries to detect what the FW detected maybe by catching specific exceptions and not pass the message from the FW but an new translation string to be added to the CMS.

@zero-24
Copy link
Contributor

zero-24 commented Nov 15, 2022

  • 1 and 2 are just bad ideas.
  • 3 would be an TTs decisione and result into other issues too as generic error messages are bad for searching on the problem and would basicly meaning appling 1. on the translation package level.
  • 4 would be the best solution to me but that involves much more code and the "hope" that all issues do have specific exceptions and should be applied all over the place and not just for the installer.

@MartijnMaandag
Copy link
Contributor

Back from holliday ;-)
I think that technical things that come from databases should not all be translated. This way we must translate every text which could come from the database.
In the example above there is even a part translated which helps the user. The "Foutmelding:" shows it is coming from another source.
When I have a problem with a message, I turn from Dutch into English and try to search with the English string to solve the problem ;-)

@Hackwar Hackwar added the bug label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants