From a8c22829d8e8845cd4ddf4ef8b61a1ed79edfffc Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 12 Mar 2018 22:57:42 +0100 Subject: Imported from the SVN repository http://svn.wolffelaar.nl/wsvn/phpbb/branches/jessie/ Signed-off-by: Olivier Gayot --- debian/update_languages | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100755 debian/update_languages (limited to 'debian/update_languages') diff --git a/debian/update_languages b/debian/update_languages new file mode 100755 index 0000000..d9fa579 --- /dev/null +++ b/debian/update_languages @@ -0,0 +1,52 @@ +#!/usr/bin/perl -w +use strict; + +die "Must be executed in the 'debian' subdir" unless -d 'upstream'; + +`rm -f upstream/phpbb3_l10n-*.info`; + +my @lists; +my @langs; + +my $index='https://www.phpbb.com/languages/index.php'; +my $trans='/customise/db/translation/'; +my $downl='https://www.phpbb.com/customise/db/download/'; + +# Get language pages and other list pages +open DOWNLOADS, "wget -q -O- $index|"; +while () { + push @langs, $1 if m,,; + push @lists, $1 if m,,; +} +close DOWNLOADS; + +# Get other language pages +for (@lists) { + open DOWNLOADS, "wget -q -O- $index\?$_|"; + while () { + push @langs, $1 if m,, + } + close DOWNLOADS; +} + +# Get information about language pack +for (@langs) { + open DOWNLOADS, "wget -q -O- https://www.phpbb.com/customise/db/translation/$_|"; + my ($url,$code,$md5); + $md5 =''; + while () { + $url = $1 if m,MD5 checksum:,; + if ($md5 eq 0) { + $md5 = $1 if m,
(\w+)
,; + } + $code = $1 if m,ISO Code (.+)\n,; + } + close DOWNLOADS; + open INFO, "> upstream/phpbb3_l10n-$code.info"; + print INFO "Url=$url\n"; + print INFO "Md5=$md5\n"; + print INFO "Copyright=GPL-2\n"; + print INFO "Include=yes\n"; + close INFO; +} -- cgit v1.2.3