diff --git a/front/src/components/common/ActionTable.vue b/front/src/components/common/ActionTable.vue index f1c5a400fe7fe84600149244e11e427e76622d55..10d49018b2a77e4cd188f48e2641fb83ca189a2e 100644 --- a/front/src/components/common/ActionTable.vue +++ b/front/src/components/common/ActionTable.vue @@ -5,7 +5,7 @@ <th colspan="1000"> <div v-if="refreshable" class="right floated"> <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> <button @click="$emit('refresh')" @@ -19,7 +19,7 @@ <div class="ui small left floated form" v-if="actionUrl && actions.length > 0"> <div class="ui inline fields"> <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"> <option v-for="action in actions" :value="action.name"> {{ action.label }} @@ -32,9 +32,9 @@ confirm-color="green" color="" @confirm="launchAction"> - <translate>Go</translate> + <translate :translate-context="'Content/*/Button.Label/Short, Verb'">Go</translate> <p slot="modal-header"> - <translate + <translate :translate-context="'Modal/*/Title'" key="1" :translate-n="affectedObjectsCount" :translate-params="{count: affectedObjectsCount, action: currentActionName}" @@ -43,28 +43,28 @@ </translate> </p> <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> - <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> <div v-else @click="launchAction" :disabled="checked.length === 0" :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 class="count field"> - <translate + <translate :translate-context="'Content/*/Paragraph'" tag="span" v-if="selectAll" key="1" :translate-n="objectsData.count" :translate-params="{count: objectsData.count, total: objectsData.count}" - translate-plural="%{ count } on %{ total } selected"> - %{ count } on %{ total } selected + translate-plural="All %{ count } elements selected"> + All %{ count } element selected </translate> - <translate + <translate :translate-context="'Content/*/Paragraph'" tag="span" v-else key="2" @@ -75,7 +75,7 @@ </translate> <template v-if="currentAction.allowAll && checkable.length > 0 && checkable.length === checked.length"> <a @click="selectAll = true" v-if="!selectAll"> - <translate + <translate :translate-context="'Content/*/Link/Verb'" key="3" :translate-n="objectsData.count" :translate-params="{total: objectsData.count}" @@ -84,20 +84,20 @@ </translate> </a> <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> </template> </div> </div> <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"> <li v-for="error in actionErrors">{{ error }}</li> </ul> </div> <div v-if="actionResult" class="ui positive message"> <p> - <translate + <translate :translate-context="'Content/*/Paragraph'" :translate-n="actionResult.updated" :translate-params="{count: actionResult.updated, action: actionResult.action}" translate-plural="Action %{ action } was launched successfully on %{ count } elements"> @@ -269,7 +269,7 @@ export default { }, labels () { return { - refresh: this.$gettext('Refresh table content') + refresh: this.$pgettext('Content/*/Button.Tooltip/Verb', 'Refresh table content') } }, affectedObjectsCount () { diff --git a/front/src/components/common/CopyInput.vue b/front/src/components/common/CopyInput.vue index af82f2c661aec207bbae6208d192ca4376dc02b6..3e400893494cd447a2ee3b320fee4c5a205ac874 100644 --- a/front/src/components/common/CopyInput.vue +++ b/front/src/components/common/CopyInput.vue @@ -1,12 +1,12 @@ <template> <div class="ui fluid action input"> <p class="message" v-if="copied"> - <translate>Text copied to clipboard!</translate> + <translate :translate-context="'Content/*/Paragraph/Short'">Text copied to clipboard!</translate> </p> <input ref="input" :value="value" type="text"> <button @click="copy" :class="['ui', buttonClasses, 'right', 'labeled', 'icon', 'button']"> <i class="copy icon"></i> - <translate>Copy</translate> + <translate :translate-context="'Content/*/Button.Label/Short, Verb'">Copy</translate> </button> </div> </template> diff --git a/front/src/components/common/DangerousButton.vue b/front/src/components/common/DangerousButton.vue index e6139203a7c6f96e1eb1fc57ec498b7318643590..9a2fab48a3358225317144ec1b25133084bef1d9 100644 --- a/front/src/components/common/DangerousButton.vue +++ b/front/src/components/common/DangerousButton.vue @@ -5,7 +5,7 @@ <modal class="small" :show.sync="showModal"> <div class="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> </div> <div class="scrolling content"> @@ -15,11 +15,11 @@ </div> <div class="actions"> <div class="ui cancel button"> - <translate>Cancel</translate> + <translate :translate-context="'Modal/*/Button.Label/Short, Verb'">Cancel</translate> </div> <div :class="['ui', 'confirm', confirmButtonColor, 'button']" @click="confirm"> <slot name="modal-confirm"> - <translate>Confirm</translate> + <translate :translate-context="'Modal/*/Button.Label/Short, Verb'">Confirm</translate> </slot> </div> </div> diff --git a/front/src/components/common/Duration.vue b/front/src/components/common/Duration.vue index 85b070fcd4f18a121e6ce76bdc52bf6fd9762e51..93465ba6fcb818faec5c92de93acfeb28f117967 100644 --- a/front/src/components/common/Duration.vue +++ b/front/src/components/common/Duration.vue @@ -1,9 +1,9 @@ <template> <span> - <translate + <translate :translate-context="'Content/*/Paragraph'" v-if="durationData.hours > 0" :translate-params="{minutes: durationData.minutes, hours: durationData.hours}">%{ hours } h %{ minutes } min</translate> - <translate + <translate :translate-context="'Content/*/Paragraph'" v-else :translate-params="{minutes: durationData.minutes}">%{ minutes } min</translate> </span> diff --git a/front/src/components/common/EmptyState.vue b/front/src/components/common/EmptyState.vue index ddd9066f031d24a592984b1cd1e7a4c2ea983f31..8b911cecf2bfa0cc6a7552445a01241f82a123d1 100644 --- a/front/src/components/common/EmptyState.vue +++ b/front/src/components/common/EmptyState.vue @@ -5,7 +5,7 @@ <slot name="title"> <i class="search icon"></i> - <translate :translate-context="'Content/*/Paragraph'"> + <translate :translate-context="'Content/*/Paragraph'" :translate-context="'Content/*/Paragraph'"> No results were found. </translate> </slot> @@ -14,7 +14,7 @@ <div class="inline"> <slot></slot> <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 </translate></button> </button>