#662: Resolve "Add contexts to translatable strings"

This commit is contained in:
jovuit 2019-02-14 10:40:20 +01:00 committed by Eliot Berriot
parent a311f96933
commit f66d95663f
10 changed files with 126 additions and 126 deletions

View file

@ -2,18 +2,18 @@
<main v-title="labels.title">
<section class="ui vertical stripe segment">
<h2 class="ui header">
<translate>Browsing albums</translate>
<translate :translate-context="'Content/Album/Title'">Browsing albums</translate>
</h2>
<div :class="['ui', {'loading': isLoading}, 'form']">
<div class="fields">
<div class="field">
<label>
<translate>Search</translate>
<translate :translate-context="'Content/Search/Input.Label/Verb'">Search</translate>
</label>
<input type="text" name="search" v-model="query" :placeholder="labels.searchPlaceholder"/>
</div>
<div class="field">
<label><translate>Ordering</translate></label>
<label><translate :translate-context="'Content/Search/Dropdown.Label/Noun'">Ordering</translate></label>
<select class="ui dropdown" v-model="ordering">
<option v-for="option in orderingOptions" :value="option[0]">
{{ sharedLabels.filters[option[1]] }}
@ -21,14 +21,14 @@
</select>
</div>
<div class="field">
<label><translate>Ordering direction</translate></label>
<label><translate :translate-context="'Content/Search/Dropdown.Label/Noun'">Ordering direction</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/Search/Dropdown'">Ascending</translate></option>
<option value="-"><translate :translate-context="'Content/Search/Dropdown'">Descending</translate></option>
</select>
</div>
<div class="field">
<label><translate>Results per page</translate></label>
<label><translate :translate-context="'Content/Search/Dropdown.Label/Noun'">Results per page</translate></label>
<select class="ui dropdown" v-model="paginateBy">
<option :value="parseInt(12)">12</option>
<option :value="parseInt(25)">25</option>
@ -116,8 +116,8 @@ export default {
},
computed: {
labels() {
let searchPlaceholder = this.$gettext("Enter album title...")
let title = this.$gettext("Albums")
let searchPlaceholder = this.$pgettext('Content/Search/Input.Placeholder', "Enter album title...")
let title = this.$pgettext('Head/Album/Title', "Albums")
return {
searchPlaceholder,
title