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 language files for english and german #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions footnotes/dialogs/footnotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
return {
editor_name: false,
// Basic properties of the dialog window: title, minimum size.
title: 'Manage Footnotes',
title: editor.lang.footnotes.dialog.title,
minWidth: 400,
minHeight: 200,
footnotes_el: false,
Expand All @@ -25,7 +25,7 @@
{
// Definition of the Basic Settings dialog tab (page).
id: 'tab-basic',
label: 'Basic Settings',
label: editor.lang.footnotes.dialog.basicSettings,

// The tab contents.
elements: [
Expand All @@ -34,15 +34,15 @@
type: 'textarea',
id: 'new_footnote',
'class': 'footnote_text',
label: 'New footnote:',
label: editor.lang.footnotes.dialog.fields.text,
inputStyle: 'height: 100px',
},
{
// Text input field for the footnotes title (explanation).
type: 'text',
id: 'footnote_id',
name: 'footnote_id',
label: 'No existing footnotes',
label: editor.lang.footnotes.dialog.fields.id,


// Called by the main setupContent call on dialog initialization.
Expand All @@ -60,7 +60,7 @@

if ($footnotes.length > 0) {
if ($el.find('p').length == 0) {
$el.append('<p style="margin-bottom: 10px;"><strong>OR:</strong> Choose footnote:</p><ol class="footnotes_list"></ol>');
$el.append('<p style="margin-bottom: 10px;"><strong>' + editor.lang.footnotes.dialog.texts.or + '</strong> ' + editor.lang.footnotes.dialog.texts.choose + '</p><ol class="footnotes_list"></ol>');
} else {
$el.find('ol').empty();
}
Expand Down
17 changes: 17 additions & 0 deletions footnotes/lang/de.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CKEDITOR.plugins.setLang('footnotes', 'de', {
buttons: {
add: 'Fußnote einfügen'
},
dialog: {
title: 'Fußnoten verwalten',
basicSettings: 'Einstellungen',
fields: {
text: 'Neue Fußnote:',
id: 'Keine Fußnoten vorhanden'
},
texts: {
or: 'ODER',
choose: 'vorhandene Fußnote verwenden:'
}
}
});
17 changes: 17 additions & 0 deletions footnotes/lang/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CKEDITOR.plugins.setLang('footnotes', 'en', {
buttons: {
add: 'Insert Footnotes'
},
dialog: {
title: 'Manage Footnotes',
basicSettings: 'Basic Settings',
fields: {
text: 'New footnote:',
id: 'No existing footnotes'
},
texts: {
or: 'OR',
choose: 'choose footnote:'
}
}
});
3 changes: 2 additions & 1 deletion footnotes/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
footnote_ids: [],
requires: 'widget',
icons: 'footnotes',
lang: 'en,de',


// The plugin initialization logic goes inside this method.
Expand Down Expand Up @@ -123,7 +124,7 @@
editor.ui.addButton('Footnotes', {

// The text part of the button (if available) and tooptip.
label: 'Insert Footnotes',
label: editor.lang.footnotes.buttons.add,

// The command to execute on click.
command: 'footnotes',
Expand Down