Creates the Twig\PmaGlobalVariable class to handle the 'pma' Twig global
variable.
The idea of this global variable is to automatically inject in all
templates some useful information.
For now it only includes `pma.version` to get the phpMyAdmin version
and `pma.text_dir` to get the text direction ('ltr' or 'rtl').
Adding new variables to the `pma` global variable should be done with
caution.
- https://twig.symfony.com/doc/3.x/advanced.html#globals
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
For translations, a Twig function is more versatile than a Twig tag and
has the benefit of auto escaping.
As the phpmyadmin/twig-i18n-extension package is a fork of the Twig's
I18nExtension, the custom function was added to the phpMyAdmin main
repository, this way the cases not used by phpMyAdmin don't need to be
implemented. For example, only the default domain is used and
MoTranslator is always available.
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>