Localization of SQL parser messages #12013

Closed
nijel opened this Issue Feb 22, 2016 · 6 comments

Projects

None yet

2 participants

@nijel
Member
nijel commented Feb 22, 2016

In master the SQL parser is in the separate repository. This makes us unable to directly extract messages for translation from it.

I see few possible options:

  1. Make it return only error codes and do the translation to messages in the phpMyAdmin
  2. Use localization framework in the SQL parser as well and do the messages translation there
  3. Make the text extraction in phpMyAdmin look inside SQL parser

The (3) is easiest to implement, but I feel it's a bit awkward towards possible other users of the library.

@nijel nijel added the bug label Feb 22, 2016
@nijel nijel self-assigned this Feb 22, 2016
@nijel
Member
nijel commented Feb 22, 2016

I'm pushing (3) solution for now, so that we don't loose the messages from translations, but proper solution should be decided...

@nijel nijel added a commit that referenced this issue Feb 22, 2016
@nijel nijel Add back SQL parser messages to phpMyAdmin
Temporary solution until we decide for something better.

See issue #12013

Signed-off-by: Michal Čihař <michal@cihar.com>
55fec13
@nisargjhaveri
Contributor

As we're trying to have the SQL parser independently usable by others too, I don't think (1) is a good idea.

(2) looks like the best solution to me, as it makes the SQL parser have its own translations, and others using SQL parser can also make use of it. But with that, we should find a way to make easy enough for a translator coming through web interface to translate SQL parser too, along with PMA.

@nijel
Member
nijel commented Feb 29, 2016

I also think this could be good approach. Once we decide to go with motranslator (see phpmyadmin/sql-parser#35), it will be really easy to implement.

@nijel
Member
nijel commented Mar 1, 2016

PR phpmyadmin/sql-parser#35 currently fully implements (2).

@nijel nijel added this to the 4.7.0 milestone Dec 23, 2016
@nijel
Member
nijel commented Dec 23, 2016

There is now motranslator branch, which implements translation using motranslator and it' available on Hosted Weblate for translation: https://hosted.weblate.org/projects/phpmyadmin/sql-parser/

It should be merge to master branch after releasing phpMyAdmin 4.6.6, so that it's ready for 4.7.0, see phpmyadmin/sql-parser#106

@nijel
Member
nijel commented Jan 23, 2017

phpmyadmin/sql-parser#106 is merged now.

@nijel nijel closed this Jan 23, 2017
@nijel nijel added a commit that referenced this issue Jan 23, 2017
@nijel nijel Remove po files from sql-parser on creating tarball
Issue #12013

Signed-off-by: Michal Čihař <michal@cihar.com>
b6468d9
@nijel nijel added a commit that referenced this issue Jan 23, 2017
@nijel nijel Remove phpmyadmin vendor from being translated here
Every library should handle localization on it's own.

Fixes #12013

Signed-off-by: Michal Čihař <michal@cihar.com>
4b8fe37
@nijel nijel added a commit that referenced this issue Jan 23, 2017
@nijel nijel Require sql-parser 4.1 to get localized messages from it
Issue #12013

Signed-off-by: Michal Čihař <michal@cihar.com>
eb1f277
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment