#662: Resolve "Add contexts to translatable strings"

This commit is contained in:
jovuit 2019-02-14 10:28:12 +01:00 committed by Eliot Berriot
parent 84942f74eb
commit 46bae31b3e
6 changed files with 59 additions and 58 deletions

View file

@ -3,10 +3,10 @@
<section class="ui vertical stripe segment">
<div class="ui small text container">
<h2>
<translate>Are you sure you want to log out?</translate>
<translate :translate-context="'Content/Login/Title'">Are you sure you want to log out?</translate>
</h2>
<p v-translate="{username: $store.state.auth.username}">You are currently logged in as %{ username }</p>
<button class="ui button" @click="$store.dispatch('auth/logout')"><translate>Yes, log me out!</translate></button>
<button class="ui button" @click="$store.dispatch('auth/logout')"><translate :translate-context="'Content/Login/Button.Label'">Yes, log me out!</translate></button>
</div>
</section>
</main>
@ -17,7 +17,7 @@ export default {
computed: {
labels() {
return {
title: this.$gettext("Log Out")
title: this.$pgettext('Head/Login/Title', "Log Out")
}
}
}