Your message dated Thu, 31 Aug 2017 13:35:05 +0000
with message-id <e1dnpcf-000gpa...@fasolo.debian.org>
and subject line Bug#714394: fixed in pdfsam 3.2.5-1
has caused the Debian Bug report #714394,
regarding pdfsam: fix support for system default locale (patch included)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
714394: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714394
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: pdfsam
Version: 1.1.4-2
Severity: normal

pdfsam uses Locale.UK per default, even when it supports the current system
locale. This way a user outside the UK always has to know about this and
change
the language settings of pdfsam manually. The current locale handling also
does not allow pdfsam to simply follow the system locale settings, instead a
user always has to reconfigure pdfsam manually every time after changing
the system locale.

The attached patch fixes this issue. If you approve the patch, feel free to
send the changes upstream.

-- System Information:
Debian Release: 7.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.9-1-486
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages pdfsam depends on:
ii  default-jre [java2-runtime]    1:1.7-48~bpo70+1
ii  java-wrappers                  0.1.25
ii  libcommons-httpclient-java     3.1-10.2
ii  libdom4j-java                  1.6.1+dfsg.2-6
ii  libhttpclient-java             4.1.1-2
ii  libitext-java                  2.1.7-3+deb7u1
ii  libjaxen-java                  1.1.3-1
ii  libjgoodies-looks-java         2.5.0-2
ii  liblog4j1.2-java               1.2.16-3
ii  openjdk-7-jre [java2-runtime]  7u21-2.3.9-1~bpo70+1

pdfsam recommends no packages.

pdfsam suggests no packages.

-- no debconf information
Description: fixed system locale handling
 This patch adds support for system default locale handling so that pdfsam
 starts with the system language per default and uses "Locale.UK" only as
 the fallback locale if the system locale is not supported by pdfsam.
 .
 pdfsam (1.1.4-3) unstable; urgency=low
 .
   * fixed system locale handling
Author: Ronny Standtke <ronny.stand...@fhnw.ch>

--- 
pdfsam-1.1.4.orig/pdfsam-maine-br1/src/java/org/pdfsam/guiclient/l10n/LanguageLoader.java
+++ 
pdfsam-1.1.4/pdfsam-maine-br1/src/java/org/pdfsam/guiclient/l10n/LanguageLoader.java
@@ -23,8 +23,9 @@ import java.util.ResourceBundle;
 public class LanguageLoader {
 
     //const
-    public static final String DEFAULT_LANGUAGE = "en_GB";
-    public final Locale DEFAULT_LOCALE = Locale.UK;
+    public static final Locale DEFAULT_LOCALE = Locale.getDefault();
+    public static final Locale FALLBACK_LOCALE = Locale.UK;
+    public static final String DEFAULT_LANGUAGE = DEFAULT_LOCALE.getLanguage();
     //vars
     private String bundleName;
     private Locale currentLocale; 
@@ -45,7 +46,7 @@ public class LanguageLoader {
                        currentLocale = new Locale (i18nInfos[0].toLowerCase());
                }
         }catch(Exception ex){
-            currentLocale = DEFAULT_LOCALE;
+            currentLocale = FALLBACK_LOCALE;
         }
     }
     
@@ -57,7 +58,7 @@ public class LanguageLoader {
         try{            
             return ResourceBundle.getBundle(bundleName, currentLocale);
         }catch(Exception exc){
-            return ResourceBundle.getBundle(bundleName, DEFAULT_LOCALE);
+            return ResourceBundle.getBundle(bundleName, FALLBACK_LOCALE);
         }
     }
 
@@ -69,7 +70,7 @@ public class LanguageLoader {
         try{
             return ResourceBundle.getBundle(bundleName, currentLocale, cl);
         }catch(Exception exc){
-            return ResourceBundle.getBundle(bundleName, DEFAULT_LOCALE, cl);
+            return ResourceBundle.getBundle(bundleName, FALLBACK_LOCALE, cl);
         }
     }
 
