From 3b9fd20d3bfde716b0b9eebb93fba03220565a2a Mon Sep 17 00:00:00 2001 From: jovuit Date: Fri, 1 Mar 2019 14:29:58 +0100 Subject: [PATCH] Added translation context Minor rewording Added changelog fragment --- changes/changelog.d/662.enhancement | 1 + front/src/components/About.vue | 10 +-- front/src/components/Footer.vue | 30 ++++----- front/src/components/Home.vue | 50 +++++++-------- front/src/components/PageNotFound.vue | 8 +-- front/src/components/Pagination.vue | 2 +- front/src/components/ShortcutsModal.vue | 24 +++---- front/src/components/Sidebar.vue | 64 +++++++++---------- front/src/components/admin/SettingsGroup.vue | 6 +- .../components/federation/LibraryWidget.vue | 2 +- front/src/components/forms/PasswordInput.vue | 2 +- front/src/components/instance/Stats.vue | 18 +++--- .../notifications/NotificationRow.vue | 12 ++-- front/src/components/radios/Button.vue | 4 +- front/src/components/radios/Card.vue | 2 +- 15 files changed, 118 insertions(+), 117 deletions(-) create mode 100644 changes/changelog.d/662.enhancement diff --git a/changes/changelog.d/662.enhancement b/changes/changelog.d/662.enhancement new file mode 100644 index 000000000..cda19e4ed --- /dev/null +++ b/changes/changelog.d/662.enhancement @@ -0,0 +1 @@ +Added standardized translation context for all strings in the frontend to give accurate hints to translators. diff --git a/front/src/components/About.vue b/front/src/components/About.vue index cfffb7b6a..f29f960f8 100644 --- a/front/src/components/About.vue +++ b/front/src/components/About.vue @@ -3,10 +3,10 @@

- + About %{ instance } - About this instance + About this instance

@@ -15,12 +15,12 @@

Unfortunately, owners of this instance did not yet take the time to complete this page.

+ v-if="!instance.short_description.value && !instance.long_description.value">Unfortunately, the owners of this instance did not yet take the time to complete this page.

- Edit instance info + Edit instance info
@@ -64,7 +64,7 @@ export default { }), labels() { return { - title: this.$gettext("About this instance") + title: this.$pgettext('Head/About/Title', "About this instance") } } } diff --git a/front/src/components/Footer.vue b/front/src/components/Footer.vue index e45a9b47b..00ec4f79c 100644 --- a/front/src/components/Footer.vue +++ b/front/src/components/Footer.vue @@ -4,22 +4,22 @@

- About %{instanceName} + About %{instanceName}

- + @@ -29,29 +29,29 @@

Using Funkwhale

Getting help

About Funkwhale

- The funkwhale logo was kindly designed and provided by Francis Gading. + The funkwhale logo was kindly designed and provided by Francis Gading.

diff --git a/front/src/components/Home.vue b/front/src/components/Home.vue index bdca00005..747121fd3 100644 --- a/front/src/components/Home.vue +++ b/front/src/components/Home.vue @@ -3,15 +3,15 @@

- Welcome on Funkwhale + Welcome on Funkwhale

-

We think listening to music should be simple.

+

We think listening to music should be simple.

- Learn more about this instance + Learn more about this instance - Get me to the library + Get me to the library
@@ -22,9 +22,9 @@

- Why funkwhale? + Why funkwhale?

-

That's simple: we loved Grooveshark and we want to build something even better.

+

That's simple: we loved Grooveshark and we want to build something even better.

@@ -35,26 +35,26 @@

- Unlimited music + Unlimited music

-

Funkwhale is designed to make it easy to listen to music you like, or to discover new artists.

+

Funkwhale is designed to make it easy to listen to music you like, or to discover new artists.

- Click once, listen for hours using built-in radios + Click once, listen for hours using built-in radios
- Keep a track of your favorite songs + Keep a track of your favorite songs
- Playlists? We got them + Playlists? We got them
@@ -62,14 +62,14 @@

- Clean library + A clean library

-

Funkwhale takes care of handling your music.

+

Funkwhale takes care of handling your music.

