#662: Resolve "Add contexts to translatable strings"
This commit is contained in:
parent
84688b91c9
commit
2341975856
|
@ -5,7 +5,7 @@
|
||||||
<th colspan="1000">
|
<th colspan="1000">
|
||||||
<div v-if="refreshable" class="right floated">
|
<div v-if="refreshable" class="right floated">
|
||||||
<span v-if="needsRefresh">
|
<span v-if="needsRefresh">
|
||||||
<translate>Content have been updated, click refresh to see up-to-date content</translate>
|
<translate :translate-context="'Content/*/Button.Help text.Paragraph'">Content have been updated, click refresh to see up-to-date content</translate>
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
@click="$emit('refresh')"
|
@click="$emit('refresh')"
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
<div class="ui small left floated form" v-if="actionUrl && actions.length > 0">
|
<div class="ui small left floated form" v-if="actionUrl && actions.length > 0">
|
||||||
<div class="ui inline fields">
|
<div class="ui inline fields">
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label><translate>Actions</translate></label>
|
<label><translate :translate-context="'Content/*/Dropdown.Label/Noun'">Actions</translate></label>
|
||||||
<select class="ui dropdown" v-model="currentActionName">
|
<select class="ui dropdown" v-model="currentActionName">
|
||||||
<option v-for="action in actions" :value="action.name">
|
<option v-for="action in actions" :value="action.name">
|
||||||
{{ action.label }}
|
{{ action.label }}
|
||||||
|
@ -32,9 +32,9 @@
|
||||||
confirm-color="green"
|
confirm-color="green"
|
||||||
color=""
|
color=""
|
||||||
@confirm="launchAction">
|
@confirm="launchAction">
|
||||||
<translate>Go</translate>
|
<translate :translate-context="'Content/*/Button.Label/Short, Verb'">Go</translate>
|
||||||
<p slot="modal-header">
|
<p slot="modal-header">
|
||||||
<translate
|
<translate :translate-context="'Modal/*/Title'"
|
||||||
key="1"
|
key="1"
|
||||||
:translate-n="affectedObjectsCount"
|
:translate-n="affectedObjectsCount"
|
||||||
:translate-params="{count: affectedObjectsCount, action: currentActionName}"
|
:translate-params="{count: affectedObjectsCount, action: currentActionName}"
|
||||||
|
@ -43,28 +43,28 @@
|
||||||
</translate>
|
</translate>
|
||||||
</p>
|
</p>
|
||||||
<p slot="modal-content">
|
<p slot="modal-content">
|
||||||
<translate>This may affect a lot of elements or have irreversible consequences, please double check this is really what you want.</translate>
|
<translate :translate-context="'Modal/*/Paragraph'">This may affect a lot of elements or have irreversible consequences, please double check this is really what you want.</translate>
|
||||||
</p>
|
</p>
|
||||||
<div slot="modal-confirm"><translate>Launch</translate></div>
|
<div slot="modal-confirm"><translate :translate-context="'Modal/*/Button.Label/Short, Verb'">Launch</translate></div>
|
||||||
</dangerous-button>
|
</dangerous-button>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
@click="launchAction"
|
@click="launchAction"
|
||||||
:disabled="checked.length === 0"
|
:disabled="checked.length === 0"
|
||||||
:class="['ui', {disabled: checked.length === 0}, {'loading': actionLoading}, 'button']">
|
:class="['ui', {disabled: checked.length === 0}, {'loading': actionLoading}, 'button']">
|
||||||
<translate>Go</translate></div>
|
<translate :translate-context="'Content/*/Button.Label/Short, Verb'">Go</translate></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="count field">
|
<div class="count field">
|
||||||
<translate
|
<translate :translate-context="'Content/*/Paragraph'"
|
||||||
tag="span"
|
tag="span"
|
||||||
v-if="selectAll"
|
v-if="selectAll"
|
||||||
key="1"
|
key="1"
|
||||||
:translate-n="objectsData.count"
|
:translate-n="objectsData.count"
|
||||||
:translate-params="{count: objectsData.count, total: objectsData.count}"
|
:translate-params="{count: objectsData.count, total: objectsData.count}"
|
||||||
translate-plural="%{ count } on %{ total } selected">
|
translate-plural="All %{ count } elements selected">
|
||||||
%{ count } on %{ total } selected
|
All %{ count } element selected
|
||||||
</translate>
|
</translate>
|
||||||
<translate
|
<translate :translate-context="'Content/*/Paragraph'"
|
||||||
tag="span"
|
tag="span"
|
||||||
v-else
|
v-else
|
||||||
key="2"
|
key="2"
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
</translate>
|
</translate>
|
||||||
<template v-if="currentAction.allowAll && checkable.length > 0 && checkable.length === checked.length">
|
<template v-if="currentAction.allowAll && checkable.length > 0 && checkable.length === checked.length">
|
||||||
<a @click="selectAll = true" v-if="!selectAll">
|
<a @click="selectAll = true" v-if="!selectAll">
|
||||||
<translate
|
<translate :translate-context="'Content/*/Link/Verb'"
|
||||||
key="3"
|
key="3"
|
||||||
:translate-n="objectsData.count"
|
:translate-n="objectsData.count"
|
||||||
:translate-params="{total: objectsData.count}"
|
:translate-params="{total: objectsData.count}"
|
||||||
|
@ -84,20 +84,20 @@
|
||||||
</translate>
|
</translate>
|
||||||
</a>
|
</a>
|
||||||
<a @click="selectAll = false" v-else>
|
<a @click="selectAll = false" v-else>
|
||||||
<translate key="4">Select only current page</translate>
|
<translate :translate-context="'Content/*/Link/Verb'" key="4">Select only current page</translate>
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="actionErrors.length > 0" class="ui negative message">
|
<div v-if="actionErrors.length > 0" class="ui negative message">
|
||||||
<div class="header"><translate>Error while applying action</translate></div>
|
<div class="header"><translate :translate-context="'Content/*/Error message/Header'">Error while applying action</translate></div>
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
<li v-for="error in actionErrors">{{ error }}</li>
|
<li v-for="error in actionErrors">{{ error }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="actionResult" class="ui positive message">
|
<div v-if="actionResult" class="ui positive message">
|
||||||
<p>
|
<p>
|
||||||
<translate
|
<translate :translate-context="'Content/*/Paragraph'"
|
||||||
:translate-n="actionResult.updated"
|
:translate-n="actionResult.updated"
|
||||||
:translate-params="{count: actionResult.updated, action: actionResult.action}"
|
:translate-params="{count: actionResult.updated, action: actionResult.action}"
|
||||||
translate-plural="Action %{ action } was launched successfully on %{ count } elements">
|
translate-plural="Action %{ action } was launched successfully on %{ count } elements">
|
||||||
|
@ -269,7 +269,7 @@ export default {
|
||||||
},
|
},
|
||||||
labels () {
|
labels () {
|
||||||
return {
|
return {
|
||||||
refresh: this.$gettext('Refresh table content')
|
refresh: this.$pgettext('Content/*/Button.Tooltip/Verb', 'Refresh table content')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
affectedObjectsCount () {
|
affectedObjectsCount () {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="ui fluid action input">
|
<div class="ui fluid action input">
|
||||||
<p class="message" v-if="copied">
|
<p class="message" v-if="copied">
|
||||||
<translate>Text copied to clipboard!</translate>
|
<translate :translate-context="'Content/*/Paragraph/Short'">Text copied to clipboard!</translate>
|
||||||
</p>
|
</p>
|
||||||
<input ref="input" :value="value" type="text">
|
<input ref="input" :value="value" type="text">
|
||||||
<button @click="copy" :class="['ui', buttonClasses, 'right', 'labeled', 'icon', 'button']">
|
<button @click="copy" :class="['ui', buttonClasses, 'right', 'labeled', 'icon', 'button']">
|
||||||
<i class="copy icon"></i>
|
<i class="copy icon"></i>
|
||||||
<translate>Copy</translate>
|
<translate :translate-context="'Content/*/Button.Label/Short, Verb'">Copy</translate>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<modal class="small" :show.sync="showModal">
|
<modal class="small" :show.sync="showModal">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<slot name="modal-header">
|
<slot name="modal-header">
|
||||||
<translate>Do you want to confirm this action?</translate>
|
<translate :translate-context="'Modal/*/Title'">Do you want to confirm this action?</translate>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="scrolling content">
|
<div class="scrolling content">
|
||||||
|
@ -15,11 +15,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="ui cancel button">
|
<div class="ui cancel button">
|
||||||
<translate>Cancel</translate>
|
<translate :translate-context="'Modal/*/Button.Label/Short, Verb'">Cancel</translate>
|
||||||
</div>
|
</div>
|
||||||
<div :class="['ui', 'confirm', confirmButtonColor, 'button']" @click="confirm">
|
<div :class="['ui', 'confirm', confirmButtonColor, 'button']" @click="confirm">
|
||||||
<slot name="modal-confirm">
|
<slot name="modal-confirm">
|
||||||
<translate>Confirm</translate>
|
<translate :translate-context="'Modal/*/Button.Label/Short, Verb'">Confirm</translate>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<span>
|
<span>
|
||||||
<translate
|
<translate :translate-context="'Content/*/Paragraph'"
|
||||||
v-if="durationData.hours > 0"
|
v-if="durationData.hours > 0"
|
||||||
:translate-params="{minutes: durationData.minutes, hours: durationData.hours}">%{ hours } h %{ minutes } min</translate>
|
:translate-params="{minutes: durationData.minutes, hours: durationData.hours}">%{ hours } h %{ minutes } min</translate>
|
||||||
<translate
|
<translate :translate-context="'Content/*/Paragraph'"
|
||||||
v-else
|
v-else
|
||||||
:translate-params="{minutes: durationData.minutes}">%{ minutes } min</translate>
|
:translate-params="{minutes: durationData.minutes}">%{ minutes } min</translate>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<slot name="title">
|
<slot name="title">
|
||||||
|
|
||||||
<i class="search icon"></i>
|
<i class="search icon"></i>
|
||||||
<translate :translate-context="'Content/*/Paragraph'">
|
<translate :translate-context="'Content/*/Paragraph'" :translate-context="'Content/*/Paragraph'">
|
||||||
No results were found.
|
No results were found.
|
||||||
</translate>
|
</translate>
|
||||||
</slot>
|
</slot>
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
<div class="inline">
|
<div class="inline">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<button v-if="refresh" class="ui button" @click="$emit('refresh')">
|
<button v-if="refresh" class="ui button" @click="$emit('refresh')">
|
||||||
<translate :translate-context="'Content/Button/Label/Verb'">
|
<translate :translate-context="'Content/*/Button.Label/Short, Verb'" :translate-context="'Content/Button/Label/Verb'">
|
||||||
Refresh
|
Refresh
|
||||||
</translate></button>
|
</translate></button>
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Reference in New Issue