From 9a3b1b2f7ba44e187b97464db8e47d6d1357c570 Mon Sep 17 00:00:00 2001 From: jovuit Date: Mon, 11 Feb 2019 09:34:37 +0100 Subject: [PATCH] #662: Resolve "Add contexts to translatable strings" --- CONTRIBUTING.rst | 1 + .../views/admin/moderation/AccountsDetail.vue | 86 +++++++++---------- 2 files changed, 43 insertions(+), 44 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 9422692e0..47d745e6c 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -484,6 +484,7 @@ The detail part, which is optional and refers to the contents of the string itse - ``Call to action`` - ``Verb`` - ``Short`` + - ``Unit`` Here are a few examples of valid context hierarchies: diff --git a/front/src/views/admin/moderation/AccountsDetail.vue b/front/src/views/admin/moderation/AccountsDetail.vue index 5a339db56..685c87146 100644 --- a/front/src/views/admin/moderation/AccountsDetail.vue +++ b/front/src/views/admin/moderation/AccountsDetail.vue @@ -16,12 +16,12 @@ - Open profile  + Open profile  @@ -44,16 +44,16 @@

- You don't have any rule in place for this account. + You don't have any rule in place for this account.

-

Moderation policies help you control how your instance interact with a given domain or account.

- +

Moderation policies help you control how your instance interact with a given domain or account.

+

- This domain is subject to specific moderation rules + This domain is subject to specific moderation rules

@@ -76,14 +76,14 @@

- Account data + Account data

- Username + Username {{ object.preferred_username }} @@ -91,7 +91,7 @@
- Domain + Domain @@ -101,7 +101,7 @@
- Display name + Display name {{ object.name }} @@ -109,7 +109,7 @@
- Email address + Email address {{ object.user.email }} @@ -117,7 +117,7 @@
- Login status + Login status
@@ -125,17 +125,17 @@ @change="updateUser('is_active')" v-model="object.user.is_active" type="checkbox">
- Enabled - Disabled + Enabled + Disabled
- Permissions + Permissions
- Type + Type {{ object.type }} @@ -157,7 +157,7 @@
- First seen + First seen @@ -165,16 +165,16 @@
- Last checked + Last checked - N/A + N/A
- Sign-up date + Sign-up date @@ -182,7 +182,7 @@
- Last activity + Last activity @@ -197,7 +197,7 @@

- Activity  + Activity 
@@ -212,7 +212,7 @@

- Emitted messages + Emitted messages {{ stats.outbox_activities}} @@ -220,7 +220,7 @@
- Received library follows + Received library follows {{ stats.received_library_follows}} @@ -228,7 +228,7 @@
- Emitted library follows + Emitted library follows {{ stats.emitted_library_follows}} @@ -243,7 +243,7 @@

- Audio content  + Audio content 
@@ -259,7 +259,7 @@

- Cached size + Cached size {{ stats.media_downloaded_size | humanSize }} @@ -267,7 +267,7 @@
- Upload quota + Upload quota @@ -279,14 +279,14 @@ step="100" type="number" />
- MB + MB
- Total size + Total size {{ stats.media_total_size | humanSize }} @@ -295,7 +295,7 @@
- Libraries + Libraries {{ stats.libraries }} @@ -303,7 +303,7 @@
- Uploads + Uploads {{ stats.uploads }} @@ -311,7 +311,7 @@
- Artists + Artists {{ stats.artists }} @@ -319,7 +319,7 @@
- Albums + Albums {{ stats.albums}} @@ -327,7 +327,7 @@
- Tracks + Tracks {{ stats.tracks }} @@ -451,25 +451,23 @@ export default { computed: { labels() { return { - statsWarning: this.$gettext("Statistics are computed from known activity and content on your instance, and do not reflect general activity for this account"), - uploadQuota: this.$gettext( - "Determine how much content the user can upload. Leave empty to use the default value of the instance." - ), + 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 account'), + uploadQuota: this.$pgettext('Content/Moderation/Help text', 'Determine how much content the user can upload. Leave empty to use the default value of the instance.'), } }, allPermissions() { return [ { code: "library", - label: this.$gettext("Library") + label: this.$pgettext('Content/Moderation/Dropdown', "Library") }, { code: "moderation", - label: this.$gettext("Moderation") + label: this.$pgettext('Content/Moderation/Dropdown', "Moderation") }, { code: "settings", - label: this.$gettext("Settings") + label: this.$pgettext('Content/Moderation/Dropdown', "Settings") } ] }