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

Bind translations in v-for loops: does not work? #22

Closed
qathom opened this issue Feb 26, 2016 · 4 comments
Closed

Bind translations in v-for loops: does not work? #22

qathom opened this issue Feb 26, 2016 · 4 comments
Milestone

Comments

@qathom
Copy link

qathom commented Feb 26, 2016

Hello,

First of all, thank you for sharing this wonderful plugin! :)
I am facing a problem with loops.
In fact, the plugin returns the default value in loops.

Example:

<ul class="list-files">
    <li v-for="file in files">
        <ul class="file-actions">
            <li><a href="#" @click="insertFile">{{ $t('insert') }}</a></li>
            <li><a href="#" @click="deleteFile">{{ $t('delete') }}</a></li>
        </ul>
        <div class="file-name">
            <a href="{{ file.url }}" title="{{ file.name }}">{{ file.name }}</a>
        </div>
    </li>
</ul>

Am I doing something wrong?
Thanks in advance.

@kazupon
Copy link
Owner

kazupon commented Feb 29, 2016

Thank you for your reporting !!
Can you provide the reproduction code with jsfiddle or other please ?

@qathom
Copy link
Author

qathom commented Mar 2, 2016

Oups.
I ran several tests and I've realized that I forgot to update my translated locales, so the default value is shown. But I have now a suggestion about this: what do you think if it possible to set a default value or if the plugin returns a simple warning if the keypath is not present?

@kazupon
Copy link
Owner

kazupon commented Apr 17, 2016

I'll plan to consider simple warn outputting to console.

@kazupon kazupon added this to the 3.1 milestone Apr 18, 2016
@kazupon kazupon closed this as completed in b4c7c0e May 8, 2016
@qathom
Copy link
Author

qathom commented May 8, 2016

Great! Thanks @kazupon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants