Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add spanish to FontSize Plugin #809

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/demos/js/loader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var baseURL = window.location.hostname.indexOf('github.') !== -1 ? '//cdn.rawgit.com/Alex-D/Trumbowyg/v2.9.2/' : '../../../';
var baseURL = window.location.hostname.indexOf('github.') !== -1 ? '//cdn.rawgit.com/Alex-D/Trumbowyg/v2.10.0/' : '../../../';
var styleLoadingContainer = document.querySelector('.loading-head');
var scriptLoadingContainer = document.querySelector('.loading-body');

Expand Down
20 changes: 14 additions & 6 deletions docs/documentation/plugins/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -764,19 +764,27 @@ <h4>How to use it?</h4>
&lt;script src="node_modules/trumbowyg/dist/plugins/template/trumbowyg.template.min.js">&lt;/script>
</code></pre>
<p>
Then you can use the new button definition <code>template</code>
Then you can use the new button definition <code>template</code> and can add your template code.
</p>
<pre><code class="javascript">
$('#my-editor').trumbowyg({
btns: [
['template']
]
],
plugins: {
templates: [
{
name: 'Template 1',
html: '<p>I am a template!</p>'
},
{
name: 'Template 2',
html: '<p>I am a different template!</p>'
}
]
}
});
</code></pre>
<p class="note">
Some doc to write about template options/definition... <br>
You can contribute to this documentation by submitting a Pull Request :)
</p>
</div>

