@ckeditor/ckeditor5-language 29.1.0 → 31.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/language.js +1 -1
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de-ch.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/lang/translations/da.po +29 -0
- package/lang/translations/pt-br.po +29 -0
- package/lang/translations/ru.po +29 -0
- package/lang/translations/zh-cn.po +29 -0
- package/package.json +9 -9
- package/src/textpartlanguageui.js +14 -14
- package/CHANGELOG.md +0 -4
package/build/language.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
4
|
*/
|
|
5
|
-
window.CKEditor5=window.CKEditor5||{},window.CKEditor5.language=function(e){var t={};function n(
|
|
5
|
+
!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"Choose language":"Choose language",Language:"Language","Remove language":"Remove language"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),window.CKEditor5=window.CKEditor5||{},window.CKEditor5.language=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t,n){e.exports=n(3)("./src/core.js")},function(e,t,n){e.exports=n(3)("./src/ui.js")},function(e,t,n){e.exports=n(3)("./src/utils.js")},function(e,t){e.exports=CKEditor5.dll},function(e,t,n){var o=n(5),r=n(6);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o(r,a);e.exports=r.locals||{}},function(e,t,n){"use strict";var o,r=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function u(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},o=[],r=0;r<e.length;r++){var a=e[r],s=t.base?a[0]+t.base:a[0],l=n[s]||0,c="".concat(s," ").concat(l);n[s]=l+1;var d=u(c),g={css:a[1],media:a[2],sourceMap:a[3]};-1!==d?(i[d].references++,i[d].updater(g)):i.push({identifier:c,updater:b(g,t),references:1}),o.push(c)}return o}function l(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var r=n.nc;r&&(o.nonce=r)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var i=a(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var c,d=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function g(e,t,n,o){var r=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=d(t,r);else{var a=document.createTextNode(r),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function f(e,t,n){var o=n.css,r=n.media,a=n.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var p=null,m=0;function b(e,t){var n,o,r;if(t.singleton){var a=m++;n=p||(p=l(t)),o=g.bind(null,n,a,!1),r=g.bind(null,n,a,!0)}else n=l(t),o=f.bind(null,n,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=r());var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<n.length;o++){var r=u(n[o]);i[r].references--}for(var a=s(e,t),l=0;l<n.length;l++){var c=u(n[l]);0===i[c].references&&(i[c].updater(),i.splice(c,1))}n=a}}}},function(e,t){e.exports=".ck-content span[lang]{font-style:italic}"},function(e,t,n){"use strict";n.r(t),n.d(t,"TextPartLanguage",(function(){return c})),n.d(t,"TextPartLanguageEditing",(function(){return u})),n.d(t,"TextPartLanguageUI",(function(){return l}));var o=n(0),r=n(2);function a(e,t){return`${e}:${t=t||Object(r.getLanguageDirection)(e)}`}class i extends o.Command{refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,"language")}execute({languageCode:e,textDirection:t}={}){const n=this.editor.model,o=n.document.selection,r=!!e&&a(e,t);n.change(e=>{if(o.isCollapsed)r?e.setSelectionAttribute("language",r):e.removeSelectionAttribute("language");else{const t=n.schema.getValidRanges(o.getRanges(),"language");for(const n of t)r?e.setAttribute("language",r,n):e.removeAttribute("language",n)}})}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,n=e.document.selection;if(n.isCollapsed)return n.getAttribute("language")||!1;for(const e of n.getRanges())for(const n of e.getItems())if(t.checkAttribute(n,"language"))return n.getAttribute("language")||!1;return!1}}class u extends o.Plugin{static get pluginName(){return"TextPartLanguageEditing"}constructor(e){super(e),e.config.define("language",{textPartLanguage:[{title:"Arabic",languageCode:"ar"},{title:"French",languageCode:"fr"},{title:"Spanish",languageCode:"es"}]})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"language"}),e.model.schema.setAttributeProperties("language",{copyOnEnter:!0}),this._defineConverters(),e.commands.add("textPartLanguage",new i(e))}_defineConverters(){const e=this.editor.conversion;e.for("upcast").elementToAttribute({model:{key:"language",value:e=>a(e.getAttribute("lang"),e.getAttribute("dir"))},view:{name:"span",attributes:{lang:/[\s\S]+/}}}),e.for("downcast").attributeToElement({model:"language",view:(e,{writer:t})=>{if(!e)return;const{languageCode:n,textDirection:o}=function(e){const[t,n]=e.split(":");return{languageCode:t,textDirection:n}}(e);return t.createAttributeElement("span",{lang:n,dir:o})}})}}var s=n(1);n(4);class l extends o.Plugin{static get pluginName(){return"TextPartLanguageUI"}init(){const e=this.editor,t=e.t,n=e.config.get("language.textPartLanguage"),o=t("Choose language"),i=t("Remove language"),u=t("Language");e.ui.componentFactory.add("textPartLanguage",t=>{const l=new r.Collection,c={},d=e.commands.get("textPartLanguage");l.add({type:"button",model:new s.Model({label:i,languageCode:!1,withText:!0})}),l.add({type:"separator"});for(const e of n){const t={type:"button",model:new s.Model({label:e.title,languageCode:e.languageCode,textDirection:e.textDirection,withText:!0})},n=a(e.languageCode,e.textDirection);t.model.bind("isOn").to(d,"value",e=>e===n),l.add(t),c[n]=e.title}const g=Object(s.createDropdown)(t);return Object(s.addListToDropdown)(g,l),g.buttonView.set({isOn:!1,withText:!0,tooltip:u}),g.extendTemplate({attributes:{class:["ck-text-fragment-language-dropdown"]}}),g.bind("isEnabled").to(d,"isEnabled"),g.buttonView.bind("label").to(d,"value",e=>c[e]||o),this.listenTo(g,"execute",t=>{d.execute({languageCode:t.source.languageCode,textDirection:t.source.textDirection}),e.editing.view.focus()}),g})}}class c extends o.Plugin{static get requires(){return[u,l]}static get pluginName(){return"TextPartLanguage"}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(a){const n=a.cs=a.cs||{};n.dictionary=Object.assign(n.dictionary||{},{"Choose language":"Vybrat jazyk",Language:"Jazyk","Remove language":"Odstranit jazyk"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const o=n.da=n.da||{};o.dictionary=Object.assign(o.dictionary||{},{"Choose language":"Vælg sprog",Language:"Sprog","Remove language":"Fjern sprog"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e){const n=e["de-ch"]=e["de-ch"]||{};n.dictionary=Object.assign(n.dictionary||{},{"Choose language":"Sprache auswählen",Language:"Sprache","Remove language":"Sprache entfernen"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e){const n=e.de=e.de||{};n.dictionary=Object.assign(n.dictionary||{},{"Choose language":"Sprache auswählen",Language:"Sprache","Remove language":"Sprache entfernen"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const a=i.es=i.es||{};a.dictionary=Object.assign(a.dictionary||{},{"Choose language":"Elija el idioma",Language:"Idioma","Remove language":"Quitar idioma"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(a){const n=a.fr=a.fr||{};n.dictionary=Object.assign(n.dictionary||{},{"Choose language":"Choisir la langue",Language:"Langue","Remove language":"Supprimer la langue"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(o){const a=o.gl=o.gl||{};a.dictionary=Object.assign(a.dictionary||{},{"Choose language":"Escolla o idioma",Language:"Idioma","Remove language":"Retirar o idioma"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(a){const e=a.hu=a.hu||{};e.dictionary=Object.assign(e.dictionary||{},{"Choose language":"Nyelv választása",Language:"Nyelv","Remove language":"Nyelv eltávolítása"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(a){const i=a.id=a.id||{};i.dictionary=Object.assign(i.dictionary||{},{"Choose language":"Pilih bahasa",Language:"Bahasa","Remove language":"Singkirkan bahasa"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const n=i.it=i.it||{};n.dictionary=Object.assign(n.dictionary||{},{"Choose language":"Seleziona lingua",Language:"Lingua","Remove language":"Rimuovi lingua"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(a){const n=a.nl=a.nl||{};n.dictionary=Object.assign(n.dictionary||{},{"Choose language":"Kies taal",Language:"Taal","Remove language":"Taal verwijderen"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const a=n.pl=n.pl||{};a.dictionary=Object.assign(a.dictionary||{},{"Choose language":"Wybierz język",Language:"Język","Remove language":"Usuń język"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(o){const i=o["pt-br"]=o["pt-br"]||{};i.dictionary=Object.assign(i.dictionary||{},{"Choose language":"Escolher idioma",Language:"Idioma","Remove language":"Remover idioma"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(a){const e=a.ro=a.ro||{};e.dictionary=Object.assign(e.dictionary||{},{"Choose language":"Alege limba",Language:"Limbă","Remove language":"Șterge limba"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const a=n.ru=n.ru||{};a.dictionary=Object.assign(a.dictionary||{},{"Choose language":"Выбрать язык",Language:"Язык","Remove language":"Убрать язык"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(a){const n=a.sk=a.sk||{};n.dictionary=Object.assign(n.dictionary||{},{"Choose language":"Vybrať jazyk",Language:"Jazyk","Remove language":"Odstrániť jazyk"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const a=n["sr-latn"]=n["sr-latn"]||{};a.dictionary=Object.assign(a.dictionary||{},{"Choose language":"Izaberi jezik",Language:"Jezik","Remove language":"Odstrani jezik"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const a=n.sr=n.sr||{};a.dictionary=Object.assign(a.dictionary||{},{"Choose language":"Изабери језик",Language:"Језик","Remove language":"Одстрани језик"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(i){const a=i.tk=i.tk||{};a.dictionary=Object.assign(a.dictionary||{},{"Choose language":"Dili saýlaň",Language:"Dil","Remove language":"Dili pozuň"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const a=n.uk=n.uk||{};a.dictionary=Object.assign(a.dictionary||{},{"Choose language":"Обрати мову",Language:"Мова","Remove language":"Видалити мову"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const a=n["zh-cn"]=n["zh-cn"]||{};a.dictionary=Object.assign(a.dictionary||{},{"Choose language":"选择语言",Language:"语言","Remove language":"移除语言"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(n){const a=n.zh=n.zh||{};a.dictionary=Object.assign(a.dictionary||{},{"Choose language":"選擇語言",Language:"語言","Remove language":"移除語言"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Danish (https://www.transifex.com/ckeditor/teams/11143/da/)\n"
|
|
16
|
+
"Language: da\n"
|
|
17
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "Toolbar button tooltip for the text part language feature."
|
|
20
|
+
msgid "Language"
|
|
21
|
+
msgstr "Sprog"
|
|
22
|
+
|
|
23
|
+
msgctxt "Default label for the text part language dropdown."
|
|
24
|
+
msgid "Choose language"
|
|
25
|
+
msgstr "Vælg sprog"
|
|
26
|
+
|
|
27
|
+
msgctxt "The label of the remove language option for the text part language dropdown."
|
|
28
|
+
msgid "Remove language"
|
|
29
|
+
msgstr "Fjern sprog"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/ckeditor/teams/11143/pt_BR/)\n"
|
|
16
|
+
"Language: pt_BR\n"
|
|
17
|
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "Toolbar button tooltip for the text part language feature."
|
|
20
|
+
msgid "Language"
|
|
21
|
+
msgstr "Idioma"
|
|
22
|
+
|
|
23
|
+
msgctxt "Default label for the text part language dropdown."
|
|
24
|
+
msgid "Choose language"
|
|
25
|
+
msgstr "Escolher idioma"
|
|
26
|
+
|
|
27
|
+
msgctxt "The label of the remove language option for the text part language dropdown."
|
|
28
|
+
msgid "Remove language"
|
|
29
|
+
msgstr "Remover idioma"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Russian (https://www.transifex.com/ckeditor/teams/11143/ru/)\n"
|
|
16
|
+
"Language: ru\n"
|
|
17
|
+
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "Toolbar button tooltip for the text part language feature."
|
|
20
|
+
msgid "Language"
|
|
21
|
+
msgstr "Язык"
|
|
22
|
+
|
|
23
|
+
msgctxt "Default label for the text part language dropdown."
|
|
24
|
+
msgid "Choose language"
|
|
25
|
+
msgstr "Выбрать язык"
|
|
26
|
+
|
|
27
|
+
msgctxt "The label of the remove language option for the text part language dropdown."
|
|
28
|
+
msgid "Remove language"
|
|
29
|
+
msgstr "Убрать язык"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
|
|
2
|
+
#
|
|
3
|
+
# !!! IMPORTANT !!!
|
|
4
|
+
#
|
|
5
|
+
# Before you edit this file, please keep in mind that contributing to the project
|
|
6
|
+
# translations is possible ONLY via the Transifex online service.
|
|
7
|
+
#
|
|
8
|
+
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
|
|
9
|
+
#
|
|
10
|
+
# To learn more, check out the official contributor's guide:
|
|
11
|
+
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
|
|
12
|
+
#
|
|
13
|
+
msgid ""
|
|
14
|
+
msgstr ""
|
|
15
|
+
"Language-Team: Chinese (China) (https://www.transifex.com/ckeditor/teams/11143/zh_CN/)\n"
|
|
16
|
+
"Language: zh_CN\n"
|
|
17
|
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
|
18
|
+
|
|
19
|
+
msgctxt "Toolbar button tooltip for the text part language feature."
|
|
20
|
+
msgid "Language"
|
|
21
|
+
msgstr "语言"
|
|
22
|
+
|
|
23
|
+
msgctxt "Default label for the text part language dropdown."
|
|
24
|
+
msgid "Choose language"
|
|
25
|
+
msgstr "选择语言"
|
|
26
|
+
|
|
27
|
+
msgctxt "The label of the remove language option for the text part language dropdown."
|
|
28
|
+
msgid "Remove language"
|
|
29
|
+
msgstr "移除语言"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-language",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "31.1.0",
|
|
4
4
|
"description": "Text part language feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
],
|
|
13
13
|
"main": "src/index.js",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"ckeditor5": "^
|
|
15
|
+
"ckeditor5": "^31.1.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@ckeditor/ckeditor5-core": "^
|
|
19
|
-
"@ckeditor/ckeditor5-dev-utils": "^
|
|
20
|
-
"@ckeditor/ckeditor5-editor-classic": "^
|
|
21
|
-
"@ckeditor/ckeditor5-engine": "^
|
|
22
|
-
"@ckeditor/ckeditor5-paragraph": "^
|
|
23
|
-
"@ckeditor/ckeditor5-theme-lark": "^
|
|
24
|
-
"@ckeditor/ckeditor5-ui": "^
|
|
18
|
+
"@ckeditor/ckeditor5-core": "^31.1.0",
|
|
19
|
+
"@ckeditor/ckeditor5-dev-utils": "^26.0.0",
|
|
20
|
+
"@ckeditor/ckeditor5-editor-classic": "^31.1.0",
|
|
21
|
+
"@ckeditor/ckeditor5-engine": "^31.1.0",
|
|
22
|
+
"@ckeditor/ckeditor5-paragraph": "^31.1.0",
|
|
23
|
+
"@ckeditor/ckeditor5-theme-lark": "^31.1.0",
|
|
24
|
+
"@ckeditor/ckeditor5-ui": "^31.1.0",
|
|
25
25
|
"webpack": "^4.43.0",
|
|
26
26
|
"webpack-cli": "^3.3.11"
|
|
27
27
|
},
|
|
@@ -47,6 +47,20 @@ export default class TextPartLanguageUI extends Plugin {
|
|
|
47
47
|
|
|
48
48
|
const languageCommand = editor.commands.get( 'textPartLanguage' );
|
|
49
49
|
|
|
50
|
+
// Item definition with false `languageCode` will behave as remove lang button.
|
|
51
|
+
itemDefinitions.add( {
|
|
52
|
+
type: 'button',
|
|
53
|
+
model: new Model( {
|
|
54
|
+
label: removeTitle,
|
|
55
|
+
languageCode: false,
|
|
56
|
+
withText: true
|
|
57
|
+
} )
|
|
58
|
+
} );
|
|
59
|
+
|
|
60
|
+
itemDefinitions.add( {
|
|
61
|
+
type: 'separator'
|
|
62
|
+
} );
|
|
63
|
+
|
|
50
64
|
for ( const option of options ) {
|
|
51
65
|
const def = {
|
|
52
66
|
type: 'button',
|
|
@@ -67,20 +81,6 @@ export default class TextPartLanguageUI extends Plugin {
|
|
|
67
81
|
titles[ language ] = option.title;
|
|
68
82
|
}
|
|
69
83
|
|
|
70
|
-
itemDefinitions.add( {
|
|
71
|
-
type: 'separator'
|
|
72
|
-
} );
|
|
73
|
-
|
|
74
|
-
// Item definition with false `languageCode` will behave as remove lang button.
|
|
75
|
-
itemDefinitions.add( {
|
|
76
|
-
type: 'button',
|
|
77
|
-
model: new Model( {
|
|
78
|
-
label: removeTitle,
|
|
79
|
-
languageCode: false,
|
|
80
|
-
withText: true
|
|
81
|
-
} )
|
|
82
|
-
} );
|
|
83
|
-
|
|
84
84
|
const dropdownView = createDropdown( locale );
|
|
85
85
|
addListToDropdown( dropdownView, itemDefinitions );
|
|
86
86
|
|
package/CHANGELOG.md
DELETED