From 9a8718f86dd6431a67013f4ca670b62043752916 Mon Sep 17 00:00:00 2001 From: quasi Date: Thu, 20 May 2010 09:40:35 +0000 Subject: [PATCH] Basetypes Globalization repariert git-svn-id: https://svn.libreccm.org/ccm/trunk@426 8810af33-2d31-482b-a856-94f89814c4df --- .../com/arsdigita/cms/basetypes/Address.java | 2 +- .../basetypes/BasetypesResources.properties | 6 ++ .../BasetypesResources_de.properties | 6 ++ .../basetypes/ui/PersonPropertiesStep.java | 67 +++++++++---------- .../util/BasetypesGlobalizationUtil.java | 2 +- 5 files changed, 47 insertions(+), 36 deletions(-) diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/Address.java b/ccm-cms/src/com/arsdigita/cms/basetypes/Address.java index b8d052b18..344a0d284 100644 --- a/ccm-cms/src/com/arsdigita/cms/basetypes/Address.java +++ b/ccm-cms/src/com/arsdigita/cms/basetypes/Address.java @@ -59,7 +59,7 @@ public class Address extends ContentPage { public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.basetypes.Address"; - private static final AddressConfig s_config = new AddressConfig(); + private static AddressConfig s_config = new AddressConfig(); static { s_config.load(); } diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/BasetypesResources.properties b/ccm-cms/src/com/arsdigita/cms/basetypes/BasetypesResources.properties index 0efc1bd55..d4ee71b7a 100644 --- a/ccm-cms/src/com/arsdigita/cms/basetypes/BasetypesResources.properties +++ b/ccm-cms/src/com/arsdigita/cms/basetypes/BasetypesResources.properties @@ -4,4 +4,10 @@ cms.basetypes.ui.address.city=City cms.basetypes.ui.address.state=State cms.basetypes.ui.address.iso_country_code=Country cms.basetypes.ui.address.error_iso_country=You must select a country + +cms.basetypes.ui.person.surname=Surname +cms.basetypes.ui.person.givenname=Given name +cms.basetypes.ui.person.titlepre=Title +cms.basetypes.ui.person.titlepost=Name appendix + address.authoring.basic_properties.title=Basic Properties \ No newline at end of file diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/BasetypesResources_de.properties b/ccm-cms/src/com/arsdigita/cms/basetypes/BasetypesResources_de.properties index 6504aeb34..374feed44 100644 --- a/ccm-cms/src/com/arsdigita/cms/basetypes/BasetypesResources_de.properties +++ b/ccm-cms/src/com/arsdigita/cms/basetypes/BasetypesResources_de.properties @@ -4,4 +4,10 @@ cms.basetypes.ui.address.city=Stadt cms.basetypes.ui.address.state=Bundesland cms.basetypes.ui.address.iso_country_code=Land cms.basetypes.ui.address.error_iso_country=Bitte w\u00E4hlen Sie ein Land aus + +cms.basetypes.ui.person.surname=Nachname +cms.basetypes.ui.person.givenname=Vorname +cms.basetypes.ui.person.titlepre=Titel +cms.basetypes.ui.person.titlepost=Namesanhang + address.authoring.basic_properties.title=Eigenschaften von Adresse \ No newline at end of file diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/ui/PersonPropertiesStep.java b/ccm-cms/src/com/arsdigita/cms/basetypes/ui/PersonPropertiesStep.java index 955c232f1..2ddbb4517 100644 --- a/ccm-cms/src/com/arsdigita/cms/basetypes/ui/PersonPropertiesStep.java +++ b/ccm-cms/src/com/arsdigita/cms/basetypes/ui/PersonPropertiesStep.java @@ -16,7 +16,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ - package com.arsdigita.cms.basetypes.ui; import com.arsdigita.bebop.Component; @@ -31,22 +30,22 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; -import com.arsdigita.cms.basetypes.util.BasetypesGlobalizationUtil; import com.arsdigita.cms.basetypes.util.BasetypesGlobalizationUtil; import java.text.DateFormat; public class PersonPropertiesStep extends SimpleEditStep { + public static final String EDIT_SHEET_NAME = "edit"; public PersonPropertiesStep(ItemSelectionModel itemModel, - AuthoringKitWizard parent) { - super(itemModel, parent); - - setDefaultEditKey(EDIT_SHEET_NAME); - createEditSheet(itemModel); - - setDisplayComponent(getPersonPropertySheet(itemModel)); + AuthoringKitWizard parent) { + super(itemModel, parent); + + setDefaultEditKey(EDIT_SHEET_NAME); + createEditSheet(itemModel); + + setDisplayComponent(getPersonPropertySheet(itemModel)); } protected void createEditSheet(ItemSelectionModel itemModel) { @@ -56,31 +55,31 @@ public class PersonPropertiesStep extends SimpleEditStep { } public static Component getPersonPropertySheet(ItemSelectionModel itemModel) { - DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel); + DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel); - sheet.add((String)BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.person.surname").localize(), Person.SURNAME); - sheet.add((String)BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.person.givenname").localize(), Person.GIVENNAME); - sheet.add((String)BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.person.titlepre").localize(), Person.TITLEPRE); - sheet.add((String)BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.person.titlepost").localize(), Person.TITLEPOST); - - if(!ContentSection.getConfig().getHideLaunchDate()) { - sheet.add((String)BasetypesGlobalizationUtil.globalize("cms.ui.authoring.page_launch_date").localize(), - ContentPage.LAUNCH_DATE, - new DomainObjectPropertySheet.AttributeFormatter() { - public String format(DomainObject item, - String attribute, - PageState state) { - ContentPage page = (ContentPage)item; - if (page.getLaunchDate() != null) { - return DateFormat.getDateInstance(DateFormat.LONG).format(page.getLaunchDate()); - } - else { - return (String)BasetypesGlobalizationUtil.globalize("cms.ui.unknown").localize(); - } - } - }); - } + sheet.add((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.person.surname").localize(), Person.SURNAME); + sheet.add((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.person.givenname").localize(), Person.GIVENNAME); + sheet.add((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.person.titlepre").localize(), Person.TITLEPRE); + sheet.add((String) BasetypesGlobalizationUtil.globalize("cms.basetypes.ui.person.titlepost").localize(), Person.TITLEPOST); - return sheet; + if (!ContentSection.getConfig().getHideLaunchDate()) { + sheet.add((String) BasetypesGlobalizationUtil.globalize("cms.ui.authoring.page_launch_date").localize(), + ContentPage.LAUNCH_DATE, + new DomainObjectPropertySheet.AttributeFormatter() { + + public String format(DomainObject item, + String attribute, + PageState state) { + ContentPage page = (ContentPage) item; + if (page.getLaunchDate() != null) { + return DateFormat.getDateInstance(DateFormat.LONG).format(page.getLaunchDate()); + } else { + return (String) BasetypesGlobalizationUtil.globalize("cms.ui.unknown").localize(); + } + } + }); + } + + return sheet; } -} \ No newline at end of file +} diff --git a/ccm-cms/src/com/arsdigita/cms/basetypes/util/BasetypesGlobalizationUtil.java b/ccm-cms/src/com/arsdigita/cms/basetypes/util/BasetypesGlobalizationUtil.java index 76286334e..3cd5fe277 100644 --- a/ccm-cms/src/com/arsdigita/cms/basetypes/util/BasetypesGlobalizationUtil.java +++ b/ccm-cms/src/com/arsdigita/cms/basetypes/util/BasetypesGlobalizationUtil.java @@ -23,7 +23,7 @@ import com.arsdigita.globalization.GlobalizedMessage; public class BasetypesGlobalizationUtil { final public static String BUNDLE_NAME = - "com.arsdigita.cms.basetypes.util.BaetypesResourceBundle"; + "com.arsdigita.cms.basetypes.util.BasetypesResourceBundle"; public static GlobalizedMessage globalize (String key) { return new GlobalizedMessage(key, BUNDLE_NAME);