]> git.mxchange.org Git - addressbook-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 19:55:23 +0000 (21:55 +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/addressbook/beans/localization/AddressbookLocalizationSessionBean.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties

index 192558f89259ef58ed4a8e7bf77e2795261a59d6..dcc831be07aa12eea65d1bc3c609d24d0e897cbc 100644 (file)
@@ -149,10 +149,10 @@ public class AddressbookLocalizationSessionBean extends BaseAddressbookControlle
                // 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 AddressbookLocalizationSessionBean extends BaseAddressbookControlle
                // 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 AddressbookLocalizationSessionBean extends BaseAddressbookControlle
                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 AddressbookLocalizationSessionBean extends BaseAddressbookControlle
         * @return Locale
         */
        public Locale getLocale () {
-               System.out.println("Getting this.locale=" + this.locale);
                return this.locale;
        }
 
@@ -201,7 +198,6 @@ public class AddressbookLocalizationSessionBean extends BaseAddressbookControlle
         * @param locale Locale
         */
        public void setLocale (final Locale locale) {
-               System.out.println("Setting locale=" + locale);
                this.locale = locale;
        }
 
@@ -211,7 +207,6 @@ public class AddressbookLocalizationSessionBean extends BaseAddressbookControlle
         * @return Language code
         */
        public String getLocaleCode () {
-               System.out.println("Getting this.localeCode=" + this.localeCode);
                return this.localeCode;
        }
 
@@ -221,7 +216,6 @@ public class AddressbookLocalizationSessionBean extends BaseAddressbookControlle
         * @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 AddressbookLocalizationSessionBean extends BaseAddressbookControlle
        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 AddressbookLocalizationSessionBean extends BaseAddressbookControlle
                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 AddressbookLocalizationSessionBean extends BaseAddressbookControlle
 
                // 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 AddressbookLocalizationSessionBean extends BaseAddressbookControlle
                        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 AddressbookLocalizationSessionBean extends BaseAddressbookControlle
                // 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 8b78ff82ffa3415a2d70fc7625ed5d7016e3fa9a..a19aae03855be4b38b1e74bbbe415c084f261dad 100644 (file)
@@ -888,7 +888,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 ebc2f6d0e08a23c9fe497fae34842c4b92629f21..6143074ab0a43c2e1d6ecf5ee55e652497bb75a7 100644 (file)
@@ -865,7 +865,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