Skip to content

Add vuejs language support #118

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

Open
OmgImAlexis opened this issue May 11, 2017 · 0 comments
Open

Add vuejs language support #118

OmgImAlexis opened this issue May 11, 2017 · 0 comments

Comments

@OmgImAlexis
Copy link

OmgImAlexis commented May 11, 2017

Would it be possible to add support for vue?
Here's a sample file. The{{}} is for js, $t is the gettext function.
It should be possible to just use the HTML parser but only in the <template> section of the vue file.

<template>
    <div>
        <div v-if="loading" class="loading">{{$('loading')}}</div>
        <template v-else>
            This is the homepage.<br>
            <form>
                <input v-model="series.id" type="text"></input>
                <input v-model="series.name" type="text"></input>
                <button>{{$t('series.add.new')}}</button>
            </form>
            <div v-for="series in allSeries">{{series}}</div>
        </template>
    </div>
</template>

<script>
export default {
    name: 'Home',
    data() {
        return {
            series: {
                id: '',
                name: ''
            },
            loading: true
        };
    }
};
</script>

<style lang="scss">
.loading {
    color: red;
}
</style>
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

1 participant