Re: Examples code style
| From: | Christoph M. Becker | Date: | Thu, 23 May 2019 09:21:02 +0000 |
| Subject: | Re: Examples code style | ||
| References: | 1 2 3 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969387249@lists.php.net to get a copy of this message | ||
On 23.05.2019 at 11:01, Michał Brzuchalski wrote:
> thanks for sharing your thoughts on that.
>
> czw., 23 maj 2019 o 10:33 G. P. B. <george.banyard@gmail.com> napisał(a):
>
>> ...
>> I do like the project you plan to do, however as a Doc translator I feel
>> this may bring unnecessary strain on the translation teams.
>> As some languages are already behind on keeping up to date the docs with
>> minor changes such as prototype fixes/changes.
>
> I think it would also be possible to identify the same examples on
> translation repositories
> as they probably are in the same files and in the same order and fix them
> in the next step.
>
> It would also be possible to use a script which automatically fixes code
> style against ruleset file
> and replace the examples using Code Beautifier and Fixer feature of
> PHP_CodeSniffer - this would
> simplify a lot to reformat examples in translation repositories as well.
>
> The ruleset.xml and check and fix script would become a part of doc-base so
> can be used by others as well.
> I can include a small howto description.
>
> If that won't be enough I may think of doing it on behalf of translation
> teams.
A particular issue would be the EN-Revision[1]; just changing the
example code, but leaving the EN-Revision as is, would still flag the
translation as being out-dated, so translators would have to review.
Automatically "fixing" the EN-Revision when doing example code updates
would require to check whether the translation has been up-to-date with
the former SVN Revision; otherwise translators might miss some important
updates.
Since only few of the relevant translations are up-to-date (Russian
(kudos!), also mostly French and German), I would suggest to not fix
examples if it's only for some minor style issues.
[1] <http://doc.php.net/tutorial/translating.php>
--
Christoph M. Becker