- Import music from various platforms, such as YouTube or SoundCloud + Import music from various platforms, such as YouTube or SoundCloud
@@ -83,7 +83,7 @@
- Covers, lyrics, our goal is to have them all ;) + Covers, lyrics, our goal is to have them all ;)
@@ -91,20 +91,20 @@

- Easy to use + Easy to use

-

Funkwhale is dead simple to use.

+

Funkwhale is dead simple to use.

- No add-ons, no plugins : you only need a web library + No add-ons, no plugins : you only need a web library
- Access your music from a clean interface that focus on what really matters + Access your music from a clean interface that focus on what really matters
@@ -112,26 +112,26 @@

- Your music, your way + Your music, your way

-

Funkwhale is free and gives you control on your music.

+

Funkwhale is free and gives you control on your music.

- The plaform is free and open-source, you can install it and modify it without worries + The plaform is free and open-source, you can install it and modify it without worries
- We do not track you or bother you with ads + We do not track you or bother you with ads
- You can invite friends and family to your instance so they can enjoy your music + You can invite friends and family to your instance so they can enjoy your music
@@ -150,7 +150,7 @@ export default { computed: { labels() { return { - title: this.$gettext("Welcome") + title: this.$pgettext('Head/Home/Title', "Welcome") } } } diff --git a/front/src/components/PageNotFound.vue b/front/src/components/PageNotFound.vue index ef4e66f45..5b91d2a47 100644 --- a/front/src/components/PageNotFound.vue +++ b/front/src/components/PageNotFound.vue @@ -5,14 +5,14 @@

- Page not found! + Page not found!

-

We're sorry, the page you asked for does not exist:

+

Sorry, the page you asked for does not exist:

{{ path }} - Go to home page + Go to home page
@@ -30,7 +30,7 @@ export default { computed: { labels() { return { - title: this.$gettext("Page Not Found") + title: this.$pgettext('Head/*/Title', "Page Not Found") } } } diff --git a/front/src/components/Pagination.vue b/front/src/components/Pagination.vue index 963b000a8..482082238 100644 --- a/front/src/components/Pagination.vue +++ b/front/src/components/Pagination.vue @@ -36,7 +36,7 @@ export default { computed: { labels() { return { - pagination: this.$gettext("Pagination") + pagination: this.$pgettext('Content/*/Hidden text/Noun', "Pagination") } }, pages: function() { diff --git a/front/src/components/ShortcutsModal.vue b/front/src/components/ShortcutsModal.vue index 2338658dd..9bae0a9ca 100644 --- a/front/src/components/ShortcutsModal.vue +++ b/front/src/components/ShortcutsModal.vue @@ -1,7 +1,7 @@ @@ -35,11 +35,11 @@ export default { sections () { return [ { - title: this.$gettext('General shortcuts'), + title: this.$pgettext('Popup/Keyboard shortcuts/Title', 'General shortcuts'), shortcuts: [ { key: 'h', - summary: this.$gettext('Show available keyboard shortcuts') + summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Show available keyboard shortcuts') } ] }, @@ -52,35 +52,35 @@ export default { // s.prevent.exact="shuffle" { - title: this.$gettext('Audio player shortcuts'), + title: this.$pgettext('Popup/Keyboard shortcuts/Title', 'Audio player shortcuts'), shortcuts: [ { key: 'space', - summary: this.$gettext('Pause/play the current track') + summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Pause/play the current track') }, { key: 'ctrl left', - summary: this.$gettext('Play previous track') + summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Play previous track') }, { key: 'ctrl right', - summary: this.$gettext('Play next track') + summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Play next track') }, { key: 'ctrl up', - summary: this.$gettext('Increase volume') + summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Increase volume') }, { key: 'ctrl down', - summary: this.$gettext('Decrease volume') + summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Decrease volume') }, { key: 'l', - summary: this.$gettext('Toggle queue looping') + summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Toggle queue looping') }, { key: 's', - summary: this.$gettext('Shuffle queue') + summary: this.$pgettext('Popup/Keyboard shortcuts/Table.Label/Verb', 'Shuffle queue') }, ] } diff --git a/front/src/components/Sidebar.vue b/front/src/components/Sidebar.vue index 77b9c02f5..31b35ebdc 100644 --- a/front/src/components/Sidebar.vue +++ b/front/src/components/Sidebar.vue @@ -16,13 +16,13 @@