X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/3c3939e2970468061592e66fc8989189279c3d17..2eac26a1b1fc8995dcebeba22f6991ef3542a886:/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