Basetypes Globalization repariert
git-svn-id: https://svn.libreccm.org/ccm/trunk@426 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
08744c27f0
commit
9a8718f86d
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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,12 +30,12 @@ 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,
|
||||
|
|
@ -58,24 +57,24 @@ public class PersonPropertiesStep extends SimpleEditStep {
|
|||
public static Component getPersonPropertySheet(ItemSelectionModel 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);
|
||||
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(),
|
||||
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;
|
||||
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();
|
||||
} else {
|
||||
return (String) BasetypesGlobalizationUtil.globalize("cms.ui.unknown").localize();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue