Index: main/plugin-cms/plugin.xml =================================================================== --- main/plugin-cms/plugin.xml (revision 1426) +++ main/plugin-cms/plugin.xml (working copy) @@ -389,7 +389,7 @@ <scripts> <file>js/org/ametys/cms/utils/ResourcesUtility.js</file> - <file>js/org/ametys/cms/editor/FileUpload.js</file> + <file>js/org/ametys/cms/editor/FileUpload.i18n.js</file> <file>js/org/ametys/cms/widgets/LocalFilesWidget.i18n.js</file> <file>js/org/ametys/cms/widgets/LocalImagesWidget.i18n.js</file> <file plugin="core">js/users/selectuser.i18n.js</file> @@ -422,7 +422,7 @@ <scripts> <file>js/org/ametys/cms/tool/content/RepeaterHelper.i18n.js</file> <file>js/org/ametys/cms/tool/content/EditionFormHelper.i18n.js</file> - <file>js/org/ametys/cms/tool/content/ContentTool.js</file> + <file>js/org/ametys/cms/tool/content/ContentTool.i18n.js</file> <file>js/org/ametys/cms/tool/content/ContentToolFactory.js</file> <file>js/org/ametys/cms/editor/Editor.js</file> <file plugin="tiny_mce">tiny_mce.js</file> @@ -450,7 +450,7 @@ <param name="default-location"></param> </action> <scripts> - <file>js/org/ametys/cms/tool/content/OldContentTool.js</file> + <file>js/org/ametys/cms/tool/content/OldContentTool.i18n.js</file> <file>js/org/ametys/cms/tool/content/OldContentToolFactory.js</file> </scripts> <css> @@ -561,7 +561,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/BasicActions.js</file> + <file>js/org/ametys/cms/editor/BasicActions.i18n.js</file> </scripts> </extension> @@ -578,7 +578,7 @@ <param name="icon-large" file="true">img/content/edition/save_32.png</param> </action> <scripts> - <file>js/org/ametys/cms/editor/SaveAction.js</file> + <file>js/org/ametys/cms/editor/SaveAction.i18n.js</file> </scripts> </extension> @@ -595,7 +595,7 @@ <param name="icon-large" file="true">img/content/edition/unsave_32.png</param> </action> <scripts> - <file>js/org/ametys/cms/editor/SaveAction.js</file> + <file>js/org/ametys/cms/editor/SaveAction.i18n.js</file> </scripts> </extension> @@ -614,7 +614,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/BasicActions.js</file> + <file>js/org/ametys/cms/editor/BasicActions.i18n.js</file> </scripts> </extension> @@ -633,7 +633,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/BasicActions.js</file> + <file>js/org/ametys/cms/editor/BasicActions.i18n.js</file> </scripts> </extension> @@ -666,7 +666,7 @@ <scripts> <file>js/org/ametys/cms/ribbon/button/Menu.js</file> <file>js/org/ametys/cms/ribbon/button/EditorMenu.js</file> - <file>js/org/ametys/cms/editor/BasicActions.js</file> + <file>js/org/ametys/cms/editor/BasicActions.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.clipboard.Cut" @@ -683,7 +683,7 @@ <param name="icon-large" file="true">img/content/edition/clipboard/cut_32.png</param> </action> <scripts> - <file>js/org/ametys/cms/editor/BasicActions.js</file> + <file>js/org/ametys/cms/editor/BasicActions.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.clipboard.Copy" @@ -700,7 +700,7 @@ <param name="icon-large" file="true">img/content/edition/clipboard/copy_32.png</param> </action> <scripts> - <file>js/org/ametys/cms/editor/BasicActions.js</file> + <file>js/org/ametys/cms/editor/BasicActions.i18n.js</file> </scripts> </extension> @@ -1134,8 +1134,8 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Images.js</file> - <file>js/org/ametys/cms/editor/FileUpload.js</file> + <file>js/org/ametys/cms/editor/Images.i18n.js</file> + <file>js/org/ametys/cms/editor/FileUpload.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.image.StyleGallery" @@ -1196,7 +1196,7 @@ <scripts> <file>js/org/ametys/cms/ribbon/button/Menu.js</file> <file>js/org/ametys/cms/ribbon/button/EditorMenu.js</file> - <file>js/org/ametys/cms/editor/Images.js</file> + <file>js/org/ametys/cms/editor/Images.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.image.ImageFloatLeft" @@ -1214,7 +1214,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Images.js</file> + <file>js/org/ametys/cms/editor/Images.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.image.ImageNoFloat" @@ -1232,7 +1232,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Images.js</file> + <file>js/org/ametys/cms/editor/Images.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.image.ImageFloatRight" @@ -1250,7 +1250,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Images.js</file> + <file>js/org/ametys/cms/editor/Images.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.image.Legend" @@ -1314,7 +1314,7 @@ </action> <script> <file>js/org/ametys/cms/control/InputField.js</file> - <file>js/org/ametys/cms/editor/Images.js</file> + <file>js/org/ametys/cms/editor/Images.i18n.js</file> </script> </extension> <extension id="org.ametys.cms.edition.image.Width" @@ -1494,7 +1494,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> <css> <file>css/content/TableMenu.css</file> @@ -1567,8 +1567,8 @@ <scripts> <file>js/org/ametys/cms/ribbon/button/Menu.js</file> <file>js/org/ametys/cms/ribbon/button/EditorMenu.js</file> - <file>js/org/ametys/cms/editor/BasicActions.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/BasicActions.i18n.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.RowHeader" @@ -1585,7 +1585,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.ColHeader" @@ -1602,7 +1602,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.Caption" @@ -1652,7 +1652,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.NoFloat" @@ -1667,7 +1667,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.FloatRight" @@ -1682,7 +1682,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.VAlignTop" @@ -1698,7 +1698,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.VAlignMiddle" @@ -1714,7 +1714,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.VAlignBottom" @@ -1730,7 +1730,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> @@ -1748,7 +1748,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.AlignCenterVAlignTop" @@ -1764,7 +1764,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.AlignRightVAlignTop" @@ -1780,7 +1780,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.AlignLeftVAlignMiddle" @@ -1796,7 +1796,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.AlignCenterVAlignMiddle" @@ -1812,7 +1812,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.AlignRightVAlignMiddle" @@ -1828,7 +1828,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.AlignLeftVAlignBottom" @@ -1844,7 +1844,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.AlignCenterVAlignBottom" @@ -1860,7 +1860,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.AlignRightVAlignBottom" @@ -1876,7 +1876,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> @@ -1895,7 +1895,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.InsertRowDown" @@ -1912,7 +1912,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.InsertColumnRight" @@ -1929,7 +1929,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.InsertColumnLeft" @@ -1946,7 +1946,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> @@ -1985,7 +1985,7 @@ <scripts> <file>js/org/ametys/cms/ribbon/button/EditorMenu.js</file> <file>js/org/ametys/cms/ribbon/button/Menu.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> @@ -2021,7 +2021,7 @@ <scripts> <file>js/org/ametys/cms/ribbon/button/EditorMenu.js</file> <file>js/org/ametys/cms/ribbon/button/Menu.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.ColWidth" @@ -2039,7 +2039,7 @@ </action> <script> <file>js/org/ametys/cms/control/InputField.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </script> </extension> <extension id="org.ametys.cms.edition.table.RowHeight" @@ -2057,7 +2057,7 @@ </action> <script> <file>js/org/ametys/cms/control/InputField.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </script> </extension> @@ -2076,7 +2076,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.SplitCells" @@ -2093,7 +2093,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> <extension id="org.ametys.cms.edition.table.InvisibleElements" @@ -2110,7 +2110,7 @@ </action> <scripts> <file>js/org/ametys/cms/ribbon/button/EditorButton.js</file> - <file>js/org/ametys/cms/editor/Tables.js</file> + <file>js/org/ametys/cms/editor/Tables.i18n.js</file> </scripts> </extension> Index: main/plugin-cms/i18n/messages_fr.xml =================================================================== --- main/plugin-cms/i18n/messages_fr.xml (revision 1426) +++ main/plugin-cms/i18n/messages_fr.xml (working copy) @@ -180,6 +180,16 @@ <message key="PLUGINS_CMS_CONTENT_CREATECONTENTMENU_DESCRIPTION">Ce bouton permet de créer un nouveau contenu</message> <message key="PLUGINS_CMS_CONTENT_CREATECONTENTMENU_GROUP_LABEL">Types de contenus</message> + <!-- Create content action--> + <message key="PLUGINS_CMS_CONTENT_CREATECONTENTACTION_MSG">Créer un contenu de type</message> + <message key="PLUGINS_CMS_CONTENT_CREATECONTENTACTION_CONTENTNAME">Nouveau</message> + <message key="PLUGINS_CMS_CONTENT_CREATECONTENTACTION_HINT">Saisissez ci-dessous le nom du nouveau contenu que vous souhaitez créer.</message> + <message key="PLUGINS_CMS_CONTENT_CREATECONTENTACTION_TEXT">Nom du contenu</message> + <message key="PLUGINS_CMS_CONTENT_CREATECONTENTACTION_HINTDESC">Le nom du contenu doit être unique dans toute la base de contenus et ne pas contenir de caractères spéciaux. Le nom que vous saisissez ci-dessus est donc suceptible d'être modifié automatiquement.</message> + <message key="PLUGINS_CMS_CONTENT_CREATECONTENTACTION_OK">Ok</message> + <message key="PLUGINS_CMS_CONTENT_CREATECONTENTACTION_CANCEL">Annuler</message> + <message key="PLUGINS_CMS_CONTENT_CREATECONTENTACTION_CREATIONFAILED">La création a échouée</message> + <!--+ | WORKFLOW +--> @@ -454,6 +464,11 @@ <message key="CONTENT_EDITION_TABLE_COLUMN_WIDTH_DESCRIPTION">Largeur de la colonne sélectionnée</message> <message key="CONTENT_EDITION_TABLE_ROW_HEIGHT_LABEL">Hauteur (px)</message> <message key="CONTENT_EDITION_TABLE_ROW_HEIGHT_DESCRIPTION">Hauteur de la ligne sélectionnée</message> + <!-- Tables.js --> + <message key="CONTENT_EDITION_TABLE_INSERT_TABLE_TITLE">Insérer un tableau</message> + <message key="CONTENT_EDITION_TABLE_SET_TITLE">Tableau</message> + <message key="CONTENT_EDITION_TABLE_ARRAY_DECRIPTION">Survolez le quadrillage ci-contre pour choisir la taille du tableau à créer</message> + <message key="CONTENT_EDITION_IMAGE_STYLE_LABEL">Styles d'images</message> <message key="CONTENT_EDITION_IMAGE_STYLE_DESCRIPTION">Choix du style d'image</message> @@ -551,6 +566,17 @@ <message key="CONTENT_EDITION_REPEATER_MOVE_UP">Monter</message> <message key="CONTENT_EDITION_REPEATER_MOVE_DOWN">Descendre</message> <message key="CONTENT_EDITION_REPEATER_INSERT_ERROR">Une erreur est survenue : elle a empêchée l'insertion d'un nouvel élément.</message> + + <!-- BasicActions.js --> + <message key="CONTENT_EDITION_BASICACTION_ERROR_SECURITY_TEXT">Problème de sécurité</message> + <message key="CONTENT_EDITION_BASICACTION_ERROR_SECURITY_DESC_CTRLX">Utilisez les raccourcis clavier habituels pour effectuer les opérations sur le presse-papier. Par exemple, pour couper : <strong>CTRL+X</strong> ou <strong>POMME+X</strong>.</message> + <message key="CONTENT_EDITION_BASICACTION_ERROR_SECURITY_DESC_EXPL">Les paramètres de sécurité de votre navigateur empèchent d'effectuer cette opération de manière automatique.<br/><br/></message> + <message key="CONTENT_EDITION_BASICACTION_ERROR_SECURITY_DESC_CTRLC">Utilisez les raccourcis clavier habituels pour effectuer les opérations sur le presse-papier. Par exemple, pour copier : <strong>CTRL+C</strong> ou <strong>POMME+C</strong>.</message> + <message key="CONTENT_EDITION_BASICACTION_ERROR_SECURITY_DESC_CTRLV">Utilisez les raccourcis clavier habituels pour effectuer les opérations sur le presse-papier. Par exemple, pour coller : <strong>CTRL+V</strong> ou <strong>POMME+V</strong>.</message> + <message key="CONTENT_EDITION_BASICACTION_PASTE_WITHOUT_STYLE">Coller le texte sans mise en forme...</message> + <message key="CONTENT_EDITION_BASICACTION_INFO_COPY"><div style='font-weight: strong;'>Utilisez maintenant le raccourci clavier de Coller</div><div style='text-align: center; padding-top: 10px; padding-bottom: 10px'><span style='font-weight: bold; font-size: 14px;'>CTRL+V</span> ou <span style='font-weight: bold; font-size: 14px;'>POMME+V</span></div><div style='font-style: italic'>Les paramètres de sécurité de votre navigateur empèchent d'effectuer cette opération de manière automatique.</div></message> + <message key="CONTENT_EDITION_BASICACTION_CANCEL">Annuler</message> + <!-- + USERS + --> @@ -670,4 +696,69 @@ <message key="WIDGET_USER_DELETE_USER_BUTTON">Supprimer le ou les utilisateur(s)</message> <message key="WIDGET_USER_SELECT_USER_BUTTON">Sélectionner un utilisateur</message> + <!-- + + | FileUpload.js + + --> + <message key="PLUGINS_CMS_FILEUPLOAD_FIELD_EMPTYTEXT">Sélectionnez un fichier</message> + <message key="PLUGINS_CMS_FILEUPLOAD_FIELD_FIELDLABEL">Fichier</message> + <message key="PLUGINS_CMS_FILEUPLOAD_FIELD_BUTTONTEXT">Parcourir</message> + <message key="PLUGINS_CMS_FILEUPLOAD_BOX_OK">Ok</message> + <message key="PLUGINS_CMS_FILEUPLOAD_BOX_CANCEL">Annuler</message> + <message key="PLUGINS_CMS_FILEUPLOAD_IMAGEFILTER">fichier image (avec une extension en jpg, gif ou png)</message> + <message key="PLUGINS_CMS_FILEUPLOAD_ERRORDIALOG_TEXT">Fichier non adapté</message> + <message key="PLUGINS_CMS_FILEUPLOAD_ERRORDIALOG_DESC">Le fichier choisi n'est pas du type attendu.<br/>Veuillez sélectionner un</message> + <message key="PLUGINS_CMS_FILEUPLOAD_SUBMITFORM_TITLE">Insérer un fichier</message> + <message key="PLUGINS_CMS_FILEUPLOAD_SUBMITFORM_MSG">Téléchargement du fichier en cours, veuillez patienter...</message> + <message key="PLUGINS_CMS_FILEUPLOAD_ERROR_MSG">Echec du téléchargement</message> + <message key="PLUGINS_CMS_FILEUPLOAD_ERROR_FILEREJECTED">Le fichier a été rejeté par le serveur</message> + <message key="PLUGINS_CMS_FILEUPLOAD_ERROR_ON_SERVER">Une erreur est survenue sur le serveur</message> + + <!-- + + | Images.js + + --> + <message key="PLUGINS_CMS_EDITOR_IMAGES_INSERT_IMAGE">Insérer une image...</message> + <message key="PLUGINS_CMS_EDITOR_IMAGES_BROWSE_DESC">Cliquez sur le bouton parcourir ci-dessous pour choisir une image sur votre disque.</message> + + <!-- + + | Links.js + + --> + <message key="PLUGINS_CMS_EDITOR_LINK_INSERT_LINK">Insérer un lien vers une page web...</message> + <message key="PLUGINS_CMS_EDITOR_LINK_INSERT_URL_DESC">Saisissez ci-dessous l'adresse web vers laquelle pointe le lien.</message> + <message key="PLUGINS_CMS_EDITOR_LINK_INSERT_URL_LABEL">Adresse</message> + <message key="PLUGINS_CMS_EDITOR_LINK_INSERT_URL_HINT">L'adresse web doit être complète (en incluant donc 'http' ou 'https').<br/><span style='font-style: italic'>Par exemple: 'http://www.ametys.org'</span></message> + <message key="PLUGINS_CMS_EDITOR_LINK_INSERT_OK">Ok</message> + <message key="PLUGINS_CMS_EDITOR_LINK_INSERT_CANCEL">Annuler</message> + + <!-- + + | SaveAction.js + + --> + <message key="PLUGINS_CMS_SAVE_ACTION_SAVE">Sauvegarde ...</message> + <message key="PLUGINS_CMS_SAVE_ACTION_INVALIDFIELDS">Un ou plusieurs champs du formulaire sont invalides.<br/>Veuillez les corriger pour pouvoir continuer : </message> + <message key="PLUGINS_CMS_SAVE_ACTION_ERROR">Une erreur est survenue : la sauvegarde a échouée</message> + <message key="PLUGINS_CMS_SAVE_ACTION_FAILED_TITLE">La sauvegarde a échouée</message> + <message key="PLUGINS_CMS_SAVE_ACTION_FAILED_DESC">erreur(s) a(ont) été rencontrée(s) pendant la sauvegarde</message> + + <!-- + + | WorkflowMenu.js + + --> + <message key="PLUGINS_CMS_WORKFLOW_ERROR_DESC">Une erreur est survenue : le contenu suivant n'a pas été traité : </message> + + <!-- + + | ContentTool.js + + --> + <message key="PLUGINS_CMS_TOOL_CONTENT_TOOLTIP_TEXT"><u>Auteur</u> : <b>{lastContributor}</b><br/><u>Dernière modification</u> :<b>{lastModified}</b></message> + <message key="PLUGINS_CMS_TOOL_CONTENT_FORMDEFINITION_ERROR">Une erreur est survenue : elle a empéchée de créer le formulaire d'édition du contenu</message> + <message key="PLUGINS_CMS_TOOL_CONTENT_FORMVALUES_ERROR">Une erreur est survenue : elle a empéchée de récupérer les valeurs du contenu suivant pour pour remplir le formulaire d'édition : </message> + + <!-- + + | OldContentTool.js + + --> + <message key="PLUGINS_CMS_TOOL_CONTENT_INTRO_VERSION">version v</message> + <message key="PLUGINS_CMS_TOOL_CONTENT_INTRO_DESC1">Le contenu que vous visualisez ci-dessous est une ancienne version du contenu. Il n'est donc pas éditable.</message> + <message key="PLUGINS_CMS_TOOL_CONTENT_INTRO_DESC2">Vous pouvez restaurer cette version pour qu'elle devienne la version actuelle du contenu.</message> + <message key="PLUGINS_CMS_TOOL_CONTENT_TOOLTIP_VERSION">Version</message> + <message key="PLUGINS_CMS_TOOL_CONTENT_TOOLTIP_AUTHOR">Auteur</message> + <message key="PLUGINS_CMS_TOOL_CONTENT_TOOLTIP_LASTMODIFICATION">Dernière modification</message> + <message key="PLUGINS_CMS_TOOL_CONTENT_TOOLTIP_DATEFORMAT">d/m/Y, H:i</message> + </catalogue> \ No newline at end of file Index: main/plugin-cms/resources/js/org/ametys/cms/buttons/content/CreateContentAction.js =================================================================== --- main/plugin-cms/resources/js/org/ametys/cms/buttons/content/CreateContentAction.js (revision 1426) +++ main/plugin-cms/resources/js/org/ametys/cms/buttons/content/CreateContentAction.js (working copy) @@ -16,14 +16,13 @@ org.ametys.cms.buttons.content.CreateContentAction._configuration = configuration; org.ametys.cms.buttons.content.CreateContentAction._createBoxIfNeeded(); - /* FIXME i18n */ - org.ametys.cms.buttons.content.CreateContentAction._box.setTitle("Créer un contenu de type " + button.getText() + "..."); + org.ametys.cms.buttons.content.CreateContentAction._box.setTitle("<i18n:text i18n:key='PLUGINS_CMS_CONTENT_CREATECONTENTACTION_MSG'/>" + " " + button.getText() + "..."); org.ametys.cms.buttons.content.CreateContentAction._box.setIconPath(button.iconSmall); Ext.getCmp("content-type-to-create").setValue(configuration["gallery-" + index]); org.ametys.cms.buttons.content.CreateContentAction._box.show(); var f = Ext.getCmp("content-name-to-create"); - f.setValue("Nouveau" + " " + button.getText()); // FIXME i18n + f.setValue("<i18n:text i18n:key='PLUGINS_CMS_CONTENT_CREATECONTENTACTION_CONTENTNAME'/>" + " " + button.getText()); f.focus(true, 100); } @@ -53,10 +52,9 @@ items: [ - // FIXME i18n - new org.ametys.HtmlContainer ({cls: 'hint', html: "Saisissez ci-dessous le nom du nouveau contenu que vous souhaitez créer."}), + new org.ametys.HtmlContainer ({cls: 'hint', html: "<i18n:text i18n:key='PLUGINS_CMS_CONTENT_CREATECONTENTACTION_HINT'/>"}), new Ext.form.TextField ({ - fieldLabel : "Nom du contenu", + fieldLabel : "<i18n:text i18n:key='PLUGINS_CMS_CONTENT_CREATECONTENTACTION_TEXT'/>", name: 'contentName', id: 'content-name-to-create', allowBlank: false, @@ -67,17 +65,17 @@ name: 'contentTypeName', id: 'content-type-to-create' }), - new org.ametys.HtmlContainer ({cls: 'hint', html: "Le nom du contenu doit être unique dans toute la base de contenus et ne pas contenir de caractères spéciaux. Le nom que vous saisissez ci-dessus est donc suceptible d'être modifié automatiquement."}) + new org.ametys.HtmlContainer ({cls: 'hint', html: "<i18n:text i18n:key='PLUGINS_CMS_CONTENT_CREATECONTENTACTION_HINTDESC'/>"}) ], closeAction: 'hide', buttons : [ { - text :'Ok', // FIXME i18n + text :"<i18n:text i18n:key='PLUGINS_CMS_CONTENT_CREATECONTENTACTION_OK'/>", handler : org.ametys.cms.buttons.content.CreateContentAction._ok }, { - text :'Annuler', // FIXME i18n + text :"<i18n:text i18n:key='PLUGINS_CMS_CONTENT_CREATECONTENTACTION_CANCEL'/>", parentCmp: this, handler: function() { this.parentCmp._box.hide(); } } @@ -126,8 +124,7 @@ org.ametys.cms.buttons.content.CreateContentAction._creationCallBack = function(response, params) { - // FIXME i18n - if (org.ametys.servercomm.ServerComm.handleBadResponse("La création a échouée", response, "org.ametys.cms.buttons.content.CreateContentAction")) + if (org.ametys.servercomm.ServerComm.handleBadResponse("<i18n:text i18n:key='PLUGINS_CMS_CONTENT_CREATECONTENTACTION_CREATIONFAILED'/>", response, "org.ametys.cms.buttons.content.CreateContentAction")) { return; } Index: main/plugin-cms/resources/js/org/ametys/cms/tool/content/ContentTool.js =================================================================== --- main/plugin-cms/resources/js/org/ametys/cms/tool/content/ContentTool.js (revision 1426) +++ main/plugin-cms/resources/js/org/ametys/cms/tool/content/ContentTool.js (working copy) @@ -21,8 +21,7 @@ { org.ametys.cms.tool.content.ContentTool.initTinyMCE(); - // FIXME i18n - this._toolTipTextTpl = new Ext.Template("<u>Auteur</u> : <b>{lastContributor}</b><br/><u>Dernière modification</u> :<b>{lastModified}</b>"); + this._toolTipTextTpl = new Ext.Template("<i18n:text i18n:key='PLUGINS_CMS_TOOL_CONTENT_TOOLTIP_TEXT'/>"); this._toolTipText = ""; this._toolTipImage = ""; this._toolTipTitle = ""; @@ -204,7 +203,7 @@ org.ametys.cms.tool.content.ContentTool.prototype._destroyEditionComponents = function () { var editPanel = this._mainPanel.get(1); - if (editPanel.items.length > 1) + if (editPanel.items.length > 1) { tinyMCE.execCommand("mceRemoveControl", false, id); tinyMCE.activeEditor = null; @@ -227,7 +226,7 @@ { this.refreshing(); this._mainPanel.layout.setActiveItem(0); - this._mainPanel.layout.activeItem.body.update('<iframe id="' + this._iframeId + '" frameborder="0" style="width: 100%; height: 100%;" src="' + context.contextPath + '/_content.html?contentId=' + this._contentId + '"></iframe>'); + this._mainPanel.layout.activeItem.body.update('<iframe id="' + this._iframeId + '" frameborder="0" style="width: 100%; height: 100%;" src="' + context.contextPath + '/_content.html?contentId=' + this._contentId + '"></iframe>'); } this._updateTooltipText(); this.upToDate(); @@ -235,7 +234,7 @@ /** * This method is called when tools params are updated. This implementation change the mode if needed - * @param {Map<id,value>} params The params : 'id' that is the content id. 'mode' can be 'view' or 'edit'. 'view' is the default mode. In edit mode the parameter 'metadataset' is available ('main' is the default value) + * @param {Map<id,value>} params The params : 'id' that is the content id. 'mode' can be 'view' or 'edit'. 'view' is the default mode. In edit mode the parameter 'metadataset' is available ('main' is the default value) */ org.ametys.cms.tool.content.ContentTool.prototype.setParams = function (params) { @@ -266,7 +265,7 @@ org.ametys.cms.tool.content.ContentTool.prototype.onMessage = function (messages) { - for (var i=messages.length - 1; i >= 0; i--) + for (var i=messages.length - 1; i >= 0; i--) { if (messages[i].getType().getName() == org.ametys.ribbon.RibbonManager.EVENTTYPE_METADATACHANGED) { @@ -274,7 +273,7 @@ var target = org.ametys.messagebus.message.MessageTargetHelper.findFirst(targets, function(target) { return target.getType() == "content";}); // FIXME on ne cherche que dans la premiere target, mais faut toutes les regarder - if (target != null && this._contentId == target.getParameters().id && this._mode != 'edit') + if (target != null && this._contentId == target.getParameters().id && this._mode != 'edit') { this.outOfDate(); } @@ -368,7 +367,7 @@ */ org.ametys.cms.tool.content.ContentTool.prototype._drawEditionForm = function(response, args) { - if (org.ametys.servercomm.ServerComm.handleBadResponse("Une erreur est survenue : elle a empéchée de créer le formulaire d'édition du contenu '" + this._contentId + "'", response, "org.ametys.cms.tool.content.ContentTool")) + if (org.ametys.servercomm.ServerComm.handleBadResponse("<i18n:text i18n:key='PLUGINS_CMS_TOOL_CONTENT_FORMDEFINITION_ERROR'/>" + " '" + this._contentId + "'", response, "org.ametys.cms.tool.content.ContentTool")) { return; } @@ -393,7 +392,7 @@ org.ametys.cms.tool.content.ContentTool.prototype._createHTMLAreas = function() { - for (var i=0; i < this._htmlAreas.length; i++) + for (var i=0; i < this._htmlAreas.length; i++) { var id = this._htmlAreas[i]; @@ -403,7 +402,7 @@ org.ametys.cms.tool.content.ContentTool.prototype._getForm = function() { - if (this._mainPanel && this._mainPanel.layout && this._mainPanel.layout.activeItem && this._mainPanel.layout.activeItem.form) + if (this._mainPanel && this._mainPanel.layout && this._mainPanel.layout.activeItem && this._mainPanel.layout.activeItem.form) { return this._mainPanel.layout.activeItem.form; } @@ -449,7 +448,7 @@ /** * @private - * @property {Map<String, Ext.Field>} _fields Association Name and fields in the form. + * @property {Map<String, Ext.Field>} _fields Association Name and fields in the form. */ org.ametys.cms.tool.content.ContentTool.prototype._fields = {}; /** @@ -462,7 +461,7 @@ org.ametys.cms.tool.content.ContentTool.prototype._drawEditionFormPart = function(drawInPanel, compositeMetaNode, compositePrefix) { var metadataDefs = compositeMetaNode.selectNodes("*"); - for (var i=0; i < metadataDefs.length; i++) + for (var i=0; i < metadataDefs.length; i++) { var metadataDef = metadataDefs[i]; @@ -519,7 +518,7 @@ else // Draw widget { // validation information - var mandatory = metadataDef.selectSingleNode("validation/mandatory") != null && metadataDef.selectSingleNode("validation/mandatory")[org.ametys.servercomm.ServerComm.xmlTextContent] == 'true'; + var mandatory = metadataDef.selectSingleNode("validation/mandatory") != null && metadataDef.selectSingleNode("validation/mandatory")[org.ametys.servercomm.ServerComm.xmlTextContent] == 'true'; var regexp = metadataDef.selectSingleNode("validation/regexp") != null ? metadataDef.selectSingleNode("validation/regexp")[org.ametys.servercomm.ServerComm.xmlTextContent] : null; if (regexp != null) { @@ -572,7 +571,7 @@ var enumeratedValues = []; var enumeration = metadataDef.selectSingleNode("enumeration") var options = enumeration.selectNodes("option"); - for (var j=0; j < options.length; j++) + for (var j=0; j < options.length; j++) { enumeratedValues.push([options[j].getAttribute("value"), options[j][org.ametys.servercomm.ServerComm.xmlTextContent]]) } @@ -594,7 +593,7 @@ */ org.ametys.cms.tool.content.ContentTool.prototype._fillEditionForm = function(response, args) { - if (org.ametys.servercomm.ServerComm.handleBadResponse("Une erreur est survenue : elle a empéchée de récupérer les valeurs du contenu '" + this._contentId + "' pour remplir le formulaire d'édition", response, "org.ametys.cms.tool.content.ContentTool")) + if (org.ametys.servercomm.ServerComm.handleBadResponse("<i18n:text i18n:key='PLUGINS_CMS_TOOL_CONTENT_FORMVALUES_ERROR'/>" + "'" + this._contentId + "'", response, "org.ametys.cms.tool.content.ContentTool")) { return; } @@ -612,12 +611,12 @@ org.ametys.cms.tool.content.ContentTool.prototype._setValuesFromXML = function (node, prefix) { var childNodes = node.selectNodes("*"); - for (var i=0; i < childNodes.length; i++) + for (var i=0; i < childNodes.length; i++) { var metadataNode = childNodes[i]; var sameNodes = metadataNode.parentNode.selectNodes(metadataNode.tagName); - if (sameNodes.length > 1 && sameNodes[0] != metadataNode) + if (sameNodes.length > 1 && sameNodes[0] != metadataNode) { continue; } @@ -625,7 +624,7 @@ if (metadataNode.tagName == 'entry') { var repeater = Ext.getCmp (prefix); - if (parseInt(metadataNode.getAttribute('name')) > 1) + if (parseInt(metadataNode.getAttribute('name')) > 1) { // Add repeater instance org.ametys.cms.tool.content.RepeaterHelper._insert (null, null, repeater.getComponent (repeater.items.getCount() - 1), null); @@ -670,7 +669,7 @@ var logins = []; var names = []; var nodes = metadataNode.parentNode.selectNodes(metadataNode.tagName); - for (var i=0; i < nodes.length; i++) + for (var i=0; i < nodes.length; i++) { logins.push(nodes[i].getAttribute('login')); names.push(nodes[i][org.ametys.servercomm.ServerComm.xmlTextContent]); @@ -681,7 +680,7 @@ { var values = []; var nodes = metadataNode.parentNode.selectNodes(metadataNode.tagName); - for (var i=0; i < nodes.length; i++) + for (var i=0; i < nodes.length; i++) { if (nodes[i][org.ametys.servercomm.ServerComm.xmlTextContent] != '') { @@ -697,7 +696,7 @@ { var xpath = ""; var path = name.split('.'); - for (var i=0; i < path.length; i++) + for (var i=0; i < path.length; i++) { if (i!=0) { @@ -731,15 +730,15 @@ var c = this.getComponent(comp); - if(c && this.fireEvent('beforeremove', this, c) !== false) + if(c && this.fireEvent('beforeremove', this, c) !== false) { this.items.remove(c); delete c.ownerCt; - if(this.layout && this.rendered){ + if(this.layout && this.rendered){ // this.layout.onRemove(c); } this.onRemove(c); - if(autoDestroy === true || (autoDestroy !== false && this.autoDestroy)){ + if(autoDestroy === true || (autoDestroy !== false && this.autoDestroy)){ c.destroy(); } this.fireEvent('remove', this, c); Index: main/plugin-cms/resources/js/org/ametys/cms/tool/content/OldContentTool.js =================================================================== --- main/plugin-cms/resources/js/org/ametys/cms/tool/content/OldContentTool.js (revision 1426) +++ main/plugin-cms/resources/js/org/ametys/cms/tool/content/OldContentTool.js (working copy) @@ -130,14 +130,14 @@ org.ametys.cms.tool.content.OldContentTool.prototype.refresh = function (manual) { this.refreshing(); - this._mainPanel.get(1).body.update('<iframe id="' + this._iframeId + '" frameborder="0" style="width: 100%; height: 100%;" src="' + context.contextPath + '/_content/v_' + this._contentVersion + '.html?contentId=' + this._contentId + '"></iframe>'); + this._mainPanel.get(1).body.update('<iframe id="' + this._iframeId + '" frameborder="0" style="width: 100%; height: 100%;" src="' + context.contextPath + '/_content/v_' + this._contentVersion + '.html?contentId=' + this._contentId + '"></iframe>'); this._updateTooltipText(); this.upToDate(); } /** * This method is called when tools params are updated. This implementation change the mode if needed - * @param {Map<id,value>} params The params : 'id' that is the content id. + * @param {Map<id,value>} params The params : 'id' that is the content id. */ org.ametys.cms.tool.content.OldContentTool.prototype.setParams = function (params) { @@ -219,19 +219,18 @@ org.ametys.cms.tool.content.OldContentTool.prototype._createIntro = function (data) { - // FIXME i18n - var text = '<div class="intro">'; + var text = '<div class="intro">'; - text+= '<img src="' + context.contextPath + '/plugins/cms/resources/img/history/content/old_content_32.png"/>'; - text += data.title + ' (version v' + data.version + ')'; - text += '</div>'; + text+= '<img src="' + context.contextPath + '/plugins/cms/resources/img/history/content/old_content_32.png"/>'; + text += data.title + ' (' + "<i18n:text i18n:key='PLUGINS_CMS_TOOL_CONTENT_INTRO_VERSION'/>" + data.version + ')'; + text += '</div>'; - text += '<div class="text">'; - text += "Le contenu que vous visualisez ci-dessous est une ancienne version du contenu. Il n'est donc pas éditable."; - text += '<br/>'; - text += "Vous pouvez restaurer cette version pour qu'elle devienne la version actuelle du contenu."; - text += '</div>'; + text += '<div class="text">'; + text += "<i18n:text i18n:key='PLUGINS_CMS_TOOL_CONTENT_INTRO_DESC1'/>"; + text += '<br/>'; + text += "<i18n:text i18n:key='PLUGINS_CMS_TOOL_CONTENT_INTRO_DESC2'/>"; + text += '</div>'; return text; } @@ -240,12 +239,12 @@ { // FIXME i18n - var text = '<u>Version</u> :'; - text += '<b>v' + data.version + '</b><br/>'; - text += '<u>Auteur</u> :'; - text += '<b>' + data.lastContributor + '</b><br/>'; - text += '<u>Dernière modification</u> :'; - text += '<b>' + Ext.util.Format.date(Date.parseDate(data.lastModified, Date.patterns.ISO8601Long), 'd/m/Y, H:i') + '</b>'; + var text = '<u>' + "<i18n:text i18n:key='PLUGINS_CMS_TOOL_CONTENT_TOOLTIP_VERSION'/>" + '</u> :'; + text += '<b>v' + data.version + '</b><br/>'; + text += '<u>' + "<i18n:text i18n:key='PLUGINS_CMS_TOOL_CONTENT_TOOLTIP_AUTHOR'/>" + '</u> :'; + text += '<b>' + data.lastContributor + '</b><br/>'; + text += '<u>' + "<i18n:text i18n:key='PLUGINS_CMS_TOOL_CONTENT_TOOLTIP_LASTMODIFICATION'/>" + '</u> :'; + text += '<b>' + Ext.util.Format.date(Date.parseDate(data.lastModified, Date.patterns.ISO8601Long), "<i18n:text i18n:key='PLUGINS_CMS_TOOL_CONTENT_TOOLTIP_DATEFORMAT'/>") + '</b>'; return text; } \ No newline at end of file Index: main/plugin-cms/resources/js/org/ametys/cms/ribbon/button/WorkflowMenu.js =================================================================== --- main/plugin-cms/resources/js/org/ametys/cms/ribbon/button/WorkflowMenu.js (revision 1426) +++ main/plugin-cms/resources/js/org/ametys/cms/ribbon/button/WorkflowMenu.js (working copy) @@ -21,7 +21,7 @@ /** * @private - * @property {Map<String, String>} _lastParams The params received on the last refresh + * @property {Map<String, String>} _lastParams The params received on the last refresh */ org.ametys.cms.ribbon.button.WorkflowMenu.prototype._lastParams; @@ -33,7 +33,7 @@ /** * @private - * @property {Map<String, Item>} _menuItems A map of association actionId and menuItem. + * @property {Map<String, Item>} _menuItems A map of association actionId and menuItem. */ org.ametys.cms.ribbon.button.WorkflowMenu.prototype._menuItems; @@ -42,10 +42,10 @@ element = org.ametys.cms.ribbon.button.WorkflowMenu.superclass.createControl.call(this, size, colspan); var menuCount = parseInt(this.getConfiguration()["menu-size"]); - if (menuCount > 0) + if (menuCount > 0) { var items = []; - for (var i=0; i < menuCount; i++) + for (var i=0; i < menuCount; i++) { var actionId = this.getConfiguration()["menu-" + i]; this._menuItems[actionId] = new Ext.menu.Item ({ @@ -78,7 +78,7 @@ return false; } - for (var i=0; i < tab1.length; i++) + for (var i=0; i < tab1.length; i++) { if (tab2.indexOf(tab1[i]) == -1) { @@ -92,7 +92,7 @@ org.ametys.cms.ribbon.button.WorkflowMenu.prototype._convertToId = function (targets) { var targetsIds = []; - for (var i = 0; i < targets.length; i++) + for (var i = 0; i < targets.length; i++) { targetsIds.push(targets[i].getParameters()['id']); } @@ -107,7 +107,7 @@ org.ametys.cms.ribbon.button.WorkflowMenu.prototype.onMessage = function (messages) { // SELECTION - for (var i=messages.length - 1; i >= 0; i--) + for (var i=messages.length - 1; i >= 0; i--) { if (messages[i].getType().getName() == org.ametys.ribbon.RibbonManager.EVENTTYPE_SELECTIONCHANGED) { @@ -152,7 +152,7 @@ } // WORKFLOW - for (var i=0; i < messages.length; i++) + for (var i=0; i < messages.length; i++) { if (messages[i].getType().getName() == org.ametys.ribbon.RibbonManager.EVENTTYPE_WORKFLOWCHANGED) { @@ -161,11 +161,11 @@ var currentSelection = org.ametys.ribbon.RibbonManager.getInstance().getCurrentSelectionTargets(); - for (var t=0; currentSelection != null && t < allTargetsIds.length; t++) + for (var t=0; currentSelection != null && t < allTargetsIds.length; t++) { var currentSelectionIds = this._convertToId(org.ametys.messagebus.message.MessageTargetHelper.findAll(currentSelection, this.checkTarget() )); - for (var c=0; c < currentSelectionIds.length; c++) + for (var c=0; c < currentSelectionIds.length; c++) { if (currentSelectionIds[c] == allTargetsIds[t]) { @@ -195,7 +195,7 @@ tooltip = ""; } - var finalTooltip = begin + ((begin != "" && tooltip != "") ? "<br/><br/>" : "") + tooltip + var finalTooltip = begin + ((begin != "" && tooltip != "") ? "<br/><br/>" : "") + tooltip this.getElement().updateTooltip(finalTooltip, context.contextPath + this.getConfiguration()['icon-medium']); } @@ -219,16 +219,16 @@ // Action map. Key is action id, Value is an array of content name var menuCount = parseInt(this.getConfiguration()["menu-size"]); var action = {}; - for (var i=0; i < menuCount; i++) + for (var i=0; i < menuCount; i++) { var actionId = this.getConfiguration()["menu-" + i]; action[actionId] = []; } - if (count > 0) + if (count > 0) { tooltip += this.getConfiguration()["contentselected-description-begin"]; - for (var i=0; i < count; i++) + for (var i=0; i < count; i++) { if (i != 0) { @@ -237,7 +237,7 @@ tooltip += params["content-" + i + "-title"]; // loop on action for this content - if (menuCount > 0) + if (menuCount > 0) { for (var actionId in action) { @@ -266,7 +266,7 @@ this._updateTip(tooltip); this.getElement().allowDepress = false; this.getElement().setDisabled(count == 0); - this.getElement().toggle(count > 0); + this.getElement().toggle(count > 0); } org.ametys.cms.ribbon.button.WorkflowMenu.act = function(controlId, controlConfiguration, controlPluginName) @@ -279,7 +279,7 @@ var params = this.ribbonControl._lastParams; org.ametys.servercomm.ServerComm.getInstance().suspend(); - for (var i=0; i < this.contents.length; i++) + for (var i=0; i < this.contents.length; i++) { var serverMessage = new org.ametys.servercomm.ServerMessage("cms", "do-action/" + this.actionId, {contentId: this.contents[i]}, org.ametys.servercomm.ServerComm.PRIORITY_MAJOR, this.ribbonControl.workflowActionCallback, this.ribbonControl, {content: this.contents[i], max: this.contents.length}); org.ametys.servercomm.ServerComm.getInstance().send(serverMessage); @@ -292,8 +292,8 @@ org.ametys.cms.ribbon.button.WorkflowMenu.prototype.workflowActionCallback = function(response, args) { this.cumulate++; - // FIXME i18n - if (!org.ametys.servercomm.ServerComm.handleBadResponse("Une erreur est survenue : le contenu '" + args.content + "' n'a pas été traité", response, "org.ametys.cms.ribbon.button.WorkflowMenu")) + + if (!org.ametys.servercomm.ServerComm.handleBadResponse("<i18n:text i18n:key='PLUGINS_CMS_WORKFLOW_ERROR_DESC'/>" + args.content , response, "org.ametys.cms.ribbon.button.WorkflowMenu")) { this.cumulated.push(args.content) } @@ -302,7 +302,7 @@ { // Send the event for all contents so discard the next callback var targets = []; - for (var i=0; i < this.cumulated.length; i++) + for (var i=0; i < this.cumulated.length; i++) { targets.push(org.ametys.messagebus.bus.MessageBuilder.getInstance().createTarget("content", {'id': this.cumulated[i]})); } Index: main/plugin-cms/resources/js/org/ametys/cms/editor/BasicActions.js =================================================================== --- main/plugin-cms/resources/js/org/ametys/cms/editor/BasicActions.js (revision 1432) +++ main/plugin-cms/resources/js/org/ametys/cms/editor/BasicActions.js (working copy) @@ -68,10 +68,9 @@ } catch (e) { - // FIXME i18n - new org.ametys.uitool.msg.ErrorDialog("Problème de sécurité", - "Utilisez les raccourcis clavier habituels pour effectuer les opérations sur le presse-papier. Par exemple, pour couper : <strong>CTRL+X</strong> ou <strong>POMME+X</strong>.", - "Les paramètres de sécurité de votre navigateur empèchent d'effectuer cette opération de manière automatique.<br/><br/>" + e, + new org.ametys.uitool.msg.ErrorDialog("<i18n:text i18n:key='CONTENT_EDITION_BASICACTION_ERROR_SECURITY_TEXT'/>", + "<i18n:text i18n:key='CONTENT_EDITION_BASICACTION_ERROR_SECURITY_DESC_CTRLX'/>", + "<i18n:text i18n:key='CONTENT_EDITION_BASICACTION_ERROR_SECURITY_DESC_EXPL'/>" + e, "org.ametys.cms.editor.basicactions.Paste"); } tinyMCE.activeEditor.getWin().focus(); @@ -101,10 +100,9 @@ } catch (e) { - // FIXME i18n - new org.ametys.uitool.msg.ErrorDialog("Problème de sécurité", - "Utilisez les raccourcis clavier habituels pour effectuer les opérations sur le presse-papier. Par exemple, pour copier : <strong>CTRL+C</strong> ou <strong>POMME+C</strong>.", - "Les paramètres de sécurité de votre navigateur empèchent d'effectuer cette opération de manière automatique.<br/><br/>" + e, + new org.ametys.uitool.msg.ErrorDialog("<i18n:text i18n:key='CONTENT_EDITION_BASICACTION_ERROR_SECURITY_TEXT'/>", + "<i18n:text i18n:key='CONTENT_EDITION_BASICACTION_ERROR_SECURITY_DESC_CTRLC'/>", + "<i18n:text i18n:key='CONTENT_EDITION_BASICACTION_ERROR_SECURITY_DESC_EXPL'/>" + e, "org.ametys.cms.editor.basicactions.Paste"); } tinyMCE.activeEditor.getWin().focus(); @@ -135,10 +133,9 @@ } catch (e) { - // FIXME i18n - new org.ametys.uitool.msg.ErrorDialog("Problème de sécurité", - "Utilisez les raccourcis clavier habituels pour effectuer les opérations sur le presse-papier. Par exemple, pour coller : <strong>CTRL+V</strong> ou <strong>POMME+V</strong>.", - "Les paramètres de sécurité de votre navigateur empèchent d'effectuer cette opération de manière automatique.<br/><br/>" + e, + new org.ametys.uitool.msg.ErrorDialog("<i18n:text i18n:key='CONTENT_EDITION_BASICACTION_ERROR_SECURITY_TEXT'/>", + "<i18n:text i18n:key='CONTENT_EDITION_BASICACTION_ERROR_SECURITY_DESC_CTRLV'/>", + "<i18n:text i18n:key='CONTENT_EDITION_BASICACTION_ERROR_SECURITY_DESC_EXPL'/>" + e, "org.ametys.cms.editor.basicactions.Paste"); } tinyMCE.activeEditor.getWin().focus(); @@ -234,7 +231,7 @@ org.ametys.cms.editor.basicactions._FinishTxtPaste = function (txt) { // paste in the html editor - tinyMCE.activeEditor.execCommand('mceInsertContent', false, "<p>" + txt.replace(/\n/g, "</p><p>") + "</p>"); + tinyMCE.activeEditor.execCommand('mceInsertContent', false, "<p>" + txt.replace(/\n/g, "</p><p>") + "</p>"); // end tinyMCE.activeEditor.getWin().focus(); @@ -246,8 +243,7 @@ { org.ametys.cms.editor.basicactions.ManualTxtPaste._box = new org.ametys.DialogBox( { - /* FIXME i18n */ - title: "Coller le texte sans mise en forme...", + title: "<i18n:text i18n:key='CONTENT_EDITION_BASICACTION_PASTE_WITHOUT_STYLE'/>", icon: getPluginResourcesUrl("cms") + "/img/content/edition/clipboard/paste_txt_16.png", width: 300, @@ -261,7 +257,6 @@ items: [ - // FIXME i18n new Ext.form.TextArea ({ id: 'manualtxtpaste', listeners: @@ -272,14 +267,14 @@ //height: 1, style: org.ametys.cms.editor.basicactions._hiddenTextAreaStyle }), - new org.ametys.HtmlContainer ({cls: 'hint', html: "<div style='font-weight: strong;'>Utilisez maintenant le raccourci clavier de Coller</div><div style='text-align: center; padding-top: 10px; padding-bottom: 10px'><span style='font-weight: bold; font-size: 14px;'>CTRL+V</span> ou <span style='font-weight: bold; font-size: 14px;'>POMME+V</span></div><div style='font-style: italic'>Les paramètres de sécurité de votre navigateur empèchent d'effectuer cette opération de manière automatique.</div>"}) + new org.ametys.HtmlContainer ({cls: 'hint', html: "<i18n:text i18n:key='CONTENT_EDITION_BASICACTION_INFO_COPY'/>"}) ], closeAction: 'hide', buttons: [ { - text: 'Annuler', // FIXME i18n + text: "<i18n:text i18n:key='CONTENT_EDITION_BASICACTION_CANCEL'/>", parentCmp: this, handler: function() { org.ametys.cms.editor.basicactions.ManualTxtPaste._box.hide(); } } @@ -347,13 +342,13 @@ var target = org.ametys.messagebus.message.MessageTargetHelper.findFirst(targets, function(target) { return target.getType() == "node";}); var node = target != null ? target.getParameters()['object'] : null; - if (node != null && tinyMCE.activeEditor != null) + if (node != null && tinyMCE.activeEditor != null) { var specificNode = tinyMCE.activeEditor.dom.getParent(node, item.ribbonControl.getConfiguration()['tagname']); if (specificNode != null) { item.setDisabled(false); - item.toggle(specificNode.className.split(" ").indexOf(item.ribbonControl.getConfiguration()["gallery-" + item.index + "-css-class"]) >= 0); + item.toggle(specificNode.className.split(" ").indexOf(item.ribbonControl.getConfiguration()["gallery-" + item.index + "-css-class"]) >= 0); return; } Index: main/plugin-cms/resources/js/org/ametys/cms/editor/SaveAction.js =================================================================== --- main/plugin-cms/resources/js/org/ametys/cms/editor/SaveAction.js (revision 1426) +++ main/plugin-cms/resources/js/org/ametys/cms/editor/SaveAction.js (working copy) @@ -20,7 +20,7 @@ var extForm = targets[0].getSubTargets()[0].getParameters()['object']; var form = extForm.getEl().dom; - for (var i=0; i < tool._htmlAreas.length; i++) + for (var i=0; i < tool._htmlAreas.length; i++) { var editorId = tool._htmlAreas[i]; var editor = tinyMCE.get(editorId); @@ -45,12 +45,11 @@ } } - if (invalidFields.length > 0) + if (invalidFields.length > 0) { - // FIXME i18n Ext.Msg.show({ - title: "Sauvegarde ...", //<i18n:text i18n:key="CONTENT_EDITION_SAVE_LABEL"/>", - msg: "Un ou plusieurs champs du formulaire sont invalides.<br/>Veuillez les corriger pour pouvoir continuer : " + invalidFields, //"<i18n:text i18n:key="CONTENT_EDITION_SAVE_INVALID_FIELD"/>", + title: "<i18n:text i18n:key='PLUGINS_CMS_SAVE_ACTION_SAVE'/>", //<i18n:text i18n:key="CONTENT_EDITION_SAVE_LABEL"/>", + msg: "<i18n:text i18n:key='PLUGINS_CMS_SAVE_ACTION_INVALIDFIELDS'/>" + invalidFields, //"<i18n:text i18n:key="CONTENT_EDITION_SAVE_INVALID_FIELD"/>", buttons: Ext.Msg.OK, icon: Ext.MessageBox.ERROR }); @@ -71,7 +70,7 @@ // Indicate to the server that we're in ajax mode // Iterate on all form controls - for (var i = 0; i < form.elements.length; i++) { + for (var i = 0; i < form.elements.length; i++) { input = form.elements[i]; if (input.name == null || input.name == "" || input.disabled) { @@ -92,7 +91,7 @@ continue; } - if (input.type == "radio" && !input.checked) { + if (input.type == "radio" && !input.checked) { // Skip unchecked checkboxes and radio buttons continue; } @@ -100,10 +99,10 @@ // Can't send files in Ajax mode. Fall back to full page return null; } - if (input.tagName.toLowerCase() == "select" && input.multiple) { + if (input.tagName.toLowerCase() == "select" && input.multiple) { var name = input.name; var options = input.options; - for (var zz = 0; zz < options.length; zz++) { + for (var zz = 0; zz < options.length; zz++) { if (options[zz].selected) { query[name] = options[zz].value; } @@ -117,7 +116,7 @@ { continue; } - if (extInput.xtype == 'datefield' && extInput.getValue() != '') + if (extInput.xtype == 'datefield' && extInput.getValue() != '') { // date query[input.name] = extInput.getValue().format(Date.patterns.ISO8601Long); @@ -137,8 +136,7 @@ org.ametys.cms.editor.Save._callBack = function(response, args) { - // FIXME i18n - if (org.ametys.servercomm.ServerComm.handleBadResponse("Une erreur est survenue : la sauvegarde a échouée", response, "org.ametys.cms.editor.Save._callBack")) + if (org.ametys.servercomm.ServerComm.handleBadResponse("<i18n:text i18n:key='PLUGINS_CMS_SAVE_ACTION_ERROR'/>", response, "org.ametys.cms.editor.Save._callBack")) { return; } @@ -161,14 +159,14 @@ field.markInvalid(); else field.markInvalid(error); - detailledMsg += fieldName + "<br/>"; + detailledMsg += fieldName + "<br/>"; errors++; } } - if (errors > 0) + if (errors > 0) { - new org.ametys.uitool.msg.ErrorDialog("La sauvegarde a échoué", errors + " erreur(s) a(ont) été rencontrée(s) pendant la sauvegarde", detailledMsg, "org.ametys.cms.editor.Save._callBack"); + new org.ametys.uitool.msg.ErrorDialog("<i18n:text i18n:key='PLUGINS_CMS_SAVE_ACTION_FAILED_TITLE'/>", errors + " " + "<i18n:text i18n:key='PLUGINS_CMS_SAVE_ACTION_FAILED_DESC'/>", detailledMsg, "org.ametys.cms.editor.Save._callBack"); return; } Index: main/plugin-cms/resources/js/org/ametys/cms/editor/Link.js =================================================================== --- main/plugin-cms/resources/js/org/ametys/cms/editor/Link.js (revision 1426) +++ main/plugin-cms/resources/js/org/ametys/cms/editor/Link.js (working copy) @@ -16,8 +16,7 @@ */ org.ametys.cms.editor.link.InsertWebLink = function(controlId, config, pluginName) { - /* FIXME i18n */ - org.ametys.cms.editor.link.InsertWebLink.act("Insérer un lien vers une page web...", ""); + org.ametys.cms.editor.link.InsertWebLink.act("<i18n:text i18n:key='PLUGINS_CMS_EDITOR_LINK_INSERT_LINK'/>", ""); } org.ametys.cms.editor.link.InsertWebLink.act = function(title, currentUrl) @@ -56,26 +55,25 @@ items: [ - // FIXME i18n - new org.ametys.HtmlContainer ({cls: 'hint', html: "Saisissez ci-dessous l'adresse web vers laquelle pointe le lien."}), + new org.ametys.HtmlContainer ({cls: 'hint', html: "<i18n:text i18n:key='PLUGINS_CMS_EDITOR_LINK_INSERT_URL_DESC'/>"}), new Ext.form.TextField ({ - fieldLabel : "Adresse", + fieldLabel : "<i18n:text i18n:key='PLUGINS_CMS_EDITOR_LINK_INSERT_URL_LABEL'/>", id: org.ametys.cms.editor.link.InsertWebLink._fieldId, allowBlank: false, msgTarget: 'side', width: 450 }), - new org.ametys.HtmlContainer ({cls: 'hint', html: "L'adresse web doit être complète (en incluant donc 'http' ou 'https').<br/><span style='font-style: italic'>Par exemple: 'http://www.ametys.org'</span>"}) + new org.ametys.HtmlContainer ({cls: 'hint', html: "<i18n:text i18n:key='PLUGINS_CMS_EDITOR_LINK_INSERT_URL_HINT'/>"}) ], closeAction: 'hide', buttons: [ { - text: 'Ok', // FIXME i18n + text: "<i18n:text i18n:key='PLUGINS_CMS_EDITOR_LINK_INSERT_OK'/>", handler: function() { org.ametys.cms.editor.link.InsertWebLink._doAction(); } }, { - text: 'Annuler', // FIXME i18n + text: "<i18n:text i18n:key='PLUGINS_CMS_EDITOR_LINK_INSERT_CANCEL'/>", handler: function() { org.ametys.cms.editor.link.InsertWebLink._hide(); } } ] @@ -95,10 +93,10 @@ tinyMCE.activeEditor.execCommand('mceBeginUndoLevel'); var node = tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'a'); - if (node == null && tinyMCE.activeEditor.selection.isCollapsed()) + if (node == null && tinyMCE.activeEditor.selection.isCollapsed()) { var id = Ext.id(); - tinyMCE.activeEditor.execCommand('mceInsertContent', false, "<a id='" + id + "'>" + urlField.getValue() + "</a>"); + tinyMCE.activeEditor.execCommand('mceInsertContent', false, "<a id='" + id + "'>" + urlField.getValue() + "</a>"); node = tinyMCE.activeEditor.dom.get(id); delete node.id; @@ -126,7 +124,7 @@ org.ametys.cms.editor.link.LinkListener = function(button, target, node) { - var img = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'a') : null; + var img = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'a') : null; button.getElement().setDisabled(img == null); } @@ -183,7 +181,7 @@ } org.ametys.cms.editor.link.AlternativeListener = function (elt, target, node) { - var link = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'a') : null; + var link = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'a') : null; if (!link) { elt.getElement().setValue(""); @@ -216,7 +214,7 @@ org.ametys.cms.editor.link.OpenNewWindowListener = function (elt, target, node) { - var link = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'a') : null; + var link = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'a') : null; if (!link) { elt.getElement().setValue(false); @@ -225,7 +223,7 @@ else { var target = link.getAttribute("target"); - elt.getElement().setValue(target != null && target == "_blank"); + elt.getElement().setValue(target != null && target == "_blank"); elt.getElement().setDisabled(false); } } Index: main/plugin-cms/resources/js/org/ametys/cms/editor/Images.js =================================================================== --- main/plugin-cms/resources/js/org/ametys/cms/editor/Images.js (revision 1426) +++ main/plugin-cms/resources/js/org/ametys/cms/editor/Images.js (working copy) @@ -41,7 +41,7 @@ }; org.ametys.cms.editor.images.FloatLeftListener = function (button, target, node) { - var img = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'img') : null; + var img = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'img') : null; if (img) { button.getElement().setDisabled(false); @@ -71,11 +71,11 @@ }; org.ametys.cms.editor.images.NoFloatListener = function (button, target, node) { - var img = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'img') : null; + var img = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'img') : null; if (img) { button.getElement().setDisabled(false); - button.getElement().toggle(!Ext.get(img).hasClass("floatleft") && !Ext.get(img).hasClass("floatright")); + button.getElement().toggle(!Ext.get(img).hasClass("floatleft") && !Ext.get(img).hasClass("floatright")); } else { @@ -102,7 +102,7 @@ }; org.ametys.cms.editor.images.FloatRightListener = function (button, target, node) { - var img = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'img') : null; + var img = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'img') : null; if (img) { button.getElement().setDisabled(false); @@ -138,7 +138,7 @@ org.ametys.cms.editor.images.InputImageHeightListener = function (elt, target, node) { - var img = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'img') : null; + var img = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'img') : null; if (img != null) { elt.getElement().setDisabled(false); @@ -170,7 +170,7 @@ org.ametys.cms.editor.images.InputImageWidthListener = function (elt, target, node) { - var img = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'img') : null; + var img = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'img') : null; if (img != null) { elt.getElement().setDisabled(false); @@ -208,7 +208,7 @@ } org.ametys.cms.editor.images.LegendListener = function (elt, target, node) { - var img = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'img') : null; + var img = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'img') : null; if (!img) { elt.getElement().setValue(""); @@ -247,7 +247,7 @@ } org.ametys.cms.editor.images.AlternativeListener = function (elt, target, node) { - var img = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'img') : null; + var img = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'img') : null; if (!img) { elt.getElement().setValue(""); @@ -286,11 +286,10 @@ */ org.ametys.cms.editor.images.InsertLocaleImages = function(controlId, config, pluginName) { - // FIXME i18n org.ametys.cms.editor.FileUpload( context.contextPath + config['icon-small'], - "Insérer une image...", - "Cliquez sur le bouton parcourir ci-dessous pour choisir une image sur votre disque.", + "<i18n:text i18n:key='PLUGINS_CMS_EDITOR_IMAGES_INSERT_IMAGE'/>", + "<i18n:text i18n:key='PLUGINS_CMS_EDITOR_IMAGES_BROWSE_DESC'/>", org.ametys.cms.editor.images.InsertLocaleImages._callback, org.ametys.cms.editor.FileUpload.IMAGE_FILTER); } @@ -299,7 +298,7 @@ if (id != null) { tinyMCE.activeEditor.execCommand('mceBeginUndoLevel'); - tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<img class="simple" src="' + viewHref + '" ametys_tempfile_src="' + id + '"/>'); + tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<img class="simple" src="' + viewHref + '" ametys_tempfile_src="' + id + '"/>'); tinyMCE.activeEditor.execCommand('mceEndUndoLevel'); } tinyMCE.activeEditor.getWin().focus(); Index: main/plugin-cms/resources/js/org/ametys/cms/editor/Tables.js =================================================================== --- main/plugin-cms/resources/js/org/ametys/cms/editor/Tables.js (revision 1426) +++ main/plugin-cms/resources/js/org/ametys/cms/editor/Tables.js (working copy) @@ -50,29 +50,29 @@ { var table = Ext.getDom(this._menuId); - for (var j = 0; j < table.rows.length; j++) + for (var j = 0; j < table.rows.length; j++) { - for (var i = 0; i < table.rows[j].cells.length; i++) + for (var i = 0; i < table.rows[j].cells.length; i++) { var cell = table.rows[j].cells[i]; cell.className = ""; } } - Ext.getCmp(this._overPanelId).setTitle("Insérer un tableau"); // FIXME i18n + Ext.getCmp(this._overPanelId).setTitle("<i18n:text i18n:key='CONTENT_EDITION_TABLE_INSERT_TABLE_TITLE'/>"); } org.ametys.cms.editor.Table.prototype.drawMenuTable = function(rows, cols) { var table = Ext.getDom(this._menuId); - for (var j = 0; j < table.rows.length; j++) + for (var j = 0; j < table.rows.length; j++) { - for (var i = 0; i < table.rows[j].cells.length; i++) + for (var i = 0; i < table.rows[j].cells.length; i++) { var cell = table.rows[j].cells[i]; - if (j <= rows && i <= cols) + if (j <= rows && i <= cols) { cell.className = "over"; } @@ -83,7 +83,7 @@ } } - Ext.getCmp(this._overPanelId).setTitle("Tableau " + (rows+1) + "x" + (cols+1)); // FIXME i18n + Ext.getCmp(this._overPanelId).setTitle("<i18n:text i18n:key='CONTENT_EDITION_TABLE_SET_TITLE'/>" + " " + (rows+1) + "x" + (cols+1)); } /** @@ -93,33 +93,33 @@ */ org.ametys.cms.editor.Table.prototype.createTable = function(cols, rows) { - var html = '<table'; + var html = '<table'; html += ' class="simple"'; html += ' style="width:100%"'; - html += '>'; - for (var i = 0; i < rows; i++) + html += '>'; + for (var i = 0; i < rows; i++) { - html += "<tr>"; - for (var j = 0; j < cols; j++) + html += "<tr>"; + for (var j = 0; j < cols; j++) { if (!tinymce.isIE) { - html += '<td><br mce_bogus="1"/></td>'; + html += '<td><br mce_bogus="1"/></td>'; } else { - html += '<td></td>'; + html += '<td></td>'; } } - html += "</tr>"; + html += "</tr>"; } - html += "</table>"; + html += "</table>"; tinyMCE.activeEditor.execCommand('mceBeginUndoLevel'); var bm = tinyMCE.activeEditor.selection.getBookmark(), patt = ''; - tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<br class="_mce_marker" />'); + tinyMCE.activeEditor.execCommand('mceInsertContent', false, '<br class="_mce_marker" />'); tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) { if (patt) @@ -207,19 +207,19 @@ var html = "" - html += "<table id='" + this._menuId + "' class='insert-table'>"; - for (var r = 0; r < row; r++) + html += "<table id='" + this._menuId + "' class='insert-table'>"; + for (var r = 0; r < row; r++) { - html += "<tr>"; - for (var c = 0; c < col; c++) + html += "<tr>"; + for (var c = 0; c < col; c++) { - html += "<td></td>"; + html += "<td></td>"; } - html += "</tr>"; + html += "</tr>"; } - html += "</table>"; + html += "</table>"; - html += "<div class='insert-table-hint'>Survolez le quadrillage ci-contre pour choisir la taille du tableau à créer</div>"; // FIXME i18n + html += "<div class='insert-table-hint'>" + "<i18n:text i18n:key='CONTENT_EDITION_TABLE_ARRAY_DECRIPTION'/>" + "</div>"; return html; } @@ -279,7 +279,7 @@ org.ametys.cms.editor.tables._hasColHeader = function (tableElt) { var rows = tableElt.select('tr', false); - for (var i = 0; i < rows.getCount(); i++) + for (var i = 0; i < rows.getCount(); i++) { if (rows.item(i).select('*:first', false).first().is('td')) { @@ -308,7 +308,7 @@ var i = cell.cellIndex; - for (var x = 0; x < grid.length; x++) + for (var x = 0; x < grid.length; x++) { if (org.ametys.cms.editor.tables.getColRowSpan(grid[x][i]).colspan == 1) { @@ -330,10 +330,10 @@ var cellIndex = cell.cellIndex; - for (var x = 0; x < grid.length; x++) + for (var x = 0; x < grid.length; x++) { var gridColRowSpan = org.ametys.cms.editor.tables.getColRowSpan(grid[x][cellIndex]); - if (gridColRowSpan.rowspan = 1 && gridColRowSpan.colspan == org.ametys.cms.editor.tables.getColRowSpan(cell).colspan && grid[x][cellIndex].cellIndex == cellIndex) + if (gridColRowSpan.rowspan = 1 && gridColRowSpan.colspan == org.ametys.cms.editor.tables.getColRowSpan(cell).colspan && grid[x][cellIndex].cellIndex == cellIndex) { grid[x][cellIndex].style.width = size; } @@ -359,10 +359,10 @@ var rowIndex = cell.parentNode.rowIndex; - for (var x = 0; x < grid[rowIndex].length; x++) + for (var x = 0; x < grid[rowIndex].length; x++) { var gridColRowSpan = org.ametys.cms.editor.tables.getColRowSpan(grid[rowIndex][x]); - if (gridColRowSpan.colspan = 1 && gridColRowSpan.colspan == org.ametys.cms.editor.tables.getColRowSpan(cell).colspan && grid[rowIndex][x].parentNode.rowIndex == rowIndex) + if (gridColRowSpan.colspan = 1 && gridColRowSpan.colspan == org.ametys.cms.editor.tables.getColRowSpan(cell).colspan && grid[rowIndex][x].parentNode.rowIndex == rowIndex) { grid[rowIndex][x].style.height = size; } @@ -395,20 +395,20 @@ { var grid = [], rows = table.rows, x, y, td, sd, xstart, x2, y2; - for (y=0; y<rows.length; y++) { - for (x=0; x<rows[y].cells.length; x++) { + for (y=0; y<rows.length; y++) { + for (x=0; x<rows[y].cells.length; x++) { td = rows[y].cells[x]; sd = org.ametys.cms.editor.tables.getColRowSpan(td); // All ready filled - for (xstart = x; grid[y] && grid[y][xstart]; xstart++) ; + for (xstart = x; grid[y] && grid[y][xstart]; xstart++) ; // Fill box - for (y2=y; y2<y+sd['rowspan']; y2++) { + for (y2=y; y2<y+sd['rowspan']; y2++) { if (!grid[y2]) grid[y2] = []; - for (x2=xstart; x2<xstart+sd['colspan']; x2++) + for (x2=xstart; x2<xstart+sd['colspan']; x2++) grid[y2][x2] = td; } } @@ -431,7 +431,7 @@ { return false; } - return tinyMCE.activeEditor != null && tinyMCE.activeEditor.dom.getParent(node, 'table') != null; + return tinyMCE.activeEditor != null && tinyMCE.activeEditor.dom.getParent(node, 'table') != null; } /** * @private @@ -447,7 +447,7 @@ { return false; } - return tinyMCE.activeEditor != null && tinyMCE.activeEditor.dom.getParent(node, 'tr') != null; + return tinyMCE.activeEditor != null && tinyMCE.activeEditor.dom.getParent(node, 'tr') != null; } /** * @private @@ -463,7 +463,7 @@ { return false; } - return tinyMCE.activeEditor != null && tinyMCE.activeEditor.dom.getParent(node, 'td') != null; + return tinyMCE.activeEditor != null && tinyMCE.activeEditor.dom.getParent(node, 'td') != null; } /** @@ -545,7 +545,7 @@ } org.ametys.cms.editor.tables.RowHeaderListener = function (button, target, node) { - var tableNode = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'table') : null; + var tableNode = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'table') : null; if (tableNode != null) { button.getElement().setDisabled(false); @@ -624,7 +624,7 @@ } org.ametys.cms.editor.tables.ColHeaderListener = function (button, target, node) { - var tableNode = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'table') : null; + var tableNode = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'table') : null; if (tableNode != null) { button.getElement().setDisabled(false); @@ -648,7 +648,7 @@ { var off = target == null || node == null; button.getElement().setDisabled(off); - button.getElement().toggle(!off && tinyMCE.activeEditor != null && tinyMCE.activeEditor.hasVisual); + button.getElement().toggle(!off && tinyMCE.activeEditor != null && tinyMCE.activeEditor.hasVisual); } /** @@ -672,7 +672,7 @@ org.ametys.cms.editor.tables.FloatLeft = function() { var node = tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'TABLE'); - if (node != null && node.nodeName.toUpperCase() == 'TABLE') + if (node != null && node.nodeName.toUpperCase() == 'TABLE') { tinyMCE.activeEditor.execCommand('mceBeginUndoLevel'); tinyMCE.activeEditor.dom.setAttrib(node, 'align', 'left'); @@ -682,7 +682,7 @@ }; org.ametys.cms.editor.tables.FloatLeftListener = function (button, target, node) { - var table = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'table') : null; + var table = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'table') : null; if (table) { button.getElement().setDisabled(table.style.width == '100%'); @@ -701,7 +701,7 @@ org.ametys.cms.editor.tables.NoFloat = function () { var node = tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'TABLE'); - if (node != null && node.nodeName.toUpperCase() == 'TABLE') + if (node != null && node.nodeName.toUpperCase() == 'TABLE') { tinyMCE.activeEditor.execCommand('mceBeginUndoLevel'); node.removeAttribute('align'); @@ -711,7 +711,7 @@ }; org.ametys.cms.editor.tables.NoFloatListener = function (button, target, node) { - var table = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'table') : null; + var table = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'table') : null; if (table) { button.getElement().setDisabled(table.style.width == '100%'); @@ -731,7 +731,7 @@ org.ametys.cms.editor.tables.FloatRight = function() { var node = tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'TABLE'); - if (node != null && node.nodeName.toUpperCase() == 'TABLE') + if (node != null && node.nodeName.toUpperCase() == 'TABLE') { tinyMCE.activeEditor.execCommand('mceBeginUndoLevel'); tinyMCE.activeEditor.dom.setAttrib(node, 'align', 'right'); @@ -741,7 +741,7 @@ }; org.ametys.cms.editor.tables.FloatRightListener = function (button, target, node) { - var table = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'table') : null; + var table = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, 'table') : null; if (table) { button.getElement().setDisabled(table.style.width == '100%'); @@ -780,7 +780,7 @@ } org.ametys.cms.editor.tables.AlignListener = function(button, target, node, align, valign) { - var cell = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, function (node) { return /^td|th$/i.test(node.nodeName); }) : null; + var cell = target != null && node != null && tinyMCE.activeEditor != null ? tinyMCE.activeEditor.dom.getParent(node, function (node) { return /^td|th$/i.test(node.nodeName); }) : null; if (cell) { button.getElement().setDisabled(false); @@ -799,7 +799,7 @@ } } - button.getElement().toggle(onVAlignValue && onAlignValue); + button.getElement().toggle(onVAlignValue && onAlignValue); } else { @@ -845,7 +845,7 @@ */ org.ametys.cms.editor.tables.InsertRowUp = function () { - // mceTableInsertRowBefore does not take care about th => emulation + // mceTableInsertRowBefore does not take care about th => emulation var tableNode = tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'table'); if (tableNode != null) { @@ -875,7 +875,7 @@ */ org.ametys.cms.editor.tables.InsertRowDown = function () { - // mceTableInsertRowBefore does not take care about th => emulation + // mceTableInsertRowBefore does not take care about th => emulation var tableNode = tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'table'); if (tableNode != null) { @@ -1034,7 +1034,7 @@ } var on = /^th|td$/i.test(node.nodeName) - && (!isNaN(parseInt(node.getAttribute("colspan"))) + && (!isNaN(parseInt(node.getAttribute("colspan"))) || !isNaN(parseInt(node.getAttribute("rowspan")))); button.getElement().setDisabled(!on); } @@ -1139,7 +1139,7 @@ org.ametys.cms.editor.tables.InputColSizeListener = function (elt, target, node) { - var cell = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), function (node) { return /^td|th$/i.test(node.nodeName); }) : null; + var cell = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), function (node) { return /^td|th$/i.test(node.nodeName); }) : null; if (cell != null) { elt.getElement().setDisabled(false); @@ -1173,7 +1173,7 @@ org.ametys.cms.editor.tables.InputRowSizeListener = function (elt, target, node) { - var cell = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), function (node) { return /^td|th$/i.test(node.nodeName); }) : null; + var cell = (target != null && node != null) ? tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), function (node) { return /^td|th$/i.test(node.nodeName); }) : null; if (cell != null) { elt.getElement().setDisabled(false); @@ -1214,7 +1214,7 @@ { capEl = elt.ownerDocument.createElement('caption'); if (!tinymce.isIE) - capEl.innerHTML = '<br mce_bogus="1"/>'; + capEl.innerHTML = '<br mce_bogus="1"/>'; elt.insertBefore(capEl, elt.firstChild); } @@ -1281,7 +1281,7 @@ return; } var node = tinyMCE.activeEditor.dom.getParent(tinyMCE.activeEditor.selection.getNode(), 'TABLE'); - if (node != null && node.nodeName.toUpperCase() == 'TABLE') + if (node != null && node.nodeName.toUpperCase() == 'TABLE') { org.ametys.cms.editor.tables.SetSummary._selectedTable = node; @@ -1448,7 +1448,7 @@ HTMLEditor_TableProperties._addColumnFields = function (form) { // TODO Iterate on colmuns table - for (var i=1; i < 4; i++) + for (var i=1; i < 4; i++) { var field = new Ext.form.NumberField ({ fieldLabel : 'Colonne ' + i, Index: main/plugin-cms/resources/js/org/ametys/cms/editor/FileUpload.js =================================================================== --- main/plugin-cms/resources/js/org/ametys/cms/editor/FileUpload.js (revision 1426) +++ main/plugin-cms/resources/js/org/ametys/cms/editor/FileUpload.js (working copy) @@ -20,7 +20,7 @@ * @param {String} icon The full path to icon (16x16) for the dialog box * @param {String} title The title of the dialogue box. * @param {String} helpmessage The message displayed at the top of the dialog box. - * @param {Function} callback The method that will be called when the dialog box is closed. The method signature is <ul><li>node : The tree node currently selected or null if no selection has been made (cancel)</li></ul> The method can return false to made the dialog box keep open (you should display an error message in this case) + * @param {Function} callback The method that will be called when the dialog box is closed. The method signature is <ul><li>node : The tree node currently selected or null if no selection has been made (cancel)</li></ul> The method can return false to made the dialog box keep open (you should display an error message in this case) * @param {Function} filter The filter for the filename. Choose between constants. Argument is the file name and return a boolean. */ org.ametys.cms.editor.FileUpload = function(icon, title, helpmessage, callback, filter) @@ -45,12 +45,12 @@ labelAlign: 'top', items: [ new Ext.ux.form.FileUploadField ({ - emptyText: "Sélectionnez un fichier", // FIXME i18n - fieldLabel: "Fichier", // FIXME i18n + emptyText: "<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_FIELD_EMPTYTEXT'/>"", + fieldLabel: "<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_FIELD_FIELDLABEL'/>", name: 'file', width: 260, listeners: {'fileselected': org.ametys.cms.editor.FileUpload._select}, - buttonText: "Parcourir" // FIXME i18n + buttonText: "<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_FIELD_BUTTONTEXT'/>" }) ] }); @@ -75,14 +75,14 @@ buttons: [ { - text: 'Ok', // FIXME i18n + text: "<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_BOX_OK'/>", disabled: true, handler: function() { org.ametys.cms.editor.FileUpload._submit(); } }, { - text: 'Annuler', // FIXME i18n + text: "<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_BOX_CANCEL'/>", handler: function() { org.ametys.cms.editor.FileUpload._box.hide(); @@ -110,17 +110,16 @@ { return /\.jpg|\.jpeg|\.gif|\.png$/i.test(filename); } -org.ametys.cms.editor.FileUpload.IMAGE_FILTER.label = "fichier image (avec une extension en jpg, gif ou png)"; // FIXME i18n +org.ametys.cms.editor.FileUpload.IMAGE_FILTER.label = "<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_IMAGEFILTER'/>"; org.ametys.cms.editor.FileUpload._select = function(object, name) { - var disabled = org.ametys.cms.editor.FileUpload._filter != null && !org.ametys.cms.editor.FileUpload._filter(name); + var disabled = org.ametys.cms.editor.FileUpload._filter != null && !org.ametys.cms.editor.FileUpload._filter(name); org.ametys.cms.editor.FileUpload._box.buttons[0].setDisabled(disabled); if (disabled) { - // FIXME i18n - new org.ametys.uitool.msg.ErrorDialog("Fichier non adapté", - "Le fichier choisi n'est pas du type attendu.<br/>Veuillez sélectionner un " + org.ametys.cms.editor.FileUpload._filter.label, + new org.ametys.uitool.msg.ErrorDialog("<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_ERRORDIALOG_TEXT'/>", + "<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_ERRORDIALOG_DESC'/>" + " " + org.ametys.cms.editor.FileUpload._filter.label, name, "org.ametys.cms.editor.FileUpload._select"); } @@ -131,8 +130,8 @@ org.ametys.cms.editor.FileUpload._form.getForm().submit({ url : getPluginDirectUrl('core') + "/upload/store", - waitTitle: "Insérer un fichier", // FIXME i18n - waitMsg: "Téléchargement du fichier en cours, veuillez patienter...", // FIXME i18n + waitTitle: "<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_SUBMITFORM_TITLE'/>", + waitMsg: "<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_SUBMITFORM_MSG'/>", success: org.ametys.cms.editor.FileUpload._submitSuccess, failure: org.ametys.cms.editor.FileUpload._submitFailure @@ -154,17 +153,15 @@ // TODO préciser if (action.result.error == "rejected") { - // FIXME i18n - new org.ametys.uitool.msg.ErrorDialog("Echec du téléchargement", - "Le fichier a été rejeté par le serveur", + new org.ametys.uitool.msg.ErrorDialog("<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_ERROR_MSG'/>", + "<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_ERROR_FILEREJECTED'/>", "", "org.ametys.cms.editor.FileUpload._submitFailure"); } else { - // FIXME i18n - new org.ametys.uitool.msg.ErrorDialog("Echec du téléchargement", - "Une erreur est survenue sur le serveur", + new org.ametys.uitool.msg.ErrorDialog("<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_ERROR_MSG'/>"", + "<i18n:text i18n:key='PLUGINS_CMS_FILEUPLOAD_ERROR_ON_SERVER'/>"", action.result.error.message + "\n" + action.result.error.stacktrace, "org.ametys.cms.editor.FileUpload._submitFailure"); } Index: main/workspace-cms/resources/js/org/ametys/servercomm/ServerComm.js =================================================================== --- main/workspace-cms/resources/js/org/ametys/servercomm/ServerComm.js (revision 1426) +++ main/workspace-cms/resources/js/org/ametys/servercomm/ServerComm.js (working copy) @@ -140,7 +140,7 @@ this._suspended--; - if (this._suspended == 0 && this._nextTimer != null && this._nextTimer < new Date().getTime()) + if (this._suspended == 0 && this._nextTimer != null && this._nextTimer < new Date().getTime()) { this._sendMessages(); } @@ -167,7 +167,7 @@ var ringTime = new Date().getTime() + delay; // if the current timer rings after the wanted time (at 20 milliseconds near) - if (this._nextTimer == null || ringTime < this._nextTimer - 20) + if (this._nextTimer == null || ringTime < this._nextTimer - 20) { this._nextTimer = ringTime; this._sendTask = setTimeout(function () { org.ametys.servercomm.ServerComm.getInstance()._sendMessages(); }, delay); @@ -211,7 +211,7 @@ try { http = new XMLHttpRequest(); } catch(e) { - for (var i = 0; i < activeX.length; ++i) { + for (var i = 0; i < activeX.length; ++i) { try { http = new ActiveXObject(activeX[i]); break; @@ -261,7 +261,7 @@ initHeader('X-Requested-With', pub.defaultXhrHeader); } - if(postData && pub.useDefaultHeader && (!pub.headers || !pub.headers[CONTENTTYPE])) + if(postData && pub.useDefaultHeader && (!pub.headers || !pub.headers[CONTENTTYPE])) { initHeader(CONTENTTYPE, pub.defaultPostHeader); } @@ -334,7 +334,7 @@ this._sendTask = null; this._nextTimer = null; - if (this._suspended > 0) + if (this._suspended > 0) { // communication is suspended - messages will be sent as soon as possible return; @@ -348,7 +348,7 @@ // Effectively send messages var parameters = {}; var count = 0; - for (var i = 0; i < this._messages.length; i++) + for (var i = 0; i < this._messages.length; i++) { var message = this._messages[i]; parameters[count++] = message.toRequest(); @@ -408,7 +408,7 @@ this._cancelTimeout(options); // for each message call the handler - for (var i = 0; i < options.messages.length; i++) + for (var i = 0; i < options.messages.length; i++) { var message = options.messages[i]; @@ -425,8 +425,8 @@ throwException.defer(1, this, [e]); // FIXME i18n - new org.ametys.uitool.msg.ErrorDialog("Erreur de traitement", - "Une erreur est survenue dans le traitement de la réponse serveur", + new org.ametys.uitool.msg.ErrorDialog("<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_ERROR_TITLE'/>", + "<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_ERROR_DESC'/>", e, "org.ametys.servercomm.ServerComm"); } @@ -436,7 +436,7 @@ /** * @private * @static - * @type {Map<String, Object} Association of id and send options ; to remember while timeout + * @type {Map<String, Object} Association of id and send options ; to remember while timeout */ org.ametys.servercomm.ServerComm._runningRequests = {}; /** @@ -501,7 +501,7 @@ this._cancelTimeout(options); // for each message call the handler - for (var i = 0; i < options.messages.length; i++) + for (var i = 0; i < options.messages.length; i++) { var message = options.messages[i]; @@ -519,8 +519,8 @@ throwException.defer(1, this, [e]); // FIXME i18n - new org.ametys.uitool.msg.ErrorDialog("Erreur de traitement", - "Une erreur est survenue dans le traitement de la réponse serveur", + new org.ametys.uitool.msg.ErrorDialog("<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_ERROR_TITLE'/>", + "<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_ERROR_DESC'/>", e + '', "org.ametys.servercomm.ServerComm"); } @@ -550,14 +550,14 @@ } - if (confirm("Le serveur est actuellement indisponible.\nAttendez quelques instants et cliquez sur OK. Sinon cliquez sur annuler mais vous perdrez peut-être vos données en cours d'enregistrement.") && !this._off) + if (confirm("<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_LISTENERREQUEST_FAILED_UNAVAILABLE'/>") && !this._off) { this._connection.request(options); } else { this._off = true; - document.body.innerHTML = "<h1>La connexion avec le serveur a été perdue</h1> <p>L'application s'est retrouvée dans un état instable et a été arretée</p><p><a href='index.html'>Cliquez ici pour redémarrer l'application.</a></p>" + document.body.innerHTML = "<h1>" + "<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_LISTENERREQUEST_LOST_CONNECTION_1'/>" + "</h1> <p>" + "<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_LISTENERREQUEST_LOST_CONNECTION_2'/>" +"</p><p><a href='index.html'>" + "<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_LISTENERREQUEST_LOST_CONNECTION_3'/>" + "</a></p>" } } @@ -576,24 +576,24 @@ if (response == null) { // FIXME i18n new org.ametys.uitool.msg.ErrorDialog( - "Pas de réponse du serveur", + "<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_BADRESPONSE_TITLE'/>", message, - "La réponse du serveur est incomplète et ne contient pas les information permetant de continuer le traitement correctement.", + "<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_BADRESPONSE_DESC'/>", category ); } else { var intMsg = response.selectSingleNode("message")[org.ametys.servercomm.ServerComm.xmlTextContent]; - var hasMsg = intMsg != null && intMsg != ""; + var hasMsg = intMsg != null && intMsg != ""; var intStk = response.selectSingleNode("stacktrace")[org.ametys.servercomm.ServerComm.xmlTextContent]; - var hasStk = intStk != null && intStk != ""; + var hasStk = intStk != null && intStk != ""; new org.ametys.uitool.msg.ErrorDialog( "Le serveur a échoué (code " + response.getAttribute("code") + ")", message, (hasMsg ? intMsg : "") - + (hasMsg && hasStk ? "<br/><br/>" : "") + + (hasMsg && hasStk ? "<br/><br/>" : "") + (hasStk ? intStk : ""), category ); Index: main/workspace-cms/resources/js/org/ametys/servercomm/TimeoutDialog.js =================================================================== --- main/workspace-cms/resources/js/org/ametys/servercomm/TimeoutDialog.js (revision 1426) +++ main/workspace-cms/resources/js/org/ametys/servercomm/TimeoutDialog.js (working copy) @@ -20,9 +20,8 @@ */ org.ametys.servercomm.TimeoutDialog = function (details, index) { - // FIXME i18n - var title = "Le serveur ne répond pas" - var text = "Une demande est partie en direction du serveur depuis quelques secondes mais aucune réponse n'a été encore obtenue.<br/>Vous pouvez choisir d'annuler cette requête ou d'attendre quelques secondes de plus." + var title = "<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_TITLE'/>" + var text = "<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_TEXT1'/>" + "<br/>" + "<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_TEXT2'/>" this._runningRequestIndex = index; this.getRequestOptions()._timeout = null; @@ -35,7 +34,7 @@ height: 50 }); var detailledMsg = new Ext.Panel({ - html: "<div style='white-space: nowrap'>" + details.replace(/\n?\n/g, '<br/>').replace(/\t/g, '    ') + "</div>", + html: "<div style='white-space: nowrap'>" + details.replace(/\n?\n/g, '<br/>').replace(/\t/g, '&#160;&#160;&#160;&#160;') + "</div>", cls: 'timeout-dialog-details', autoScroll: true, border: false, @@ -58,7 +57,7 @@ defaultButton: waitId, buttons : [ { - text :'Attendre', // FIXME i18n + text :"<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_WAIT'/>", id: waitId, handler : function() { @@ -70,7 +69,7 @@ } }, { - text :'Annuler', // FIXME i18n + text :"<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_CANCEL'/>", handler : function() { var currentTimeoutDialog = org.ametys.servercomm.TimeoutDialog._stack[0]; @@ -79,7 +78,7 @@ } }, { - text :'Détails >>', // FIXME i18n + text : "<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_DETAILS'/>" + " >>", // FIXME i18n handler : function() { var currentTimeoutDialog = org.ametys.servercomm.TimeoutDialog._stack[0]; @@ -88,12 +87,12 @@ { detailledMsg.setHeight(50); detailledMsg.show(); - this.setText("<< Détails"); // FIXME i18n + this.setText("<< " + "<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_DETAILS'/>"); currentTimeoutDialog.setHeight(170) } else { - this.setText("Détails >>"); // FIXME i18n + this.setText("<i18n:text i18n:key='ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_DETAILS'/>" + " >>"); detailledMsg.hide(); currentTimeoutDialog.setHeight(120) } Index: main/workspace-cms/resources/js/org/ametys/messagebus/MessageBus.js =================================================================== --- main/workspace-cms/resources/js/org/ametys/messagebus/MessageBus.js (revision 1426) +++ main/workspace-cms/resources/js/org/ametys/messagebus/MessageBus.js (working copy) @@ -17,7 +17,7 @@ * @constructor * @class This class has a single instance. Use org.ametys.messagebus.MessageBus.getInstance to get it. * This class handle the message bus. - * Object will register on it, and may send/receive events this way.<br/> + * Object will register on it, and may send/receive events this way.<br/> */ org.ametys.messagebus.MessageBus = function () { @@ -77,7 +77,7 @@ { org.ametys.servercomm.ServerComm.getInstance().suspend(); - for (var i = 0; i < this._listeners.length ; i++) + for (var i = 0; i < this._listeners.length ; i++) { var obj = this._listeners[i]; if (typeof obj.onMessage == "function") @@ -88,9 +88,8 @@ } catch (e) { - // FIXME i18n - new org.ametys.uitool.msg.ErrorDialog("Erreur du bus de message", - "Un composant a rencontré une exception lors du traitement d'un message du bus", + new org.ametys.uitool.msg.ErrorDialog("<i18n:text i18n:key='ORG_AMETYS_CMS_MESSAGEBUS_BUSERROR_TITLE'/>", + "<i18n:text i18n:key='ORG_AMETYS_CMS_MESSAGEBUS_BUSERROR_DESC'/>", e + '', "org.ametys.servercomm.ServerComm"); function throwException(e) @@ -108,9 +107,8 @@ } catch (e) { - // FIXME i18n - new org.ametys.uitool.msg.ErrorDialog("Erreur de rafraichissement", - "Un outil a rencontré une exception lors de son rafraichissement automatique", + new org.ametys.uitool.msg.ErrorDialog("<i18n:text i18n:key='ORG_AMETYS_CMS_MESSAGEBUS_REFRESHERROR_TITLE'/>", + "<i18n:text i18n:key='ORG_AMETYS_CMS_MESSAGEBUS_REFRESHERROR_DESC'/>", e + '', "org.ametys.servercomm.ServerComm"); Index: main/workspace-cms/resources/js/org/ametys/uitool/msg/ErrorDialog.js =================================================================== --- main/workspace-cms/resources/js/org/ametys/uitool/msg/ErrorDialog.js (revision 1426) +++ main/workspace-cms/resources/js/org/ametys/uitool/msg/ErrorDialog.js (working copy) @@ -30,7 +30,7 @@ height: 40 }); var detailledMsg = new Ext.Panel({ - html: "<div style='white-space: nowrap'>" + details.replace(/\n?\n/g, '<br/>').replace(/\t/g, '    ') + "</div>", + html: "<div style='white-space: nowrap'>" + details.replace(/\n?\n/g, '<br/>').replace(/\t/g, '&#160;&#160;&#160;&#160;') + "</div>", cls: 'error-dialog-details', autoScroll: true, border: false, @@ -45,8 +45,8 @@ var okId = Ext.id(); var errorDialog = new org.ametys.DialogBox( { - title: "Erreur : " + title, // FIXME i18n - originalTitle: "Erreur : " + title, // FIXME i18n + title: "<i18n:text i18n:key='ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_ERROR_MSG'/>" + title, + originalTitle: "<i18n:text i18n:key='ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_ERROR_MSG'/>" + title, cls: 'error-dialog', width: 450, height: 110, @@ -58,25 +58,25 @@ defaultButton: okId, buttons : [ { - text :'Ok', // FIXME i18n + text :"<i18n:text i18n:key='ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_OK'/>", id: okId, handler : org.ametys.uitool.msg.ErrorDialog._okMessage }, new Ext.SplitButton({ // A bug of extjs imply to set space caracter. If not the menu zone is too big. - text :'     Ok     ', // FIXME i18n + text :"&#160;&#160;&#160;&#160;&#160;" + "<i18n:text i18n:key='ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_SPLITBUTTON_OK'/>" + "&#160;&#160;&#160;&#160;&#160;", menu: { items: [{ - text: "Ignore tous les messages d'erreur en attente", + text: "<i18n:text i18n:key='ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_IGNOREERRORS'/>", handler: function() { window.setTimeout(org.ametys.uitool.msg.ErrorDialog._okMessages, 10); } }] }, handler : org.ametys.uitool.msg.ErrorDialog._okMessage }), { - text :'Détails >>', // FIXME i18n + text : "<i18n:text i18n:key='ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_DETAILS'/> >>", handler : function() { var currentErrorDialog = org.ametys.uitool.msg.ErrorDialog._stack[0]; @@ -85,12 +85,12 @@ { detailledMsg.setHeight(100); detailledMsg.show(); - this.setText("<< Détails"); // FIXME i18n + this.setText("<< <i18n:text i18n:key='ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_DETAILS'/>"); currentErrorDialog.setHeight(210) } else { - this.setText("Détails >>"); // FIXME i18n + this.setText("<i18n:text i18n:key='ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_DETAILS'/> >>"); detailledMsg.hide(); currentErrorDialog.setHeight(110) } @@ -143,7 +143,7 @@ } else { - dialogBox.setTitle(dialogBox.originalTitle + " - " + nb + " autre(s) erreur(s)"); // FIXME i18n + dialogBox.setTitle(dialogBox.originalTitle + " - " + nb + " "+ "<i18n:text i18n:key='ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_OTHERSERRORS'/>"); dialogBox.buttons[0].setVisible(false); dialogBox.buttons[1].setVisible(true); } Index: main/workspace-cms/i18n/messages_fr.xml =================================================================== --- main/workspace-cms/i18n/messages_fr.xml (revision 1426) +++ main/workspace-cms/i18n/messages_fr.xml (working copy) @@ -19,4 +19,44 @@ <message key="WORKSPACE_WEB_HOME_PAGE_INTRO"><br/><br/>Vous trouverez ci-dessous la liste des sites webs gérés.<br/>Cliquez sur le site de votre choix pour accéder à l'interface de gestion.</message> <message key="WORKSPACE_WEB_HOME_PAGE_NO_SITES">Aucun site n'est actuellement créé.</message> <message key="WORKSPACE_WEB_HOME_PAGE_CREATE_SITE">Pour créer et gérer un nouveau site web, veuillez contacter l'administrateur de votre CMS Ametys.</message> + + <!-- + + | MessageBus.js + + --> + <message key="ORG_AMETYS_CMS_MESSAGEBUS_BUSERROR_TITLE">Erreur du bus de message</message> + <message key="ORG_AMETYS_CMS_MESSAGEBUS_BUSERROR_DESC">Un composant a rencontré une exception lors du traitement d'un message du bus</message> + <message key="ORG_AMETYS_CMS_MESSAGEBUS_REFRESHERROR_TITLE">Erreur de rafraichissement</message> + <message key="ORG_AMETYS_CMS_MESSAGEBUS_REFRESHERROR_DESC">Un outil a rencontré une exception lors de son rafraichissement automatique</message> + + <!-- + + | ServerComm.js + + --> + <message key="ORG_AMETYS_CMS_SERVERCOMM_ERROR_TITLE">Erreur de traitement</message> + <message key="ORG_AMETYS_CMS_SERVERCOMM_ERROR_DESC">Une erreur est survenue dans le traitement de la réponse serveur</message> + <message key="ORG_AMETYS_CMS_SERVERCOMM_BADRESPONSE_TITLE">Pas de réponse du serveur</message> + <message key="ORG_AMETYS_CMS_SERVERCOMM_BADRESPONSE_DESC">La réponse du serveur est incomplète et ne contient pas les information permetant de continuer le traitement correctement.</message> + <message key="ORG_AMETYS_CMS_SERVERCOMM_LISTENERREQUEST_FAILED_UNAVAILABLE">Le serveur est actuellement indisponible.\nAttendez quelques instants et cliquez sur OK. Sinon cliquez sur annuler mais vous perdrez peut-être vos données en cours d'enregistrement.</message> + <message key="ORG_AMETYS_CMS_SERVERCOMM_LISTENERREQUEST_LOST_CONNECTION_1">La connexion avec le serveur a été perdue</message> + <message key="ORG_AMETYS_CMS_SERVERCOMM_LISTENERREQUEST_LOST_CONNECTION_2">L'application s'est retrouvée dans un état instable et a été arretée</message> + <message key="ORG_AMETYS_CMS_SERVERCOMM_LISTENERREQUEST_LOST_CONNECTION_3">Cliquez ici pour redémarrer l'application.</message> + + <!-- + + | TimeoutDialog.js + + --> + <message key="ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_TITLE">Le serveur ne répond pas</message> + <message key="ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_TEXT1">Une demande est partie en direction du serveur depuis quelques secondes mais aucune réponse n'a été encore obtenue.</message> + <message key="ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_TEXT2">Vous pouvez choisir d'annuler cette requête ou d'attendre quelques secondes de plus.</message> + <message key="ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_WAIT">Attendre</message> + <message key="ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_CANCEL">Annuler</message> + <message key="ORG_AMETYS_CMS_SERVERCOMM_TIMEOUTDIALOG_DETAILS">Détails</message> + + <!-- + + | ErrorDialog.js + + --> + <message key="ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_ERROR_MSG">Erreur : </message> + <message key="ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_OK">Ok</message> + <message key="ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_SPLITBUTTON_OK">Ok</message> + <message key="ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_IGNOREERRORS">Ignore tous les messages d'erreur en attente</message> + <message key="ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_DETAILS">Détails</message> + <message key="ORG_AMETYS_CMS_UITOOL_MSG_ERRORDIALOG_OTHERSERRORS">autre(s) erreur(s)</message> </catalogue> \ No newline at end of file Index: main/workspace-cms/stylesheets/cms.xsl =================================================================== --- main/workspace-cms/stylesheets/cms.xsl (revision 1426) +++ main/workspace-cms/stylesheets/cms.xsl (working copy) @@ -233,7 +233,7 @@ <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/utils/Widgets.js"></script> <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/log/LoggerEntry.js"></script> <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/log/LoggerManager.js"></script> - <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/messagebus/MessageBus.js"></script> + <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/messagebus/MessageBus.i18n.js"></script> <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/messagebus/MessageListener.js"></script> <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/messagebus/bus/MessageBuilder.js"></script> <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/messagebus/bus/MessageTargetFactory.js"></script> @@ -257,9 +257,9 @@ <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/uitool/tool/ToolPanel.js"></script> <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/uitool/tool/impl/UniqueInstanceToolFactory.js"></script> <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/uitool/msg/ErrorDialog.js"></script> - <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/servercomm/ServerComm.js"></script> + <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/servercomm/ServerComm.i18n.js"></script> <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/servercomm/ServerMessage.js"></script> - <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/servercomm/TimeoutDialog.js"></script> + <script type="text/javascript" src="{$workspace-resources}/js/org/ametys/servercomm/TimeoutDialog.i18n.js"></script> <!-- Ametys Fluent EXTJS Extension --> <!-- CSS --> <link rel="stylesheet" type="text/css" href="{$workspace-resources}/fluent/css/theme/ametys/all.css" />