Weitere Verbesserung Multi-Language Support.

git-svn-id: https://svn.libreccm.org/ccm/trunk@2212 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2013-06-15 10:02:20 +00:00
parent 7639171263
commit 95e4e1fd99
6 changed files with 24 additions and 33 deletions

View File

@ -55,7 +55,7 @@ public class ArticlePropertiesStep extends GenericArticlePropertiesStep {
BasicPageForm editSheet; BasicPageForm editSheet;
editSheet = new ArticlePropertyForm(itemModel, this); editSheet = new ArticlePropertyForm(itemModel, this);
add(EDIT_SHEET_NAME, add(EDIT_SHEET_NAME,
"Edit", // curently add accepts just a String, not a Label GlobalizationUtil.globalize("cms.ui.edit"),
new WorkflowLockedComponentAccess(editSheet, itemModel), new WorkflowLockedComponentAccess(editSheet, itemModel),
editSheet.getSaveCancelSection().getCancelButton()); editSheet.getSaveCancelSection().getCancelButton());
} }

View File

@ -49,7 +49,8 @@ public class BookmarkPropertiesStep extends SimpleEditStep {
BasicPageForm editSheet; BasicPageForm editSheet;
editSheet = new BookmarkPropertyForm( itemModel ); editSheet = new BookmarkPropertyForm( itemModel );
add( EDIT_SHEET_NAME, "Edit", add( EDIT_SHEET_NAME,
GlobalizationUtil.globalize("cms.ui.edit"),
new WorkflowLockedComponentAccess(editSheet, itemModel), new WorkflowLockedComponentAccess(editSheet, itemModel),
editSheet.getSaveCancelSection().getCancelButton() ); editSheet.getSaveCancelSection().getCancelButton() );

View File

@ -286,7 +286,7 @@ cms.ui.authoring.sql_error_in_getting_byte_content=SQL Fehler beim Holen von Bin
cms.ui.authoring.sqle=SQLE cms.ui.authoring.sqle=SQLE
cms.ui.authoring.steps=Authoring steps cms.ui.authoring.steps=Authoring steps
cms.ui.authoring.submission_cancelled=Submission Cancelled cms.ui.authoring.submission_cancelled=Submission Cancelled
cms.ui.authoring.text_type=Text Type: cms.ui.authoring.text_type=Art des Textes:
cms.ui.authoring.this_article_does_not_have_an_image=Dieser Artikel hat kein Bild. cms.ui.authoring.this_article_does_not_have_an_image=Dieser Artikel hat kein Bild.
cms.ui.authoring.title=Titel der Seite: cms.ui.authoring.title=Titel der Seite:
cms.ui.authoring.unable_to_load_file=Datei konnte nicht geladen werden: cms.ui.authoring.unable_to_load_file=Datei konnte nicht geladen werden:

View File

@ -55,7 +55,9 @@ public abstract class ContentGroupPropertiesStep extends SimpleEditStep {
BasicItemForm editSheet; BasicItemForm editSheet;
editSheet = getPropertyForm(itemModel); editSheet = getPropertyForm(itemModel);
add( EDIT_SHEET_NAME, "Edit", editSheet, add( EDIT_SHEET_NAME,
GlobalizationUtil.globalize("cms.ui.edit"),
editSheet,
editSheet.getSaveCancelSection().getCancelButton() ); editSheet.getSaveCancelSection().getCancelButton() );
setDisplayComponent( getPropertySheet( itemModel ) ); setDisplayComponent( getPropertySheet( itemModel ) );

View File

@ -62,7 +62,7 @@ public class GenericAddressPropertiesStep extends SimpleEditStep {
BasicPageForm editSheet; BasicPageForm editSheet;
editSheet = new GenericAddressPropertyForm(itemModel, this); editSheet = new GenericAddressPropertyForm(itemModel, this);
add(EDIT_SHEET_NAME, add(EDIT_SHEET_NAME,
"Edit", GlobalizationUtil.globalize("cms.ui.edit"),
new WorkflowLockedComponentAccess(editSheet, itemModel), new WorkflowLockedComponentAccess(editSheet, itemModel),
editSheet.getSaveCancelSection().getCancelButton()); editSheet.getSaveCancelSection().getCancelButton());
} }
@ -74,6 +74,13 @@ public class GenericAddressPropertiesStep extends SimpleEditStep {
.globalize("cms.contenttypes.ui.title"), GenericAddress.TITLE); .globalize("cms.contenttypes.ui.title"), GenericAddress.TITLE);
sheet.add(GlobalizationUtil sheet.add(GlobalizationUtil
.globalize("cms.contenttypes.ui.name"), GenericAddress.NAME); .globalize("cms.contenttypes.ui.name"), GenericAddress.NAME);
if (!ContentSection.getConfig().getHideLaunchDate()) {
sheet.add(GlobalizationUtil
.globalize("cms.contenttypes.ui.launch_date"),
ContentPage.LAUNCH_DATE,
new LaunchDateAttributeFormatter() );
}
sheet.add(ContenttypesGlobalizationUtil sheet.add(ContenttypesGlobalizationUtil
.globalize("cms.contenttypes.ui.address.address"), .globalize("cms.contenttypes.ui.address.address"),
GenericAddress.ADDRESS); GenericAddress.ADDRESS);
@ -107,29 +114,6 @@ public class GenericAddressPropertiesStep extends SimpleEditStep {
} }
}); });
if (!ContentSection.getConfig().getHideLaunchDate()) {
sheet.add(GlobalizationUtil
.globalize("cms.ui.authoring.page_launch_date"),
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) GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
});
}
return sheet; return sheet;
} }
} }

View File

@ -135,21 +135,25 @@ public abstract class TextAssetBody extends SecurityPropertyEditor
if (!s_config.getHideTextAssetUploadFile()) { if (!s_config.getHideTextAssetUploadFile()) {
PageFileForm f = getPageFileForm(); PageFileForm f = getPageFileForm();
addFileWidgets(f); addFileWidgets(f);
add(FILE_UPLOAD, "Upload a file", f, add(FILE_UPLOAD,
GlobalizationUtil.globalize("cms.ui.upload"),
f,
f.getSaveCancelSection().getCancelButton()); f.getSaveCancelSection().getCancelButton());
} }
PageTextForm t = new PageTextForm(); PageTextForm t = new PageTextForm();
addTextWidgets(t); addTextWidgets(t);
add(TEXT_ENTRY, "Edit as text", t, add(TEXT_ENTRY,
GlobalizationUtil.globalize("cms.ui.edit"),
t,
t.getSaveCancelSection().getCancelButton()); t.getSaveCancelSection().getCancelButton());
// Specify full path to properties of the text asset // Specify full path to properties of the text asset
DomainObjectPropertySheet sheet = getBodyPropertySheet(assetModel); DomainObjectPropertySheet sheet = getBodyPropertySheet(assetModel);
sheet.add("Text Type:", sheet.add(GlobalizationUtil.globalize("cms.ui.authoring.text_type"),
Asset.MIME_TYPE + "." + MimeType.LABEL); Asset.MIME_TYPE + "." + MimeType.LABEL);
sheet.add((String) GlobalizationUtil.globalize("cms.ui.authoring.body"). sheet.add(GlobalizationUtil.globalize("cms.ui.authoring.body"),
localize(), TextAsset.CONTENT); TextAsset.CONTENT);
setDisplayComponent(sheet); setDisplayComponent(sheet);