X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/efe36f4f1b5df351eeb4d40a54c3900cf9a7079b..b616f6757e950aea9f757d7426550cab3bdff1ec:/src/editor/utils/wlxml.js?ds=sidebyside 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