--- 
pdfsam-1.1.4.orig/pdfsam-maine-br1/src/java/org/pdfsam/guiclient/configuration/Configuration.java
+++ 
pdfsam-1.1.4/pdfsam-maine-br1/src/java/org/pdfsam/guiclient/configuration/Configuration.java
@@ -206,6 +206,7 @@ public class Configuration{
                        log.warn("Unable to get language ResourceBudle, setting 
the default language.", e);
                        language = LanguageLoader.DEFAULT_LANGUAGE;
                }
+               log.info("Language: " + language);
        
                //get bundle
                i18nMessages = (new LanguageLoader(language, 
"org.pdfsam.i18n.resources.Messages").getBundle());
--- pdfsam-1.1.4.orig/pdfsam-langpack-br1/src/java/org/pdfsam/i18n/languages.xml
+++ pdfsam-1.1.4/pdfsam-langpack-br1/src/java/org/pdfsam/i18n/languages.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <languages>
+    <language value="" description="System default" />  
     <language value="bs" description="Bosnian" />  
     <language value="pt_BR" description="Brazilian Portuguese" />    
     <language value="bg" description="Bulgarian" />  
--- pdfsam-1.1.4.orig/template-basic-1/config.xml
+++ pdfsam-1.1.4/template-basic-1/config.xml
@@ -12,7 +12,6 @@
       <LAF>5</LAF>  
       <theme>14</theme> 
     </lookAndfeel>  
-    <i18n>en_GB</i18n>  
     <plugs_absolute_dir/>  
     <defaultjob></defaultjob>  
     <loglevel>10000</loglevel> 

--- End Message ---
--- Begin Message ---
Source: pdfsam
Source-Version: 3.2.5-1

We believe that the bug you reported is fixed in the latest version of
pdfsam, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 714...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Markus Koschany <a...@debian.org> (supplier of updated pdfsam package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 31 Aug 2017 13:24:56 +0200
Source: pdfsam
Binary: pdfsam
Architecture: source
Version: 3.2.5-1
Distribution: experimental
Urgency: medium
Maintainer: Debian Java Maintainers 
<pkg-java-maintainers@lists.alioth.debian.org>
Changed-By: Markus Koschany <a...@debian.org>
Description:
 pdfsam     - PDF Split and Merge
Closes: 635964 714304 714394 779058 792467 796805
Changes:
 pdfsam (3.2.5-1) experimental; urgency=medium
 .
   * New upstream version. (Closes: #635964)
     - Null pointer exception was fixed. (Closes: #779058)
     - pdfsam-console does no longer exist. (Closes: #792467)
     - i18n localization works as expected now. (Closes: #714394)
     - The update manager is disabled by default now. (Closes: #796805)
     - jgoodies-common is no longer a required dependency. (Closes: #714304)
   * New build system Maven.
   * Add myself to Uploaders and remove Thorsten Werner because he is not active
     anymore.
Checksums-Sha1:
 e4306cd1afd659ed3ffa78c2ab69acd563a5edaf 2490 pdfsam_3.2.5-1.dsc
 54c7de3cf8707a0d2999112890ba532e786ceed6 1390912 pdfsam_3.2.5.orig.tar.xz
 b1aa8a9ccaecb54dd7bb23fcaa61eee2abadedd2 16264 pdfsam_3.2.5-1.debian.tar.xz
 0d21fe72825397b7aada6710062418882c6f43d0 16380 pdfsam_3.2.5-1_amd64.buildinfo
Checksums-Sha256:
 eddfa951b0f03a5eec23522e92f70c300402bb87bef8812919aa33e0fdbada2b 2490 
pdfsam_3.2.5-1.dsc
 810f96ec6c1ec57bbff53189a662d1c81b38ece210d3b8d3a6b6a534ae2bf5b4 1390912 
pdfsam_3.2.5.orig.tar.xz
 cf72b3955e016e6c2081257886a841211957ac640ac0c137b22386afc14408cc 16264 
pdfsam_3.2.5-1.debian.tar.xz
 2f2101771356e40553d2eea4a05ef27dce51c3cbd9d619909c99d6560caa7053 16380 
pdfsam_3.2.5-1_amd64.buildinfo
Files:
 40978acb1fbe0457cedcb65f357ca1d1 2490 java optional pdfsam_3.2.5-1.dsc
 8e3516e7f9e010399b4ed5207f4d540b 1390912 java optional pdfsam_3.2.5.orig.tar.xz
 7eb98ec022e3d87eacf4aa08e9d5b6fc 16264 java optional 
pdfsam_3.2.5-1.debian.tar.xz
 2a878585ecc14beac5aa9c3854d5e802 16380 java optional 
pdfsam_3.2.5-1_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQKjBAEBCgCNFiEErPPQiO8y7e9qGoNf2a0UuVE7UeQFAlmoC3xfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEFD
RjNEMDg4RUYzMkVERUY2QTFBODM1RkQ5QUQxNEI5NTEzQjUxRTQPHGFwb0BkZWJp
YW4ub3JnAAoJENmtFLlRO1Hk9e8QAK+zBWN/ym8xxl+I+PqP1qatmqtq+j3ArWlr
3qYUUnHBQKqk+UVtQm9E+7Vv70b5yjpzNr8wn+kmUf8j46t5FHRoaoSR73m1O0i4
Tsx4cEHMmtAI9Wq5SRISUTIiKWm6sJyiE/Uz7byY7x2pi3nJyGWsGnfbTMSXSkYo
X/ZHdjXEnwZhsl/LjsScu9yE4aKXrikQXznsN3Cf8uCeJux5ZocvOk1WifKS86NX
OGVZZsFfOLDv82C35F+j6u/RqscUEM8USE6uqKA9lXAo2Akhxqwo/HRgEch+1ECI
zr0df9vEBH1J8CmzbrTaUvbLtIAqbaakQJffyoHrrfqE+RlyB1xrlFhdB/xaR19I
TrD9De28DIyiylGS0Do9ejLgW8Uos4K0lEDmxBUDHKm+7jQ8s8NyD1YmRm+dVuvL
jRbC2x6uxEA2/yRXOTMhxoBz+gR2D09hWzIVbQqwjQllxj2UjlMwX7AzM8z/AXH8
3KHlVrpyWliDGs5R7Qkt5cQCVwuN4Pz0NKVewGuwjI4LzIgwsIOuNlInPpiIIw/N
y9NK5lezels7swywbdcQ+BDT0p0PO0qtxVXErJCbPsrC01JFI9WSG/puQ7GLw+My
7xHyGVNY26w4BqBzSjRQHyZLy2Gh5HgDlTIDYBxvMVYmfWvZ6Fke11sqO61nETLV
eNObtgvf
=TDvt
-----END PGP SIGNATURE-----

--- End Message ---
__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Reply via email to