X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/efe36f4f1b5df351eeb4d40a54c3900cf9a7079b..6515d67111202f746a1a58c66dcf2261636f2a26:/src/editor/utils/wlxml.js diff --git a/src/editor/utils/wlxml.js b/src/editor/utils/wlxml.js index 5f1b84d..9935655 100644 --- a/src/editor/utils/wlxml.js +++ b/src/editor/utils/wlxml.js @@ -6,17 +6,17 @@ define([ -return { - wlxmlTagNames: { - '': '', +var names = { + tag: { + '': '-', section: 'sekcja', header: 'nagłówek', div: 'blok', span: 'tekst', aside: 'poboczny' }, - wlxmlClassNames: { - '': '', + 'class': { + '': '-', author: 'autor', title: 'tytuł', cite: 'cytat', @@ -33,4 +33,16 @@ return { } }; +return { + getLabel: function(of, name) { + return (names[of] && (names[of][name] || name)) || '?'; + }, + getTagLabel: function(tagName) { + return this.getLabel('tag', tagName); + }, + getClassLabel: function(className) { + return this.getLabel('class', className); + } +}; + }); \ No newline at end of file