editor: cleanup - removing unnecessary wlxml class handling code in canvas generic...
[fnpeditor.git] / src / editor / utils / wlxml.js
1 define([
2
3 ], function() {
4     
5 'use strict';
6
7
8
9 var names = {
10     tag: {
11         '': '-',
12         section: 'sekcja',
13         header: 'nagłówek',
14         div: 'blok',
15         span: 'tekst',
16         aside: 'poboczny'
17     },
18     'class': {
19         '': '-',
20         author: 'autor',
21         title: 'tytuł',
22         cite: 'cytat',
23         'cite.code': 'cytat.kod',
24         'cite.code.xml': 'cytat.kod.xml',
25         'list.items': 'lista',
26         'list.items.enum': 'lista.numerowana',
27         item: 'element',
28         uri: 'uri',
29         p: 'paragraf',
30         footnote: 'przypis',
31         todo: 'todo',
32         emp: 'wyróżnienie'
33     }
34 };
35
36 return {
37     getLabel: function(of, name) {
38         return (names[of] && (names[of][name] || name)) || '?';
39     },
40     getTagLabel: function(tagName) {
41         return this.getLabel('tag', tagName);
42     },
43     getClassLabel: function(className) {
44         return this.getLabel('class', className);
45     }
46 };
47
48 });