[Phpmyadmin-devel] advisory rules and translation

Marc Delisle marc at infomarc.info
Sun Aug 7 13:26:36 CEST 2011

Le 2011-08-06 15:22, Piotr Przybylski a écrit :
> 2011/8/6 Tyron Madlener <tyronx at gmail.com>:
>> On Sat, Aug 6, 2011 at 1:59 PM, Marc Delisle <marc at infomarc.info> wrote:
>>> Tyron,
>>> the messages in the rules are not translatable using our standard
>>> gettext mechanism?
>> Yes, that is an issue that I still have to solve. I'd love to keep the
>> rules file independent from the translation mechanism by adding some
>> compile/transform mechanism for pma releases.
>> But if that is not possible I guess I will have to rename
>> advisory_rules.txt to a php file, surround all text strings with __('
>> '); and hope it works as well.
>> I'd prefer to have the syntax of advsiory_rules.txt as simple as
>> possible so other users can easily add new rules without the knowledge
>> of php.
>> What do you think would be the best choice what to do?
> How about using arrays? Yes, it requires at least enough knowledge of
> PHP so as not to break strings, but I believe no one without such
> knowledge would want to modify it anyway.

I agree with Piotr. Also, having this rule parser in the code base means
more code to maintain. Finally, I believe that using a syntax similar to
the one of libraries/export/sql.php will bring better readability for
the rules.

Marc Delisle

More information about the Developers mailing list