From 844420df40c18fed97976da75265297e6386852a Mon Sep 17 00:00:00 2001 From: Christopher Joe Date: Wed, 31 May 2017 15:31:41 +1200 Subject: [PATCH] Enhancement Translation strings updated --- client/dist/js/TinyMCE_sslink-internal.js | 2 +- client/lang/en.js | 2 +- client/lang/src/en.json | 4 ++-- client/src/legacy/TinyMCE_sslink-internal.js | 4 ++-- tests/behat/features/insert-a-link.feature | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/client/dist/js/TinyMCE_sslink-internal.js b/client/dist/js/TinyMCE_sslink-internal.js index cf689ae6..38af2969 100644 --- a/client/dist/js/TinyMCE_sslink-internal.js +++ b/client/dist/js/TinyMCE_sslink-internal.js @@ -1 +1 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=18)}([function(e,t){e.exports=jQuery},function(e,t){e.exports=i18n},,,,,,,,function(e,t){e.exports=Injector},function(e,t){e.exports=InsertLinkModal},function(e,t){e.exports=React},function(e,t){e.exports=ReactApollo},function(e,t){e.exports=ReactDom},function(e,t){e.exports=ShortcodeSerialiser},function(e,t){e.exports=TinyMCEActionRegistrar},,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n.n(r),o=n(15),a=n.n(o),l=n(11),s=n.n(l),c=n(13),u=n.n(c),p=n(12),d=(n.n(p),n(0)),f=n.n(d),g=n(14),k=n.n(g),h=n(10),_=(n.n(h),n(9));n.n(_),a.a.addAction("sslink",{text:i.a._t("CMS.LINKLABEL_PAGE","Link to page"),onclick:function(e){return e.execCommand("sslinkinternal")}});var m={init:function(e){e.addCommand("sslinkinternal",function(){f()("#"+e.id).entwine("ss").openLinkInternalDialog()})}},x="insert-link__dialog-wrapper--internal",A=n.i(_.provideInjector)(n.i(h.createInsertLinkModal)("SilverStripe\\CMS\\Controllers\\CMSPageEditController","editorInternalLink"));f.a.entwine("ss",function(e){e("textarea.htmleditor").entwine({openLinkInternalDialog:function(){var t=e("#"+x);t.length||(t=e('
'),e("body").append(t)),t.addClass("insert-link__dialog-wrapper"),t.setElement(this),t.open()}}),e("#"+x).entwine({renderModal:function(e){var t=this,n=ss.store,r=ss.apolloClient,o=function(){return t.close()},a=function(){return t.handleInsert.apply(t,arguments)},l=this.getOriginalAttributes();u.a.render(s.a.createElement(p.ApolloProvider,{store:n,client:r},s.a.createElement(A,{show:e,onInsert:a,onHide:o,title:i.a._t("CMS.LINK_PAGE","Insert page link"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--internal",fileAttributes:l})),this[0])},buildAttributes:function(e){return{href:k.a.serialise({name:"sitetree_link",properties:{id:e.PageID}},!0)+(e.Anchor&&e.Anchor.length?"#"+e.Anchor:""),target:e.TargetBlank?"_blank":"",title:e.Description}},getOriginalAttributes:function(){var t=this.getElement().getEditor(),n=e(t.getSelectedNode()),r=(n.attr("href")||"").split("#");if(!r[0])return{};var i=k.a.match("sitetree_link",!1,r[0]);return i?{PageID:i.properties.id?parseInt(i.properties.id,10):0,Anchor:r[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}:{}}})}),tinymce.PluginManager.add("sslinkinternal",function(e){return m.init(e)}),t.default=m}]); \ No newline at end of file +!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=18)}([function(t,e){t.exports=jQuery},function(t,e){t.exports=i18n},,,,,,,,function(t,e){t.exports=Injector},function(t,e){t.exports=InsertLinkModal},function(t,e){t.exports=React},function(t,e){t.exports=ReactApollo},function(t,e){t.exports=ReactDom},function(t,e){t.exports=ShortcodeSerialiser},function(t,e){t.exports=TinyMCEActionRegistrar},,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n.n(r),o=n(15),a=n.n(o),l=n(11),s=n.n(l),c=n(13),u=n.n(c),d=n(12),p=(n.n(d),n(0)),f=n.n(p),g=n(14),h=n.n(g),k=n(10),_=(n.n(k),n(9));n.n(_),a.a.addAction("sslink",{text:i.a._t("CMS.LINKLABEL_PAGE","Page on this site"),onclick:function(t){return t.execCommand("sslinkinternal")}});var m={init:function(t){t.addCommand("sslinkinternal",function(){f()("#"+t.id).entwine("ss").openLinkInternalDialog()})}},x="insert-link__dialog-wrapper--internal",A=n.i(_.provideInjector)(n.i(k.createInsertLinkModal)("SilverStripe\\CMS\\Controllers\\CMSPageEditController","editorInternalLink"));f.a.entwine("ss",function(t){t("textarea.htmleditor").entwine({openLinkInternalDialog:function(){var e=t("#"+x);e.length||(e=t('
'),t("body").append(e)),e.addClass("insert-link__dialog-wrapper"),e.setElement(this),e.open()}}),t("#"+x).entwine({renderModal:function(t){var e=this,n=ss.store,r=ss.apolloClient,o=function(){return e.close()},a=function(){return e.handleInsert.apply(e,arguments)},l=this.getOriginalAttributes();u.a.render(s.a.createElement(d.ApolloProvider,{store:n,client:r},s.a.createElement(A,{show:t,onInsert:a,onHide:o,title:i.a._t("CMS.LINK_PAGE","Link to a page"),bodyClassName:"modal__dialog",className:"insert-link__dialog-wrapper--internal",fileAttributes:l})),this[0])},buildAttributes:function(t){return{href:h.a.serialise({name:"sitetree_link",properties:{id:t.PageID}},!0)+(t.Anchor&&t.Anchor.length?"#"+t.Anchor:""),target:t.TargetBlank?"_blank":"",title:t.Description}},getOriginalAttributes:function(){var e=this.getElement().getEditor(),n=t(e.getSelectedNode()),r=(n.attr("href")||"").split("#");if(!r[0])return{};var i=h.a.match("sitetree_link",!1,r[0]);return i?{PageID:i.properties.id?parseInt(i.properties.id,10):0,Anchor:r[1]||"",Description:n.attr("title"),TargetBlank:!!n.attr("target")}:{}}})}),tinymce.PluginManager.add("sslinkinternal",function(t){return m.init(t)}),e.default=m}]); \ No newline at end of file diff --git a/client/lang/en.js b/client/lang/en.js index 94d09533..8db14879 100644 --- a/client/lang/en.js +++ b/client/lang/en.js @@ -11,7 +11,7 @@ if (typeof(ss) === 'undefined' || typeof(ss.i18n) === 'undefined') { "CMS.ConfirmRestoreFromLive": "Are you sure you want to revert draft to when the page was last published?", "CMS.Duplicate": "Duplicate", "CMS.EditPage": "Edit", - "CMS.LINKLABEL_PAGE": "Link to page", + "CMS.LINKLABEL_PAGE": "Page on this site", "CMS.ONLYSELECTTWO": "You can only compare two versions at this time.", "CMS.Restore": "Are you sure you want to restore this page from archive?", "CMS.RestoreToRoot": "Are you sure you want to restore this page from archive?\n\nBecause the parent page is not available this will be restored to the top level.", diff --git a/client/lang/src/en.json b/client/lang/src/en.json index ae927a89..b67e2aaa 100644 --- a/client/lang/src/en.json +++ b/client/lang/src/en.json @@ -4,8 +4,8 @@ "CMS.ConfirmRestoreFromLive": "Are you sure you want to revert draft to when the page was last published?", "CMS.Duplicate": "Duplicate", "CMS.EditPage": "Edit", - "CMS.LINK_PAGE": "Insert page link", - "CMS.LINKLABEL_PAGE": "Link to page", + "CMS.LINK_PAGE": "Link to a page", + "CMS.LINKLABEL_PAGE": "Page on this site", "CMS.ONLYSELECTTWO": "You can only compare two versions at this time.", "CMS.Restore": "Are you sure you want to restore this page from archive?", "CMS.RestoreToRoot": "Are you sure you want to restore this page from archive?\n\nBecause the parent page is not available this will be restored to the top level.", diff --git a/client/src/legacy/TinyMCE_sslink-internal.js b/client/src/legacy/TinyMCE_sslink-internal.js index 4d9030a7..fc12f5b2 100644 --- a/client/src/legacy/TinyMCE_sslink-internal.js +++ b/client/src/legacy/TinyMCE_sslink-internal.js @@ -11,7 +11,7 @@ import { provideInjector } from 'lib/Injector'; // Link to external url TinyMCEActionRegistrar.addAction('sslink', { - text: i18n._t('CMS.LINKLABEL_PAGE', 'Link to page'), + text: i18n._t('CMS.LINKLABEL_PAGE', 'Page on this site'), // eslint-disable-next-line no-console onclick: (editor) => editor.execCommand('sslinkinternal'), }); @@ -65,7 +65,7 @@ jQuery.entwine('ss', ($) => { show={show} onInsert={handleInsert} onHide={handleHide} - title={i18n._t('CMS.LINK_PAGE', 'Insert page link')} + title={i18n._t('CMS.LINK_PAGE', 'Link to a page')} bodyClassName="modal__dialog" className="insert-link__dialog-wrapper--internal" fileAttributes={attrs} diff --git a/tests/behat/features/insert-a-link.feature b/tests/behat/features/insert-a-link.feature index 00284267..d659aa82 100644 --- a/tests/behat/features/insert-a-link.feature +++ b/tests/behat/features/insert-a-link.feature @@ -16,7 +16,7 @@ So that I can link to a external website or a page on my site Scenario: I can link to an internal page Given I select "awesome" in the "Content" HTML field And I press the "Insert Link" HTML field button - And I click "Link to page" in the ".mce-menu" element + And I click "Page on this site" in the ".mce-menu" element And I should see an "form#Form_editorInternalLink" element When I click "(Choose Page)" in the ".Select-multi-value-wrapper" element And I click "About Us" in the ".treedropdownfield__menu" element @@ -31,7 +31,7 @@ So that I can link to a external website or a page on my site Given I fill in the "Content" HTML field with "awesome" And I select "awesome" in the "Content" HTML field And I press the "Insert Link" HTML field button - And I click "Link to page" in the ".mce-menu" element + And I click "Page on this site" in the ".mce-menu" element And I should see an "form#Form_editorInternalLink" element Then I should see "About Us" in the ".Select-value" element And the "Link description" field should contain "my desc"