Resolve "Add contexts to translatable strings"

This commit is contained in:
jovuit 2019-02-08 10:06:28 +01:00 committed by Eliot Berriot
parent d92f790ef6
commit 95c43c2ff6
2 changed files with 11 additions and 8 deletions

View File

@ -434,6 +434,7 @@ This hierarchical structure is made of several parts:
- ``Menu``
- ``Modal``
- ``Sidebar``
- ``Head``
- ``Popup``
- ``*`` for strings that are not tied to a specific location
@ -447,6 +448,7 @@ This hierarchical structure is made of several parts:
- ``Moderation``
- ``Player``
- ``Playlist``
- ``Favorites``
- ``Notifications``
- ``Radio``
- ``Settings``

View File

@ -3,7 +3,7 @@
<section class="ui vertical center aligned stripe segment">
<div :class="['ui', {'active': isLoading}, 'inverted', 'dimmer']">
<div class="ui text loader">
<translate>Loading your favorites</translate>
<translate :translate-context="'Content/Favorites/Message'">Loading your favorites</translate>
</div>
</div>
<h2 v-if="results" class="ui center aligned icon header">
@ -11,7 +11,8 @@
<translate
translate-plural="%{ count } favorites"
:translate-n="$store.state.favorites.count"
:translate-params="{count: results.count}">
:translate-params="{count: results.count}"
:translate-context="'Content/Favorites/Title'">
1 favorite
</translate>
</h2>
@ -21,7 +22,7 @@
<div :class="['ui', {'loading': isLoading}, 'form']">
<div class="fields">
<div class="field">
<label><translate>Ordering</translate></label>
<label><translate :translate-context="'Content/Favorites/Dropdown.Title/Short, Name'">Ordering</translate></label>
<select class="ui dropdown" v-model="ordering">
<option v-for="option in orderingOptions" :value="option[0]">
{{ sharedLabels.filters[option[1]] }}
@ -29,14 +30,14 @@
</select>
</div>
<div class="field">
<label><translate>Order</translate></label>
<label><translate :translate-context="'Content/*/Dropdown.Label/Short, Name'">Order</translate></label>
<select class="ui dropdown" v-model="orderingDirection">
<option value="+"><translate>Ascending</translate></option>
<option value="-"><translate>Descending</translate></option>
<option value="+"><translate :translate-context="'Content/*/Dropdown/Short'">Ascending</translate></option>
<option value="-"><translate :translate-context="'Content/*/Short'">Descending</translate></option>
</select>
</div>
<div class="field">
<label><translate>Results per page</translate></label>
<label><translate :translate-context="'Content/*/Dropdown.Label/Short, Name'">Results per page</translate></label>
<select class="ui dropdown" v-model="paginateBy">
<option :value="parseInt(12)">12</option>
<option :value="parseInt(25)">25</option>
@ -112,7 +113,7 @@ export default {
computed: {
labels() {
return {
title: this.$gettext("Your Favorites")
title: this.$pgettext('Head/Favorites/Title', 'Your Favorites')
}
}
},