From fc6cbb5f7d06748e26b3cd7379aba6817485e9ed Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 24 Mar 2015 15:28:44 +0100 Subject: [PATCH] Adding mathjax plugin + db change "enabled_mathjax" see #7517 --- .../plugins/mathjax/dialogs/mathjax.js | 78 +++ .../plugins/mathjax/icons/hidpi/mathjax.png | Bin 0 -> 1437 bytes .../plugins/mathjax/icons/mathjax.png | Bin 0 -> 703 bytes .../plugins/mathjax/images/loader.gif | Bin 0 -> 784 bytes .../ckeditor/plugins/mathjax/lang/af.js | 13 + .../ckeditor/plugins/mathjax/lang/ar.js | 13 + .../ckeditor/plugins/mathjax/lang/ca.js | 13 + .../ckeditor/plugins/mathjax/lang/cs.js | 13 + .../ckeditor/plugins/mathjax/lang/cy.js | 13 + .../ckeditor/plugins/mathjax/lang/da.js | 13 + .../ckeditor/plugins/mathjax/lang/de.js | 13 + .../ckeditor/plugins/mathjax/lang/el.js | 13 + .../ckeditor/plugins/mathjax/lang/en-gb.js | 13 + .../ckeditor/plugins/mathjax/lang/en.js | 13 + .../ckeditor/plugins/mathjax/lang/eo.js | 13 + .../ckeditor/plugins/mathjax/lang/es.js | 13 + .../ckeditor/plugins/mathjax/lang/fa.js | 13 + .../ckeditor/plugins/mathjax/lang/fi.js | 13 + .../ckeditor/plugins/mathjax/lang/fr.js | 13 + .../ckeditor/plugins/mathjax/lang/gl.js | 13 + .../ckeditor/plugins/mathjax/lang/he.js | 13 + .../ckeditor/plugins/mathjax/lang/hr.js | 13 + .../ckeditor/plugins/mathjax/lang/hu.js | 13 + .../ckeditor/plugins/mathjax/lang/it.js | 13 + .../ckeditor/plugins/mathjax/lang/ja.js | 13 + .../ckeditor/plugins/mathjax/lang/km.js | 13 + .../ckeditor/plugins/mathjax/lang/ku.js | 13 + .../ckeditor/plugins/mathjax/lang/lt.js | 13 + .../ckeditor/plugins/mathjax/lang/nb.js | 13 + .../ckeditor/plugins/mathjax/lang/nl.js | 13 + .../ckeditor/plugins/mathjax/lang/no.js | 13 + .../ckeditor/plugins/mathjax/lang/pl.js | 13 + .../ckeditor/plugins/mathjax/lang/pt-br.js | 13 + .../ckeditor/plugins/mathjax/lang/pt.js | 13 + .../ckeditor/plugins/mathjax/lang/ro.js | 13 + .../ckeditor/plugins/mathjax/lang/ru.js | 13 + .../ckeditor/plugins/mathjax/lang/sk.js | 13 + .../ckeditor/plugins/mathjax/lang/sl.js | 13 + .../ckeditor/plugins/mathjax/lang/sq.js | 13 + .../ckeditor/plugins/mathjax/lang/sv.js | 13 + .../ckeditor/plugins/mathjax/lang/tr.js | 13 + .../ckeditor/plugins/mathjax/lang/tt.js | 13 + .../ckeditor/plugins/mathjax/lang/uk.js | 13 + .../ckeditor/plugins/mathjax/lang/vi.js | 13 + .../ckeditor/plugins/mathjax/lang/zh-cn.js | 13 + .../ckeditor/plugins/mathjax/lang/zh.js | 13 + .../ckeditor/plugins/mathjax/plugin.js | 460 ++++++++++++++++++ main/install/database.sql | 7 +- main/install/migrate-db-1.9.0-1.10.0-pre.sql | 8 +- main/template/default/layout/head.tpl | 1 + .../Editor/CkEditor/Toolbar/Basic.php | 5 +- 51 files changed, 1100 insertions(+), 5 deletions(-) create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/dialogs/mathjax.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/icons/hidpi/mathjax.png create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/icons/mathjax.png create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/images/loader.gif create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/af.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ca.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cs.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cy.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/el.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/en-gb.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/en.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/eo.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/es.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fa.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fi.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fr.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/gl.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/he.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hr.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hu.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/it.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ja.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/km.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ku.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/lt.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nb.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nl.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/no.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pl.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pt-br.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pt.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ro.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ru.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sk.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sl.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sq.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tr.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tt.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/uk.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/vi.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/zh-cn.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/zh.js create mode 100644 main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/dialogs/mathjax.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/dialogs/mathjax.js new file mode 100644 index 0000000000..5b8a6fc40e --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/dialogs/mathjax.js @@ -0,0 +1,78 @@ +/** + * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ + +'use strict'; + +CKEDITOR.dialog.add( 'mathjax', function( editor ) { + + var preview, + lang = editor.lang.mathjax; + + return { + title: lang.title, + minWidth: 350, + minHeight: 100, + contents: [ + { + id: 'info', + elements: [ + { + id: 'equation', + type: 'textarea', + label: lang.dialogInput, + + onLoad: function() { + var that = this; + + if ( !( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) ) { + this.getInputElement().on( 'keyup', function() { + // Add \( and \) for preview. + preview.setValue( '\\(' + that.getInputElement().getValue() + '\\)' ); + } ); + } + }, + + setup: function( widget ) { + // Remove \( and \). + this.setValue( CKEDITOR.plugins.mathjax.trim( widget.data.math ) ); + }, + + commit: function( widget ) { + // Add \( and \) to make TeX be parsed by MathJax by default. + widget.setData( 'math', '\\(' + this.getValue() + '\\)' ); + } + }, + { + id: 'documentation', + type: 'html', + html: + '
' + + '' + + lang.docLabel + + '' + + '
' + }, + ( !( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) ) && { + id: 'preview', + type: 'html', + html: + '
' + + '' + + '
', + + onLoad: function() { + var iFrame = CKEDITOR.document.getById( this.domId ).getChild( 0 ); + preview = new CKEDITOR.plugins.mathjax.frameWrapper( iFrame, editor ); + }, + + setup: function( widget ) { + preview.setValue( widget.data.math ); + } + } + ] + } + ] + }; +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/icons/hidpi/mathjax.png b/main/inc/lib/javascript/ckeditor/plugins/mathjax/icons/hidpi/mathjax.png new file mode 100644 index 0000000000000000000000000000000000000000..85b8e11df627e14ff43d101faa8c3b610c9bf615 GIT binary patch literal 1437 zcmV;O1!DS%P)u_za4{S|Wwys4dzqkAQ-TuCx^F8PE{zx<$#p4X_v8n?o$xXQ3?i&CqR!MI# z91g#l7XZLo0P9x?;JMtyLjY&aoS8d$@}!>T`2*)hhxxola^n7>Lj3Ln@V8RJ(KMj`{fU;}Au0Ifg|sGBN_c z-;Y=*_&B0*s%Y}EAyoQXi zZvixI-@g5?j*bpcN&x^o&qGlZa2)64dH%wV9Xm?%0WikC0pMzAX!xVPz8(NzwOSV) z#3dcbTER{Lec^D}JxI2dC{rBZ|Gbh_#C<;%I-k=w^RH#hfrG#bV9^mOaG zb?eUMbs%d6mjJxtcDw&>Z*R}!&1N%XSq8^(8X@HTu3fuKEA$B&42BP?tE*90S7*tt zt@uyK82bu9TVrEm^5DUPAmqXA6a)dXEQ3w1f#D85w#n1=`gIJ|%V ze!aQ5Ig>9dD??RPRZ0+q!BqvAhxiDr8sfo1igO!`tD+SE%h}l z6ry`@aIhv4iM%O_B04)ev0=l8833XG1whlZ7DC7y8#iv8_W67kyWRdffJVmHNHKjL zX$v$>YbS)9wb^WAfk0r5-ERK{fU{U};1L{fyWMXSLVT*K{ul~{ssus!3BXRq*sq2B z-sABY6N$v@l+rH-1_q{zazN9x_W<~6YHDuu_xC?72touveWBt2FgrVYm=N-zuIo;q zKnGM+C9*8PPY5~UbUGuaPoH*BO2YuWjInzwHkc2W%Oz1t->s;qNFF_UGy)WG22@q0 zvMdJ(AxD~;ntlidgAPjRIRGygBfe+P9xKOjeO9a0+R)HY;`MqRzzPm{JRYN>C}#oe zJ#^^M_nn=cbpZSTIv8Wi&W73Ha=F$}N?+1--ETA+pS0O*a5x-E0GILtY}>ZYY&M(E z6GGgQB&8-MCh9yM&u=$x-h2T-q`-w!j^m!vb=^oQg`y~+lw$Md&BKhb__6>lmuoH0 z^A`yrTO~sqcI_G_CnwjV$dR4nIGD|5R905PU@*XLw?mSoPZ?ua5O@ca+}A><;Zbd##8;CVi? ziqg`&<6ps1TU&dZF*d#|fXQU4P*qjud7k9f{%u$+7C0P^PZsQ765!UYTQLAn{MX`H rv1lY)>JY90@aHOtk2A(bvlIUSmP*Mm4Sl`b00000NkvXXu0mjfAQg@n literal 0 HcmV?d00001 diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/icons/mathjax.png b/main/inc/lib/javascript/ckeditor/plugins/mathjax/icons/mathjax.png new file mode 100644 index 0000000000000000000000000000000000000000..d25081be998163c28c17c6802c1a0246ca1534a7 GIT binary patch literal 703 zcmV;w0zmzVP)|L1vl1;!Zur)>L=Xf(PF;LK^71VPwdTU)z$Ot8GXd^VHG$N=DUI%#2H z!IC5i0MO}lu(!8|N~I!It5vbpYALF!ij1)?7-L|JfrxGui^Z;C7?emPC=!XRHyVwr zM0ACSt`X4cG(nE0`|xjD}m z>-MmMuIo2uFYo40{GI; zihny5=ln?^5O}003YM0ZP_Nf%5H~OZ0L0^Qmn2DvbUOVj7!2O$oPRyFAQp?MBO@b) zY&JXO_xtBK=j;89rfCnl-R|2HBj~z*NtWdgtE;P`-|wFv)EtY&!XA(3VWm>B9ZR5T z+U2pau}{fl@^>ngTB+4)J^;QWh(JUa6h*lg4u>t5%k^E@|4h2BM`T(4I6gi;y0fzb z(=<L3qXl;jz6ZS`h+Mt59|N{002ovPDHLkV1m^WEA{{Y literal 0 HcmV?d00001 diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/images/loader.gif b/main/inc/lib/javascript/ckeditor/plugins/mathjax/images/loader.gif new file mode 100644 index 0000000000000000000000000000000000000000..3ffb1811f7c06f2b5da7cac82cda97839c10e177 GIT binary patch literal 784 zcmZ?wbhEHbFMh^bMDNS zPhWEKa-KYT^5@?l6El-H@7^p~wB*jcJAZ!tS+j1T)QG8 zCo^Tzlr5XKq@<`iN0>MoI|#<%jAA1C&H!&L z)NzA?(xTQBgCCA;lUi5Y_L#}$w&YTJM2OV7i%Se2uuAlJEmUA&5U}8_PE}TfTE&QD z6dZoV zD$R|@CQR39sp9qItzk?KXUvpl7vT1D;$xCvW0VyX6q1*h;^&tPXP(9E>4?q77@&;_ zH*$EKA0D_M;pZUen!seKvYag-IO#%0Pt$Q_;Rjyp8u=d!M|iMJ&~v$Hx&6Kb1B39X zhAC3MPQr5hGA>eOo>}tjq2a>33e2feY_WU@&R8vs2YK;F4V&{rhsz#j zJRZz$2A+Nj6Py)3S7h`|@>n8#gTc&m;gJLm9TjGdYJ&+nEem{B98PEukri^1;g<_# z6jl)AN=?sX%+8UJ>St#T&6Z*p5@MHd)b0eclL$h9sJ$P#c75bIF1nxMei#jsRp<+b-BJe=XdfoU08 dOgSM+El%vr(Hsm6LetobQ$2-KqJbW?1^`cR-){f_ literal 0 HcmV?d00001 diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/af.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/af.js new file mode 100644 index 0000000000..cd488575f8 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/af.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'af', { + title: 'Wiskunde in TeX', + button: 'Wiskunde', + dialogInput: 'Skryf you Tex hier', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX dokument', + loading: 'laai...', + pathName: 'wiskunde' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js new file mode 100644 index 0000000000..5223facd08 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ar.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'ar', { + title: 'Mathematics in TeX', // MISSING + button: 'Math', // MISSING + dialogInput: 'Write your TeX here', // MISSING + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX documentation', // MISSING + loading: 'تحميل', + pathName: 'math' // MISSING +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ca.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ca.js new file mode 100644 index 0000000000..51abbc70d2 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ca.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'ca', { + title: 'Matemàtiques a TeX', + button: 'Matemàtiques', + dialogInput: 'Escriu el TeX aquí', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Documentació TeX', + loading: 'carregant...', + pathName: 'matemàtiques' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cs.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cs.js new file mode 100644 index 0000000000..c9f6a1d33b --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cs.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'cs', { + title: 'Matematika v TeXu', + button: 'Matematika', + dialogInput: 'Zde napište TeXový kód', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Dokumentace k TeXu', + loading: 'Nahrává se...', + pathName: 'Matematika' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cy.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cy.js new file mode 100644 index 0000000000..8d7298aa4d --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/cy.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'cy', { + title: 'Mathemateg mewn TeX', + button: 'Math', + dialogInput: 'Ysgrifennwch eich TeX yma', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Dogfennaeth TeX', + loading: 'llwytho...', + pathName: 'math' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js new file mode 100644 index 0000000000..d56f8f2df5 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/da.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'da', { + title: 'Matematik i TeX', + button: 'Matematik', + dialogInput: 'Write your TeX here', // MISSING + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX dokumentation', + loading: 'loading...', // MISSING + pathName: 'matematik' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js new file mode 100644 index 0000000000..9a1cf64cb9 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/de.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'de', { + title: 'Mathematik in Tex', + button: 'Rechnung', + dialogInput: 'Schreiben Sie hier in Tex', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Tex Dokumentation', + loading: 'lädt...', + pathName: 'rechnen' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/el.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/el.js new file mode 100644 index 0000000000..933a71e116 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/el.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'el', { + title: 'Μαθηματικά με τη γλώσσα TeX', + button: 'Μαθηματικά', + dialogInput: 'Γράψτε κώδικα TeX εδώ', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Τεκμηρίωση TeX', + loading: 'γίνεται φόρτωση...', + pathName: 'μαθηματικά' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/en-gb.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/en-gb.js new file mode 100644 index 0000000000..a706e8d13a --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/en-gb.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'en-gb', { + title: 'Mathematics in TeX', + button: 'Math', + dialogInput: 'Write you TeX here', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX documentation', + loading: 'loading...', + pathName: 'math' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/en.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/en.js new file mode 100644 index 0000000000..ff7701ea61 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/en.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'en', { + title: 'Mathematics in TeX', + button: 'Math', + dialogInput: 'Write your TeX here', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX documentation', + loading: 'loading...', + pathName: 'math' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/eo.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/eo.js new file mode 100644 index 0000000000..e6cc52fcda --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/eo.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'eo', { + title: 'Matematiko en TeX', + button: 'Matematiko', + dialogInput: 'Skribu vian TeX tien', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX dokumentado', + loading: 'estas ŝarganta', + pathName: 'matematiko' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/es.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/es.js new file mode 100644 index 0000000000..8de6d794bc --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/es.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'es', { + title: 'Matemáticas en TeX', + button: 'Matemáticas', + dialogInput: 'Escribe tu TeX aquí', + docUrl: 'http://es.wikipedia.org/wiki/TeX', + docLabel: 'Documentación de TeX', + loading: 'cargando...', + pathName: 'matemáticas' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fa.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fa.js new file mode 100644 index 0000000000..29cf872e7b --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fa.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'fa', { + title: 'ریاضیات در تک', + button: 'ریاضی', + dialogInput: 'فرمول خود را اینجا بنویسید', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'مستندسازی فرمول نویسی', + loading: 'بارگیری', + pathName: 'ریاضی' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fi.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fi.js new file mode 100644 index 0000000000..a83d56ede2 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fi.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'fi', { + title: 'Matematiikkaa TeX:llä', + button: 'Matematiikka', + dialogInput: 'Kirjoita TeX:iä tähän', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX dokumentaatio', + loading: 'lataa...', + pathName: 'matematiikka' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fr.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fr.js new file mode 100644 index 0000000000..fff6ad5425 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/fr.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'fr', { + title: 'Mathématiques au format TeX', + button: 'Math', + dialogInput: 'Saisir la formule TeX ici', + docUrl: 'http://fr.wikibooks.org/wiki/LaTeX/Math%C3%A9matiques', + docLabel: 'Documentation du format TeX', + loading: 'chargement...', + pathName: 'math' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/gl.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/gl.js new file mode 100644 index 0000000000..07d98ad498 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/gl.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'gl', { + title: 'Matemáticas en TeX', + button: 'Matemáticas', + dialogInput: 'Escriba o seu TeX aquí', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Documentación de TeX', + loading: 'cargando...', + pathName: 'matemáticas' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/he.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/he.js new file mode 100644 index 0000000000..841bdd22b4 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/he.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'he', { + title: 'מתמטיקה בTeX', + button: 'מתמטיקה', + dialogInput: 'כתוב את הTeX שלך כאן', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'תיעוד TeX', + loading: 'טוען...', + pathName: 'מתמטיקה' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hr.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hr.js new file mode 100644 index 0000000000..887b8ee7ad --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hr.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'hr', { + title: 'Matematika u TeXu', + button: 'Matematika', + dialogInput: 'Napiši svoj TeX ovdje', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX dokumentacija', + loading: 'učitavanje...', + pathName: 'matematika' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hu.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hu.js new file mode 100644 index 0000000000..899a143a9e --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/hu.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'hu', { + title: 'Matematika a TeX-ben', + button: 'Matek', + dialogInput: 'Írd a TeX-ed ide', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX dokumentáció', + loading: 'töltés...', + pathName: 'matek' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/it.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/it.js new file mode 100644 index 0000000000..71ce5786f4 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/it.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'it', { + title: 'Formule in TeX', + button: 'Formule', + dialogInput: 'Scrivere qui il proprio TeX', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Documentazione TeX', + loading: 'caricamento…', + pathName: 'formula' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ja.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ja.js new file mode 100644 index 0000000000..f067813c62 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ja.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'ja', { + title: 'TeX形式の数式', + button: '数式', + dialogInput: 'TeX形式の数式を入力してください', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeXの解説', + loading: '読み込み中…', + pathName: 'math' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/km.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/km.js new file mode 100644 index 0000000000..21f52a7569 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/km.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'km', { + title: 'គណិត​វិទ្យា​ក្នុង TeX', + button: 'គណិត', + dialogInput: 'សរសេរ TeX របស់​អ្នក​នៅ​ទីនេះ', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'ឯកសារ​អត្ថបទ​ពី ​TeX', + loading: 'កំពុង​ផ្ទុក..', + pathName: 'គណិត' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ku.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ku.js new file mode 100644 index 0000000000..639ba211bf --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ku.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'ku', { + title: 'بیرکاری لە TeX', + button: 'بیرکاری', + dialogInput: 'TeXەکەت لێرە بنووسە', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'بەڵگەنامەکردنی TeX', + loading: 'بارکردن...', + pathName: 'بیرکاری' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/lt.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/lt.js new file mode 100644 index 0000000000..172639f2b5 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/lt.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'lt', { + title: 'Matematika per TeX', + button: 'Matematika', + dialogInput: 'Parašyk savo TeX čia', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX žinynas', + loading: 'kraunasi...', + pathName: 'matematika' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nb.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nb.js new file mode 100644 index 0000000000..ee3c4b3f59 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nb.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'nb', { + title: 'Matematikk i TeX', + button: 'Matte', + dialogInput: 'Skriv TeX-koden her', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX-dokumentasjon', + loading: 'laster...', + pathName: 'matte' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nl.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nl.js new file mode 100644 index 0000000000..d34428c097 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/nl.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'nl', { + title: 'Wiskunde in TeX', + button: 'Wiskunde', + dialogInput: 'Typ hier uw TeX', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX documentatie', + loading: 'laden...', + pathName: 'wiskunde' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/no.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/no.js new file mode 100644 index 0000000000..9906d2c916 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/no.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'no', { + title: 'Matematikk i TeX', + button: 'Matte', + dialogInput: 'Skriv TeX-koden her', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX-dokumentasjon', + loading: 'laster...', + pathName: 'matte' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pl.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pl.js new file mode 100644 index 0000000000..36a111bb7d --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pl.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'pl', { + title: 'Wzory matematyczne w TeX', + button: 'Wzory matematyczne', + dialogInput: 'Wpisz wyrażenie w TeX', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Dokumentacja TeX', + loading: 'ładowanie...', + pathName: 'matematyka' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pt-br.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pt-br.js new file mode 100644 index 0000000000..dd1365b3aa --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pt-br.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'pt-br', { + title: 'Matemática em TeX', + button: 'Matemática', + dialogInput: 'Escreva seu TeX aqui', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Documentação TeX', + loading: 'carregando...', + pathName: 'Matemática' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pt.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pt.js new file mode 100644 index 0000000000..f63c6a0def --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/pt.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'pt', { + title: 'Matemática em TeX', + button: 'Matemática', + dialogInput: 'Escreva aqui o seu Tex', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Documentação TeX', + loading: 'a carregar ...', + pathName: 'matemática' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ro.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ro.js new file mode 100644 index 0000000000..5a6fa66173 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ro.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'ro', { + title: 'Matematici in TeX', + button: 'Matematici', + dialogInput: 'Scrie TeX-ul aici', + docUrl: 'http://ro.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Documentatie TeX', + loading: 'încarcă...', + pathName: 'matematici' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ru.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ru.js new file mode 100644 index 0000000000..0087b9cf24 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/ru.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'ru', { + title: 'Математика в TeX-системе', + button: 'Математика', + dialogInput: 'Введите здесь TeX', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX документация', + loading: 'загрузка...', + pathName: 'мат.' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sk.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sk.js new file mode 100644 index 0000000000..99c2090afc --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sk.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'sk', { + title: 'Matematika v TeX', + button: 'Matika', + dialogInput: 'Napíšte svoj TeX sem', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Dokumentácia TeX', + loading: 'načítavanie...', + pathName: 'matika' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sl.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sl.js new file mode 100644 index 0000000000..5d77cea52f --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sl.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'sl', { + title: 'Matematika v TeX', + button: 'Matematika', + dialogInput: 'Napišite svoj TeX tukaj', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX dokumentacija', + loading: 'nalaganje...', + pathName: 'matematika' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sq.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sq.js new file mode 100644 index 0000000000..10751371a3 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sq.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'sq', { + title: 'Matematikë në TeX', + button: 'Matematikë', + dialogInput: 'Shkruani TeX-in tuaj këtu', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Tex dokumentimi', + loading: 'duke u hapur...', + pathName: 'matematikë' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js new file mode 100644 index 0000000000..f24b12ce25 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/sv.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'sv', { + title: 'Mattematik i TeX', + button: 'Matte', + dialogInput: 'Skriv din TeX här', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX dokumentation', + loading: 'laddar', + pathName: 'matte' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tr.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tr.js new file mode 100644 index 0000000000..5ed54da79e --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tr.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'tr', { + title: 'TeX ile Matematik', + button: 'Matematik', + dialogInput: 'TeX kodunuzu buraya yazın', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX yardım dökümanı', + loading: 'yükleniyor...', + pathName: 'matematik' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tt.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tt.js new file mode 100644 index 0000000000..3d9fdf5004 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/tt.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'tt', { + title: 'TeX\'та математика', + button: 'Математика', + dialogInput: 'Биредә TeX форматында аңлатмагызны языгыз', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX турыдна документлар', + loading: 'йөкләнә...', + pathName: 'математика' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/uk.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/uk.js new file mode 100644 index 0000000000..092b0e958a --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/uk.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'uk', { + title: 'Математика у TeX', + button: 'Математика', + dialogInput: 'Наберіть тут на TeX\'у', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Документація про TeX', + loading: 'завантажується…', + pathName: 'математика' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/vi.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/vi.js new file mode 100644 index 0000000000..74fd68a4c2 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/vi.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'vi', { + title: 'Toán học bằng TeX', + button: 'Toán', + dialogInput: 'Nhập mã TeX ở đây', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'Tài liệu TeX', + loading: 'đang nạp...', + pathName: 'toán' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/zh-cn.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/zh-cn.js new file mode 100644 index 0000000000..a78d17a47e --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/zh-cn.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'zh-cn', { + title: 'TeX 语法的数学公式编辑器', + button: '数学公式', + dialogInput: '在此编写您的 TeX 指令', + docUrl: 'http://zh.wikipedia.org/wiki/TeX', + docLabel: 'TeX 语法(可以参考维基百科自身关于数学公式显示方式的帮助)', + loading: '正在加载...', + pathName: '数字公式' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/zh.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/zh.js new file mode 100644 index 0000000000..d8ffe31668 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/lang/zh.js @@ -0,0 +1,13 @@ +/* +Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.plugins.setLang( 'mathjax', 'zh', { + title: '以 TeX 表示數學', + button: '數學', + dialogInput: '請輸入 TeX', + docUrl: 'http://en.wikibooks.org/wiki/LaTeX/Mathematics', + docLabel: 'TeX 說明文件', + loading: '載入中…', + pathName: '數學' +} ); diff --git a/main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js b/main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js new file mode 100644 index 0000000000..482a8b7fd6 --- /dev/null +++ b/main/inc/lib/javascript/ckeditor/plugins/mathjax/plugin.js @@ -0,0 +1,460 @@ +/** + * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. + * For licensing, see LICENSE.md or http://ckeditor.com/license + */ + +/** + * @fileOverview [Mathematical Formulas](http://ckeditor.com/addon/mathjax) plugin. + */ + +'use strict'; + +( function() { + + var cdn = 'http:\/\/cdn.mathjax.org\/mathjax\/2.2-latest\/MathJax.js?config=TeX-AMS_HTML'; + + CKEDITOR.plugins.add( 'mathjax', { + lang: 'af,ar,ca,cs,cy,da,de,el,en,en-gb,eo,es,fa,fi,fr,gl,he,hr,hu,it,ja,km,ku,lt,nb,nl,no,pl,pt,pt-br,ro,ru,sk,sl,sq,sv,tr,tt,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% + requires: 'widget,dialog', + icons: 'mathjax', + hidpi: true, // %REMOVE_LINE_CORE% + + init: function( editor ) { + var cls = editor.config.mathJaxClass || 'math-tex'; + + editor.widgets.add( 'mathjax', { + inline: true, + dialog: 'mathjax', + button: editor.lang.mathjax.button, + mask: true, + allowedContent: 'span(!' + cls + ')', + // Allow style classes only on spans having mathjax class. + styleToAllowedContentRules: function( style ) { + var classes = style.getClassesArray(); + if ( !classes ) + return null; + classes.push( '!' + cls ); + + return 'span(' + classes.join( ',' ) + ')'; + }, + pathName: editor.lang.mathjax.pathName, + + template: '', + + parts: { + span: 'span' + }, + + defaults: { + math: '\\(x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}\\)' + }, + + init: function() { + var iframe = this.parts.span.getChild( 0 ); + + // Check if span contains iframe and create it otherwise. + if ( !iframe || iframe.type != CKEDITOR.NODE_ELEMENT || !iframe.is( 'iframe' ) ) { + iframe = new CKEDITOR.dom.element( 'iframe' ); + iframe.setAttributes( { + style: 'border:0;width:0;height:0', + scrolling: 'no', + frameborder: 0, + allowTransparency: true, + src: CKEDITOR.plugins.mathjax.fixSrc + } ); + this.parts.span.append( iframe ); + } + + // Wait for ready because on some browsers iFrame will not + // have document element until it is put into document. + // This is a problem when you crate widget using dialog. + this.once( 'ready', function() { + // Src attribute must be recreated to fix custom domain error after undo + // (see iFrame.removeAttribute( 'src' ) in frameWrapper.load). + if ( CKEDITOR.env.ie ) + iframe.setAttribute( 'src', CKEDITOR.plugins.mathjax.fixSrc ); + + this.frameWrapper = new CKEDITOR.plugins.mathjax.frameWrapper( iframe, editor ); + this.frameWrapper.setValue( this.data.math ); + } ); + }, + + data: function() { + if ( this.frameWrapper ) + this.frameWrapper.setValue( this.data.math ); + }, + + upcast: function( el, data ) { + if ( !( el.name == 'span' && el.hasClass( cls ) ) ) + return; + + if ( el.children.length > 1 || el.children[ 0 ].type != CKEDITOR.NODE_TEXT ) + return; + + data.math = CKEDITOR.tools.htmlDecode( el.children[ 0 ].value ); + + // Add style display:inline-block to have proper height of widget wrapper and mask. + var attrs = el.attributes; + + if ( attrs.style ) + attrs.style += ';display:inline-block'; + else + attrs.style = 'display:inline-block'; + + // Add attribute to prevent deleting empty span in data processing. + attrs[ 'data-cke-survive' ] = 1; + + el.children[ 0 ].remove(); + + return el; + }, + + downcast: function( el ) { + el.children[ 0 ].replaceWith( new CKEDITOR.htmlParser.text( CKEDITOR.tools.htmlEncode( this.data.math ) ) ); + + // Remove style display:inline-block. + var attrs = el.attributes; + attrs.style = attrs.style.replace( /display:\s?inline-block;?\s?/, '' ); + if ( attrs.style === '' ) + delete attrs.style; + + return el; + } + } ); + + // Add dialog. + CKEDITOR.dialog.add( 'mathjax', this.path + 'dialogs/mathjax.js' ); + + // Add MathJax script to page preview. + editor.on( 'contentPreview', function( evt ) { + evt.data.dataValue = evt.data.dataValue.replace( /<\/head>/, + '' + + + // Load MathJax lib. + '' + + '' + + '' + + '' + + + // Render everything here and after that copy it to the preview. + '' + + '' + + '' ); + } + + // Run MathJax parsing Tex. + function update() { + isRunning = true; + + value = newValue; + + editor.fire( 'lockSnapshot' ); + + buffer.setHtml( value ); + + // Set loading indicator. + preview.setHtml( ' + editor.lang.mathjax.loading + ' ); + + iFrame.setStyles( { + height: '16px', + width: '16px', + display: 'inline', + 'vertical-align': 'middle' + } ); + + editor.fire( 'unlockSnapshot' ); + + // Run MathJax. + doc.getWindow().$.update( value ); + } + + return { + /** + * Sets the TeX value to be displayed in the `iframe` element inside + * the editor. This function will activate the MathJax + * library which interprets TeX expressions and converts them into + * their representation that is displayed in the editor. + * + * @param {String} value TeX string. + */ + setValue: function( value ) { + newValue = CKEDITOR.tools.htmlEncode( value ); + + if ( isInit && !isRunning ) + update(); + } + }; + }; + } else { + // In IE8 MathJax does not work stable so instead of using standard + // frame wrapper it is replaced by placeholder to show pure TeX in iframe. + CKEDITOR.plugins.mathjax.frameWrapper = function( iFrame, editor ) { + iFrame.getFrameDocument().write( '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '' ); + + return { + setValue: function( value ) { + var doc = iFrame.getFrameDocument(), + tex = doc.getById( 'tex' ); + + tex.setHtml( CKEDITOR.plugins.mathjax.trim( CKEDITOR.tools.htmlEncode( value ) ) ); + + CKEDITOR.plugins.mathjax.copyStyles( iFrame, tex ); + + editor.fire( 'lockSnapshot' ); + + iFrame.setStyles( { + width: Math.min( 250, tex.$.offsetWidth ) + 'px', + height: doc.$.body.offsetHeight + 'px', + display: 'inline', + 'vertical-align': 'middle' + } ); + + editor.fire( 'unlockSnapshot' ); + } + }; + }; + } +} )(); + +/** + * Sets the path to the MathJax library. It can be both a local + * resource and a location different than the default CDN. + * + * Please note that this must be a full or absolute path. + * + * config.mathJaxLib = 'http:\/\/example.com\/libs\/MathJax.js'; + * + * @cfg {String} [mathJaxLib='http:\/\/cdn.mathjax.org\/mathjax\/2.2-latest\/MathJax.js?config=TeX-AMS_HTML'] + * @member CKEDITOR.config + */ + +/** + * Sets the default class for `span` elements that will be + * converted into [Mathematical Formulas](http://ckeditor.com/addon/mathjax) + * widgets. + * + * If you set it to the following: + * + * config.mathJaxClass = 'my-math'; + * + * The code below will be recognized as a Mathematical Formulas widget. + * + * \( \sqrt{4} = 2 \) + * + * @cfg {String} [mathJaxClass='math-tex'] + * @member CKEDITOR.config + */ diff --git a/main/install/database.sql b/main/install/database.sql index 84bdbf3904..93f6111730 100644 --- a/main/install/database.sql +++ b/main/install/database.sql @@ -885,6 +885,7 @@ VALUES ('tool_visible_by_default_at_creation','gradebook','checkbox','Tools','true','ToolVisibleByDefaultAtCreationTitle','ToolVisibleByDefaultAtCreationComment',NULL,'Gradebook', 1), ('prevent_session_admins_to_manage_all_users', NULL, 'radio', 'Session', 'false', 'PreventSessionAdminsToManageAllUsersTitle', 'PreventSessionAdminsToManageAllUsersComment', NULL, NULL, 1), ('documents_default_visibility_defined_in_course', NULL,'radio','Tools','false','DocumentsDefaultVisibilityDefinedInCourseTitle','DocumentsDefaultVisibilityDefinedInCourseComment',NULL, NULL, 1), +('enabled_mathjax', NULL, 'radio', 'Editor', 'false', 'EnableMathJaxTitle', 'EnableMathJaxComment', NULL, NULL, 0), ('chamilo_database_version', NULL, 'textfield',NULL, '0', 'DatabaseVersion','', NULL, NULL, 0); UNLOCK TABLES; /*!40000 ALTER TABLE settings_current ENABLE KEYS */; @@ -1229,7 +1230,9 @@ VALUES ('prevent_session_admins_to_manage_all_users', 'true', 'Yes'), ('prevent_session_admins_to_manage_all_users', 'false', 'No'), ('documents_default_visibility_defined_in_course', 'true', 'Yes'), -('documents_default_visibility_defined_in_course', 'false', 'No'); +('documents_default_visibility_defined_in_course', 'false', 'No'), +('enabled_mathjax','true','Yes'), +('enabled_mathjax','false','No'); UNLOCK TABLES; @@ -4725,5 +4728,5 @@ CREATE TABLE c_attendance_calendar_rel_group ( -- Version LOCK TABLES settings_current WRITE; -UPDATE settings_current SET selected_value = '1.10.0.24' WHERE variable = 'chamilo_database_version'; +UPDATE settings_current SET selected_value = '1.10.0.25' WHERE variable = 'chamilo_database_version'; UNLOCK TABLES; diff --git a/main/install/migrate-db-1.9.0-1.10.0-pre.sql b/main/install/migrate-db-1.9.0-1.10.0-pre.sql index 9461d5bff4..e8d41067d9 100644 --- a/main/install/migrate-db-1.9.0-1.10.0-pre.sql +++ b/main/install/migrate-db-1.9.0-1.10.0-pre.sql @@ -87,10 +87,14 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('show_gloss INSERT INTO settings_options (variable, value, display_text) VALUES ('show_glossary_in_extra_tools', 'exercise_and_lp', 'ExerciseAndLearningPath'); INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('documents_default_visibility_defined_in_course', NULL,'radio','Tools','false','DocumentsDefaultVisibilityDefinedInCourseTitle','DocumentsDefaultVisibilityDefinedInCourseComment',NULL, NULL, 1); - INSERT INTO settings_options (variable, value, display_text) VALUES ('documents_default_visibility_defined_in_course', 'true', 'Yes'); INSERT INTO settings_options (variable, value, display_text) VALUES ('documents_default_visibility_defined_in_course', 'false', 'No'); +INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enabled_mathjax', NULL, 'radio', 'Editor', 'false', 'EnableMathJaxTitle', 'EnableMathJaxComment', NULL, NULL, 0); +INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_mathjax', 'true', 'Yes'); +INSERT INTO settings_options (variable, value, display_text) VALUES ('enabled_mathjax', 'false', 'No'); + + -- xxCOURSExx ALTER TABLE c_survey ADD COLUMN visible_results INT UNSIGNED DEFAULT 0; @@ -107,4 +111,4 @@ CREATE TABLE IF NOT EXISTS c_student_publication_comment (id INT PRIMARY KEY NOT CREATE TABLE IF NOT EXISTS c_attendance_calendar_rel_group (id int NOT NULL auto_increment PRIMARY KEY, c_id INT NOT NULL, group_id INT NOT NULL, calendar_id INT NOT NULL); -- Do not move this query -UPDATE settings_current SET selected_value = '1.10.0.24' WHERE variable = 'chamilo_database_version'; +UPDATE settings_current SET selected_value = '1.10.0.25' WHERE variable = 'chamilo_database_version'; diff --git a/main/template/default/layout/head.tpl b/main/template/default/layout/head.tpl index cb80a761f9..239a099e50 100755 --- a/main/template/default/layout/head.tpl +++ b/main/template/default/layout/head.tpl @@ -28,6 +28,7 @@ var plugins = [ 'leaflet', 'mapping', 'maximize', + 'mathjax', 'oembed', 'toolbar', 'toolbarswitch', diff --git a/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Basic.php b/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Basic.php index f3cb8dae66..19abb546b5 100644 --- a/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Basic.php +++ b/src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Basic.php @@ -61,7 +61,10 @@ class Basic extends Toolbar if (api_get_setting('math_asciimathML') == 'true') { $plugins[] = 'asciimath'; } - $plugins[] = 'asciimath'; + + if (api_get_setting('enabled_mathjax') == 'true') { + $plugins[] = 'mathjax'; + } if (api_get_setting('enabled_asciisvg') == 'true') { $plugins[] = 'asciisvg';