]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sat, 19 Aug 2017 15:07:03 +0000 (17:07 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 19 Aug 2017 15:07:03 +0000 (17:07 +0200)
- removed debug lines, were to noisy and the localization bug has been fixed
- company name and legal status are no longer separated, some other i18n
  strings may still write about it

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jfinancials/beans/localization/FinancialsLocalizationSessionBean.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties

index 24bf5bd74038a5f55784e236cf7bab832dfa1cf7..f9d9e08bc35cef4c5644746303ff90f61b55a062 100644 (file)
@@ -149,10 +149,10 @@ public class FinancialsLocalizationSessionBean extends BaseFinancialsController
                // Is locale code set?
                if (this.getLocaleCode() == null) {
                        // Throw NPE
-                       throw new NullPointerException("this.localeCode is null");
+                       throw new NullPointerException("this.localeCode is null"); //NOI18N
                } else if (this.getLocaleCode().isEmpty()) {
                        // Throw IAE
-                       throw new IllegalArgumentException("this.localeCode is empty");
+                       throw new IllegalArgumentException("this.localeCode is empty"); //NOI18N
                }
 
                // Default new locale is null, will be handled later
@@ -161,7 +161,6 @@ public class FinancialsLocalizationSessionBean extends BaseFinancialsController
                // Iterate over whole map
                for (Map.Entry<String, Locale> entry : this.getSupportedLocales().entrySet()) {
                        Locale foundLocale = entry.getValue();
-                       System.out.println(MessageFormat.format("foundLocale={0},this.localeCode={1}", foundLocale, this.getLocaleCode()));
 
                        // Does the language match?
                        if (Objects.equals(foundLocale.toString(), this.getLocaleCode())) {
@@ -175,10 +174,9 @@ public class FinancialsLocalizationSessionBean extends BaseFinancialsController
                this.clear();
 
                // Has a matching locale
-               System.out.println("newLocale=" + newLocale);
                if (null == newLocale) {
                        // Throw NPE
-                       throw new NullPointerException("this.localeCode=" + this.getLocaleCode() + " cannot be found.");
+                       throw new NullPointerException("this.localeCode=" + this.getLocaleCode() + " cannot be found."); //NOI18N
                }
 
                // Then change it
@@ -191,7 +189,6 @@ public class FinancialsLocalizationSessionBean extends BaseFinancialsController
         * @return Locale
         */
        public Locale getLocale () {
-               System.out.println("Getting this.locale=" + this.locale);
                return this.locale;
        }
 
@@ -201,7 +198,6 @@ public class FinancialsLocalizationSessionBean extends BaseFinancialsController
         * @param locale Locale
         */
        public void setLocale (final Locale locale) {
-               System.out.println("Setting locale=" + locale);
                this.locale = locale;
        }
 
@@ -211,7 +207,6 @@ public class FinancialsLocalizationSessionBean extends BaseFinancialsController
         * @return Language code
         */
        public String getLocaleCode () {
-               System.out.println("Getting this.localeCode=" + this.localeCode);
                return this.localeCode;
        }
 
@@ -221,7 +216,6 @@ public class FinancialsLocalizationSessionBean extends BaseFinancialsController
         * @param localeCode Language code
         */
        public void setLocaleCode (final String localeCode) {
-               System.out.println("Setting localeCode=" + localeCode);
                this.localeCode = localeCode;
        }
 
@@ -243,7 +237,6 @@ public class FinancialsLocalizationSessionBean extends BaseFinancialsController
        public void init () {
                // Get default locale
                Locale defaultLocale = FacesContext.getCurrentInstance().getApplication().getDefaultLocale();
-               System.out.println("defaultLocale=" + defaultLocale);
 
                // Add it to list
                this.getSupportedLocales().put(defaultLocale.toString(), defaultLocale);
@@ -255,7 +248,6 @@ public class FinancialsLocalizationSessionBean extends BaseFinancialsController
                while (iterator.hasNext()) {
                        // Get next locale
                        Locale supportedLocale = iterator.next();
-                       System.out.println("supportedLocale=" + supportedLocale);
 
                        // Add it
                        this.getSupportedLocales().put(supportedLocale.toString(), supportedLocale);
@@ -266,10 +258,7 @@ public class FinancialsLocalizationSessionBean extends BaseFinancialsController
 
                // Is no country code found?
                if (requestLocale.getCountry().isEmpty()) {
-                       // Then try to find one
-                       System.out.println("Request locale is without country information, looking up in map ...");
-
-                       // Get language from it
+                       // Then try to find one, get language from it
                        String language = requestLocale.getLanguage();
                        Boolean found = Boolean.FALSE;
 
@@ -277,7 +266,6 @@ public class FinancialsLocalizationSessionBean extends BaseFinancialsController
                        for (Map.Entry<String, Locale> entry : this.getSupportedLocales().entrySet()) {
                                String languageCode = entry.getKey();
                                Locale foundLocale = entry.getValue();
-                               System.out.println(MessageFormat.format("languageCode={0},language={1}", languageCode, language));
 
                                // Does the language match?
                                if (languageCode.startsWith(language)) {
@@ -310,14 +298,12 @@ public class FinancialsLocalizationSessionBean extends BaseFinancialsController
                // Is the locale language_country at least?
                if (null == locale) {
                        // Throw NPE
-                       throw new NullPointerException("locale is null");
-               } else if (!locale.toString().contains("_")) {
+                       throw new NullPointerException("locale is null"); //NOI18N
+               } else if (!locale.toString().contains("_")) { //NOI18N
                        // Throw IAE
-                       throw new IllegalArgumentException(MessageFormat.format("locale={0} does not have country information set.", locale));
+                       throw new IllegalArgumentException(MessageFormat.format("locale={0} does not have country information set.", locale)); //NOI18N
                }
 
-               System.out.println("Changing locale to " + locale + " ...");
-
                // Set locale + code here
                this.setLocale(locale);
                this.setLocaleCode(locale.toString());
index b503fa8066db4792fa3145df0ef856e74f2bfd52..b6f5e13d87680b0a52c6e933c26d27b5450f2f16 100644 (file)
@@ -858,7 +858,7 @@ ADMIN_CONTACT_BUSINESS_DATA_LEGEND=Basisdaten fuer geschaeftlichen Kontakt:
 #@TODO Please fix German umlauts!
 ADMIN_CONTACT_BUSINESS_DATA_LEGEND_TITLE=Geben Sie die Basisdaten fuer einen geschaeftlichen Kontakt ein.
 ADMIN_BUSINESS_DATA_COMPANY_NAME=Firmenname:
-ADMIN_BUSINESS_DATA_COMPANY_NAME_REQUIRED=Bitte geben Sie den Firmennamen ohne Rechtsform ein.
+ADMIN_BUSINESS_DATA_COMPANY_NAME_REQUIRED=Bitte geben Sie den Firmennamen inklusive Rechtsform ein.
 ADMIN_BUSINESS_DATA_COMPANY_LEGAL_STATUS=Rechtsform (z.B. GmbH):
 ADMIN_BUSINESS_DATA_COMPANY_EMAIL_ADDRESS=Haupt-Email-Adresse:
 #@TODO Please fix German umlauts!
index 5c2afc048787da2a4aa455ce175459831f557041..667e5b55d0a91d31fa49b56302b6495d94b3710d 100644 (file)
@@ -825,7 +825,7 @@ ADMIN_CONTACT_BUSINESS_DATA_LEGEND=Basic data for business contact:
 #Geben Sie die Basisdaten fuer einen geschaeftlichen Kontakt ein.
 ADMIN_CONTACT_BUSINESS_DATA_LEGEND_TITLE=Enter basic data for a business contact.
 ADMIN_BUSINESS_DATA_COMPANY_NAME=Company name:
-ADMIN_BUSINESS_DATA_COMPANY_NAME_REQUIRED=Please enter the company's name without legal status.
+ADMIN_BUSINESS_DATA_COMPANY_NAME_REQUIRED=Please enter the company's name including legal status.
 ADMIN_BUSINESS_DATA_COMPANY_LEGAL_STATUS=Legal status (e.g. Inc.):
 ADMIN_BUSINESS_DATA_COMPANY_EMAIL_ADDRESS=Main email address:
 BUTTON_ADMIN_CONTINUE_BUSINESS_CONTACT_PERSON=Add basic data