From 2b65fcc2dfc841da20b0a9572ca07cf04a334fe9 Mon Sep 17 00:00:00 2001 From: Collin Brown Date: Mon, 14 Sep 2020 11:09:11 -0400 Subject: [PATCH] Replacing hard-coded value Starting i18n project documentation --- docs/advanced/internationalization.md | 5 +++++ frontend/components/containers/annotation/FilterButton.vue | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 docs/advanced/internationalization.md diff --git a/docs/advanced/internationalization.md b/docs/advanced/internationalization.md new file mode 100644 index 00000000..36c5130c --- /dev/null +++ b/docs/advanced/internationalization.md @@ -0,0 +1,5 @@ +# Internationalization (i18n) + +Internationalization allows for the text content of an application to be translated across multiple languages without changing the source code. This is done by extracting each piece of text content into a generic template for each supported language. + +## Nuxt i18n \ No newline at end of file diff --git a/frontend/components/containers/annotation/FilterButton.vue b/frontend/components/containers/annotation/FilterButton.vue index 6a815bbc..1409e66a 100644 --- a/frontend/components/containers/annotation/FilterButton.vue +++ b/frontend/components/containers/annotation/FilterButton.vue @@ -52,9 +52,9 @@ export default { data() { return { items: [ - { title: 'All', param: '' }, - { title: 'Done', param: 'false' }, - { title: 'Undone', param: 'true' } + { title: this.$t('annotation.filterOption1'), param: '' }, + { title: this.$t('annotation.filterOption2'), param: 'false' }, + { title: this.$t('annotation.filterOption3'), param: 'true' } ] } },