Re: Italian building process runs on an old version

Andreas Heigl <[email protected]>
Newsgroups gmane.comp.php.documentation.general
Message-ID <[email protected]>
Hey folks.

Am 05.02.21 um 12:23 schrieb Peter Cowburn:
> On Fri, 5 Feb 2021 at 10:57, Andreas Heigl <[email protected]> wrote:
> 
>> Hey Peter
>>
>> Am 05.02.21 um 11:52 schrieb Peter Cowburn:
>>> On Fri, 5 Feb 2021 at 10:39, Andreas Heigl <[email protected]> wrote:
>>>
>>>> Hey Davide.
>>>>
>>>> Am 05.02.21 um 10:43 schrieb Davide Pastore:
>>>>> Hi,
>>>>>
>>>>> we're facing some issues in the Italian documentation since we keep on
>>>>> receiving emails with misleading errors
>>>>> <https://news-web.php.net/php.doc.it/2815> on our mailing list. Could
>>>> you
>>>>> please check it? The issue is the same reported here
>>>>> <https://news-web.php.net/php.doc/969387814>. How can we fix this?
>>>>
>>>> As italian is not considered an active translation, the italian git-repo
>>>> is not updated in an automated way.
>>>>
>>>> We would need to rewrite the way the translations are updated.
>>>>
>>>> I can see to it, but on the other hand the question stands why we want
>>>> to invest energy into updating a translation that is considered inactive
>>>> and therefore will not show up on the PHP-Website.
>>>>
>>>> So either we rewrite the way translations are updated, or we upgrade
>>>> italian to an active translation.
>>>>
>>>
>>> The docs server is supposed to build both "active" and "inactive"
>>> translations.  The marker for what *doesn't* get built on the docs server
>>> is *(supposed to be) the "broken-language.txt" file in a translation.
>> That
>>> way, the docs server can build and render "inactive" translations, so
>>> translators can work on moving towards the "active" status without
>> building
>>> and rendering for the main website.  That has been the process since
>>> "forever", has it changed?
>>
>> I can't actually ell you as I never knew about that process :-)
>>
>> But I have changed it in so far, that I rewrote the loop which
>> translations are updated from iterating over the folder-list to
>> iterating over the ACTIVE_TRANSLATIONS array.
>>
> 
> Ah I see this now from the scripts in the systems repo.
> 
> Note the comment in web/php.get/includes/languages.inc [1]:
> 
> 50
> <http://git.php.net/?p=web/php.git;a=blob;f=include/languages.inc;h=f31926e63b81be521b1b39da3b6bc47bcc60730f;hb=HEAD#l50>
> /*
> 51
> <http://git.php.net/?p=web/php.git;a=blob;f=include/languages.inc;h=f31926e63b81be521b1b39da3b6bc47bcc60730f;hb=HEAD#l51>
>  The following languages are inactive, which means they will not:
> 52
> <http://git.php.net/?p=web/php.git;a=blob;f=include/languages.inc;h=f31926e63b81be521b1b39da3b6bc47bcc60730f;hb=HEAD#l52>
>  - Show up via the language select box at php.net
> 53
> <http://git.php.net/?p=web/php.git;a=blob;f=include/languages.inc;h=f31926e63b81be521b1b39da3b6bc47bcc60730f;hb=HEAD#l53>
>  - Be selectable via my.php
> 54
> <http://git.php.net/?p=web/php.git;a=blob;f=include/languages.inc;h=f31926e63b81be521b1b39da3b6bc47bcc60730f;hb=HEAD#l54>
>  - Accept redirections to the translation, despite ACCEPT_LANGUAGE
> 55
> <http://git.php.net/?p=web/php.git;a=blob;f=include/languages.inc;h=f31926e63b81be521b1b39da3b6bc47bcc60730f;hb=HEAD#l55>
>  - Be listed at php.net/docs or php.net/download-docs
> 56
> <http://git.php.net/?p=web/php.git;a=blob;f=include/languages.inc;h=f31926e63b81be521b1b39da3b6bc47bcc60730f;hb=HEAD#l56>
>  However, these languages are available on the doc dev server:
> 57
> <http://git.php.net/?p=web/php.git;a=blob;f=include/languages.inc;h=f31926e63b81be521b1b39da3b6bc47bcc60730f;hb=HEAD#l57>
>  - http://docs.php.net/
> 58
> <http://git.php.net/?p=web/php.git;a=blob;f=include/languages.inc;h=f31926e63b81be521b1b39da3b6bc47bcc60730f;hb=HEAD#l58>
> */
> 59
> <http://git.php.net/?p=web/php.git;a=blob;f=include/languages.inc;h=f31926e63b81be521b1b39da3b6bc47bcc60730f;hb=HEAD#l59>
> $INACTIVE_ONLINE_LANGUAGES = array(
> 
> And in the script that builds the docs on the dev docs server [2]:
> 
> 239
> <http://git.php.net/?p=systems.git;a=blob;f=build-docs-snapshots;h=e8748f89373061eba5f1958e61c819ffb602c463;hb=HEAD#l239>
>         for i in `/bin/ls -1 | grep -v doc-base`; do
> 240
> <http://git.php.net/?p=systems.git;a=blob;f=build-docs-snapshots;h=e8748f89373061eba5f1958e61c819ffb602c463;hb=HEAD#l240>
>                 if [ -d $i -a ! -f "$i/broken-language.txt" ]; then
> 241
> <http://git.php.net/?p=systems.git;a=blob;f=build-docs-snapshots;h=e8748f89373061eba5f1958e61c819ffb602c463;hb=HEAD#l241>
>                         do_lang $i
> 242
> <http://git.php.net/?p=systems.git;a=blob;f=build-docs-snapshots;h=e8748f89373061eba5f1958e61c819ffb602c463;hb=HEAD#l242>
>                 fi
> 243
> <http://git.php.net/?p=systems.git;a=blob;f=build-docs-snapshots;h=e8748f89373061eba5f1958e61c819ffb602c463;hb=HEAD#l243>
>         done
> 
> And in our documentation documentation [3]:
> 
>    - Only active translations are built on rsync box (and then pushed to
>    regular mirrors). This is managed in web/php/includes/languages.inc
>    <http://git.php.net/?p=web/php.git;a=blob;f=include/languages.inc>
>    - docs.php.net attempts to build all translations (both active and
>    inactive). However, we use a broken-language.txt file in root of broken
>    translations to disable those that are very outdated and failing to build
>    for a long time.
> 
> Hope that helps.

That does indeed help.

Top explain the confusion a bit:

The previous behaviour on euk2 was to iterate through the result of
`ls`. As I was under the impression that we are by now only building
active translations I modified that to use languages.inc. (Which seems
to have been wrong due to italian being not an active language despite
there being an active community behind it)

And as a lot of the changes on euk2 were hardcoded on the machine
without having any equivalent in the systems repo and the systems repo
on the machine being rather outdated I had to find my way around the
differences between the local setup and the one I found in the git-repo
which might have added to the confusion. This is still not fixed but is
something on my agenda for this month.
> 
> 
>>
>> Looks like that was a mistake which I will then fix later today on the
>> docs server.
>>
> 
> Great.
> 
> 
>>
>> This will then require manually cloning a new language repo into the
>> appropriate folder when another language shall be added.
>>
> 
> I'm not sure why this *requires* manual cloning, there's a list of all
> languages in web/php.git/includes/languages.inc that can drive this.

When we started the migration from SVN to git we decided to only
transfer languages that had contributions within the last 2 years.
According to https://news-web.php.net/php.doc/969387428 that included
the italian repo. All other languages are not (yet) transferred to git
as they seemed to be "dead" by that time.

As the languages.inc-file still contains all those languages it's a less
that optimal solution to use it to automatically clone a repo. Unless
you want either only the active online languages (which is the current
situation) or a lot of errors due to not existing git-repositories.
Alternatively we can also remove those "dead" languages completely from
that languages.inc-file.

Therefore currently the easiest way is to actually log into the machine
and clone a new repo when it is created on git.php.net. Or do some magic
and request all repos starting with "doc" from git.php.net and check
whether they are already created and if not create them.

So all in all: Fixes are on their way and I will notify here when the
italian build will work again as expected on docs.php.net

Cheers

Andreas

-- 
                                                              ,,,
                                                             (o o)
+---------------------------------------------------------ooO-(_)-Ooo-+
| Andreas Heigl                                                       |
| mailto:[email protected]                  N 50°22'59.5" E 08°23'58" |
| https://andreas.heigl.org                                           |
+---------------------------------------------------------------------+
| https://hei.gl/appointmentwithandreas                               |
+---------------------------------------------------------------------+
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEOHo7et0VdZk8RJK34Ff+SCK3tkUFAmAdQksACgkQ4Ff+SCK3
tkUcXw/8CPEjwFxtWDuP/Aq/VUczqoweQTDadapPWKNCFKAYihSzjNvooIkGE+YB
bKmqdhjIX+Bvdb70coCjl6nC8E2BXhnIw9lZyoM5YEqzW08+2NWFWPzLxrZ3DiDR
qUOrWHEnpgIFgSH0MdulkWr4Ry+SnLuAvtMYLbT9J1OW1f0yLCu9+QT7FTbHU6b5
9yvLMPOd+1MiwxnOaNNvkfDm8rIzeTaj8kzYbDlKGYTrrfWvPUUeZVkhQjTjwxyr
240bsMNzgXAIzjuhy/G2M1yfqXUqHaL4AOj/CFjUvIAR8y7Kbw4yFT4yjuzFMFaP
n5VyxSTJE5CpxeIObEv5C71DhjLdA+EszR+pSsLMkQ9lQKDb8G4q7Wt7bbConPYG
jUN1YGNfQEQVFagRVYWWXQouO2cHl25N+CPIDbVE0jw+1k7IEswBIwEh7b/cnScS
6tH/UnIEBotuj/Aan/4XWoxiVcSqD8yLTp1FOGJ7/cmC7jcdaJxAzl5m7EJiTVJU
pc6iH2Pgzma7afzvMTdKFy8PJomPPhNL2cn0VML7c95mVyww/5xBiY+WFQ2U0UK7
BDPOUx0z2ZtnSBeM/SNWN6ohsZDdsNMXpcbtCtYfX0sAlzIaUUnpmeoJVbPbnQLt
G4cKsC5tNtnO/KopOBjh4Bnbo7m4GkM08pc+hnSO7HNMNOkNS3E=
=i2pm
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.