<div class="feature">
Expand Down
84 changes: 42 additions & 42 deletions docs/index.html

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions plugins/base64/trumbowyg.base64.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
errFileReaderNotSupported: 'FileReader is not supported by your browser.',
errInvalidImage: 'Invalid image file.'
},
da: {
base64: 'Billede som base64',
file: 'Fil',
errFileReaderNotSupported: 'FileReader er ikke understøttet af din browser.',
errInvalidImage: 'Ugyldig billedfil.'
},
fr: {
base64: 'Image en base64',
file: 'Fichier'
Expand Down
8 changes: 8 additions & 0 deletions plugins/colors/trumbowyg.colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,18 @@
foreColor: 'Text color',
backColor: 'Background color'
},
da: {
foreColor: 'Tekstfarve',
backColor: 'Baggrundsfarve'
},
fr: {
foreColor: 'Couleur du texte',
backColor: 'Couleur de fond'
},
de: {
foreColor: 'Textfarbe',
backColor: 'Hintergrundfarbe'
},
nl: {
foreColor: 'Tekstkleur',
backColor: 'Achtergrondkleur'
Expand Down
3 changes: 3 additions & 0 deletions plugins/emoji/trumbowyg.emoji.js
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,9 @@
en: {
emoji: 'Add an emoji'
},
da: {
emoji: 'Tilføj et humørikon'
},
fr: {
emoji: 'Ajouter un emoji'
},
Expand Down
6 changes: 6 additions & 0 deletions plugins/fontfamily/trumbowyg.fontfamily.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@
en: {
fontFamily: 'Font'
},
da: {
fontFamily: 'Skrifttype'
},
fr: {
fontFamily: 'Police'
},
de: {
fontFamily: 'Schriftart'
},
nl: {
fontFamily: 'Lettertype'
},
Expand Down
22 changes: 22 additions & 0 deletions plugins/fontsize/trumbowyg.fontsize.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@
'custom': 'Custom'
}
},
da: {
fontsize: 'Skriftstørrelse',
fontsizes: {
'x-small': 'Ekstra lille',
'small': 'Lille',
'medium': 'Normal',
'large': 'Stor',
'x-large': 'Ekstra stor',
'custom': 'Brugerdefineret'
}
},
fr: {
fontsize: 'Taille de la police',
fontsizes: {
Expand All @@ -26,6 +37,17 @@
'custom': 'Douane'
}
},
de: {
fontsize: 'Font size',
fontsizes: {
'x-small': 'Sehr klein',
'small': 'Klein',
'medium': 'Normal',
'large': 'Groß',
'x-large': 'Sehr groß',
'custom': 'Benutzerdefiniert'
}
},
nl: {
fontsize: 'Lettergrootte',
fontsizes: {
Expand Down
6 changes: 6 additions & 0 deletions plugins/history/trumbowyg.history.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
undo: 'Undo'
}
},
da: {
history: {
redo: 'Annuller fortryd',
undo: 'Fortryd'
}
},
fr: {
history: {
redo: 'Annuler',
Expand Down
3 changes: 3 additions & 0 deletions plugins/insertaudio/trumbowyg.insertaudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
en: {
insertAudio: 'Insert Audio'
},
da: {
insertAudio: 'Indsæt lyd'
},
fr: {
insertAudio: 'Insérer un son'
},
Expand Down
9 changes: 9 additions & 0 deletions plugins/lineheight/trumbowyg.lineheight.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
'2.0': 'Extra large'
}
},
da: {
lineheight: 'Linjehøjde',
lineheights: {
'0.9': 'Lille',
'normal': 'Normal',
'1.5': 'Stor',
'2.0': 'Ekstra stor'
}
},
fr: {
lineheight: 'Hauteur de ligne',
lineheights: {
Expand Down
5 changes: 5 additions & 0 deletions plugins/mathml/trumbowyg.mathml.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
formulas: 'Formulas',
inline: 'Inline'
},
da: {
mathml: 'Indsæt formler',
formulas: 'Formler',
inline: 'Inline'
},
fr: {
mathml: 'Inserer une formule',
formulas: 'Formule',
Expand Down
3 changes: 3 additions & 0 deletions plugins/mention/trumbowyg.mention.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
en: {
mention: 'Mention'
},
da: {
mention: 'Nævn'
},
fr: {
mention: 'Mentioner'
},
Expand Down
3 changes: 3 additions & 0 deletions plugins/noembed/trumbowyg.noembed.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
noembed: 'Noembed',
noembedError: 'Error'
},
da: {
noembedError: 'Fejl'
},
sk: {
noembedError: 'Chyba'
},
Expand Down
3 changes: 3 additions & 0 deletions plugins/preformatted/trumbowyg.preformatted.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
en: {
preformatted: 'Code sample <pre>'
},
da: {
preformatted: 'Præformateret <pre>'
},
fr: {
preformatted: 'Exemple de code <pre>'
},
Expand Down
5 changes: 5 additions & 0 deletions plugins/ruby/trumbowyg.ruby.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
rubyModal: 'Ruby modal',
rubyText: 'Ruby text'
},
da: {
ruby: 'Tilføj ruby tekst',
rubyModal: 'Ruby modal',
rubyText: 'Ruby tekst'
},
fr: {
ruby: 'Ajouter du texte ruby',
rubyModal: 'Modale ruby',
Expand Down
16 changes: 14 additions & 2 deletions plugins/table/trumbowyg.table.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
tableDestroy: 'Delete table',
error: 'Error'
},
da: {
table: 'Indsæt tabel',
tableAddRow: 'Tilføj række',
tableAddColumn: 'Tilføj kolonne',
tableDeleteRow: 'Slet række',
tableDeleteColumn: 'Slet kolonne',
tableDestroy: 'Slet tabel',
error: 'Fejl'
},
de: {
table: 'Tabelle einfügen',
tableAddRow: 'Zeile hinzufügen',
Expand Down Expand Up @@ -55,8 +64,11 @@
},
ru: {
table: 'Вставить таблицу',
tableAddRow: 'Добавить строки',
tableAddColumn: 'Добавить столбцы',
tableAddRow: 'Добавить строку',
tableAddColumn: 'Добавить столбец',
tableDeleteRow: 'Удалить строку',
tableDeleteColumn: 'Удалить столбец',
tableDestroy: 'Удалить таблицу',
error: 'Ошибка'
},
ja: {
Expand Down
1 change: 1 addition & 0 deletions plugins/table/ui/sass/trumbowyg.table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
height: 20px;
width: 20px;
margin: 1px;
padding: 0;
background-color: #fff;
box-shadow: 0 0 0 1px #cecece inset;

Expand Down
3 changes: 3 additions & 0 deletions plugins/template/trumbowyg.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
en: {
template: 'Template'
},
da: {
template: 'Skabelon'
},
fr: {
template: 'Patron'
},
Expand Down
5 changes: 5 additions & 0 deletions plugins/upload/trumbowyg.upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
file: 'File',
uploadError: 'Error'
},
da: {
upload: 'Upload',
file: 'Fil',
uploadError: 'Fejl'
},
sk: {
upload: 'Nahrať',
file: 'Súbor',
Expand Down
13 changes: 11 additions & 2 deletions src/langs/da.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
jQuery.trumbowyg.langs.da = {
viewHTML: 'Vis HTML',

formatting: 'Formatter',
undo: 'Fortryd',
redo: 'Anuller fortryd',

formatting: 'Formattering',
p: 'Afsnit',
blockquote: 'Citat',
code: 'Kode',
Expand All @@ -25,6 +28,9 @@ jQuery.trumbowyg.langs.da = {
em: 'Fremhæv',
del: 'Slettet',

superscript: 'Hævet skrift',
subscript: 'Sænket skrift',

unorderedList: 'Uordnet liste',
orderedList: 'Ordnet liste',

Expand All @@ -40,6 +46,7 @@ jQuery.trumbowyg.langs.da = {
justifyFull: 'Lige margener',

horizontalRule: 'Horisontal linie',
removeformat: 'Ryd formattering',

fullscreen: 'Fuld skærm',

Expand All @@ -51,5 +58,7 @@ jQuery.trumbowyg.langs.da = {
required: 'Påkrævet',
description: 'Beskrivelse',
title: 'Titel',
text: 'Tekst'
text: 'Tekst',
target: 'Mål',
width: 'Bredde'
};
11 changes: 6 additions & 5 deletions src/trumbowyg.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', {
};
t.btnsDef = {
viewHTML: {
fn: 'toggle'
fn: 'toggle',
class: 'trumbowyg-not-disable',
},

undo: {
Expand Down Expand Up @@ -1247,7 +1248,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', {
return false;
}

var link = $(['<a href="', v.url, '">', v.text || v.url, '</a>'].join(''));
var link = $(['<a href="', url, '">', v.text || v.url, '</a>'].join(''));

if (!t.o.minimalLinks) {
if (v.title.length > 0) {
Expand All @@ -1270,12 +1271,12 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', {
return url;
}

const VALID_LINK_PREFIX = /^([a-z][-+.a-z0-9]*:|\/|#)/i;
var VALID_LINK_PREFIX = /^([a-z][-+.a-z0-9]*:|\/|#)/i;
if (VALID_LINK_PREFIX.test(url)) {
return url;
}

const SIMPLE_EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
var SIMPLE_EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (SIMPLE_EMAIL_REGEX.test(url)) {
return 'mailto:' + url;
}
Expand Down Expand Up @@ -1639,7 +1640,7 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', {
}

t.openModalInsert(t.lang.insertImage, options, function (v) {
if (v.src !== base64) {
if (v.url !== base64) {
$img.attr({
src: v.url
});
Expand Down