[Phpmyadmin-devel] advisory rules and translation

Tyron Madlener tyronx at gmail.com
Thu Aug 11 14:33:37 CEST 2011


resending to list...

On Thu, Aug 11, 2011 at 3:02 PM, Michal Čihař <michal at cihar.com> wrote:
> Hi
>
> Dne Mon, 8 Aug 2011 11:47:20 +0300
> Tyron Madlener <tyronx at gmail.com> napsal(a):
>
>> Indeed, I chose the format this way, in the hope for it to be used
>> with other tools as well. Maybe I am being a bit too visionary there.
>> However, quite naturally, a new file format will be used by only one
>> tool in the beginning ;-)
>> It is also possible to build the rules file more independent (e.g.
>> remove preg_match() calls), to guarantee the interchangeability.
>
> Using things like PMA_timespanFormat, PMA_bytime or PMA_DRIZZLE does
> not make it really portable :-).

Yes indeed. I would to find away around this. PMA_bytime however
should be ok - its defined in advisor.class.php.
I could rename them all to something neutral and then define wrapper
functions in advsior.class.php.

So as an example in advisory_rules.txt I use timespanFormat(...) and
place something like this in advisor.class.php
function timespanFormat($num) {
 return PMA_timespanFormat($num);
}

I guess that would be the prettiest solution.

>
>> If translation of the text file is possible with not too much efforts,
>> I still would vote for that solution.
>> However, if I am the only one with that opinion I will bend to the
>> opinion of the majority ;-)
>
> Translation for rules is now ready to be used in master, we can always
> switch to php array based solution if this turns out to be too
> complicated.

Thanks :)


>
> --
>        Michal Čihař | http://cihar.com | http://blog.cihar.com
>




More information about the Developers mailing list