Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > 425e2e5eda65dccbcbf69bb66074c6e8 > files > 2

shutter-0.99.4-1.mga9.src.rpm

diff -Nrup a/share/shutter/resources/modules/Shutter/App/Common.pm b/share/shutter/resources/modules/Shutter/App/Common.pm
--- a/share/shutter/resources/modules/Shutter/App/Common.pm	2023-03-10 22:51:07.000000000 +0100
+++ b/share/shutter/resources/modules/Shutter/App/Common.pm	2023-06-01 18:48:40.056399504 +0200
@@ -34,6 +34,9 @@ use Locale::gettext;
 #Glib
 use Glib qw/ TRUE FALSE /;
 
+#fix locale for utf8
+use Shutter::App::UTF8Locale;
+
 has shutter_root => ( is => "ro", required => 1 );
 has main_window  => ( is => "rw", required => 1 );
 has appname      => ( is => "ro", required => 1 );
@@ -64,8 +67,7 @@ has gettext_object => (
     builder => sub {
         my $self = shift;
 
-        my $l = Locale::gettext->domain("shutter");
-        $l->dir( $self->shutter_root . "/share/locale" );
+        my $l = Shutter::App::UTF8Locale->new($self->{_shutter_root});
 
         return $l;
     },
diff -Nur shutter-0.93.1.orig/share/shutter/resources/modules/Shutter/App/UTF8Locale.pm shutter-0.93.1/share/shutter/resources/modules/Shutter/App/UTF8Locale.pm
--- shutter-0.93.1.orig/share/shutter/resources/modules/Shutter/App/UTF8Locale.pm	1970-01-01 03:00:00.000000000 +0300
+++ shutter-0.93.1/share/shutter/resources/modules/Shutter/App/UTF8Locale.pm	2016-02-18 08:59:38.000000000 +0300
@@ -0,0 +1,48 @@
+package Shutter::App::UTF8Locale;
+
+use strict;
+use utf8;
+use Encode;
+use Locale::gettext;
+use POSIX ();
+
+use vars qw(@ISA @EXPORT @EXPORT_OK);
+
+use Exporter;
+@ISA = ('Exporter');
+
+#list of function names
+@EXPORT = qw ();
+
+#theese are public variables
+@EXPORT_OK = qw( );
+
+sub new {
+    my $class = shift;
+    my $shutter_root = shift;
+    my $domain = shift || "shutter";
+
+    POSIX::setlocale(POSIX::LC_ALL(), "");
+
+    Locale::gettext::bindtextdomain($domain,"/usr/share/locale");
+    Locale::gettext::bind_textdomain_codeset($domain, 'UTF-8');
+
+    my $self = {domain => $domain };
+
+    bless $self, $class;
+    return $self;
+}
+
+sub get {
+    my $class = shift;
+    my $text = shift;
+    return Locale::gettext::dgettext($class->{domain},$text);
+}
+
+sub nget {
+    my $class = shift;
+    my $text = shift;
+    return Locale::gettext::dgettext($class->{domain},$text);
+}
+
+1;
diff -Nur shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/spbardistortion/spbardistortion shutter-0.93.1/share/shutter/resources/system/plugins/perl/spbardistortion/spbardistortion
--- shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/spbardistortion/spbardistortion	2014-12-24 02:12:32.000000000 +0300
+++ shutter-0.93.1/share/shutter/resources/system/plugins/perl/spbardistortion/spbardistortion	2016-02-18 09:00:55.000000000 +0300
@@ -50,8 +50,9 @@
 setlocale(LC_NUMERIC, "C");	
 #configure gettext using ENV Variable (setup during shutter start)
 setlocale( LC_MESSAGES, "" );
-my $d = Locale::gettext->domain("shutter-plugins");
-$d->dir( $ENV{'SHUTTER_INTL'} );
+use lib($ENV{'SHUTTER_ROOT'}."/share/shutter/resources/modules");
+use Shutter::App::UTF8Locale;
+my $d=Shutter::App::UTF8Locale->new($ENV{'SHUTTER_INTL'},"shutter-plugins");
 
 #icontheme to determine if icons exist or not
 #in some cases we deliver fallback icons
diff -Nur shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/spnegate/spnegate shutter-0.93.1/share/shutter/resources/system/plugins/perl/spnegate/spnegate
--- shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/spnegate/spnegate	2014-12-24 02:12:32.000000000 +0300
+++ shutter-0.93.1/share/shutter/resources/system/plugins/perl/spnegate/spnegate	2016-02-18 09:00:55.000000000 +0300
@@ -50,8 +50,9 @@
 setlocale(LC_NUMERIC, "C");	
 #configure gettext using ENV Variable (setup during shutter start)
 setlocale( LC_MESSAGES, "" );
-my $d = Locale::gettext->domain("shutter-plugins");
-$d->dir( $ENV{'SHUTTER_INTL'} );
+use lib($ENV{'SHUTTER_ROOT'}."/share/shutter/resources/modules");
+use Shutter::App::UTF8Locale;
+my $d=Shutter::App::UTF8Locale->new($ENV{'SHUTTER_INTL'},"shutter-plugins");
 
 #icontheme to determine if icons exist or not
 #in some cases we deliver fallback icons
diff -Nur shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/sppolaroid/sppolaroid shutter-0.93.1/share/shutter/resources/system/plugins/perl/sppolaroid/sppolaroid
--- shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/sppolaroid/sppolaroid	2014-12-24 02:12:32.000000000 +0300
+++ shutter-0.93.1/share/shutter/resources/system/plugins/perl/sppolaroid/sppolaroid	2016-02-18 09:00:55.000000000 +0300
@@ -50,8 +50,9 @@
 setlocale(LC_NUMERIC, "C");	
 #configure gettext using ENV Variable (setup during shutter start)
 setlocale( LC_MESSAGES, "" );
-my $d = Locale::gettext->domain("shutter-plugins");
-$d->dir( $ENV{'SHUTTER_INTL'} );
+use lib($ENV{'SHUTTER_ROOT'}."/share/shutter/resources/modules");
+use Shutter::App::UTF8Locale;
+my $d=Shutter::App::UTF8Locale->new($ENV{'SHUTTER_INTL'},"shutter-plugins");
 
 #icontheme to determine if icons exist or not
 #in some cases we deliver fallback icons
diff -Nur shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/spresize/spresize shutter-0.93.1/share/shutter/resources/system/plugins/perl/spresize/spresize
--- shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/spresize/spresize	2014-12-24 02:12:32.000000000 +0300
+++ shutter-0.93.1/share/shutter/resources/system/plugins/perl/spresize/spresize	2016-02-18 09:00:55.000000000 +0300
@@ -36,8 +36,9 @@
 setlocale(LC_NUMERIC, "C");	
 #configure gettext using ENV Variable (setup during shutter start)
 setlocale( LC_MESSAGES, "" );
-my $d = Locale::gettext->domain("shutter-plugins");
-$d->dir( $ENV{'SHUTTER_INTL'} );
+use lib($ENV{'SHUTTER_ROOT'}."/share/shutter/resources/modules");
+use Shutter::App::UTF8Locale;
+my $d=Shutter::App::UTF8Locale->new($ENV{'SHUTTER_INTL'},"shutter-plugins");
 
 binmode( STDOUT, ":utf8" );
 #shutter will ask for some infos - no need of changing anything
diff -Nur shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/spsepia/spsepia shutter-0.93.1/share/shutter/resources/system/plugins/perl/spsepia/spsepia
--- shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/spsepia/spsepia	2014-12-24 02:12:32.000000000 +0300
+++ shutter-0.93.1/share/shutter/resources/system/plugins/perl/spsepia/spsepia	2016-02-18 09:00:55.000000000 +0300
@@ -59,8 +59,9 @@
 setlocale(LC_NUMERIC, "C");	
 #configure gettext using ENV Variable (setup during shutter start)
 setlocale( LC_MESSAGES, "" );
-my $d = Locale::gettext->domain("shutter-plugins");
-$d->dir( $ENV{'SHUTTER_INTL'} );
+use lib($ENV{'SHUTTER_ROOT'}."/share/shutter/resources/modules");
+use Shutter::App::UTF8Locale;
+my $d=Shutter::App::UTF8Locale->new($ENV{'SHUTTER_INTL'},"shutter-plugins");
 
 #icontheme to determine if icons exist or not
 #in some cases we deliver fallback icons
diff -Nur shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/spshadow/spshadow shutter-0.93.1/share/shutter/resources/system/plugins/perl/spshadow/spshadow
--- shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/spshadow/spshadow	2014-12-24 02:12:32.000000000 +0300
+++ shutter-0.93.1/share/shutter/resources/system/plugins/perl/spshadow/spshadow	2016-02-18 09:00:55.000000000 +0300
@@ -51,8 +51,9 @@
 setlocale(LC_NUMERIC, "C");	
 #configure gettext using ENV Variable (setup during shutter start)
 setlocale( LC_MESSAGES, "" );
-my $d = Locale::gettext->domain("shutter-plugins");
-$d->dir( $ENV{'SHUTTER_INTL'} );
+use lib($ENV{'SHUTTER_ROOT'}."/share/shutter/resources/modules");
+use Shutter::App::UTF8Locale;
+my $d=Shutter::App::UTF8Locale->new($ENV{'SHUTTER_INTL'},"shutter-plugins");
 
 #icontheme to determine if icons exist or not
 #in some cases we deliver fallback icons
diff -Nur shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/spwatermark/spwatermark shutter-0.93.1/share/shutter/resources/system/plugins/perl/spwatermark/spwatermark
--- shutter-0.93.1.orig/share/shutter/resources/system/plugins/perl/spwatermark/spwatermark	2014-12-24 02:12:32.000000000 +0300
+++ shutter-0.93.1/share/shutter/resources/system/plugins/perl/spwatermark/spwatermark	2016-02-18 09:00:55.000000000 +0300
@@ -50,8 +50,9 @@
 setlocale(LC_NUMERIC, "C");	
 #configure gettext using ENV Variable (setup during shutter start)
 setlocale( LC_MESSAGES, "" );
-my $d = Locale::gettext->domain("shutter-plugins");
-$d->dir( $ENV{'SHUTTER_INTL'} );
+use lib($ENV{'SHUTTER_ROOT'}."/share/shutter/resources/modules");
+use Shutter::App::UTF8Locale;
+my $d=Shutter::App::UTF8Locale->new($ENV{'SHUTTER_INTL'},"shutter-plugins");
 
 #icontheme to determine if icons exist or not
 #in some cases we deliver fallback icons
diff -Nur shutter-0.93.1.orig/share/shutter/resources/system/upload_plugins/Template.pm shutter-0.93.1/share/shutter/resources/system/upload_plugins/Template.pm
--- shutter-0.93.1.orig/share/shutter/resources/system/upload_plugins/Template.pm	2014-12-24 02:12:32.000000000 +0300
+++ shutter-0.93.1/share/shutter/resources/system/upload_plugins/Template.pm	2016-02-18 09:00:55.000000000 +0300
@@ -35,8 +35,9 @@
 use Shutter::Upload::Shared;
 our @ISA = qw(Shutter::Upload::Shared);
 
-my $d = Locale::gettext->domain("shutter-plugins");
-$d->dir($ENV{'SHUTTER_INTL'});
+use lib($ENV{'SHUTTER_ROOT'}."/share/shutter/resources/modules");
+use Shutter::App::UTF8Locale;
+my $d=Shutter::App::UTF8Locale->new($ENV{'SHUTTER_INTL'},"shutter-plugins");
 
 my %upload_plugin_info = (
 	'module'                     => "PROVIDER",                          #edit (must be the same as 'package')
diff -Nur shutter-0.93.1.orig/share/shutter/resources/system/upload_plugins/upload/Imgur.pm shutter-0.93.1/share/shutter/resources/system/upload_plugins/upload/Imgur.pm
--- shutter-0.93.1.orig/share/shutter/resources/system/upload_plugins/upload/Imgur.pm	2014-12-24 02:12:32.000000000 +0300
+++ shutter-0.93.1/share/shutter/resources/system/upload_plugins/upload/Imgur.pm	2016-02-18 09:00:55.000000000 +0300
@@ -34,8 +34,9 @@
 use Shutter::Upload::Shared;
 our @ISA = qw(Shutter::Upload::Shared);
 
-my $d = Locale::gettext->domain("shutter-upload-plugins");
-$d->dir($ENV{'SHUTTER_INTL'});
+use lib($ENV{'SHUTTER_ROOT'}."/share/shutter/resources/modules");
+use Shutter::App::UTF8Locale;
+my $d=Shutter::App::UTF8Locale->new($ENV{'SHUTTER_INTL'},"shutter-upload-plugins");
 
 my %upload_plugin_info = (
 	'module'                     => "Imgur",