Skip to content
Snippets Groups Projects
Commit 858d9178 authored by Jo Vuit's avatar Jo Vuit
Browse files

Added translation string context for admin/moderation/DomainsDetail.vue

parent e250f4bd
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
{{ object.name }} {{ object.name }}
<div class="sub header"> <div class="sub header">
<a :href="externalUrl" target="_blank" rel="noopener noreferrer" class="logo-wrapper"> <a :href="externalUrl" target="_blank" rel="noopener noreferrer" class="logo-wrapper">
<translate>Open website</translate>&nbsp; <translate :translate-context="'Content/Moderation/Link/Verb'">Open website</translate>&nbsp;
<i class="external icon"></i> <i class="external icon"></i>
</a> </a>
</div> </div>
...@@ -37,16 +37,16 @@ ...@@ -37,16 +37,16 @@
<header class="ui header"> <header class="ui header">
<h3> <h3>
<i class="shield icon"></i> <i class="shield icon"></i>
<translate>You don't have any rule in place for this domain.</translate> <translate :translate-context="'Content/Moderation/Card.Title'">You don't have any rule in place for this domain.</translate>
</h3> </h3>
</header> </header>
<p><translate>Moderation policies help you control how your instance interact with a given domain or account.</translate></p> <p><translate :translate-context="'Content/Moderation/Card.Paragraph'">Moderation policies help you control how your instance interact with a given domain or account.</translate></p>
<button @click="showPolicyForm = true" class="ui primary button">Add a moderation policy</button> <button @click="showPolicyForm = true" class="ui primary button">Add a moderation policy</button>
</template> </template>
<instance-policy-card v-else-if="policy && !showPolicyForm" :object="policy" @update="showPolicyForm = true"> <instance-policy-card v-else-if="policy && !showPolicyForm" :object="policy" @update="showPolicyForm = true">
<header class="ui header"> <header class="ui header">
<h3> <h3>
<translate>This domain is subject to specific moderation rules</translate> <translate :translate-context="'Content/Moderation/Card.Title'">This domain is subject to specific moderation rules</translate>
</h3> </h3>
</header> </header>
</instance-policy-card> </instance-policy-card>
...@@ -69,14 +69,14 @@ ...@@ -69,14 +69,14 @@
<h3 class="ui header"> <h3 class="ui header">
<i class="info icon"></i> <i class="info icon"></i>
<div class="content"> <div class="content">
<translate>Instance data</translate> <translate :translate-context="'Content/Moderation/Title'">Instance data</translate>
</div> </div>
</h3> </h3>
<table class="ui very basic table"> <table class="ui very basic table">
<tbody> <tbody>
<tr> <tr>
<td> <td>
<translate>First seen</translate> <translate :translate-context="'Content/*/Table.Label'">First seen</translate>
</td> </td>
<td> <td>
<human-date :date="object.creation_date"></human-date> <human-date :date="object.creation_date"></human-date>
...@@ -84,18 +84,18 @@ ...@@ -84,18 +84,18 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<translate>Last checked</translate> <translate :translate-context="'Content/*/Table.Label'">Last checked</translate>
</td> </td>
<td> <td>
<human-date v-if="object.nodeinfo_fetch_date" :date="object.nodeinfo_fetch_date"></human-date> <human-date v-if="object.nodeinfo_fetch_date" :date="object.nodeinfo_fetch_date"></human-date>
<translate v-else>N/A</translate> <translate v-else :translate-context="'*/*/*'">N/A</translate>
</td> </td>
</tr> </tr>
<template v-if="object.nodeinfo && object.nodeinfo.status === 'ok'"> <template v-if="object.nodeinfo && object.nodeinfo.status === 'ok'">
<tr> <tr>
<td> <td>
<translate>Software</translate> <translate :translate-context="'Content/Moderation/Table.Label'">Software</translate>
</td> </td>
<td> <td>
{{ lodash.get(object, 'nodeinfo.payload.software.name', $gettext('N/A')) }} ({{ lodash.get(object, 'nodeinfo.payload.software.version', $gettext('N/A')) }}) {{ lodash.get(object, 'nodeinfo.payload.software.name', $gettext('N/A')) }} ({{ lodash.get(object, 'nodeinfo.payload.software.version', $gettext('N/A')) }})
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<translate>Name</translate> <translate :translate-context="'Content/Moderation/Table.Label'">Name</translate>
</td> </td>
<td> <td>
{{ lodash.get(object, 'nodeinfo.payload.metadata.nodeName', $gettext('N/A')) }} {{ lodash.get(object, 'nodeinfo.payload.metadata.nodeName', $gettext('N/A')) }}
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<translate>Total users</translate> <translate :translate-context="'Content/*/*'">Total users</translate>
</td> </td>
<td> <td>
{{ lodash.get(object, 'nodeinfo.payload.usage.users.total', $gettext('N/A')) }} {{ lodash.get(object, 'nodeinfo.payload.usage.users.total', $gettext('N/A')) }}
...@@ -121,10 +121,10 @@ ...@@ -121,10 +121,10 @@
<template v-if="object.nodeinfo && object.nodeinfo.status === 'error'"> <template v-if="object.nodeinfo && object.nodeinfo.status === 'error'">
<tr> <tr>
<td> <td>
<translate>Status</translate> <translate :translate-context="'Content/Moderation/Table.Label'">Status</translate>
</td> </td>
<td> <td>
<translate>Error while fetching node info</translate>&nbsp; <translate :translate-context="'Content/Moderation/Table'">Error while fetching node info</translate>&nbsp;
<span :data-tooltip="object.nodeinfo.error"><i class="question circle icon"></i></span> <span :data-tooltip="object.nodeinfo.error"><i class="question circle icon"></i></span>
</td> </td>
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
</tbody> </tbody>
</table> </table>
<ajax-button @action-done="refreshNodeInfo" method="get" :url="'manage/federation/domains/' + object.name + '/nodeinfo/'"> <ajax-button @action-done="refreshNodeInfo" method="get" :url="'manage/federation/domains/' + object.name + '/nodeinfo/'">
<translate>Refresh node info</translate> <translate :translate-context="'Content/Moderation/Button.Label/Verb'">Refresh node info</translate>
</ajax-button> </ajax-button>
</section> </section>
</div> </div>
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
<h3 class="ui header"> <h3 class="ui header">
<i class="feed icon"></i> <i class="feed icon"></i>
<div class="content"> <div class="content">
<translate>Activity</translate>&nbsp; <translate :translate-context="'Content/Moderation/Title'">Activity</translate>&nbsp;
<span :data-tooltip="labels.statsWarning"><i class="question circle icon"></i></span> <span :data-tooltip="labels.statsWarning"><i class="question circle icon"></i></span>
</div> </div>
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
<td> <td>
<router-link <router-link
:to="{name: 'manage.moderation.accounts.list', query: {q: 'domain:' + object.name }}"> :to="{name: 'manage.moderation.accounts.list', query: {q: 'domain:' + object.name }}">
<translate>Known accounts</translate> <translate :translate-context="'Content/Moderation/Table.Label.Link'">Known accounts</translate>
</router-link> </router-link>
</td> </td>
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<translate>Emitted messages</translate> <translate :translate-context="'Content/Moderation/Table.Label/Noun'">Emitted messages</translate>
</td> </td>
<td> <td>
{{ stats.outbox_activities}} {{ stats.outbox_activities}}
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<translate>Received library follows</translate> <translate :translate-context="'Content/Moderation/Table.Label/Noun'">Received library follows</translate>
</td> </td>
<td> <td>
{{ stats.received_library_follows}} {{ stats.received_library_follows}}
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<translate>Emitted library follows</translate> <translate :translate-context="'Content/Moderation/Table.Label/Noun'">Emitted library follows</translate>
</td> </td>
<td> <td>
{{ stats.emitted_library_follows}} {{ stats.emitted_library_follows}}
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
<h3 class="ui header"> <h3 class="ui header">
<i class="music icon"></i> <i class="music icon"></i>
<div class="content"> <div class="content">
<translate>Audio content</translate>&nbsp; <translate :translate-context="'Content/Moderation/Title'">Audio content</translate>&nbsp;
<span :data-tooltip="labels.statsWarning"><i class="question circle icon"></i></span> <span :data-tooltip="labels.statsWarning"><i class="question circle icon"></i></span>
</div> </div>
...@@ -215,7 +215,7 @@ ...@@ -215,7 +215,7 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
<translate>Cached size</translate> <translate :translate-context="'Content/Moderation/Table.Label/Noun'">Cached size</translate>
</td> </td>
<td> <td>
{{ stats.media_downloaded_size | humanSize }} {{ stats.media_downloaded_size | humanSize }}
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<translate>Total size</translate> <translate :translate-context="'Content/Moderation/Table.Label'">Total size</translate>
</td> </td>
<td> <td>
{{ stats.media_total_size | humanSize }} {{ stats.media_total_size | humanSize }}
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<translate>Libraries</translate> <translate :translate-context="'Content/Moderation/Table.Label'">Libraries</translate>
</td> </td>
<td> <td>
{{ stats.libraries }} {{ stats.libraries }}
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<translate>Uploads</translate> <translate :translate-context="'Content/Moderation/Table.Label/Noun'">Uploads</translate>
</td> </td>
<td> <td>
{{ stats.uploads }} {{ stats.uploads }}
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<translate>Artists</translate> <translate :translate-context="'Content/*/*'">Artists</translate>
</td> </td>
<td> <td>
{{ stats.artists }} {{ stats.artists }}
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<translate>Albums</translate> <translate :translate-context="'Content/*/*'">Albums</translate>
</td> </td>
<td> <td>
{{ stats.albums}} {{ stats.albums}}
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<translate>Tracks</translate> <translate :translate-context="'Content/*/*'">Tracks</translate>
</td> </td>
<td> <td>
{{ stats.tracks }} {{ stats.tracks }}
...@@ -355,7 +355,7 @@ export default { ...@@ -355,7 +355,7 @@ export default {
computed: { computed: {
labels() { labels() {
return { return {
statsWarning: this.$gettext("Statistics are computed from known activity and content on your instance, and do not reflect general activity for this domain") statsWarning: this.$pgettext('Content/Moderation/Help text', "Statistics are computed from known activity and content on your instance, and do not reflect general activity for this domain")
} }
}, },
externalUrl () { externalUrl () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment