@ckbox/i18n 2.9.0-rc.5 → 2.9.1
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/README.md +4 -4
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Using a build served from the CDN is the simplest and fastest way of embedding C
|
|
|
13
13
|
To start using CKBox on your website, embed the following `script` element in the HTML code of the page:
|
|
14
14
|
|
|
15
15
|
```html
|
|
16
|
-
<script src="https://cdn.ckbox.io/ckbox/2.9.
|
|
16
|
+
<script src="https://cdn.ckbox.io/ckbox/2.9.1/ckbox.js"></script>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
Quick implementation example:
|
|
@@ -23,7 +23,7 @@ Quick implementation example:
|
|
|
23
23
|
<html>
|
|
24
24
|
<head>
|
|
25
25
|
<meta charset="UTF-8" />
|
|
26
|
-
<script src="https://cdn.ckbox.io/ckbox/2.9.
|
|
26
|
+
<script src="https://cdn.ckbox.io/ckbox/2.9.1/ckbox.js"></script>
|
|
27
27
|
</head>
|
|
28
28
|
<body>
|
|
29
29
|
<div id="ckbox"></div>
|
|
@@ -48,10 +48,10 @@ The code snippet below presents the simplest scenario for integration of CKEdito
|
|
|
48
48
|
<html>
|
|
49
49
|
<head>
|
|
50
50
|
<meta charset="UTF-8" />
|
|
51
|
-
<script src="https://cdn.ckbox.io/ckbox/2.9.
|
|
51
|
+
<script src="https://cdn.ckbox.io/ckbox/2.9.1/ckbox.js"></script>
|
|
52
52
|
<link
|
|
53
53
|
rel="stylesheet"
|
|
54
|
-
href="https://cdn.ckbox.io/ckbox/2.9.
|
|
54
|
+
href="https://cdn.ckbox.io/ckbox/2.9.1/styles/themes/lark.css"
|
|
55
55
|
/>
|
|
56
56
|
<link rel="stylesheet" href="https://cdn.ckeditor.com/ckeditor5/42.0.0/ckeditor5.css" />
|
|
57
57
|
</head>
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
function
|
|
4
|
+
function _0x48ab(){const _0x462535=['PluralRules','4393908yvhEuq','1312venMQa','log','slice','code','includes','pluralUtils','push','getKey','createElement','indexOf','useEffect','exec','\x27\x20is\x20missing.','Fragment','_one','text','387154rgqWrX','createContext','warn','values','charAt','6078VPYjbU','strong','\x22\x20is\x20not\x20supported.','18sDWAoV','length','7112576zRSgFr','22045AkUQaf','supportedLocalesOf','9049470iQCuVh','Provider','5537NKKhJS','377262KbqabW','plural','tag','_rules'];_0x48ab=function(){return _0x462535;};return _0x48ab();}function _0x1165(_0x28191c,_0x1ab802){const _0x48ab10=_0x48ab();return _0x1165=function(_0x116580,_0x3552eb){_0x116580=_0x116580-0xc9;let _0x1bba53=_0x48ab10[_0x116580];return _0x1bba53;},_0x1165(_0x28191c,_0x1ab802);}const _0x19f89b=_0x1165;(function(_0x256a42,_0x87da01){const _0x21ce62=_0x1165,_0x4ec995=_0x256a42();while(!![]){try{const _0x40f28a=parseInt(_0x21ce62(0xea))/0x1+parseInt(_0x21ce62(0xd4))/0x2*(parseInt(_0x21ce62(0xcc))/0x3)+parseInt(_0x21ce62(0xda))/0x4*(parseInt(_0x21ce62(0xcf))/0x5)+parseInt(_0x21ce62(0xc9))/0x6*(-parseInt(_0x21ce62(0xd3))/0x7)+-parseInt(_0x21ce62(0xce))/0x8+parseInt(_0x21ce62(0xd9))/0x9+-parseInt(_0x21ce62(0xd1))/0xa;if(_0x40f28a===_0x87da01)break;else _0x4ec995['push'](_0x4ec995['shift']());}catch(_0x1c6231){_0x4ec995['push'](_0x4ec995['shift']());}}}(_0x48ab,0xd1792));import*as _0x1f7aa9 from'react';import{sprintf}from'sprintf-js';class Plural{constructor(_0x1397dd){const _0x580557=_0x1165;this['lang']=_0x1397dd;try{this[_0x580557(0xd7)]=new Intl[(_0x580557(0xd8))](_0x1397dd);}catch(_0x2d04b3){console[_0x580557(0xec)]('Plural\x20rules\x20could\x20not\x20be\x20created.\x20Perhaps\x20`Intl.PluralRules`\x20is\x20not\x20supported?');}}[_0x19f89b(0xe1)](_0x13623c,_0xda3b18){const _0x16d9c8=_0x19f89b;if(!this['_rules'])return _0x13623c+_0x16d9c8(0xe8);const _0x2cf4f1=this[_0x16d9c8(0xd7)]['select'](_0xda3b18);return _0x13623c+'_'+_0x2cf4f1;}}Plural['isSupported']=_0x2c2999=>{const _0x2ebcd8=_0x19f89b;try{return Intl[_0x2ebcd8(0xd8)][_0x2ebcd8(0xd0)]([_0x2c2999])[_0x2ebcd8(0xcd)]>0x0;}catch(_0x2ced3d){return![];}};const I18nContext=_0x1f7aa9[_0x19f89b(0xeb)]({'debug':![],'lang':'en','resources':{},'pluralUtils':new Plural('en')}),I18nProvider=({children:_0x3b221a,debug:debug=![],lang:lang='en',resources:resources={}})=>{const _0xcd575f=_0x19f89b;return _0x1f7aa9[_0xcd575f(0xe4)](()=>{const _0x1b6818=_0xcd575f,_0x229040=Plural['isSupported'](lang);!_0x229040&&console[_0x1b6818(0xec)]('Plural\x20form\x20for\x20language\x20\x22'+lang+_0x1b6818(0xcb));},[lang]),_0x1f7aa9[_0xcd575f(0xe2)](I18nContext[_0xcd575f(0xd2)],{'value':{'debug':debug,'lang':lang,'pluralUtils':new Plural(lang),'resources':resources}},_0x3b221a);},TAG_REGEX=/<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ALLOWED_TAGS=['em',_0x19f89b(0xca),_0x19f89b(0xdd)],getMsg=(_0x3d3f7c,_0x44b37e={},_0x2eec46)=>{const _0x2b6544=_0x19f89b,_0x97fdbe=_0x2eec46[_0x2b6544(0xd5)];if(_0x44b37e[_0x3d3f7c]&&_0x97fdbe===undefined)return{'found':!![],'msg':_0x44b37e[_0x3d3f7c]};const _0x4857c5=Object['keys'](_0x44b37e)['filter'](_0x38ceea=>_0x38ceea[_0x2b6544(0xe3)](_0x3d3f7c)===0x0);if(_0x4857c5[_0x2b6544(0xcd)]===0x0||_0x97fdbe===undefined)return{'found':![],'msg':_0x3d3f7c};const _0x41f66f=_0x2eec46[_0x2b6544(0xdf)]['getKey'](_0x3d3f7c,_0x97fdbe);return{'found':!![],'msg':_0x44b37e[_0x41f66f]};},parseMsgTags=_0x87ea94=>{const _0x4b3567=_0x19f89b,_0x380d78=[];let _0x34e3d6=0x0,_0x3c95aa;while((_0x3c95aa=TAG_REGEX[_0x4b3567(0xe5)](_0x87ea94))!==null){const _0x5e4f55=_0x3c95aa[0x0],{index:_0x22cf8b}=_0x3c95aa,_0x106b9e=_0x5e4f55[_0x4b3567(0xee)](0x1)==='/',_0x3e9c4e=_0x106b9e?_0x5e4f55[_0x4b3567(0xdc)](0x2,-0x1):_0x5e4f55[_0x4b3567(0xdc)](0x1,-0x1),_0x4e2f31=ALLOWED_TAGS[_0x4b3567(0xde)](_0x3e9c4e);if(!_0x4e2f31)continue;const _0xd17b8d=_0x87ea94[_0x4b3567(0xdc)](_0x34e3d6,_0x22cf8b);if(!_0xd17b8d){_0x34e3d6=_0x22cf8b+_0x5e4f55[_0x4b3567(0xcd)];continue;}_0x106b9e?_0x380d78[_0x4b3567(0xe0)]({'type':_0x4b3567(0xd6),'name':_0x5e4f55[_0x4b3567(0xdc)](0x2,-0x1),'content':_0xd17b8d}):_0x380d78[_0x4b3567(0xe0)]({'type':_0x4b3567(0xe9),'content':_0xd17b8d}),_0x34e3d6=_0x22cf8b+_0x5e4f55['length'];}return _0x34e3d6<_0x87ea94['length']&&_0x380d78[_0x4b3567(0xe0)]({'type':_0x4b3567(0xe9),'content':_0x87ea94[_0x4b3567(0xdc)](_0x34e3d6)}),_0x380d78;};function formatMsgWithTags(_0x5b1c06){const _0x427479=parseMsgTags(_0x5b1c06),_0x1a0b32=_0x427479['map'](({content:_0x349725,type:_0x378948,name:_0x22d66c},_0x42a95a)=>{const _0x1b657e=_0x1165,_0x3f9547=_0x378948!==_0x1b657e(0xe9)&&_0x22d66c?_0x22d66c:_0x1f7aa9[_0x1b657e(0xe7)];return _0x1f7aa9[_0x1b657e(0xe2)](_0x3f9547,{'key':''+_0x42a95a},_0x349725);});return _0x1a0b32;}function formatMsg(_0x2c6392,_0x3cc61d,_0x31196f){const _0x319208=sprintf(_0x2c6392,..._0x3cc61d!==null&&_0x3cc61d!==void 0x0?_0x3cc61d:[]);if(!_0x31196f)return _0x319208;return formatMsgWithTags(_0x319208);}const useTranslation=()=>{const {lang:_0x10d914,debug:_0x124ea6,pluralUtils:_0x49b306,resources:_0xcd55c5}=_0x1f7aa9['useContext'](I18nContext);function _0x48e9f8(_0x1c090a,_0x15af47){const _0x2d1936=_0x1165,{found:_0x5650d5,msg:_0x4b19d6}=getMsg(_0x1c090a,_0xcd55c5[_0x10d914],{'plural':_0x15af47===null||_0x15af47===void 0x0?void 0x0:_0x15af47[_0x2d1936(0xd5)],'pluralUtils':_0x49b306});_0x124ea6&&!_0x5650d5&&console[_0x2d1936(0xdb)]('['+_0x10d914+']:\x20Translation\x20for\x20key\x20\x27'+_0x1c090a+_0x2d1936(0xe6));if(_0x15af47===null||_0x15af47===void 0x0?void 0x0:_0x15af47['processTags'])return formatMsg(_0x4b19d6,_0x15af47===null||_0x15af47===void 0x0?void 0x0:_0x15af47[_0x2d1936(0xed)],!![]);return formatMsg(_0x4b19d6,_0x15af47===null||_0x15af47===void 0x0?void 0x0:_0x15af47[_0x2d1936(0xed)],![]);}return{'t':_0x48e9f8,'lang':_0x10d914};};export{I18nContext,I18nProvider,useTranslation};
|