Skip to content

Commit

Permalink
feat(i18n): added Swedish language support (#158)
Browse files Browse the repository at this point in the history
* Added Swedish language support

* added swedish

Co-authored-by: Jonas Nyblom <jonas.nyblom@kaplan.se>
  • Loading branch information
jnyblom and Jonas Nyblom committed May 14, 2020
1 parent 1e302f8 commit 3337180
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ If you have Vuetify `1.x` (not `2.x`), then you can find docs and demo [here](ht

- used vuetify components
- 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))
- internationalization (en, es, fr, pl, ru, uk, ptbr, tr, he, nl, ja, de, ko, zh-CN, fa), 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.
- 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.
- markdown support
- easy to start using
- props and events are available
Expand Down
2 changes: 1 addition & 1 deletion demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { MAIN_MODULE } from './config'

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

Expand Down
4 changes: 3 additions & 1 deletion src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import de from './de'
import ko from './ko'
import zh from './zh'
import fa from './fa'
import sv from './sv'

import ConsoleLogger from '~/logging/ConsoleLogger'
import { TiptapVuetifyPlugin } from '~/main'
Expand All @@ -33,7 +34,8 @@ export const dictionary = {
de,
ko,
zh,
fa
fa,
sv
}

export function getCurrentLang () {
Expand Down
142 changes: 142 additions & 0 deletions src/i18n/sv/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
export default {
extensions: {
Blockquote: {
buttons: {
blockquote: {
tooltip: 'Blockcitat'
}
}
},
Bold: {
buttons: {
bold: {
tooltip: 'Fet'
}
}
},
BulletList: {
buttons: {
bulletList: {
tooltip: 'Punktlista'
}
}
},
Code: {
buttons: {
code: {
tooltip: 'Kod'
}
}
},
CodeBlock: {
buttons: {
codeBlock: {
tooltip: 'Kodblock'
}
}
},
History: {
buttons: {
undo: {
tooltip: 'Ångra'
},
redo: {
tooltip: 'Gör om'
}
}
},
HorizontalRule: {
buttons: {
horizontalRule: {
tooltip: 'Horisontell linje'
}
}
},
Italic: {
buttons: {
italic: {
tooltip: 'Kursiv'
}
}
},
OrderedList: {
buttons: {
orderedList: {
tooltip: 'Nummerlista'
}
}
},
Paragraph: {
buttons: {
paragraph: {
tooltip: 'Stycke'
}
}
},
Strike: {
buttons: {
strike: {
tooltip: 'Genomstruken'
}
}
},
Underline: {
buttons: {
underline: {
tooltip: 'Understruken'
}
}
},
Heading: {
buttons: {
heading: {
tooltip: ({ level }) => 'Rubriknivå ' + level
}
}
},
Link: {
buttons: {
isActive: {
tooltip: 'Ändra länk'
},
notActive: {
tooltip: 'Lägg till länk'
}
},
window: {
title: 'Länkinställningar',
form: {
hrefLabel: 'Href'
},
buttons: {
close: 'Stäng',
remove: 'Ta bort',
apply: 'Applicera'
}
}
},
Image: {
buttons: {
tooltip: 'Bild'
},
window: {
title: 'Lägg till bild',
or: 'ELLER',
form: {
sourceLink: 'Bild-URL'
},
buttons: {
close: 'Stäng',
apply: 'Applicera'
}
}
},
TodoList: {
buttons: {
todoList: {
tooltip: 'Att göra-lista'
}
}
}
}
}

0 comments on commit 3337180

Please sign in to comment.