[Phpmyadmin-devel] Coding style update
Dieter Adriaenssens
dieter.adriaenssens at gmail.com
Tue May 29 12:04:11 CEST 2012
2012/5/29 Michal Čihař <michal at cihar.com>:
> Hi all
>
> though phpcs with PMAStandard does already cover this, it seems to be
> necessary to mention it explicitely:
>
> Please don't wrap translatable strings to fit into 85 chars width
> limits. It just causes further troubles (the strings are translated
> with newlines and indentation what looks weird). The PMAStandard should
> ignore such lines from checking for line length (if it does not please
> tell me, it's a bug in the rules).
Hi Michal,
It's a good thing to have an ignore rule for this, but by using
splitting and concatenation of string (example below), it might not be
necessary :
$text = __('This is an example of a very long translatable string'
. ' that is too long to fit on one line, so wrapping of long lines'
. 'is neccessary.');
But I'm not sure if this triggers other rules (like the one where the
argument of a multiline function call should start on a new line), so
it probably is best to use the ignore rule you added for translatable
string.
Besides, if it gets to complicated developers will forget what the
correct way is of wrapping a translatable string, so not wrapping them
at all is probably best.
Kind regards,
Dieter
More information about the Developers
mailing list