0

Option to set Console's language

CDuv il y a 3 jours 0

When using Ops tools such as Ansible to install/manage GLPI we can use the Console (`bin/console`) to perform some actions.


But the output (stdou or stderr) of those actions is dependent of the `language` setting (in `glpi_configs` SQL table).


For example when trying to reset an user's password, when language is set to en_GB the success message is


Reset password successful.

but, when language is fr_FR, message is:


Mot de passe modifié avec succès.

It's annoying for processing those outputs.

I suggest adding an option to the console that:


  • (Variant A) Sets the outputs to be returned in plain English
  • (Variant B) Set the specific language outputs should be returned in

Something like:

Variant A:

    bin/console --no-language user:reset_password --password foo normal


    Variant B:

      bin/console --language=en_GB user:reset_password --password foo normal