Skip to content

Commit

Permalink
feat: vue app sync with documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stepan662 committed Nov 16, 2021
1 parent 8f5594b commit a9efcaa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
17 changes: 6 additions & 11 deletions testapps/vue/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
# vue
# Vue with Tolgee example

## Project setup

```
yarn install
npm install
```

### Compiles and hot-reloads for development

```
yarn serve
npm run start
```

### Compiles and minifies for production
```
yarn build
```

### Lints and fixes files
```
yarn lint
npm run build
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
12 changes: 7 additions & 5 deletions testapps/vue/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ import { TolgeeConfig } from '@tolgee/core';
import Todos from './Todos.vue';
import TranslationMethods from './TranslationMethods.vue';
import en from '../i18n/en.json';
import de from '../i18n/de.json';
import cs from '../i18n/cs.json';
import fr from '../i18n/fr.json';
export default defineComponent({
name: 'App',
components: { TolgeeProvider, Todos, TranslationMethods },
data() {
return {
config: {
staticData: { en, de, cs, fr },
staticData: {
en: () => import('../i18n/en.json'),
de: () => import('../i18n/de.json'),
fr: () => import('../i18n/fr.json'),
cs: () => import('../i18n/cs.json'),
},
availableLanguages: ['en', 'de', 'cs', 'fr'],
apiUrl: process.env.VUE_APP_TOLGEE_API_URL,
apiKey: process.env.VUE_APP_TOLGEE_API_KEY,
ui: process.env.VUE_APP_TOLGEE_API_KEY
Expand Down

0 comments on commit a9efcaa

Please sign in to comment.