Skip to content
Snippets Groups Projects
Commit e1355559 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch '662-auth' into 'develop'

#662: Resolve "Add contexts to translatable strings"

See merge request funkwhale/funkwhale!605
parents 44ddb736 23672be5
No related branches found
No related tags found
No related merge requests found
...@@ -2,29 +2,29 @@ ...@@ -2,29 +2,29 @@
<main class="main pusher" v-title="labels.confirm"> <main class="main pusher" v-title="labels.confirm">
<section class="ui vertical stripe segment"> <section class="ui vertical stripe segment">
<div class="ui small text container"> <div class="ui small text container">
<h2><translate>Confirm your e-mail address</translate></h2> <h2><translate :translate-context="'Content/Signup/Title'">Confirm your e-mail address</translate></h2>
<form v-if="!success" class="ui form" @submit.prevent="submit()"> <form v-if="!success" class="ui form" @submit.prevent="submit()">
<div v-if="errors.length > 0" class="ui negative message"> <div v-if="errors.length > 0" class="ui negative message">
<div class="header"><translate>Could not confirm your e-mail address</translate></div> <div class="header"><translate :translate-context="'Content/Signup/Paragraph'">Could not confirm your e-mail address</translate></div>
<ul class="list"> <ul class="list">
<li v-for="error in errors">{{ error }}</li> <li v-for="error in errors">{{ error }}</li>
</ul> </ul>
</div> </div>
<div class="field"> <div class="field">
<label><translate>Confirmation code</translate></label> <label><translate :translate-context="'Content/Signup/Form.Label'">Confirmation code</translate></label>
<input name="confirmation-code" type="text" required v-model="key" /> <input name="confirmation-code" type="text" required v-model="key" />
</div> </div>
<router-link :to="{path: '/login'}"> <router-link :to="{path: '/login'}">
<translate>Return to login</translate> <translate :translate-context="'Content/Signup/Link/Verb'">Return to login</translate>
</router-link> </router-link>
<button :class="['ui', {'loading': isLoading}, 'right', 'floated', 'green', 'button']" type="submit"> <button :class="['ui', {'loading': isLoading}, 'right', 'floated', 'green', 'button']" type="submit">
<translate>Confirm your e-mail address</translate></button> <translate :translate-context="'Content/Signup/Button.Label/Verb'">Confirm your e-mail address</translate></button>
</form> </form>
<div v-else class="ui positive message"> <div v-else class="ui positive message">
<div class="header"><translate>E-mail address confirmed</translate></div> <div class="header"><translate :translate-context="'Content/Signup/Message'">E-mail address confirmed</translate></div>
<p><translate>You can now use the service without limitations.</translate></p> <p><translate :translate-context="'Content/Signup/Paragraph'">You can now use the service without limitations.</translate></p>
<router-link :to="{name: 'login'}"> <router-link :to="{name: 'login'}">
<translate>Proceed to login</translate> <translate :translate-context="'Content/Signup/Link/Verb'">Proceed to login</translate>
</router-link> </router-link>
</div> </div>
</div> </div>
...@@ -48,7 +48,7 @@ export default { ...@@ -48,7 +48,7 @@ export default {
computed: { computed: {
labels() { labels() {
return { return {
confirm: this.$gettext("Confirm your e-mail address") confirm: this.$pgettext('Head/Signup/Title', "Confirm your e-mail address")
} }
} }
}, },
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
<main class="main pusher" v-title="labels.reset"> <main class="main pusher" v-title="labels.reset">
<section class="ui vertical stripe segment"> <section class="ui vertical stripe segment">
<div class="ui small text container"> <div class="ui small text container">
<h2><translate>Reset your password</translate></h2> <h2><translate :translate-context="'Content/Signup/Title'">Reset your password</translate></h2>
<form class="ui form" @submit.prevent="submit()"> <form class="ui form" @submit.prevent="submit()">
<div v-if="errors.length > 0" class="ui negative message"> <div v-if="errors.length > 0" class="ui negative message">
<div class="header"><translate>Error while asking for a password reset</translate></div> <div class="header"><translate :translate-context="'Content/Signup/Card.Title'">Error while asking for a password reset</translate></div>
<ul class="list"> <ul class="list">
<li v-for="error in errors">{{ error }}</li> <li v-for="error in errors">{{ error }}</li>
</ul> </ul>
</div> </div>
<p><translate>Use this form to request a password reset. We will send an email to the given address with instructions to reset your password.</translate></p> <p><translate :translate-context="'Content/Signup/Paragraph'">Use this form to request a password reset. We will send an email to the given address with instructions to reset your password.</translate></p>
<div class="field"> <div class="field">
<label><translate>Account's email</translate></label> <label><translate :translate-context="'Content/Signup/Input.Label'">Account's email</translate></label>
<input <input
required required
ref="email" ref="email"
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
v-model="email"> v-model="email">
</div> </div>
<router-link :to="{path: '/login'}"> <router-link :to="{path: '/login'}">
<translate>Back to login</translate> <translate :translate-context="'Content/Signup/Link'">Back to login</translate>
</router-link> </router-link>
<button :class="['ui', {'loading': isLoading}, 'right', 'floated', 'green', 'button']" type="submit"> <button :class="['ui', {'loading': isLoading}, 'right', 'floated', 'green', 'button']" type="submit">
<translate>Ask for a password reset</translate></button> <translate :translate-context="'Content/Signup/Button.Label/Verb'">Ask for a password reset</translate></button>
</form> </form>
</div> </div>
</section> </section>
...@@ -50,9 +50,8 @@ export default { ...@@ -50,9 +50,8 @@ export default {
}, },
computed: { computed: {
labels() { labels() {
let reset = this.$gettext("Reset your password") let reset = this.$pgettext('Head/Signup/Title', "Reset your password")
let placeholder = this.$gettext( let placeholder = this.$pgettext('Content/Signup/Input.Placeholder', "Enter the email address binded to your account"
"Input the email address binded to your account"
) )
return { return {
reset, reset,
......
...@@ -2,34 +2,34 @@ ...@@ -2,34 +2,34 @@
<main class="main pusher" v-title="labels.changePassword"> <main class="main pusher" v-title="labels.changePassword">
<section class="ui vertical stripe segment"> <section class="ui vertical stripe segment">
<div class="ui small text container"> <div class="ui small text container">
<h2><translate>Change your password</translate></h2> <h2><translate :translate-context="'Content/Signup/Title'">Change your password</translate></h2>
<form v-if="!success" class="ui form" @submit.prevent="submit()"> <form v-if="!success" class="ui form" @submit.prevent="submit()">
<div v-if="errors.length > 0" class="ui negative message"> <div v-if="errors.length > 0" class="ui negative message">
<div class="header"><translate>Error while changing your password</translate></div> <div class="header"><translate :translate-context="'Content/Signup/Card.Title'">Error while changing your password</translate></div>
<ul class="list"> <ul class="list">
<li v-for="error in errors">{{ error }}</li> <li v-for="error in errors">{{ error }}</li>
</ul> </ul>
</div> </div>
<template v-if="token && uid"> <template v-if="token && uid">
<div class="field"> <div class="field">
<label><translate>New password</translate></label> <label><translate :translate-context="'Content/Signup/Input.Label'">New password</translate></label>
<password-input v-model="newPassword" /> <password-input v-model="newPassword" />
</div> </div>
<router-link :to="{path: '/login'}"> <router-link :to="{path: '/login'}">
<translate>Back to login</translate> <translate :translate-context="'Content/Signup/Link'">Back to login</translate>
</router-link> </router-link>
<button :class="['ui', {'loading': isLoading}, 'right', 'floated', 'green', 'button']" type="submit"> <button :class="['ui', {'loading': isLoading}, 'right', 'floated', 'green', 'button']" type="submit">
<translate>Update your password</translate></button> <translate :translate-context="'Content/Signup/Button.Label'">Update your password</translate></button>
</template> </template>
<template v-else> <template v-else>
<p><translate>If the email address provided in the previous step is valid and binded to a user account, you should receive an email with reset instructions in the next couple of minutes.</translate></p> <p><translate :translate-context="'Content/Signup/Paragraph'">If the email address provided in the previous step is valid and binded to a user account, you should receive an email with reset instructions in the next couple of minutes.</translate></p>
</template> </template>
</form> </form>
<div v-else class="ui positive message"> <div v-else class="ui positive message">
<div class="header"><translate>Password updated successfully</translate></div> <div class="header"><translate :translate-context="'Content/Signup/Card.Title'">Password updated successfully</translate></div>
<p><translate>Your password has been updated successfully.</translate></p> <p><translate :translate-context="'Content/Signup/Card.Paragraph'">Your password has been updated successfully.</translate></p>
<router-link :to="{name: 'login'}"> <router-link :to="{name: 'login'}">
<translate>Proceed to login</translate> <translate :translate-context="'Content/Signup/Link/Verb'">Proceed to login</translate>
</router-link> </router-link>
</div> </div>
</div> </div>
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
computed: { computed: {
labels() { labels() {
return { return {
changePassword: this.$gettext("Change your password") changePassword: this.$pgettext('Head/Signup/Title', "Change your password")
} }
} }
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment