Missing GlobalizationUtil for ccm-cms-types-bookmark

git-svn-id: https://svn.libreccm.org/ccm/trunk@3305 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2015-04-01 14:59:27 +00:00
parent 8849a83bd7
commit 33519442fd
2 changed files with 43 additions and 5 deletions

View File

@ -20,7 +20,6 @@ package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.cms.contenttypes.Bookmark; import com.arsdigita.cms.contenttypes.Bookmark;
import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.Label;
import com.arsdigita.bebop.event.FormInitListener; import com.arsdigita.bebop.event.FormInitListener;
import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormProcessListener;
import com.arsdigita.bebop.event.FormSectionEvent; import com.arsdigita.bebop.event.FormSectionEvent;
@ -28,12 +27,10 @@ import com.arsdigita.bebop.form.TextArea;
import com.arsdigita.bebop.form.TextField; import com.arsdigita.bebop.form.TextField;
import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.bebop.parameters.StringParameter;
import com.arsdigita.cms.AuthoringStep;
import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.contenttypes.util.BookmarkGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.cms.util.GlobalizationUtil;
import com.arsdigita.globalization.GlobalizedMessage;
/** /**
* to edit BasicPageForm the basic properties of an Bookmark. This form can be * to edit BasicPageForm the basic properties of an Bookmark. This form can be
@ -94,7 +91,7 @@ public class BookmarkPropertyForm extends BasicPageForm
// add(new Label(new GlobalizedMessage("cms.contenttypes.ui.bookmark.url", Bookmark.RESOURCES))); // add(new Label(new GlobalizedMessage("cms.contenttypes.ui.bookmark.url", Bookmark.RESOURCES)));
final ParameterModel urlParam = new StringParameter(URL); final ParameterModel urlParam = new StringParameter(URL);
final TextField url = new TextField(urlParam); final TextField url = new TextField(urlParam);
url.setLabel(GlobalizationUtil.globalize( url.setLabel(BookmarkGlobalizationUtil.globalize(
"cms.contenttypes.ui.bookmark.url")); "cms.contenttypes.ui.bookmark.url"));
url.setSize(40); url.setSize(40);
add(url); add(url);

View File

@ -0,0 +1,41 @@
/*
* Copyright (C) 2015 Jens Pelzetter 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.GlobalizedMessage;
/**
*
* @author Jens Pelzetter <jens@jp-digital.de>
*/
public class BookmarkGlobalizationUtil {
private static final String BUNDLE_NAME
= "com.arsdigita.cms.contenttypes.BookmarkResources";
public static GlobalizedMessage globalize(final String key) {
return new GlobalizedMessage(key, BUNDLE_NAME);
}
public static GlobalizedMessage globalizedMessage(final String key,
final Object[] args) {
return new GlobalizedMessage(key, BUNDLE_NAME, args);
}
}