View Issue Details

IDProjectCategoryView StatusLast Update
0019895phpList 3 applicationInternationalization (l18n)public11-07-19 18:05
Reporterduncanc 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionopen 
Product Version3.4.1 
Target Version3.4.4Fixed in Version 
Summary0019895: The update translations page now fails when checking for new translations
DescriptionThe URL used to check for new translations now does not work. Possibly overlooked by the change to use weblate instead of pootle.

See file admin/init.php line 183

define('TRANSLATIONS_XML', 'https://translate.phplist.org/translations.xml');
TagsNo tags attached.

Activities

michiel

27-04-19 13:20

manager   ~0062137

@Suela we should work to rewrite this part of phpLIst to use the Weblate API, https://translate.phplist.org/api/?format=json

Although that will fix us onto Weblate, which may not be desirable.

I will rewrite the XML file to use the API to generate the required XML for phpList.

michiel

11-05-19 17:07

manager   ~0062192

In order to see how it used to work, I'm going to resurrect the old translation site as "pootle.phplist.org"

FYI @erion

michiel

11-05-19 17:34

manager   ~0062193

The old XML is now on https://pootle.phplist.org/translations.xml
It is of course out of date, but it will help to figure out what phpList is expecting as the format.

michiel

11-05-19 18:48

manager   ~0062194

Waiting for further (internal) documentation on the new translation server setup.

michiel

27-05-19 23:20

manager   ~0062254

@erion has provided the docs. This is with me.

michiel

05-06-19 15:49

manager   ~0062316

Instead of copying what we did before with Pootle, we should implement this the Weblate way.

So, the intention is

1. code changes
2. changes are loaded into Weblate
3. translations are made
4. translations are pushed back

https://docs.weblate.org/en/latest/admin/continuous.html#github-setup

We should abandon the SVN repository, and possible set up a new one. It's probably safer to have a manual integration into the releases. Once we have that in place, we can work on the versions that can be pulled in from phpList to update the installation.

michiel

05-06-19 16:09

manager   ~0062317

Looks like we need to re-script it using Weblate Client https://docs.weblate.org/en/latest/wlc.html#wlc

michiel

05-06-19 16:15

manager   ~0062318

root@a459a271c7d5:/# pip3 install wlc
Collecting wlc
  Downloading https://files.pythonhosted.org/packages/46/8a/ac1b8b914d2141ae5d048af36a24a48ac015e6aca93d6c835df2a2e9f989/wlc-1.1-py3-none-any.whl
Collecting pyxdg (from wlc)
  Downloading https://files.pythonhosted.org/packages/39/03/12eb9062f43adb94e30f366743cb5c83fd15fef026500cd4de42c7c12280/pyxdg-0.26-py2.py3-none-any.whl (40kB)
    100% |████████████████████████████████| 40kB 7.0MB/s
Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from wlc) (2.21.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->wlc) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->wlc) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->wlc) (2019.3.9)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->wlc) (1.24.2)
Installing collected packages: pyxdg, wlc
Successfully installed pyxdg-0.26 wlc-1.1
root@a459a271c7d5:/# wlc
usage: wlc [-h] [--format {text,csv,json,html}] [--version] [--debug]
           [--config CONFIG] [--config-section CONFIG_SECTION] [--key KEY]
           [--url URL]
           {version,list-projects,list-components,list-languages,list-translations,show,ls,commit,push,pull,reset,cleanup,repo,changes,stats,lock-status,lock,unlock,download,upload}
           ...
wlc: error: the following arguments are required: cmd

michiel

05-06-19 16:50

manager   ~0062319

I have made it work, so that it doesn't look broken at the moment


    ScriptAlias /translations.xml /var/www/sites/pootle-phplist/php/translations.php
    ProxyPass /translations.xml !
    ProxyPass /export/phplist/ !


    ProxyPass / http://127.0.0.1:85/
    ProxyPassReverse / http://127.0.0.1:85/
    Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"

    Alias /export /var/www/sites/pootle-phplist/translations
    <Directory "/var/www/sites/pootle-phplist/translations">
        Order deny,allow
        Allow from all
    </Directory>

    <Location /export>
        SetOutputFilter DEFLATE
        # Enable directory listing.
        Options Indexes
    </Location>


But it will not actually deliver translation updates at the moment, so we need to continue to work on that.

duncanc

07-07-19 08:58

updater   ~0062539

Is this meant to be working now? When I force an update of the English translations phplist reports that it has updated 1986 language terms.

samtuke

09-07-19 13:25

administrator   ~0062548

@duncanc My understanding is that the update mechanism works (files are fetched correctly), but that they are not yet being automatically updated from weblate translations. So I would not expect to see new strings arrive, but I would expect no errors within phpList.

duncanc

10-07-19 07:58

updater   ~0062552

OK, thanks.

suela

11-07-19 18:05

administrator   ~0062558

Marking this resolved as the original reported problem is no longer present.