From 33519442fd1082e4920df57b201947ab17514e8f Mon Sep 17 00:00:00 2001 From: jensp Date: Wed, 1 Apr 2015 14:59:27 +0000 Subject: [PATCH] Missing GlobalizationUtil for ccm-cms-types-bookmark git-svn-id: https://svn.libreccm.org/ccm/trunk@3305 8810af33-2d31-482b-a856-94f89814c4df --- .../contenttypes/ui/BookmarkPropertyForm.java | 7 +--- .../util/BookmarkGlobalizationUtil.java | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/util/BookmarkGlobalizationUtil.java diff --git a/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/ui/BookmarkPropertyForm.java b/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/ui/BookmarkPropertyForm.java index 29bb1caae..a88bf2648 100755 --- a/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/ui/BookmarkPropertyForm.java +++ b/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/ui/BookmarkPropertyForm.java @@ -20,7 +20,6 @@ package com.arsdigita.cms.contenttypes.ui; import com.arsdigita.cms.contenttypes.Bookmark; import com.arsdigita.bebop.FormData; -import com.arsdigita.bebop.Label; import com.arsdigita.bebop.event.FormInitListener; import com.arsdigita.bebop.event.FormProcessListener; 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.parameters.ParameterModel; import com.arsdigita.bebop.parameters.StringParameter; -import com.arsdigita.cms.AuthoringStep; 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.util.GlobalizationUtil; -import com.arsdigita.globalization.GlobalizedMessage; /** * 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))); final ParameterModel urlParam = new StringParameter(URL); final TextField url = new TextField(urlParam); - url.setLabel(GlobalizationUtil.globalize( + url.setLabel(BookmarkGlobalizationUtil.globalize( "cms.contenttypes.ui.bookmark.url")); url.setSize(40); add(url); diff --git a/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/util/BookmarkGlobalizationUtil.java b/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/util/BookmarkGlobalizationUtil.java new file mode 100644 index 000000000..b15d80dee --- /dev/null +++ b/ccm-cms-types-bookmark/src/com/arsdigita/cms/contenttypes/util/BookmarkGlobalizationUtil.java @@ -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 + */ +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); + } + +}