taringamberini / check-outdated-fsfe-org-pages

Checks if some fsfe.org translated pages are outdated.
GNU Affero General Public License v3.0
1 stars 0 forks source link

Lang support #1

Open marado opened 8 years ago

marado commented 8 years ago

Get lang as an argument, automatically setting OUTDATED_WARNING_TEXT_FRAGMENT for that lang, and setting the lang of the pages (eg.: .it.xhtml).

taringamberini commented 8 years ago

Hi Marcos,

I have wrote this simple script because I'm playing with bash and command line scripting, and because I need an automated way to check if my favourite translated pages of the fsfe.org web site are outdated (I know that exist the pages http://status.fsfe.org/web/translations.html, its an useful page (even if "...currently not operational..."), but I still find very boring manually searching for pages I want to monitor.

As you have pointed out it would be better to automatically set the value of OUTDATED_WARNING_TEXT_FRAGMENT. It could be taken from (for example) line 30 of the file https://trac.fsfe.org/fsfe-web/browser/trunk/tools/texts-pt.xml . I'm going to find a way of extracting such value from <text id="outdated-1> xml node. Have you any hints about (maybe using xmllint)?

I agree with you that passing "lang as an argument" could be useful. On the contrary I had thought to get the two letter lang code directly from ending .<lang>.html, but I might have in mind a different usage scenario than the one you are thinking about. Could you please clarify how should be written URLs in the fsfe-org-urls.txt when passing lang as an argument? Do you mean:

# Top menu pages
https://fsfe.org/about/about
https://fsfe.org/about/work
https://fsfe.org/campaigns/campaigns

without the ending .<lang>.html ?

marado commented 8 years ago

Hi,

To get "outdated-1" from the xml file:

wget "https://trac.fsfe.org/fsfe-web/browser/trunk/tools/texts-pt.xml?format=txt" --no-check-certificate -o /dev/null -O - |hxselect '#outdated-1'

As for the fsfe-org-urls.txt contents... yes, I did meant https://fsfe.org/about/about should be on the file, in order to refer to either https://fsfe.org/about/about.pt.html or https://fsfe.org/about/about.pt.html, depending on the lang argument.

BTW, while http://status.fsfe.org/web/translations.html is outdated, there's another website doing the work at https://roidelapluie.be/uploads/lingvoj-demo/ .