-
-
Notifications
You must be signed in to change notification settings - Fork 108
Use motranslator for translating #35
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
Conversation
Current coverage is
|
* | ||
* @return Translator object | ||
*/ | ||
public static function getInstance() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we make gettext
a static method and use Translator::gettext($msg)
instead of Translator::getInstance()->gettext($msg)
. Looks much cleaner and easier to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed that would be doable as well with lazy initialization of the translator (we don't need it in most cases, it's used only for errors).
Thinking more about this I'm not sure if it's good idea to include this in releases used in phpMyAdmin 4.6.x as this will bring two gettext implementation into phpMyAdmin codebase.... |
If we want to think really 'modular', it shouldn't matter :P . But yes, makes sense. How are we actually managing releases of SQL parser? |
It won't matter for 4.7, but for 4.6 I'm not sure if switching phpmyadmin to motranslator is reasonable... |
Agreed. |
This makes it work transparently with or without phpMyAdmin. Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
[CI skip] Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Otherwise it's for user hard to diagnose what went wrong. Signed-off-by: Michal Čihař <michal@cihar.com>
[CI skip] Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
[CI skip] Signed-off-by: Michal Čihař <michal@cihar.com>
Signed-off-by: Michal Čihař <michal@cihar.com>
Superseded by #106 |
This makes it work transparently with or without phpMyAdmin.
See also phpmyadmin/phpmyadmin#12023
Signed-off-by: Michal Čihař michal@cihar.com