aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2017-09-02 18:48:11 +0200
committerAngelo Naselli <anaselli@linux.it>2017-09-02 18:52:51 +0200
commit918d60bf4e8e8fb5825804c909d86872f4af4143 (patch)
tree51d19343cc003cfc3b3fe842115062f26718688d
parent2a4b82f4fddb38d40e4e65654452f34200319756 (diff)
downloadmanatools-918d60bf4e8e8fb5825804c909d86872f4af4143.tar
manatools-918d60bf4e8e8fb5825804c909d86872f4af4143.tar.gz
manatools-918d60bf4e8e8fb5825804c909d86872f4af4143.tar.bz2
manatools-918d60bf4e8e8fb5825804c909d86872f4af4143.tar.xz
manatools-918d60bf4e8e8fb5825804c909d86872f4af4143.zip
fixed translators into about dialog
-rw-r--r--lib/ManaTools/MainDisplay.pm6
-rw-r--r--lib/ManaTools/Module/Clock.pm7
-rw-r--r--lib/ManaTools/Module/LogViewer.pm6
-rw-r--r--lib/ManaTools/Module/Services.pm6
-rw-r--r--lib/ManaTools/Module/Users.pm6
-rw-r--r--lib/ManaTools/Rpmdragora/edit_urpm_sources.pm7
-rw-r--r--lib/ManaTools/Shared.pm43
-rwxr-xr-xmodules/rpmdragora/dragoraUpdate7
-rwxr-xr-xmodules/rpmdragora/rpmdragora7
9 files changed, 63 insertions, 32 deletions
diff --git a/lib/ManaTools/MainDisplay.pm b/lib/ManaTools/MainDisplay.pm
index df0d9035..70090015 100644
--- a/lib/ManaTools/MainDisplay.pm
+++ b/lib/ManaTools/MainDisplay.pm
@@ -244,9 +244,7 @@ sub configName {
sub _showAboutDialog {
my $self = shift;
- my $translators = $self->{loc}->N("_: Translator(s) name(s) & email(s)\n");
- $translators =~ s/\</\&lt\;/g;
- $translators =~ s/\>/\&gt\;/g;
+ my $translators = ManaTools::Shared::i18NTranslators($self->{loc}->N("_: Translator(s) name(s) & email(s)\n"));
my $sh_gui = ManaTools::Shared::GUI->new();
$sh_gui->AboutDialog({ name => $self->{name},
version => $self->Version(),
@@ -259,7 +257,7 @@ sub _showAboutDialog {
<li>%s</li>
</ul>
<h3>Translators</h3>
- <ul><li>%s</li></ul>",
+ <ul>%s</ul>",
"Angelo Naselli &lt;anaselli\@linux.it&gt;",
"Matteo Pasotti &lt;matteo.pasotti\@gmail.com&gt;",
"Maarten Vanraes &lt;alien\@rmail.be&gt;",
diff --git a/lib/ManaTools/Module/Clock.pm b/lib/ManaTools/Module/Clock.pm
index 85e8ecb3..dabfb43d 100644
--- a/lib/ManaTools/Module/Clock.pm
+++ b/lib/ManaTools/Module/Clock.pm
@@ -187,9 +187,8 @@ sub _adminClockPanel {
my $event = shift; ## ManaTools::Shared::GUI::Event
my $self = $event->parentDialog()->module(); #this object
- my $translators = $self->loc->N("_: Translator(s) name(s) & email(s)\n");
- $translators =~ s/\</\&lt\;/g;
- $translators =~ s/\>/\&gt\;/g;
+ my $translators = ManaTools::Shared::i18NTranslators($self->loc->N("_: Translator(s) name(s) & email(s)\n"));
+
$self->sh_gui->AboutDialog({
name => $self->name,
version => $self->Version(),
@@ -199,7 +198,7 @@ sub _adminClockPanel {
authors => $self->loc->N("<h3>Developers</h3>
<ul><li>%s</li></ul>
<h3>Translators</h3>
- <ul><li>%s</li></ul>",
+ <ul>%s</ul>",
"Angelo Naselli &lt;anaselli\@linux.it&gt;",
$translators
),
diff --git a/lib/ManaTools/Module/LogViewer.pm b/lib/ManaTools/Module/LogViewer.pm
index b0237e25..4cccaaa5 100644
--- a/lib/ManaTools/Module/LogViewer.pm
+++ b/lib/ManaTools/Module/LogViewer.pm
@@ -314,9 +314,7 @@ sub _logViewerPanel {
last;
}
elsif($widget == $aboutButton) {
- my $translators = $self->loc->N("_: Translator(s) name(s) & email(s)\n");
- $translators =~ s/\</\&lt\;/g;
- $translators =~ s/\>/\&gt\;/g;
+ my $translators = ManaTools::Shared::i18NTranslators($self->loc->N("_: Translator(s) name(s) & email(s)\n"));
$self->sh_gui->AboutDialog({ name => $self->name,
version => $self->Version(),
credits => $self->loc->N("Copyright (C) %s Mageia community", '2014'),
@@ -327,7 +325,7 @@ sub _logViewerPanel {
<li>%s</li>
</ul>
<h3>Translators</h3>
- <ul><li>%s</li></ul>",
+ <ul>%s</ul>",
"Angelo Naselli &lt;anaselli\@linux.it&gt;",
"Matteo Pasotti &lt;matteo.pasotti\@gmail.com&gt;",
$translators
diff --git a/lib/ManaTools/Module/Services.pm b/lib/ManaTools/Module/Services.pm
index c1313cb1..6d2a44f9 100644
--- a/lib/ManaTools/Module/Services.pm
+++ b/lib/ManaTools/Module/Services.pm
@@ -438,9 +438,7 @@ sub _servicePanel {
last;
}
elsif ($widget == $aboutButton) {
- my $translators = $self->loc->N("_: Translator(s) name(s) & email(s)\n");
- $translators =~ s/\</\&lt\;/g;
- $translators =~ s/\>/\&gt\;/g;
+ my $translators = ManaTools::Shared::i18NTranslators($self->loc->N("_: Translator(s) name(s) & email(s)\n"));
$self->sh_gui->AboutDialog({ name => $self->name,
version => $self->Version(),
credits => $self->loc->N("Copyright (C) %s Mageia community", '2013-2016'),
@@ -452,7 +450,7 @@ sub _servicePanel {
<li>%s</li>
</ul>
<h3>Translators</h3>
- <ul><li>%s</li></ul>",
+ <ul>%s</ul>",
"Angelo Naselli &lt;anaselli\@linux.it&gt;",
"Matteo Pasotti &lt;matteo.pasotti\@gmail.com&gt;",
$translators
diff --git a/lib/ManaTools/Module/Users.pm b/lib/ManaTools/Module/Users.pm
index 4e4ecb63..f5e686b9 100644
--- a/lib/ManaTools/Module/Users.pm
+++ b/lib/ManaTools/Module/Users.pm
@@ -2378,9 +2378,7 @@ sub _refreshActions {
sub _showAboutDialog {
my $self = shift;
- my $translators = $self->loc->N("_: Translator(s) name(s) & email(s)\n");
- $translators =~ s/\</\&lt\;/g;
- $translators =~ s/\>/\&gt\;/g;
+ my $translators = ManaTools::Shared::i18NTranslators($self->loc->N("_: Translator(s) name(s) & email(s)\n"));
$self->sh_gui->AboutDialog({
name => $self->loc->N("manauser"),
version => $self->Version(),
@@ -2392,7 +2390,7 @@ sub _showAboutDialog {
<li>%s</li>
</ul>
<h3>Translators</h3>
- <ul><li>%s</li></ul>",
+ <ul>%s</ul>",
"Angelo Naselli &lt;anaselli\@linux.it&gt;",
"Matteo Pasotti &lt;matteo.pasotti\@gmail.com&gt;",
$translators
diff --git a/lib/ManaTools/Rpmdragora/edit_urpm_sources.pm b/lib/ManaTools/Rpmdragora/edit_urpm_sources.pm
index 1a244081..40afb941 100644
--- a/lib/ManaTools/Rpmdragora/edit_urpm_sources.pm
+++ b/lib/ManaTools/Rpmdragora/edit_urpm_sources.pm
@@ -1722,9 +1722,8 @@ sub mainwindow() {
last;
}
elsif ($menuLabel eq $helpMenu{ about }->label()) {
- my $translators = $loc->N("_: Translator(s) name(s) & email(s)\n");
- $translators =~ s/\</\&lt\;/g;
- $translators =~ s/\>/\&gt\;/g;
+ my $translators = ManaTools::Shared::i18NTranslators($loc->N("_: Translator(s) name(s) & email(s)\n"));
+
my $sh_gui = ManaTools::Shared::GUI->new();
$sh_gui->AboutDialog({ name => "Rpmdragora",
version => $VERSION,
@@ -1736,7 +1735,7 @@ sub mainwindow() {
<li>%s</li>
</ul>
<h3>Translators</h3>
- <ul><li>%s</li></ul>",
+ <ul>%s</ul>",
"Angelo Naselli &lt;anaselli\@linux.it&gt;",
"Matteo Pasotti &lt;matteo.pasotti\@gmail.com&gt;",
$translators
diff --git a/lib/ManaTools/Shared.pm b/lib/ManaTools/Shared.pm
index 8916a1f6..f6e8f52f 100644
--- a/lib/ManaTools/Shared.pm
+++ b/lib/ManaTools/Shared.pm
@@ -474,5 +474,48 @@ sub help_requested() {
return 0;
}
+
+#=============================================================
+
+=head2 i18NTranslators
+
+=head3 OUTPUT
+
+ translators: translators list from po file, it is taken
+ from translation of msgid
+ "_: Translator(s) name(s) & email(s)\n"
+
+=head3 DESCRIPTION
+
+ a string containing the new formatted list
+
+=cut
+
+#=============================================================
+sub i18NTranslators {
+ my ($translators) = @_;
+
+ $translators =~ s/\</\&lt\;/g;
+ $translators =~ s/\>/\&gt\;/g;
+ my $translators_markup = "";
+ my @translators_list = split("\n", $translators);
+
+ foreach (@translators_list) {
+ $translators_markup .= "<li>" . $_ . "</li>";
+ }
+
+# for (my $i = 0; ; $i++) {
+# if ($i > 0) {
+# $translators_markup .= "</li><li>";
+# }
+# $translators_markup .= $translators_list[$i];
+# if ($i == $#translators_list) {
+# last;
+# }
+# }
+
+ return $translators_markup;
+}
+
1; # End of ManaTools::Shared
diff --git a/modules/rpmdragora/dragoraUpdate b/modules/rpmdragora/dragoraUpdate
index 9ae6bd2b..50111e60 100755
--- a/modules/rpmdragora/dragoraUpdate
+++ b/modules/rpmdragora/dragoraUpdate
@@ -345,9 +345,8 @@ sub run_treeview_dialog {
last if quit();
}
elsif ($widget == $aboutButton) {
- my $translators = $loc->N("_: Translator(s) name(s) & email(s)\n");
- $translators =~ s/\</\&lt\;/g;
- $translators =~ s/\>/\&gt\;/g;
+ my $translators = ManaTools::Shared::i18NTranslators($loc->N("_: Translator(s) name(s) & email(s)\n"));
+
my $sh_gui = ManaTools::Shared::GUI->new();
$sh_gui->AboutDialog({
name => "dragoraUpdate",
@@ -358,7 +357,7 @@ sub run_treeview_dialog {
authors => $loc->N("<h3>Developers</h3>
<ul><li>%s</li></ul>
<h3>Translators</h3>
- <ul><li>%s</li></ul>",
+ <ul>%s</ul>",
"Angelo Naselli &lt;anaselli\@linux.it&gt;",
$translators
),
diff --git a/modules/rpmdragora/rpmdragora b/modules/rpmdragora/rpmdragora
index edab7f97..6018e181 100755
--- a/modules/rpmdragora/rpmdragora
+++ b/modules/rpmdragora/rpmdragora
@@ -1085,9 +1085,8 @@ print "Menu " . $menuLabel . " chosen\n";
elsif ($menuLabel eq $settingsMenuLabel{options}) {
}
elsif ($menuLabel eq $helpMenu{ about }->label()) {
- my $translators = $loc->N("_: Translator(s) name(s) & email(s)\n");
- $translators =~ s/\</\&lt\;/g;
- $translators =~ s/\>/\&gt\;/g;
+ my $translators = ManaTools::Shared::i18NTranslators($loc->N("_: Translator(s) name(s) & email(s)\n"));
+
my $sh_gui = ManaTools::Shared::GUI->new();
$sh_gui->AboutDialog({ name => "Rpmdragora",
version => $VERSION,
@@ -1237,4 +1236,4 @@ _run_treeview_dialog(\&perform_installation);
writeconf();
-1; \ No newline at end of file
+1;