Anpassung und Vervollständigung ResourceBundles sowie Sprachumschaltung abgeschlossen.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2196 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
4845af7490
commit
d4f138bc48
|
|
@ -0,0 +1 @@
|
||||||
|
cms.contenttypes.ui.inlinesite.url=Site Url:
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
cms.contenttypes.ui.inlinesite.url=Url der Seite:
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
cms.contenttypes.ui.inlinesite.url=Site URL:
|
||||||
|
|
@ -21,12 +21,19 @@ package com.arsdigita.cms.contenttypes.ui;
|
||||||
import com.arsdigita.cms.contenttypes.InlineSite;
|
import com.arsdigita.cms.contenttypes.InlineSite;
|
||||||
|
|
||||||
import com.arsdigita.bebop.Component;
|
import com.arsdigita.bebop.Component;
|
||||||
|
import com.arsdigita.bebop.PageState;
|
||||||
|
import com.arsdigita.cms.ContentPage;
|
||||||
|
import com.arsdigita.cms.ContentSection;
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
|
import com.arsdigita.cms.contenttypes.util.InlineSiteGlobalizationUtil;
|
||||||
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
|
||||||
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
import com.arsdigita.cms.ui.authoring.SimpleEditStep;
|
||||||
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
||||||
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
|
import com.arsdigita.domain.DomainObject;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -65,10 +72,39 @@ public class InlineSitePropertiesStep
|
||||||
itemModel ) {
|
itemModel ) {
|
||||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet( itemModel );
|
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet( itemModel );
|
||||||
|
|
||||||
sheet.add( "Name:", InlineSite.NAME );
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"),
|
||||||
sheet.add( "Title:", InlineSite.TITLE );
|
InlineSite.TITLE);
|
||||||
sheet.add( "Description:", InlineSite.DESCRIPTION);
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"),
|
||||||
sheet.add( "URL:", InlineSite.URL );
|
InlineSite.NAME );
|
||||||
|
|
||||||
|
if (!ContentSection.getConfig().getHideLaunchDate()) {
|
||||||
|
sheet.add(GlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.launch_date"),
|
||||||
|
ContentPage.LAUNCH_DATE,
|
||||||
|
new DomainObjectPropertySheet.AttributeFormatter() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
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) GlobalizationUtil
|
||||||
|
.globalize("cms.ui.unknown")
|
||||||
|
.localize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
sheet.add( GlobalizationUtil.globalize("cms.contenttypes.ui.summary"),
|
||||||
|
InlineSite.DESCRIPTION);
|
||||||
|
sheet.add( InlineSiteGlobalizationUtil
|
||||||
|
.globalize("cms.contenttypes.ui.inlinesite.url"),
|
||||||
|
InlineSite.URL );
|
||||||
|
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
* the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package com.arsdigita.cms.contenttypes.util;
|
||||||
|
|
||||||
|
import com.arsdigita.globalization.Globalized;
|
||||||
|
import com.arsdigita.globalization.GlobalizedMessage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compilation of methods to simplify the handling of globalizing keys.
|
||||||
|
* Basically it adds the name of package's resource bundle files to the
|
||||||
|
* globalize methods and forwards to GlobalizedMessage, shortening the
|
||||||
|
* method invocation in the various application classes.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:randyg@arsdigita.com">randyg@arsdigita.com</a>
|
||||||
|
* @version $Revision: #4 $ $Date: 2004/08/17 $
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class InlineSiteGlobalizationUtil implements Globalized {
|
||||||
|
|
||||||
|
/** Name of Java resource files to handle FAQ's globalisation. */
|
||||||
|
final public static String BUNDLE_NAME =
|
||||||
|
"com.arsdigita.cms.contenttypes.InlineSiteResources";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This returns a globalized message using the package specific bundle,
|
||||||
|
* provided by BUNDLE_NAME.
|
||||||
|
*/
|
||||||
|
public static GlobalizedMessage globalize(String key) {
|
||||||
|
return new GlobalizedMessage(key, BUNDLE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a globalized message object, using the package specific bundle,
|
||||||
|
* as specified by BUNDLE_NAME. Also takes in an Object[] of arguments to
|
||||||
|
* interpolate into the retrieved message using the MessageFormat class.
|
||||||
|
*/
|
||||||
|
public static GlobalizedMessage globalize(String key, Object[] args) {
|
||||||
|
return new GlobalizedMessage(key, BUNDLE_NAME, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
* the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package com.arsdigita.cms.contenttypes.util;
|
||||||
|
|
||||||
|
import com.arsdigita.globalization.Globalized;
|
||||||
|
import com.arsdigita.globalization.GlobalizedMessage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compilation of methods to simplify the handling of globalizing keys.
|
||||||
|
* Basically it adds the name of package's resource bundle files to the
|
||||||
|
* globalize methods and forwards to GlobalizedMessage, shortening the
|
||||||
|
* method invocation in the various application classes.
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:randyg@arsdigita.com">randyg@arsdigita.com</a>
|
||||||
|
* @version $Revision: #4 $ $Date: 2004/08/17 $
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class LegalNoticeGlobalizationUtil implements Globalized {
|
||||||
|
|
||||||
|
/** Name of Java resource files to handle FAQ's globalisation. */
|
||||||
|
final public static String BUNDLE_NAME =
|
||||||
|
"com.arsdigita.cms.contenttypes.LegalNoticeResources";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This returns a globalized message using the package specific bundle,
|
||||||
|
* provided by BUNDLE_NAME.
|
||||||
|
*/
|
||||||
|
public static GlobalizedMessage globalize(String key) {
|
||||||
|
return new GlobalizedMessage(key, BUNDLE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a globalized message object, using the package specific bundle,
|
||||||
|
* as specified by BUNDLE_NAME. Also takes in an Object[] of arguments to
|
||||||
|
* interpolate into the retrieved message using the MessageFormat class.
|
||||||
|
*/
|
||||||
|
public static GlobalizedMessage globalize(String key, Object[] args) {
|
||||||
|
return new GlobalizedMessage(key, BUNDLE_NAME, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue