From a266aab21c3c0dd5749bae2f0aaded633d93bd2a Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Tue, 22 May 2007 04:47:14 +0000 Subject: [PATCH] Phase one of merge of EC multilingual work These files are their changes plus adjustments for formatting and immediate clashes I anticipate that this will break the build, but there are too many changes coming to risk it. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5740 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/messages/webclient.properties | 64 +- config/alfresco/web-client-config-actions.xml | 225 +- config/alfresco/web-client-config-dialogs.xml | 33 +- .../web-client-config-forum-actions.xml | 2 +- .../alfresco/web-client-config-properties.xml | 122 +- .../evaluator/AddTranslationEvaluator.java | 70 + .../evaluator/CheckoutDocEvaluator.java | 3 +- .../action/evaluator/CutNodeEvaluator.java | 59 + .../action/evaluator/DeleteDocEvaluator.java | 36 +- .../evaluator/DiscussionCutCopyEvaluator.java | 7 + .../evaluator/EditDocHttpEvaluator.java | 8 +- .../evaluator/MakeMultilingualEvaluator.java | 62 + .../MultilingualDetailsEvaluator.java | 48 + .../evaluator/StartWorkflowEvaluator.java | 7 +- .../org/alfresco/web/bean/BrowseBean.java | 52 +- .../CreateMultilingualPropertiesBean.java | 224 ++ .../web/bean/DocumentDetailsBean.java | 106 + .../web/bean/UserPreferencesBean.java | 169 +- .../generator/LanguageSelectorGenerator.java | 111 + .../MlContainerLanguageSelectorGenerator.java | 112 + .../AddTranslationWithoutContentDialog.java | 225 ++ .../web/bean/ml/AddTranslationlDialog.java | 211 ++ .../web/bean/ml/EditMLContainerDialog.java | 140 ++ .../web/bean/ml/MakeMultilingualDialog.java | 288 +++ .../CreateMultilingualPropertiesDialog.java | 72 + .../CreateMultilingualPropertiesWizard.java | 160 ++ .../spaces/CreateMultilingualSpaceDialog.java | 95 + .../spaces/CreateMultilingualSpaceWizard.java | 224 ++ .../web/bean/spaces/CreateSpaceWizard.java | 212 +- .../web/bean/spaces/EditSpaceDialog.java | 96 +- .../ui/repo/component/UILanguageSelector.java | 144 ++ .../ui/repo/converter/LanguageConverter.java | 86 + .../web/ui/repo/tag/LanguageSelectorTag.java | 154 ++ source/web/WEB-INF/faces-config-beans.xml | 168 ++ .../web/WEB-INF/faces-config-navigation.xml | 1871 +++++++++-------- source/web/WEB-INF/faces-config-repo.xml | 10 + source/web/WEB-INF/repo.tld | 49 + source/web/css/main.css | 12 + source/web/jsp/browse/browse.jsp | 10 +- source/web/jsp/dialog/document-details.jsp | 102 + source/web/jsp/ml/add-translation-dialog.jsp | 380 ++++ .../ml/add-translation-without-content.jsp | 82 + .../web/jsp/ml/edit-ml-container-dialog.jsp | 38 + .../web/jsp/ml/make-multilingual-dialog.jsp | 80 + source/web/jsp/ml/ml-container-details.jsp | 247 +++ source/web/jsp/spaces/edit-space-dialog.jsp | 4 + .../create-multilingual-properties-dialog.jsp | 147 ++ .../ml/create-multilingual-space-dialog.jsp | 173 ++ 48 files changed, 5780 insertions(+), 1220 deletions(-) create mode 100644 source/java/org/alfresco/web/action/evaluator/AddTranslationEvaluator.java create mode 100644 source/java/org/alfresco/web/action/evaluator/CutNodeEvaluator.java create mode 100644 source/java/org/alfresco/web/action/evaluator/MakeMultilingualEvaluator.java create mode 100644 source/java/org/alfresco/web/action/evaluator/MultilingualDetailsEvaluator.java create mode 100644 source/java/org/alfresco/web/bean/CreateMultilingualPropertiesBean.java create mode 100644 source/java/org/alfresco/web/bean/generator/LanguageSelectorGenerator.java create mode 100644 source/java/org/alfresco/web/bean/generator/MlContainerLanguageSelectorGenerator.java create mode 100644 source/java/org/alfresco/web/bean/ml/AddTranslationWithoutContentDialog.java create mode 100644 source/java/org/alfresco/web/bean/ml/AddTranslationlDialog.java create mode 100644 source/java/org/alfresco/web/bean/ml/EditMLContainerDialog.java create mode 100644 source/java/org/alfresco/web/bean/ml/MakeMultilingualDialog.java create mode 100644 source/java/org/alfresco/web/bean/spaces/CreateMultilingualPropertiesDialog.java create mode 100644 source/java/org/alfresco/web/bean/spaces/CreateMultilingualPropertiesWizard.java create mode 100644 source/java/org/alfresco/web/bean/spaces/CreateMultilingualSpaceDialog.java create mode 100644 source/java/org/alfresco/web/bean/spaces/CreateMultilingualSpaceWizard.java create mode 100644 source/java/org/alfresco/web/ui/repo/component/UILanguageSelector.java create mode 100644 source/java/org/alfresco/web/ui/repo/converter/LanguageConverter.java create mode 100644 source/java/org/alfresco/web/ui/repo/tag/LanguageSelectorTag.java create mode 100644 source/web/jsp/ml/add-translation-dialog.jsp create mode 100644 source/web/jsp/ml/add-translation-without-content.jsp create mode 100644 source/web/jsp/ml/edit-ml-container-dialog.jsp create mode 100644 source/web/jsp/ml/make-multilingual-dialog.jsp create mode 100644 source/web/jsp/ml/ml-container-details.jsp create mode 100644 source/web/jsp/spaces/ml/create-multilingual-properties-dialog.jsp create mode 100644 source/web/jsp/spaces/ml/create-multilingual-space-dialog.jsp diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 604688b257..faa0936697 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -1,5 +1,46 @@ # I18N message properties +# Multilingual +make_multilingual=Make Multilingual +make_multilingual_tooltip=Make this document multilingual +make_multilingual_description=Transform this document as a multilingual document. +error_make_multilingual_dialog=Unable to make this file multilingual. +add_translation=Add Translation +add_translation_tooltip=Add a translation to this document +add_translation_description=Add a translation to the document. +error_add_translation_dialog=Unable to add a translation. +trad_exists_error=A traduction already exists for this locale. +add_translation_wc=Add Translation Without Content +add_translation_wc_tooltip=Add a translation without content to the document +add_translation_wc_description=Add a translation to the document's properties. +error_add_translation_wc_dialog=Unable to add a translation without content. +create_properties_close=Add new properties when the dialog closes +ml_common_content_properties=Common Multilingual Content Properties +ml_other_options=Other Options +ml_add_trans_when_diag_close=Add translation when this dialog closes. +ml_with_content=With content +ml_just_trans_info=Without content (just translation information) +not_multilingual=This document has no multilinguism aspect. +allow_multilinguism=Allow Multilinguism Aspect +select_language= + + + + + + 2. <%=Application.getMessage(FacesContext.getCurrentInstance(), "click_upload")%> + + + + " /> + + + + <% } %> + + + <% if (fileUploaded) { %> + + + + + + + + + + +
+
+ + + + + + +   + + + + + + + + + + + + + + + + + + + + + + + + <%-- language selection drop-down --%> + + + + + + + + + + + + + + <% if (dialog.getOtherPropertiesChoiceVisible()) { %> + + + + +   + + + + + + + + + + + + + + + +
+ + + +
+ + + <% } } %> + + + <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> + + + + <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> + + + + + + + +
+ +
+ +
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> + + + + + + + + <%-- separator row with bottom panel graphics --%> + + + + + + + + + + + + +
+ + \ No newline at end of file diff --git a/source/web/jsp/ml/add-translation-without-content.jsp b/source/web/jsp/ml/add-translation-without-content.jsp new file mode 100644 index 0000000000..45b57f4b6c --- /dev/null +++ b/source/web/jsp/ml/add-translation-without-content.jsp @@ -0,0 +1,82 @@ +<%-- + * Copyright (C) 2005-2007 Alfresco Software Limited. + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program 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 General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" +--%> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> +<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> +<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/web/jsp/ml/edit-ml-container-dialog.jsp b/source/web/jsp/ml/edit-ml-container-dialog.jsp new file mode 100644 index 0000000000..2d5e3e8163 --- /dev/null +++ b/source/web/jsp/ml/edit-ml-container-dialog.jsp @@ -0,0 +1,38 @@ +<%-- + * Copyright (C) 2005-2007 Alfresco Software Limited. + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR Alan PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" +--%> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> +<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> + + + + + + diff --git a/source/web/jsp/ml/make-multilingual-dialog.jsp b/source/web/jsp/ml/make-multilingual-dialog.jsp new file mode 100644 index 0000000000..e504455e84 --- /dev/null +++ b/source/web/jsp/ml/make-multilingual-dialog.jsp @@ -0,0 +1,80 @@ +<%-- +Copyright (C) 2005 Alfresco, Inc. + +Licensed under the Mozilla Public License version 1.1 +with a permitted attribution clause. You may obtain a +copy of the License at + +http://www.alfresco.org/legal/license.txt + +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. +--%> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> +<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> +<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> + + + + + + + + + + + + + <%-- language selection drop-down --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/web/jsp/ml/ml-container-details.jsp b/source/web/jsp/ml/ml-container-details.jsp new file mode 100644 index 0000000000..6a482fec32 --- /dev/null +++ b/source/web/jsp/ml/ml-container-details.jsp @@ -0,0 +1,247 @@ +<%-- + * Copyright (C) 2005-2007 Alfresco Software Limited. + + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program 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 General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + * As a special exception to the terms and conditions of version 2.0 of + * the GPL, you may redistribute this Program in connection with Free/Libre + * and Open Source Software ("FLOSS") applications as described in Alfresco's + * FLOSS exception. You should have recieved a copy of the text describing + * the FLOSS exception, and it is also available here: + * http://www.alfresco.com/legal/licensing" +--%> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> +<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> + +<%@ page buffer="64kb" contentType="text/html;charset=UTF-8" %> +<%@ page isELIgnored="false" %> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> + + + + + + + <%-- load a bundle of properties with I18N strings --%> + + + + + <%-- Main outer table --%> + + + <%-- Title bar --%> + + + + + <%-- Main area --%> + + <%-- Shelf --%> + + + <%-- Work Area --%> + + +
+ <%@ include file="../parts/titlebar.jsp" %> +
+ <%@ include file="../parts/shelf.jsp" %> + + + <%-- Breadcrumb --%> + <%@ include file="../parts/breadcrumb.jsp" %> + + <%-- Status and Actions --%> + + + + + + + <%-- separator row with gradient shadow --%> + + + + + + + <%-- Error Messages --%> + + + + + + + <%-- Details --%> + + + + + + + <%-- separator row with bottom panel graphics --%> + + + + + + +
+ + <%-- Status and Actions inner contents table --%> + <%-- Generally this consists of an icon, textual summary and actions for the current object --%> + + + + + +
+ + +
+ '' +
+
+
+
+ <%-- messages tag to show messages not handled by other specific message tags --%> + +
+ + + + +
+ <%-- wrapper comment used by the panel to add additional component facets --%> + + + + + + + + + + + <%-- + Multlingual details + --%> + + <%-- properties for Ml container --%> + + + + + + + + + + + + + + + +
+ + <%-- list of translations --%> + + + + + <%-- Icon details view mode --%> + + + + + + + + <%-- Name Columns --%> + + + + + + + + <%-- Language columns --%> + + + + + + + + <%-- view actions --%> + + + + + + + + + + + + + + + + +
+ + <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> + + + + +
+ +
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> + +
+ + <%-- Document Actions --%> + + + +
+
+
+ +
+ +
+ +
\ No newline at end of file diff --git a/source/web/jsp/spaces/edit-space-dialog.jsp b/source/web/jsp/spaces/edit-space-dialog.jsp index 619c645e77..cd9d17add6 100644 --- a/source/web/jsp/spaces/edit-space-dialog.jsp +++ b/source/web/jsp/spaces/edit-space-dialog.jsp @@ -31,8 +31,12 @@ + + + + diff --git a/source/web/jsp/spaces/ml/create-multilingual-properties-dialog.jsp b/source/web/jsp/spaces/ml/create-multilingual-properties-dialog.jsp new file mode 100644 index 0000000000..12ec1e1726 --- /dev/null +++ b/source/web/jsp/spaces/ml/create-multilingual-properties-dialog.jsp @@ -0,0 +1,147 @@ +<%-- +* Copyright (C) 2005-2007 Alfresco Software Limited. + +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. + +* This program 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 General Public License for more details. + +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +* As a special exception to the terms and conditions of version 2.0 of +* the GPL, you may redistribute this Program in connection with Free/Libre +* and Open Source Software ("FLOSS") applications as described in Alfresco's +* FLOSS exception. You should have recieved a copy of the text describing +* the FLOSS exception, and it is also available here: +* http://www.alfresco.com/legal/licensing" +--%> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> +<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + +
+ + + + + + + + + + + + + <%-- existing properties --%> + + + + +
+ + + + + + + + + + <%-- existing properties --%> + + + + +
+
+ + + + + +
+ + + + + + + + + + + + + + + +
+ + + diff --git a/source/web/jsp/spaces/ml/create-multilingual-space-dialog.jsp b/source/web/jsp/spaces/ml/create-multilingual-space-dialog.jsp new file mode 100644 index 0000000000..bad6dae316 --- /dev/null +++ b/source/web/jsp/spaces/ml/create-multilingual-space-dialog.jsp @@ -0,0 +1,173 @@ +<%-- +* Copyright (C) 2005-2007 Alfresco Software Limited. + +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. + +* This program 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 General Public License for more details. + +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +* As a special exception to the terms and conditions of version 2.0 of +* the GPL, you may redistribute this Program in connection with Free/Libre +* and Open Source Software ("FLOSS") applications as described in Alfresco's +* FLOSS exception. You should have recieved a copy of the text describing +* the FLOSS exception, and it is also available here: +* http://www.alfresco.com/legal/licensing" +--%> +<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> +<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> +<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + +
+ + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + +
+
+ + + + + +