You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by rw...@apache.org on 2005/07/09 06:11:52 UTC
svn commit: r209924 - in /portals/jetspeed-2/branches/MENUS_BRANCH:
components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/
components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/
components/portal-site/src/test/org/...
Author: rwatler
Date: Fri Jul 8 21:11:50 2005
New Revision: 209924
URL: http://svn.apache.org/viewcvs?rev=209924&view=rev
Log:
support localized standard menu separator text
Added:
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators.properties (with props)
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_de.properties (with props)
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_en.properties (with props)
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_es.properties (with props)
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_fr.properties (with props)
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_it.properties (with props)
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_ja.properties (with props)
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_ko.properties (with props)
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_nl.properties (with props)
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_pt.properties (with props)
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_zh.properties (with props)
Modified:
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/StandardBackMenuDefinition.java
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/StandardNavigationsMenuDefinition.java
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/jetspeed/portalsite/TestPortalSite.java
portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_group/group/folder1/folder.metadata
portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-macros.vm
Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/StandardBackMenuDefinition.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/StandardBackMenuDefinition.java?rev=209924&r1=209923&r2=209924&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/StandardBackMenuDefinition.java (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/StandardBackMenuDefinition.java Fri Jul 8 21:11:50 2005
@@ -15,8 +15,15 @@
*/
package org.apache.jetspeed.portalsite.menu;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
import org.apache.jetspeed.om.folder.Folder;
import org.apache.jetspeed.om.folder.impl.StandardMenuDefinitionImpl;
+import org.apache.jetspeed.om.folder.impl.StandardMenuOptionsDefinitionImpl;
+import org.apache.jetspeed.om.folder.impl.StandardMenuSeparatorDefinitionImpl;
import org.apache.jetspeed.portalsite.view.SiteView;
/**
@@ -29,6 +36,12 @@
public class StandardBackMenuDefinition extends StandardMenuDefinitionImpl
{
/**
+ * menuElements - ordered polymorphic list of menu option, nested
+ * menu, separator, include, and exclude definitions
+ */
+ private List menuElements;
+
+ /**
* StandardBackMenuDefinition - constructor
*/
public StandardBackMenuDefinition()
@@ -47,12 +60,90 @@
}
/**
- * getOptions - get comma separated menu options if not specified as elements
+ * getMenuElements - get ordered list of menu options,
+ * nested menus, separators, included
+ * menu, and excluded menu elements
+ *
+ * @return element list
+ */
+ public List getMenuElements()
+ {
+ // instantiate menu elements if necessary
+ if (menuElements == null)
+ {
+ menuElements = new ArrayList(2);
+ menuElements.add(new StandardMenuSeparatorDefinitionImpl()
+ {
+ /**
+ * getText - get default text for separator
+ *
+ * @return text
+ */
+ public String getText()
+ {
+ // use locale defaults
+ return getMenuSeparatorText(null, "menu.separator.back");
+ }
+
+ /**
+ * getText - get locale specific text for separator from metadata
+ *
+ * @param locale preferred locale
+ * @return text
+ */
+ public String getText(Locale locale)
+ {
+ // use specified locale
+ return getMenuSeparatorText(locale, "menu.separator.back");
+ }
+ });
+ menuElements.add(new StandardMenuOptionsDefinitionImpl()
+ {
+ /**
+ * getOptions - get comma separated menu options
+ *
+ * @return option paths specification
+ */
+ public String getOptions()
+ {
+ return ".." + Folder.PATH_SEPARATOR;
+ }
+ });
+ }
+ return menuElements;
+ }
+
+ /**
+ * getSkin - get skin name for menu element
*
- * @return option paths specification
+ * @return skin name
*/
- public String getOptions()
+ public String getSkin()
{
- return ".." + Folder.PATH_SEPARATOR;
+ return "breadcrumbs";
+ }
+
+ /**
+ * getMenuSeparatorText - lookup resource bundle based on locale
+ * and use to extract menu separator text
+ *
+ * @param locale preferred locale
+ * @param key message key for text
+ */
+ private String getMenuSeparatorText(Locale locale, String key)
+ {
+ // get resource bundle
+ ResourceBundle bundle = null;
+ if (locale != null)
+ {
+ bundle = ResourceBundle.getBundle("org.apache.jetspeed.portalsite.menu.resources.MenuSeparators",locale);
+ }
+ else
+ {
+ bundle = ResourceBundle.getBundle("org.apache.jetspeed.portalsite.menu.resources.MenuSeparators");
+ }
+
+ // lookup and return keyed message
+ return bundle.getString(key);
}
}
Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/StandardNavigationsMenuDefinition.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/StandardNavigationsMenuDefinition.java?rev=209924&r1=209923&r2=209924&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/StandardNavigationsMenuDefinition.java (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/StandardNavigationsMenuDefinition.java Fri Jul 8 21:11:50 2005
@@ -17,6 +17,8 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
import org.apache.jetspeed.om.folder.Folder;
import org.apache.jetspeed.om.folder.impl.StandardMenuDefinitionImpl;
@@ -81,7 +83,20 @@
*/
public String getText()
{
- return "Folders";
+ // use locale defaults
+ return getMenuSeparatorText(null, "menu.separator.folders");
+ }
+
+ /**
+ * getText - get locale specific text for separator from metadata
+ *
+ * @param locale preferred locale
+ * @return text
+ */
+ public String getText(Locale locale)
+ {
+ // use specified locale
+ return getMenuSeparatorText(locale, "menu.separator.folders");
}
});
menuElements.add(new StandardMenuOptionsDefinitionImpl()
@@ -127,7 +142,20 @@
*/
public String getText()
{
- return "Additional Links";
+ // use locale defaults
+ return getMenuSeparatorText(null, "menu.separator.links");
+ }
+
+ /**
+ * getText - get locale specific text for separator from metadata
+ *
+ * @param locale preferred locale
+ * @return text
+ */
+ public String getText(Locale locale)
+ {
+ // use specified locale
+ return getMenuSeparatorText(locale, "menu.separator.links");
}
});
menuElements.add(new StandardMenuOptionsDefinitionImpl()
@@ -164,5 +192,29 @@
public String getSkin()
{
return "left-navigations";
+ }
+
+ /**
+ * getMenuSeparatorText - lookup resource bundle based on locale
+ * and use to extract menu separator text
+ *
+ * @param locale preferred locale
+ * @param key message key for text
+ */
+ private String getMenuSeparatorText(Locale locale, String key)
+ {
+ // get resource bundle
+ ResourceBundle bundle = null;
+ if (locale != null)
+ {
+ bundle = ResourceBundle.getBundle("org.apache.jetspeed.portalsite.menu.resources.MenuSeparators",locale);
+ }
+ else
+ {
+ bundle = ResourceBundle.getBundle("org.apache.jetspeed.portalsite.menu.resources.MenuSeparators");
+ }
+
+ // lookup and return keyed message
+ return bundle.getString(key);
}
}
Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators.properties?rev=209924&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators.properties (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators.properties Fri Jul 8 21:11:50 2005
@@ -0,0 +1,18 @@
+# Copyright 2005 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+## menu separators
+menu.separator.folders=Folders
+menu.separator.links=Additional Links
+menu.separator.back=Back to
Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_de.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_de.properties?rev=209924&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_de.properties (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_de.properties Fri Jul 8 21:11:50 2005
@@ -0,0 +1,18 @@
+# Copyright 2005 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+## menu separators
+menu.separator.folders=[de]Folders
+menu.separator.links=[de]Links
+menu.separator.back=[de]Back to
Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_de.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_en.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_en.properties?rev=209924&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_en.properties (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_en.properties Fri Jul 8 21:11:50 2005
@@ -0,0 +1,18 @@
+# Copyright 2005 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+## menu separators
+menu.separator.folders=Folders
+menu.separator.links=Additional Links
+menu.separator.back=Back to
Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_en.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_es.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_es.properties?rev=209924&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_es.properties (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_es.properties Fri Jul 8 21:11:50 2005
@@ -0,0 +1,18 @@
+# Copyright 2005 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+## menu separators
+menu.separator.folders=[es]Folders
+menu.separator.links=[es]Links
+menu.separator.back=[es]Back to
Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_es.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_fr.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_fr.properties?rev=209924&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_fr.properties (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_fr.properties Fri Jul 8 21:11:50 2005
@@ -0,0 +1,18 @@
+# Copyright 2005 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+## menu separators
+menu.separator.folders=[fr]Folders
+menu.separator.links=[fr]Links
+menu.separator.back=[fr]Back to
Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_fr.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_it.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_it.properties?rev=209924&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_it.properties (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_it.properties Fri Jul 8 21:11:50 2005
@@ -0,0 +1,18 @@
+# Copyright 2005 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+## menu separators
+menu.separator.folders=[it]Folders
+menu.separator.links=[it]Links
+menu.separator.back=[it]Back to
Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_it.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_ja.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_ja.properties?rev=209924&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_ja.properties (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_ja.properties Fri Jul 8 21:11:50 2005
@@ -0,0 +1,18 @@
+# Copyright 2005 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+## menu separators
+menu.separator.folders=[ja]Folders
+menu.separator.links=[ja]Links
+menu.separator.back=[ja]Back to
Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_ja.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_ko.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_ko.properties?rev=209924&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_ko.properties (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_ko.properties Fri Jul 8 21:11:50 2005
@@ -0,0 +1,18 @@
+# Copyright 2005 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+## menu separators
+menu.separator.folders=[ko]Folders
+menu.separator.links=[ko]Links
+menu.separator.back=[ko]Back to
Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_ko.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_nl.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_nl.properties?rev=209924&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_nl.properties (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_nl.properties Fri Jul 8 21:11:50 2005
@@ -0,0 +1,18 @@
+# Copyright 2005 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+## menu separators
+menu.separator.folders=[nl]Folders
+menu.separator.links=[nl]Links
+menu.separator.back=[nl]Back to
Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_nl.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_pt.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_pt.properties?rev=209924&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_pt.properties (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_pt.properties Fri Jul 8 21:11:50 2005
@@ -0,0 +1,18 @@
+# Copyright 2005 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+## menu separators
+menu.separator.folders=[pt]Folders
+menu.separator.links=[pt]Links
+menu.separator.back=[pt]Back to
Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_pt.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_zh.properties
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_zh.properties?rev=209924&view=auto
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_zh.properties (added)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_zh.properties Fri Jul 8 21:11:50 2005
@@ -0,0 +1,18 @@
+# Copyright 2005 The Apache Software Foundation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+## menu separators
+menu.separator.folders=[zh]Folders
+menu.separator.links=[zh]Links
+menu.separator.back=[zh]Back to
Propchange: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/java/org/apache/jetspeed/portalsite/menu/resources/MenuSeparators_zh.properties
------------------------------------------------------------------------------
svn:eol-style = native
Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/jetspeed/portalsite/TestPortalSite.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/jetspeed/portalsite/TestPortalSite.java?rev=209924&r1=209923&r2=209924&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/jetspeed/portalsite/TestPortalSite.java (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/src/test/org/apache/jetspeed/portalsite/TestPortalSite.java Fri Jul 8 21:11:50 2005
@@ -738,7 +738,7 @@
assertFalse(customMenu.isEmpty());
List customElements = customMenu.getElements();
assertNotNull(customElements);
- assertEquals(12, customElements.size());
+ assertEquals(13, customElements.size());
assertEquals("custom", customMenu.getName());
assertEquals("Top Menu", customMenu.getTitle());
assertEquals("Haut", customMenu.getTitle(Locale.FRENCH));
@@ -899,7 +899,7 @@
MenuElement element = (MenuElement)menuElementsIter.next();
if (element.getElementType().equals(MenuElement.SEPARATOR_ELEMENT_TYPE) &&
(element instanceof MenuSeparator) &&
- ((MenuSeparator)element).getText().equals("=== Standard Menus ==="))
+ ((MenuSeparator)element).getText().equals("Back to"))
{
}
else
@@ -915,6 +915,19 @@
assertTrue(element instanceof MenuOption);
assertEquals("/", ((MenuOption)element).getUrl());
assertEquals(MenuOption.FOLDER_OPTION_TYPE, ((MenuOption)element).getType());
+ }
+ else
+ {
+ fail("Unexpected menu element type/title: "+element.getElementType()+"/"+element.getTitle());
+ }
+ }
+ if (menuElementsIter.hasNext())
+ {
+ MenuElement element = (MenuElement)menuElementsIter.next();
+ if (element.getElementType().equals(MenuElement.SEPARATOR_ELEMENT_TYPE) &&
+ (element instanceof MenuSeparator) &&
+ ((MenuSeparator)element).getText().equals("=== Standard Menus ==="))
+ {
}
else
{
Modified: portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_group/group/folder1/folder.metadata
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_group/group/folder1/folder.metadata?rev=209924&r1=209923&r2=209924&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_group/group/folder1/folder.metadata (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/components/portal-site/testdata/pages/_group/group/folder1/folder.metadata Fri Jul 8 21:11:50 2005
@@ -49,8 +49,9 @@
<separator>=== More Options ===</separator>
<options regexp="true" order="*.link,/page[0-9].psml">@,/*.psml,/*.link</options>
<exclude>zero-root-options</exclude>
- <separator>=== Standard Menus ===</separator>
+ <separator>=== Ignored Replaced Separator ===</separator>
<include>back</include>
+ <separator>=== Standard Menus ===</separator>
<include nest="true">navigations</include>
<include nest="true">pages</include>
</menu>
Modified: portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-macros.vm
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-macros.vm?rev=209924&r1=209923&r2=209924&view=diff
==============================================================================
--- portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-macros.vm (original)
+++ portals/jetspeed-2/branches/MENUS_BRANCH/portal/src/webapp/WEB-INF/decorations/layout/html/tigris/decorator-macros.vm Fri Jul 8 21:11:50 2005
@@ -60,6 +60,14 @@
#elseif($_orientation == $TOP_TO_BOTTOM)
</div>
#end
+ #elseif($element.elementType == "separator")
+ #set($separatorTitle = $element.getTitle($preferedLocale))
+ #set($separatorText = $element.getText($preferedLocale))
+ #if($_orientation == $LEFT_TO_RIGHT)
+ <span title="$!separatorTitle">${separatorText} </span>
+ #elseif($_orientation == $TOP_TO_BOTTOM)
+ <div class="pagetitle" title="$!separatorTitle">${separatorText}</div>
+ #end
#end
#end
</div>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org