Skip to content

Commit 41c87f0

Browse files
committed
Merge branch 'master' into next
2 parents 9f35c7a + 2cf77ff commit 41c87f0

File tree

4 files changed

+153
-5
lines changed

4 files changed

+153
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ If you have Vuetify `1.x` (not `2.x`), then you can find docs and demo [here](ht
5353

5454
- used vuetify components
5555
- support for different types of icons ([fa](https://fontawesome.com/), [md](https://material.io/tools/icons/), [mdi](https://materialdesignicons.com/), [mdiSvg](https://vuetifyjs.com/en/customization/icons#install-material-design-icons-js-svg))
56-
- internationalization (en, es, fr, pl, ru, uk, ptbr, tr, he, nl, ja, de, ko, zh-CN, fa, sv), with automatic detection of the current language through the Vuetify. You can make a PR for your language if it is not there, [here](https://github.com/iliyaZelenko/tiptap-vuetify/pull/118/files) is an example.
56+
- internationalization (en, es, fr, pl, ru, uk, ptbr, tr, he, nl, ja, de, ko, zh-CN, fa, sv, cs), with automatic detection of the current language through the Vuetify. You can make a PR for your language if it is not there, [here](https://github.com/iliyaZelenko/tiptap-vuetify/pull/118/files) is an example.
5757
- markdown support
5858
- easy to start using
5959
- props and events are available

demo/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { MAIN_MODULE } from './config'
2020

2121
const vuetify = new Vuetify({
2222
lang: {
23-
current: 'en' // en | es | fr | pl | ru | uk | ptbr | tr | he | nl | ja | de | ko | zh-CN | fa | sv
23+
current: 'en' // en | es | fr | pl | ru | uk | ptbr | tr | he | nl | ja | de | ko | zh-CN | fa | sv | cs
2424
}
2525
})
2626

src/i18n/cs/index.ts

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
export default {
2+
extensions: {
3+
Blockquote: {
4+
buttons: {
5+
blockquote: {
6+
tooltip: 'Bloková citace'
7+
}
8+
}
9+
},
10+
Bold: {
11+
buttons: {
12+
bold: {
13+
tooltip: 'Tučně'
14+
}
15+
}
16+
},
17+
BulletList: {
18+
buttons: {
19+
bulletList: {
20+
tooltip: 'Bodový seznam'
21+
}
22+
}
23+
},
24+
Code: {
25+
buttons: {
26+
code: {
27+
tooltip: 'Kód'
28+
}
29+
}
30+
},
31+
CodeBlock: {
32+
buttons: {
33+
codeBlock: {
34+
tooltip: 'Blok kódu'
35+
}
36+
}
37+
},
38+
History: {
39+
buttons: {
40+
undo: {
41+
tooltip: 'Zpět'
42+
},
43+
redo: {
44+
tooltip: 'Vpřed'
45+
}
46+
}
47+
},
48+
HorizontalRule: {
49+
buttons: {
50+
horizontalRule: {
51+
tooltip: 'Horizontální oddělovač'
52+
}
53+
}
54+
},
55+
Italic: {
56+
buttons: {
57+
italic: {
58+
tooltip: 'Kurzíva'
59+
}
60+
}
61+
},
62+
OrderedList: {
63+
buttons: {
64+
orderedList: {
65+
tooltip: 'Číslovaný seznam'
66+
}
67+
}
68+
},
69+
Paragraph: {
70+
buttons: {
71+
paragraph: {
72+
tooltip: 'Odstavec'
73+
}
74+
}
75+
},
76+
Strike: {
77+
buttons: {
78+
strike: {
79+
tooltip: 'Přeškrtnutě'
80+
}
81+
}
82+
},
83+
Underline: {
84+
buttons: {
85+
underline: {
86+
tooltip: 'Podrženě'
87+
}
88+
}
89+
},
90+
Heading: {
91+
buttons: {
92+
heading: {
93+
tooltip: ({ level }) => level + '. úroveň nadpisu'
94+
}
95+
}
96+
},
97+
Link: {
98+
buttons: {
99+
isActive: {
100+
tooltip: 'Změnit odkaz'
101+
},
102+
notActive: {
103+
tooltip: 'Přidat odkaz'
104+
}
105+
},
106+
window: {
107+
title: 'Správa odkazu',
108+
form: {
109+
hrefLabel: 'Odkaz'
110+
},
111+
buttons: {
112+
close: 'Zavřít',
113+
remove: 'Odebrat',
114+
apply: 'Použít'
115+
}
116+
}
117+
},
118+
Image: {
119+
buttons: {
120+
tooltip: 'Obrázek'
121+
},
122+
window: {
123+
title: 'Přidat obrázek',
124+
form: {
125+
sourceLink: 'Adresa obrázku',
126+
altText: 'Alternativní text',
127+
addImage: 'Přidat obrázek'
128+
},
129+
imageUpload: {
130+
instruction: 'Vyberte soubor(y) nebo je(j) přetáhněte sem.'
131+
},
132+
buttons: {
133+
close: 'Zavřít',
134+
apply: 'Použít'
135+
}
136+
}
137+
},
138+
TodoList: {
139+
buttons: {
140+
todoList: {
141+
tooltip: 'Seznam TODO'
142+
}
143+
}
144+
}
145+
}
146+
}

src/i18n/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import ko from './ko'
1414
import zh from './zh'
1515
import fa from './fa'
1616
import sv from './sv'
17+
import cs from './cs'
1718

1819
import ConsoleLogger from '~/logging/ConsoleLogger'
1920
import { TiptapVuetifyPlugin } from '~/main'
@@ -35,7 +36,8 @@ export const dictionary = {
3536
ko,
3637
zh,
3738
fa,
38-
sv
39+
sv,
40+
cs
3941
}
4042

4143
export function getCurrentLang () {
@@ -46,9 +48,9 @@ export function getMsg (path: string, args?, lang: null | string = null): string
4648
let currentLang = lang || getCurrentLang()
4749

4850
if (!dictionary[currentLang]) {
49-
currentLang = defaultLanguage
50-
5151
ConsoleLogger.warn(`The current language "${currentLang}" is not yet available. Using language "${defaultLanguage}" by default. Contribution to github is welcome.`)
52+
53+
currentLang = defaultLanguage
5254
}
5355

5456
const dictionaryByLang = dictionary[currentLang]

0 commit comments

Comments
 (0)