From da58216124b61bf2986b55cb14cda1abb94dcb9f Mon Sep 17 00:00:00 2001 From: tosmers Date: Sun, 15 Feb 2015 16:17:07 +0000 Subject: [PATCH] =?UTF-8?q?[UPDATE]=20In=20der=20Klasse=20ccm-cms/src/com/?= =?UTF-8?q?arsdigita/cms/contenttypes/ui/AbstractTextUploadForm.java=20die?= =?UTF-8?q?=20FormProcessException=20in=20den=20Zeilen=20236,=20244,=20262?= =?UTF-8?q?,=20285=20und=20319=20umgebaut.=20Zeilenumbr=C3=BCchen=20in=20c?= =?UTF-8?q?cm-cms/src/com/arsdigita/cms/ui/authoring/TextAssetBody.java=20?= =?UTF-8?q?eingef=C3=BCgt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@3186 8810af33-2d31-482b-a856-94f89814c4df --- .../com/arsdigita/cms/CMSResources.properties | 1 - .../arsdigita/cms/CMSResources_de.properties | 1 - .../cms/CMSResources_en_GB.properties | 1 - .../arsdigita/cms/CMSResources_fr.properties | 1 - .../ui/AbstractTextUploadForm.java | 25 +++++++------------ .../cms/ui/authoring/TextAssetBody.java | 9 ++++--- 6 files changed, 15 insertions(+), 23 deletions(-) diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources.properties index e261e08d9..f417b9a6d 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources.properties @@ -1106,4 +1106,3 @@ cms.ui.authoring.invalid_file_type=Files with invalide type connot be loaded int cms.ui.authoring.couldnt_convert_missing_inso=Could not convert to html format because interMedia INSO filter is not installed cms.ui.authoring.couldnt_convert_inso_failed=Could not convert to html format because interMedia INSO filter conversion failed cms.ui.authoring.html_file_missing_body_tags=The file (which should be type HTML) is missing the or tag. -cms.contenttypes.ui.cannot_load_files_into_article_body=Cannot load files of type {0} into the article body diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties index 8a6220aea..aaee842dd 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources_de.properties @@ -1100,4 +1100,3 @@ cms.ui.authoring.invalid_file_type=Dateien mit ung\u00fcltigem Typ k\u00f6nnen n cms.ui.authoring.couldnt_convert_missing_inso=Konnte nicht ins html Format umgewandelt werden, da der interMedia INSO Filter nicht installiert ist cms.ui.authoring.couldnt_convert_inso_failed=Konnte nicht ins html Format umgewandelt werden, da die interMedia INSO Umwandlung fehlschlug cms.ui.authoring.html_file_missing_body_tags=Der Datei (vom Type HTML) fehlt der oder Tag -cms.contenttypes.ui.cannot_load_files_into_article_body=Dateine vom Typ {0} k\u00f6nnen nicht in den Artikel-K\u00f6rper geladen werden diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties index 9733eb18e..a66dd1f36 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources_en_GB.properties @@ -144,4 +144,3 @@ cms.ui.authoring.invalid_file_type= cms.ui.authoring.couldnt_convert_missing_inso= cms.ui.authoring.couldnt_convert_inso_failed= cms.ui.authoring.html_file_missing_body_tags= -cms.contenttypes.ui.cannot_load_files_into_article_body= diff --git a/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties b/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties index 7fe069697..844c117f3 100755 --- a/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties +++ b/ccm-cms/src/com/arsdigita/cms/CMSResources_fr.properties @@ -616,4 +616,3 @@ cms.ui.authoring.invalid_file_type=Fichiers de type invalide connot \u00eatre ch cms.ui.authoring.couldnt_convert_missing_inso=Impossible de convertir au format HTML car le filtre interMedia INSO n'est pas install\u00e9 cms.ui.authoring.couldnt_convert_inso_failed=Impossible de convertir au format HTML car la conversion de filtre interMedia INSO a \u00e9chou\u00e9 cms.ui.authoring.html_file_missing_body_tags=Le fichier (qui devrait \u00eatre de type HTML) est absent de la ou -cms.contenttypes.ui.cannot_load_files_into_article_body=Impossible de charger les fichiers de type {0} dans le corps de l'article diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/AbstractTextUploadForm.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/AbstractTextUploadForm.java index f1df1c2be..32b3f1188 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/AbstractTextUploadForm.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/AbstractTextUploadForm.java @@ -234,17 +234,15 @@ public abstract class AbstractTextUploadForm if (!validType) { throw new FormProcessException(GlobalizationUtil.globalize( - "cms.contenttypes.ui.cannot_load_files_into_article_body", new Object[]{mime. - getMimeType()})); + "cms.ui.authoring.invalid_file_type")); } else { boolean insoWorks = MimeTypeStatus.getMimeTypeStatus(). getInsoFilterWorks().intValue() == 1; if (!textType && !insoWorks) { // Can't convert. inso filter is not working. Give message. - throw new FormProcessException( - "Could not convert to html " - + "format because interMedia INSO filter is not installed."); + throw new FormProcessException(GlobalizationUtil.globalize( + "cms.ui.authoring.couldnt_convert_missing_inso")); } } } @@ -260,10 +258,8 @@ public abstract class AbstractTextUploadForm fs.read(file_bytes); fs.close(); } catch (Exception e) { - throw new FormProcessException( - ((String) GlobalizationUtil.globalize( - "cms.ui.authoring.unable_to_load_file"). - localize()).concat(e.getMessage())); + throw new FormProcessException(GlobalizationUtil.globalize( + "cms.ui.authoring.unable_to_load_file")); } return file_bytes; } @@ -283,9 +279,8 @@ public abstract class AbstractTextUploadForm // Converted successfully, flag type should be html used_inso[0] = true; } else { - throw new FormProcessException( - "Could not convert to html format. " - + "interMedia INSO filter conversion failed."); + throw new FormProcessException(GlobalizationUtil.globalize( + "cms.ui.authoring.couldnt_convert_inso_failed")); } } else { // Text type, no need to convert @@ -314,10 +309,8 @@ public abstract class AbstractTextUploadForm int bodyStart_v = lc.indexOf(">", bodyStart); int bodyEnd = lc.indexOf("", bodyStart_v); if (bodyStart == -1 || bodyEnd == -1) { - final String errMsg = - "The file (which should be type " - + "HTML) is missing the or tag."; - throw new FormProcessException(errMsg); + throw new FormProcessException(GlobalizationUtil.globalize( + "cms.ui.authoring.html_file_missing_body_tags")); } return htmlText.substring(bodyStart_v + 1, bodyEnd); } diff --git a/ccm-cms/src/com/arsdigita/cms/ui/authoring/TextAssetBody.java b/ccm-cms/src/com/arsdigita/cms/ui/authoring/TextAssetBody.java index 12548e791..483e14761 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/authoring/TextAssetBody.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/authoring/TextAssetBody.java @@ -331,7 +331,8 @@ public abstract class TextAssetBody extends SecurityPropertyEditor allowINSOConvert().booleanValue()); if (!validType) { - throw new FormProcessException(GlobalizationUtil.globalize("cms.ui.authoring.invalid_file_type")); + throw new FormProcessException(GlobalizationUtil.globalize( + "cms.ui.authoring.invalid_file_type")); } boolean insoWorks = MimeTypeStatus.getMimeTypeStatus(). @@ -339,7 +340,8 @@ public abstract class TextAssetBody extends SecurityPropertyEditor if (!textType && !insoWorks) { // Can't convert. inso filter is not working. Give message. - throw new FormProcessException(GlobalizationUtil.globalize("cms.ui.authoring.couldnt_convert_missing_inso")); + throw new FormProcessException(GlobalizationUtil.globalize( + "cms.ui.authoring.couldnt_convert_missing_inso")); } } @@ -405,7 +407,8 @@ public abstract class TextAssetBody extends SecurityPropertyEditor int bodyStart_v = lc.indexOf(">", bodyStart); int bodyEnd = lc.indexOf("", bodyStart_v); if (bodyStart == -1 || bodyEnd == -1) { - throw new FormProcessException(GlobalizationUtil.globalize("cms.ui.authoring.html_file_missing_body_tags")); + throw new FormProcessException(GlobalizationUtil.globalize( + "cms.ui.authoring.html_file_missing_body_tags")); } return htmlText.substring(bodyStart_v + 1, bodyEnd); }