[Pkg-mozext-commits] [adblock-plus] 86/464: Added support for extension's homepage URL in meta.properties
David Prévot
taffit at moszumanska.debian.org
Tue Jul 22 20:44:06 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit 5b7613b44c702a88bdab2af2dcb120d1d2464d5e
Author: Wladimir Palant <trev at adblockplus.org>
Date: Wed May 19 22:07:46 2010 +0200
Added support for extension's homepage URL in meta.properties
---
Packager.pm | 12 +++++++-----
setupTestEnvironment.pl | 1 +
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/Packager.pm b/Packager.pm
index a4d919e..1252e48 100644
--- a/Packager.pm
+++ b/Packager.pm
@@ -68,6 +68,7 @@ sub readLocaleData
$self->{localeData} = {};
$self->{name} = '';
$self->{description} = '';
+ $self->{homepage} = '';
foreach my $locale (@{$self->{locales}})
{
@@ -77,7 +78,7 @@ sub readLocaleData
$self->{localeData}{$locale} = {id => $locale};
while ($data =~ /^\s*(?![!#])(\S+)\s*=\s*(.+)$/mg)
{
- if ($1 eq "name" || $1 eq "description" || $1 eq "translator" || $1 eq "description.short" || $1 eq "description.long")
+ if ($1 eq "name" || $1 eq "description" || $1 eq "homepage" || $1 eq "translator" || $1 eq "description.short" || $1 eq "description.long")
{
$self->{localeData}{$locale}{$1} = $2;
}
@@ -88,16 +89,13 @@ sub readLocaleData
{
$self->{name} = $self->{localeData}{"en-US"}{name} if exists($self->{localeData}{"en-US"}{name});
$self->{description} = $self->{localeData}{"en-US"}{description} if exists($self->{localeData}{"en-US"}{description});
+ $self->{homepage} = $self->{localeData}{"en-US"}{homepage} if exists($self->{localeData}{"en-US"}{homepage});
}
my $info = "";
my %translators = ();
foreach my $locale (sort {$a->{id} cmp $b->{id}} values %{$self->{localeData}})
{
- next unless (exists($locale->{translator}) && $locale->{translator}) ||
- (exists($locale->{name}) && $locale->{name} && $locale->{name} ne $self->{name}) ||
- (exists($locale->{description}) && $locale->{description} && $locale->{description} ne $self->{description});
-
if (exists($locale->{translator}))
{
foreach my $translator (split(/,/, $locale->{translator}))
@@ -109,10 +107,12 @@ sub readLocaleData
}
$locale->{name} = $self->{name} unless exists($locale->{name}) && $locale->{name} && $locale->{name} ne $self->{name};
$locale->{description} = $self->{description} unless exists($locale->{description}) && $locale->{description} && $locale->{description} ne $self->{description};
+ $locale->{homepage} = $self->{homepage} unless exists($locale->{homepage}) && $locale->{homepage} && $locale->{homepage} ne $self->{homepage};
my $id = $self->encodeXML($locale->{id});
my $name = $self->encodeXML($locale->{name});
my $description = $self->encodeXML($locale->{description});
+ my $homepage = $self->encodeXML($locale->{homepage});
$info .= <<EOT;
\t<em:localized>
@@ -120,6 +120,7 @@ sub readLocaleData
\t\t\t<em:locale>$id</em:locale>
\t\t\t<em:name>$name</em:name>
\t\t\t<em:description>$description</em:description>
+\t\t\t<em:homepageURL>$homepage</em:homepageURL>
\t\t</Description>
\t</em:localized>
EOT
@@ -201,6 +202,7 @@ sub cp
s/\{\{BUILD\}\}/$self->{build}/g if $extendedTextMode;
s/\{\{NAME\}\}/$self->{name}/g if $extendedTextMode;
s/\{\{DESCRIPTION\}\}/$self->{description}/g if $extendedTextMode;
+ s/\{\{HOMEPAGE\}\}/$self->{homepage}/g if $extendedTextMode;
s/\{\{LOCALIZED\}\}/$self->{localizedInfo}/g if $extendedTextMode;
if ($extendedTextMode && /\{\{LOCALE\}\}/)
{
diff --git a/setupTestEnvironment.pl b/setupTestEnvironment.pl
index e446621..173370d 100644
--- a/setupTestEnvironment.pl
+++ b/setupTestEnvironment.pl
@@ -144,6 +144,7 @@ sub fixupFile
$str =~ s/{{BUILD}}//g;
$str =~ s/{{NAME}}/$pkg->{name}/g;
$str =~ s/{{DESCRIPTION}}/$pkg->{description}/g;
+ $str =~ s/{{HOMEPAGE}}/$pkg->{homepage}/g;
$str =~ s/{{LOCALIZED}}/$pkg->{localizedInfo}/g;
$str =~ s/^.*{{LOCALE}}.*$/
my @result = ();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list