Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] $vuetify.t(key,params) #4548

Closed
deka opened this issue Jul 9, 2018 · 5 comments
Closed

[Bug Report] $vuetify.t(key,params) #4548

deka opened this issue Jul 9, 2018 · 5 comments

Comments

@deka
Copy link

deka commented Jul 9, 2018

Versions and Environment

Vuetify: 1.1.1
Vue: 2.5.16
Browsers: Chrome 67.0.3396.99
OS: Windows 10

Steps to reproduce

{
    en: {
      $vuetify: {
        dataIterator: {
          rowsPerPageText: "Items per page:"
        }
      },
      other: {
        test: "the test"
      }
    }
  }
  • use $vuetify.t('other.test') in vue template

Expected Behavior

{{ $vuetify.t('other.test') }} must return the translation

Actual Behavior

{{ $vuetify.t('other.test') }} return the key

Reproduction Link

https://codesandbox.io/s/py90q0l9q0

@KaelWD
Copy link
Member

KaelWD commented Jul 9, 2018

The documentation is wrong, keys must be prefixed with $vuetify

{{ $vuetify.t('$vuetify.other.test') }}

This is so we can dynamically change the locale with prop defaults. $vuetify.t isn't really intended to be used externally, if you already have vue-i18n installed you should use its $t() instead.

c6e17bb

@KaelWD KaelWD closed this as completed Jul 9, 2018
@KaelWD KaelWD added the wontfix The issue is expected and will not be fixed label Jul 9, 2018
@longrunningprocess
Copy link

I just ran into this documentation issue too...what's the reason for wontfix @KaelWD ?

@madnik7
Copy link

madnik7 commented Oct 26, 2018

the documentation still have the issue and killing developers time!

@nekosaur
Copy link
Member

https://github.com/vuetifyjs/vuetifyjs.com/pull/660

@KaelWD KaelWD reopened this Oct 30, 2018
@KaelWD KaelWD added T: documentation and removed wontfix The issue is expected and will not be fixed labels Oct 30, 2018
@MajesticPotatoe
Copy link
Member

docs have been updated for next release.
97d7480

@lock lock bot locked as resolved and limited conversation to collaborators Dec 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants