diff --git a/front/src/components/About.vue b/front/src/components/About.vue index 90c19d75f42fa0a85391b0cd43fe0089ec984f5c..2b0bb41925e11fdf7bf614c00369de1dfd06f9e7 100644 --- a/front/src/components/About.vue +++ b/front/src/components/About.vue @@ -6,7 +6,7 @@ <translate translate-context="Content/About/Title/Short, Noun" v-if="instance.name.value" :translate-params="{instance: instance.name.value}"> About %{ instance } </translate> - <translate translate-context="Content/About/Title/Short, Noun" v-else>About this instance</translate> + <translate translate-context="Content/About/Title" v-else>About this instance</translate> </h1> <stats></stats> </div> @@ -64,7 +64,7 @@ export default { }), labels() { return { - title: this.$pgettext('Head/About/Title', "About this instance") + title: this.$pgettext('Content/About/Title', "About this instance") } } } diff --git a/front/src/components/Footer.vue b/front/src/components/Footer.vue index 8551789ec4ac65a446169ec317419b905b4bdf7c..7c1dfe95f73ce59c5094d33f52396227d73861d0 100644 --- a/front/src/components/Footer.vue +++ b/front/src/components/Footer.vue @@ -27,15 +27,15 @@ </div> </section> <section class="four wide column"> - <h4 v-translate class="ui header">Using Funkwhale</h4> + <h4 v-translate class="ui header" translate-context="Footer/*/Title">Using Funkwhale</h4> <div class="ui link list"> <a href="https://docs.funkwhale.audio" class="item" target="_blank"><translate translate-context="Footer/*/List item.Link/Short, Noun">Documentation</translate></a> <a href="https://docs.funkwhale.audio/users/apps.html" class="item" target="_blank"><translate translate-context="Footer/*/List item.Link">Mobile and desktop apps</translate></a> - <div role="button" class="item" @click="$emit('show:shortcuts-modal')"><translate translate-context="Footer/*/List item.Link/Short, Noun">Keyboard shortcuts</translate></div> + <div role="button" class="item" @click="$emit('show:shortcuts-modal')"><translate translate-context="*/*/*/Noun">Keyboard shortcuts</translate></div> </div> </section> <section class="four wide column"> - <h4 v-translate class="ui header">Getting help</h4> + <h4 v-translate translate-context="Footer/*/Link" class="ui header">Getting help</h4> <div class="ui link list"> <a href="https://socialhub.network/c/funkwhale" class="item" target="_blank"><translate translate-context="Footer/*/Listitem.Link">Support forum</translate></a> <a href="https://riot.im/app/#/room/#funkwhale-troubleshooting:matrix.org" class="item" target="_blank"><translate translate-context="Footer/*/List item.Link">Chat room</translate></a> @@ -43,7 +43,7 @@ </div> </section> <section class="four wide column"> - <h4 v-translate class="ui header">About Funkwhale</h4> + <h4 v-translate class="ui header" translate-context="Footer/*/Title/Short">About Funkwhale</h4> <div class="ui link list"> <a href="https://funkwhale.audio" class="item" target="_blank"><translate translate-context="Footer/*/List item.Link">Official website</translate></a> <a href="https://contribute.funkwhale.audio" class="item" target="_blank"><translate translate-context="Footer/*/List item.Link">Contribute</translate></a> diff --git a/front/src/components/Home.vue b/front/src/components/Home.vue index 69ea0b9d9c54125340593d2aa0319929299f902e..38c716083abfef5f001d6e5def5b484292325284 100644 --- a/front/src/components/Home.vue +++ b/front/src/components/Home.vue @@ -76,7 +76,8 @@ <i class="tag icon"></i> <div class="content" - v-translate="{url: musicbrainzUrl}"> + v-translate="{url: musicbrainzUrl}" + translate-context="Content/Home/List item/Verb"> Get quality metadata about your music thanks to <a href="%{ url }" target="_blank">MusicBrainz</a> </div> </div> diff --git a/front/src/components/ShortcutsModal.vue b/front/src/components/ShortcutsModal.vue index 362c5208a76fda8aa1639037ce95752f24985fd6..5b1a7349d441a0de9c708f2ab9dbc03f576ab98e 100644 --- a/front/src/components/ShortcutsModal.vue +++ b/front/src/components/ShortcutsModal.vue @@ -1,7 +1,7 @@ <template> <modal @update:show="$emit('update:show', $event)" :show="show"> <header class="header"> - <translate translate-context="Popup/Keyboard shortcuts/Title">Keyboard shortcuts</translate> + <translate translate-context="*/*/*/Noun">Keyboard shortcuts</translate> </header> <section class="scrolling content"> <table diff --git a/front/src/components/Sidebar.vue b/front/src/components/Sidebar.vue index 0bbc271a4bf1ae2502e054fa6806f4cb811edacb..caa402cf32dee93916cf8256b440417413a78a48 100644 --- a/front/src/components/Sidebar.vue +++ b/front/src/components/Sidebar.vue @@ -16,7 +16,7 @@ <div class="menu-area"> <div class="ui compact fluid two item inverted menu"> - <a :class="[{active: selectedTab === 'library'}, 'item']" role="button" @click.prevent.stop="selectedTab = 'library'" data-tab="library"><translate translate-context="Sidebar/Library/Tab.Title/Verb">Browse</translate></a> + <a :class="[{active: selectedTab === 'library'}, 'item']" role="button" @click.prevent.stop="selectedTab = 'library'" data-tab="library"><translate translate-context="*/Library/*/Verb">Browse</translate></a> <a :class="[{active: selectedTab === 'queue'}, 'item']" role="button" @click.prevent.stop="selectedTab = 'queue'" data-tab="queue"> <translate translate-context="Sidebar/Queue/Tab.Title/Noun">Queue</translate> <template v-if="queue.tracks.length === 0"> @@ -41,10 +41,10 @@ </translate> <img class="ui right floated circular tiny avatar image" v-if="$store.state.auth.profile.avatar.square_crop" v-lazy="$store.getters['instance/absoluteUrl']($store.state.auth.profile.avatar.square_crop)" /> </router-link> - <router-link class="item" v-if="$store.state.auth.authenticated" :to="{path: '/settings'}"><i class="setting icon"></i><translate translate-context="Sidebar/Settings/List item.Link/Noun">Settings</translate></router-link> + <router-link class="item" v-if="$store.state.auth.authenticated" :to="{path: '/settings'}"><i class="setting icon"></i><translate translate-context="*/*/*/Noun">Settings</translate></router-link> <router-link class="item" v-if="$store.state.auth.authenticated" :to="{name: 'notifications'}"> <i class="feed icon"></i> - <translate translate-context="Sidebar/Notifications/List item.Link/Noun">Notifications</translate> + <translate translate-context="*/Notifications/*">Notifications</translate> <div v-if="$store.state.ui.notifications.inbox > 0" :class="['ui', 'teal', 'label']"> @@ -52,16 +52,16 @@ </router-link> <router-link class="item" v-if="$store.state.auth.authenticated" :to="{name: 'logout'}"><i class="sign out icon"></i><translate translate-context="Sidebar/Login/List item.Link/Verb">Logout</translate></router-link> <template v-else> - <router-link class="item" :to="{name: 'login'}"><i class="sign in icon"></i><translate translate-context="Sidebar/Login/List item.Link/Verb">Login</translate></router-link> + <router-link class="item" :to="{name: 'login'}"><i class="sign in icon"></i><translate translate-context="*/Login/*/Verb">Login</translate></router-link> <router-link class="item" :to="{path: '/signup'}"> <i class="corner add icon"></i> - <translate translate-context="Sidebar/Login/List item.Link/Verb">Create an account</translate> + <translate translate-context="*/Signup/Link/Verb">Create an account</translate> </router-link> </template> </div> </div> <div class="item"> - <header class="header"><translate translate-context="Sidebar/Library/Title">Music</translate></header> + <header class="header"><translate translate-context="*/*/*/Noun">Music</translate></header> <div class="menu"> <router-link class="item" :to="{path: '/library'}"><i class="sound icon"></i><translate translate-context="Sidebar/Library/List item.Link/Verb">Browse library</translate></router-link> <router-link class="item" v-if="$store.state.auth.authenticated" :to="{path: '/favorites'}"><i class="heart icon"></i><translate translate-context="Sidebar/Favorites/List item.Link/Noun">Favorites</translate></router-link> @@ -69,11 +69,11 @@ @click="$store.commit('playlists/chooseTrack', null)" v-if="$store.state.auth.authenticated" class="item"> - <i class="list icon"></i><translate translate-context="Sidebar/Playlist/List item.Link/Noun">Playlists</translate> + <i class="list icon"></i><translate translate-context="*/*/*">Playlists</translate> </a> <router-link v-if="$store.state.auth.authenticated" - class="item" :to="{name: 'content.index'}"><i class="upload icon"></i><translate translate-context="Sidebar/Library/List item.Link/Verb">Add content</translate></router-link> + class="item" :to="{name: 'content.index'}"><i class="upload icon"></i><translate translate-context="*/Library/*/Verb">Add content</translate></router-link> </div> </div> <div class="item" v-if="$store.state.auth.availablePermissions['settings'] || $store.state.auth.availablePermissions['moderation']"> @@ -83,25 +83,25 @@ v-if="$store.state.auth.availablePermissions['settings']" class="item" :to="{path: '/manage/settings'}"> - <i class="settings icon"></i><translate translate-context="Sidebar/Admin/List item.Link/Noun">Settings</translate> + <i class="settings icon"></i><translate translate-context="*/*/*/Noun">Settings</translate> </router-link> <router-link v-if="$store.state.auth.availablePermissions['settings']" class="item" :to="{name: 'manage.users.users.list'}"> - <i class="users icon"></i><translate translate-context="Sidebar/Admin/List item.Link/Noun">Users</translate> + <i class="users icon"></i><translate translate-context="*/*/*/Noun">Users</translate> </router-link> <router-link v-if="$store.state.auth.availablePermissions['moderation']" class="item" :to="{name: 'manage.moderation.domains.list'}"> - <i class="shield icon"></i><translate translate-context="Sidebar/Moderation/List item.Link/Noun">Moderation</translate> + <i class="shield icon"></i><translate translate-context="*/Moderation/*">Moderation</translate> </router-link> <router-link v-if="$store.state.auth.availablePermissions['library']" class="item" :to="{name: 'manage.library.edits', query: {q: 'is_approved:null'}}"> - <i class="book icon"></i><translate translate-context="Sidebar/Moderation/List item.Link/Noun">Library</translate> + <i class="book icon"></i><translate translate-context="*/*/*">Library</translate> <div v-if="$store.state.ui.notifications.pendingReviewEdits > 0" :title="labels.pendingReviewEdits" @@ -119,7 +119,7 @@ <translate translate-context="Sidebar/Queue/Message">Do you want to restore your previous queue?</translate> </div> <p> - <translate translate-context="Sidebar/Queue/Message" + <translate translate-context="*/*/*" translate-plural="%{ count } tracks" :translate-n="queue.previousQueue.tracks.length" :translate-params="{count: queue.previousQueue.tracks.length}"> @@ -170,7 +170,7 @@ <i class="feed icon"></i> <translate translate-context="Sidebar/Player/Title">You have a radio playing</translate> </div> <p><translate translate-context="Sidebar/Player/Paragraph">New tracks will be appended here automatically.</translate></p> - <div @click="$store.dispatch('radios/stop')" class="ui basic inverted red button"><translate translate-context="Sidebar/Player/Button.Label/Verb">Stop radio</translate></div> + <div @click="$store.dispatch('radios/stop')" class="ui basic inverted red button"><translate translate-context="*/Player/Button.Label/Short, Verb">Stop radio</translate></div> </div> </div> </section> diff --git a/front/src/components/admin/SettingsGroup.vue b/front/src/components/admin/SettingsGroup.vue index dacae8f9956011ed257422b55a95f4f172de11e4..0c0774bbe1055f9baf771246c2c00a8b56994307 100644 --- a/front/src/components/admin/SettingsGroup.vue +++ b/front/src/components/admin/SettingsGroup.vue @@ -65,7 +65,7 @@ <button type="submit" :class="['ui', {'loading': isLoading}, 'right', 'floated', 'green', 'button']"> - <translate translate-context="Content/Settings/Button.Label/Short, Verb">Save</translate> + <translate translate-context="Content/*/Button.Label/Verb">Save</translate> </button> </form> </template> diff --git a/front/src/components/audio/EmbedWizard.vue b/front/src/components/audio/EmbedWizard.vue index 9c11fe7e543803e2c47d46ba8ea815682028942c..e4412937e54e542a684381656a0810cf4c924b9b 100644 --- a/front/src/components/audio/EmbedWizard.vue +++ b/front/src/components/audio/EmbedWizard.vue @@ -17,7 +17,7 @@ </template> </div> <div class="field"> - <button @click="copy" class="ui right teal labeled icon floated button"><i class="copy icon"></i><translate translate-context="Popup/*/Button.Label/Verb">Copy</translate></button> + <button @click="copy" class="ui right teal labeled icon floated button"><i class="copy icon"></i><translate translate-context="*/*/Button.Label/Short, Verb">Copy</translate></button> <label for="embed-width"><translate translate-context="Popup/Embed/Input.Label/Noun">Embed code</translate></label> <p><translate translate-context="Popup/Embed/Paragraph">Copy/paste this code in your website HTML</translate></p> <textarea ref="textarea":value="embedCode" rows="5" readonly> diff --git a/front/src/components/audio/PlayButton.vue b/front/src/components/audio/PlayButton.vue index 45d47afbe8f4181a8d088041207724568bb29b0d..c1eeeedd47b30c308fee7bbba6861e1942d1d00f 100644 --- a/front/src/components/audio/PlayButton.vue +++ b/front/src/components/audio/PlayButton.vue @@ -7,7 +7,7 @@ :disabled="!playable" :class="buttonClasses.concat(['ui', {loading: isLoading}, {'mini': discrete}, {disabled: !playable}])"> <i :class="[playIconClass, 'icon']"></i> - <template v-if="!discrete && !iconOnly"><slot><translate translate-context="*/Queue/Button/Label/Short, Verb">Play</translate></slot></template> + <template v-if="!discrete && !iconOnly"><slot><translate translate-context="*/Queue/Button.Label/Short, Verb">Play</translate></slot></template> </button> <div v-if="!discrete && !iconOnly" :class="['ui', {disabled: !playable && !filterableArtist}, 'floating', 'dropdown', {'icon': !dropdownOnly}, {'button': !dropdownOnly}]"> <i :class="dropdownIconClasses.concat(['icon'])" :title="title" ></i> @@ -16,13 +16,12 @@ <i class="plus icon"></i><translate translate-context="*/Queue/Dropdown/Button/Label/Short">Add to queue</translate> </button> <button class="item basic" ref="addNext" data-ref="addNext" :disabled="!playable" @click.stop.prevent="addNext()" :title="labels.playNext"> - <i class="step forward icon"></i><translate translate-context="*/Queue/Dropdown/Button/Label/Short">Play next</translate> + <i class="step forward icon"></i>{{ labels.playNext }} </button> <button class="item basic" ref="playNow" data-ref="playNow" :disabled="!playable" @click.stop.prevent="addNext(true)" :title="labels.playNow"> - <i class="play icon"></i><translate translate-context="*/Queue/Dropdown/Button/Label/Short">Play now</translate> - </button> + <i class="play icon"></i>{{ labels.playNow }}</button> <button v-if="track" class="item basic" :disabled="!playable" @click.stop.prevent="$store.dispatch('radios/start', {type: 'similar', objectId: track.id})" :title="labels.startRadio"> - <i class="feed icon"></i><translate translate-context="*/Queue/Dropdown/Button/Label/Short">Start radio</translate> + <i class="feed icon"></i><translate translate-context="*/Queue/Button.Label/Short, Verb">Start radio</translate> </button> <button v-if="filterableArtist" class="item basic" :disabled="!filterableArtist" @click.stop.prevent="filterArtist" :title="labels.hideArtist"> <i class="eye slash outline icon"></i><translate translate-context="*/Queue/Dropdown/Button/Label/Short">Hide content from this artist</translate> diff --git a/front/src/components/audio/Search.vue b/front/src/components/audio/Search.vue index 74a96f45002495cb08556a36131d85675f8c63ae..40dbe403d4a2d8b95ae515498521a12b1cd8b041 100644 --- a/front/src/components/audio/Search.vue +++ b/front/src/components/audio/Search.vue @@ -8,7 +8,7 @@ </div> </div> <template v-if="query.length > 0"> - <h3 class="ui title"><translate translate-context="Content/Search/Title">Artists</translate></h3> + <h3 class="ui title"><translate translate-context="*/*/*/Noun">Artists</translate></h3> <div v-if="results.artists.length > 0"> <div class="ui cards"> <artist-card :key="artist.id" v-for="artist in results.artists" :artist="artist" ></artist-card> @@ -17,7 +17,7 @@ <p v-else><translate translate-context="Content/Search/Paragraph">No artist matched your query</translate></p> </template> <template v-if="query.length > 0"> - <h3 class="ui title"><translate translate-context="Content/Search/Title">Albums</translate></h3> + <h3 class="ui title"><translate translate-context="*/*/*">Albums</translate></h3> <div v-if="results.albums.length > 0" class="ui stackable three column grid"> <div class="column" :key="album.id" v-for="album in results.albums"> <album-card class="fluid" :album="album" ></album-card> diff --git a/front/src/components/audio/SearchBar.vue b/front/src/components/audio/SearchBar.vue index c1190f474d653107ce0d73066200011a7c7ff450..28b11b040d19dec5832cd5eb44971fd0e3a9b764 100644 --- a/front/src/components/audio/SearchBar.vue +++ b/front/src/components/audio/SearchBar.vue @@ -22,9 +22,9 @@ export default { } }, mounted () { - let artistLabel = this.$pgettext('Sidebar/Search/Title', 'Artist') - let albumLabel = this.$pgettext('Sidebar/Search/Title', 'Album') - let trackLabel = this.$pgettext('Sidebar/Search/Title', 'Track') + let artistLabel = this.$pgettext('*/*/*/Noun', 'Artist') + let albumLabel = this.$pgettext('*/*/*', 'Album') + let trackLabel = this.$pgettext('*/*/*/Noun', 'Track') let self = this jQuery(this.$el).search({ type: 'category', diff --git a/front/src/components/audio/album/Card.vue b/front/src/components/audio/album/Card.vue index 95c9d2f66b88d334a755ee842c1a6f7357b8bccd..d798d2c23a657533891be3e72cc62ec360ecd5fb 100644 --- a/front/src/components/audio/album/Card.vue +++ b/front/src/components/audio/album/Card.vue @@ -39,18 +39,18 @@ <translate translate-context="Content/Album/Card.Link/Verb" :translate-params="{count: album.tracks.length - initialTracks}" :translate-n="album.tracks.length - initialTracks" translate-plural="Show %{ count } more tracks">Show %{ count } more track</translate> </em> <em v-else @click="showAllTracks = false" class="expand"> - <translate translate-context="Content/Album/Card.Link/Verb">Collapse</translate> + <translate translate-context="Content/*/Card.Link/Verb">Collapse</translate> </em> </div> </div> </div> <div class="extra content"> <play-button class="mini basic orange right floated" :tracks="album.tracks" :album="album"> - <translate translate-context="Content/Queue/Card.Button.Label/Short, Verb">Play all</translate> + <translate translate-context="Content/Queue/Button.Label/Short, Verb">Play all</translate> </play-button> <span> <i class="music icon"></i> - <translate translate-context="Content/Album/Card" :translate-params="{count: album.tracks.length}" :translate-n="album.tracks.length" translate-plural="%{ count } tracks">%{ count } track</translate> + <translate translate-context="*/*/*" :translate-params="{count: album.tracks.length}" :translate-n="album.tracks.length" translate-plural="%{ count } tracks">%{ count } track</translate> </span> </div> </div> diff --git a/front/src/components/audio/artist/Card.vue b/front/src/components/audio/artist/Card.vue index f5e89cc5c359461a20d6359ccfb4e8c011cf339f..9e018216c07906313d84447ca28f3177d80af772 100644 --- a/front/src/components/audio/artist/Card.vue +++ b/front/src/components/audio/artist/Card.vue @@ -31,7 +31,7 @@ <translate translate-context="Content/Artist/Card.Link" :translate-params="{count: artist.albums.length - initialAlbums}" :translate-n="artist.albums.length - initialAlbums" translate-plural="Show %{ count } more albums">Show 1 more album</translate> </em> <em v-else @click="showAllAlbums = false" class="expand"> - <translate translate-context="Content/Artist/Card.Link">Collapse</translate> + <translate translate-context="Content/*/Card.Link/Verb">Collapse</translate> </em> </div> </div> diff --git a/front/src/components/audio/track/Table.vue b/front/src/components/audio/track/Table.vue index 13506acaeba02996d5cc1003589e8bdd185406b4..702ffe687617df4cbc2b8ab34e1384c7e28f6584 100644 --- a/front/src/components/audio/track/Table.vue +++ b/front/src/components/audio/track/Table.vue @@ -5,10 +5,10 @@ <tr> <th></th> <th></th> - <th colspan="6"><translate translate-context="Content/Track/Table.Label">Title</translate></th> - <th colspan="4"><translate translate-context="Content/Track/Table.Label">Artist</translate></th> - <th colspan="4"><translate translate-context="Content/Track/Table.Label">Album</translate></th> - <th colspan="4"><translate translate-context="Content/Track/Table.Label">Duration</translate></th> + <th colspan="6"><translate translate-context="Content/Track/*/Noun">Title</translate></th> + <th colspan="4"><translate translate-context="*/*/*/Noun">Artist</translate></th> + <th colspan="4"><translate translate-context="*/*/*">Album</translate></th> + <th colspan="4"><translate translate-context="Content/*/*">Duration</translate></th> <th colspan="2"></th> </tr> </thead> diff --git a/front/src/components/auth/Login.vue b/front/src/components/auth/Login.vue index 50acc927a15ea428888ab04fa8d113fe46eda925..20aff3236bd797e0c03a50ce9ec36b29287e20c9 100644 --- a/front/src/components/auth/Login.vue +++ b/front/src/components/auth/Login.vue @@ -15,7 +15,7 @@ <label> <translate translate-context="Content/Login/Input.Label/Noun">Username or email</translate> | <router-link :to="{path: '/signup'}"> - <translate translate-context="Content/Login/Link/Verb">Create an account</translate> + <translate translate-context="*/Signup/Link/Verb">Create an account</translate> </router-link> </label> <input @@ -31,16 +31,16 @@ </div> <div class="field"> <label> - <translate translate-context="Content/Login/Input.Label">Password</translate> | + <translate translate-context="Content/*/Input.Label">Password</translate> | <router-link :to="{name: 'auth.password-reset', query: {email: credentials.username}}"> - <translate translate-context="Content/Login/Link/Verb">Reset your password</translate> + <translate translate-context="*/Login/*/Verb">Reset your password</translate> </router-link> </label> <password-input :index="2" required v-model="credentials.password" /> </div> <button tabindex="3" :class="['ui', {'loading': isLoading}, 'right', 'floated', 'green', 'button']" type="submit"> - <translate translate-context="Content/Login/Button.Label/Verb">Login</translate> + <translate translate-context="*/Login/*/Verb">Login</translate> </button> </form> </div> diff --git a/front/src/components/auth/Logout.vue b/front/src/components/auth/Logout.vue index 84efcd1f0cb497bacafb05133b89e5e683796d8d..99fbc9da6ec7e8b11f64ff6dd4ec02af0ba080f1 100644 --- a/front/src/components/auth/Logout.vue +++ b/front/src/components/auth/Logout.vue @@ -5,7 +5,7 @@ <h2> <translate translate-context="Content/Login/Title">Are you sure you want to log out?</translate> </h2> - <p v-translate="{username: $store.state.auth.username}">You are currently logged in as %{ username }</p> + <p v-translate="{username: $store.state.auth.username}" translate-context="Content/Login/Paragraph">You are currently logged in as %{ username }</p> <button class="ui button" @click="$store.dispatch('auth/logout')"><translate translate-context="Content/Login/Button.Label">Yes, log me out!</translate></button> </div> </section> diff --git a/front/src/components/auth/Profile.vue b/front/src/components/auth/Profile.vue index 0f82b66103ef7fcc683adebf9a45c5fd7e168f33..278f62ec0092492c733d524f6c4773c5b7575b9e 100644 --- a/front/src/components/auth/Profile.vue +++ b/front/src/components/auth/Profile.vue @@ -10,7 +10,7 @@ <img class="ui big circular image" v-else v-lazy="$store.getters['instance/absoluteUrl'](profile.avatar.square_crop)" /> <div class="content"> {{ profile.username }} - <div class="sub header" v-translate="{date: signupDate}">Member since %{ date }</div> + <div class="sub header" v-translate="{date: signupDate}" translate-context="Content/Profile/Paragraph">Member since %{ date }</div> </div> </h2> <div class="ui basic green label"> @@ -21,7 +21,7 @@ :href="$store.getters['instance/absoluteUrl']('/api/admin')" target="_blank"> <i class="star icon"></i> - <translate translate-context="Content/Profile/Button.Label">Staff member</translate> + <translate translate-context="Content/Profile/User role">Staff member</translate> </a> </div> </template> diff --git a/front/src/components/auth/Settings.vue b/front/src/components/auth/Settings.vue index 6d698945070cde3464efe53bb432e40ca074d68d..8f62655d35cb9778b4a596183b2b8a1bc390c362 100644 --- a/front/src/components/auth/Settings.vue +++ b/front/src/components/auth/Settings.vue @@ -102,7 +102,7 @@ <li><translate translate-context="Popup/Settings/List item">Your Subsonic password will be changed to a new, random one, logging you out from devices that used the old Subsonic password</translate></li> </ul> </div> - <div slot="modal-confirm"><translate translate-context="Popup/Setting/Button.Label">Disable access</translate></div> + <div slot="modal-confirm"><translate translate-context="Popup/Settings/Button.Label">Disable access</translate></div> </dangerous-button> </form> <div class="ui hidden divider" /> @@ -114,25 +114,25 @@ <h2 class="ui header"> <i class="eye slash outline icon"></i> <div class="content"> - <translate>Content filters</translate> + <translate translate-context="Content/Settings/Title/Noun">Content filters</translate> </div> </h2> - <p><translate>Content filters help you hide content you don't want to see on the service.</translate></p> + <p><translate translate-context="Content/Settings/Paragraph">Content filters help you hide content you don't want to see on the service.</translate></p> <button @click="$store.dispatch('moderation/fetchContentFilters')" class="ui basic icon button"> <i class="refresh icon"></i> - <translate translate-context="Content/*/Button.Label">Refresh</translate> + <translate translate-context="Content/*/Button.Label/Short, Verb">Refresh</translate> </button> <h3 class="ui header"> - <translate>Hidden artists</translate> + <translate translate-context="Content/Settings/Title">Hidden artists</translate> </h3> <table class="ui compact very basic unstackable table"> <thead> <tr> - <th><translate translate-context="Content/*/Table.Label">Name</translate></th> - <th><translate translate-context="Content/*/Table.Label">Creation date</translate></th> + <th><translate translate-context="*/*/*/Noun">Name</translate></th> + <th><translate translate-context="Content/*/*/Noun">Creation date</translate></th> <th></th> </tr> </thead> @@ -148,7 +148,7 @@ </td> <td> <button @click="$store.dispatch('moderation/deleteContentFilter', filter.uuid)" class="ui basic tiny button"> - <translate translate-context="Content/*/Button.Label">Delete</translate> + <translate translate-context="*/*/*/Verb">Delete</translate> </button> </td> </tr> diff --git a/front/src/components/auth/Signup.vue b/front/src/components/auth/Signup.vue index 685be288db2be345cb21475b9e7a32bc9deea012..974d082bda98153009cc2e9f35cd4c0e67ab16fd 100644 --- a/front/src/components/auth/Signup.vue +++ b/front/src/components/auth/Signup.vue @@ -2,22 +2,22 @@ <main class="main pusher" v-title="labels.title"> <section class="ui vertical stripe segment"> <div class="ui small text container"> - <h2><translate :v-context="'Content/Signup/Header'">Create a funkwhale account</translate></h2> + <h2><translate translate-context="Content/Signup/Title">Create a funkwhale account</translate></h2> <form :class="['ui', {'loading': isLoadingInstanceSetting}, 'form']" @submit.prevent="submit()"> <p class="ui message" v-if="!$store.state.instance.settings.users.registration_enabled.value"> - <translate :v-context="'Content/Signup/Form/Message'">Registration are closed on this instance, you will need an invitation code to signup.</translate> + <translate translate-context="Content/Signup/Form/Paragraph">Registration are closed on this instance, you will need an invitation code to signup.</translate> </p> <div v-if="errors.length > 0" class="ui negative message"> - <div class="header"><translate :v-context="'Content/Signup/Form/Message'">We cannot create your account</translate></div> + <div class="header"><translate translate-context="Content/Signup/Form/Paragraph">Your account cannot be created.</translate></div> <ul class="list"> <li v-for="error in errors">{{ error }}</li> </ul> </div> <div class="field"> - <label><translate :v-context="'Content/Signup/Form/Label'">Username</translate></label> + <label><translate translate-context="Content/*/*">Username</translate></label> <input ref="username" name="username" @@ -28,7 +28,7 @@ v-model="username"> </div> <div class="field"> - <label><translate :v-context="'Content/Signup/Form/Label'">Email</translate></label> + <label><translate translate-context="Content/*/*/Noun">Email</translate></label> <input ref="email" name="email" @@ -38,11 +38,11 @@ v-model="email"> </div> <div class="field"> - <label><translate :v-context="'Content/Signup/Form/Label'">Password</translate></label> + <label><translate translate-context="Content/*/Input.Label">Password</translate></label> <password-input v-model="password" /> </div> <div class="field" v-if="!$store.state.instance.settings.users.registration_enabled.value"> - <label><translate :v-context="'Content/Signup/Form/Label'">Invitation code</translate></label> + <label><translate translate-context="Content/*/Input.Label">Invitation code</translate></label> <input required type="text" @@ -51,7 +51,7 @@ v-model="invitation"> </div> <button :class="['ui', 'green', {'loading': isLoading}, 'button']" type="submit"> - <translate :v-context="'Content/Signup/Form/Button'">Create my account</translate> + <translate translate-context="Content/Signup/Button.Label">Create my account</translate> </button> </form> </div> diff --git a/front/src/components/auth/SubsonicTokenForm.vue b/front/src/components/auth/SubsonicTokenForm.vue index 631fdb48cd5d32adeabd37b3ce0abb5a9ba3a951..0184074e294365a15e453db7184644d66d75796a 100644 --- a/front/src/components/auth/SubsonicTokenForm.vue +++ b/front/src/components/auth/SubsonicTokenForm.vue @@ -17,7 +17,7 @@ <div class="header">{{ successMessage }}</div> </div> <div v-if="subsonicEnabled && errors.length > 0" class="ui negative message"> - <div class="header"><translate translate-context="Content/Settings/Error message.Title">Error</translate></div> + <div class="header"><translate translate-context="Content/*/Error message.Title">Error</translate></div> <ul class="list"> <li v-for="error in errors">{{ error }}</li> </ul> @@ -31,10 +31,10 @@ color="grey" :class="['ui', {'loading': isLoading}, 'button']" :action="requestNewToken"> - <translate translate-context="Content/Settings/Button.Label/Verb">Request a new password</translate> + <translate translate-context="*/Settings/Button.Label/Verb">Request a new password</translate> <p slot="modal-header"><translate translate-context="Popup/Settings/Title">Request a new Subsonic API password?</translate></p> <p slot="modal-content"><translate translate-context="Popup/Settings/Paragraph">This will log you out from existing devices that use the current password.</translate></p> - <div slot="modal-confirm"><translate translate-context="Popup/Settings/Button.Label/Verb">Request a new password</translate></div> + <div slot="modal-confirm"><translate translate-context="*/Settings/Button.Label/Verb">Request a new password</translate></div> </dangerous-button> <button v-else diff --git a/front/src/components/common/ActionTable.vue b/front/src/components/common/ActionTable.vue index 4e7415df8e791c507c62ee8c39ec9c67fa40278c..9bbf18f85fbdf83d3c946bcbe3b5579381cf6cb2 100644 --- a/front/src/components/common/ActionTable.vue +++ b/front/src/components/common/ActionTable.vue @@ -20,7 +20,7 @@ <div class="ui small left floated form" v-if="actionUrl && actions.length > 0"> <div class="ui inline fields"> <div class="field"> - <label><translate translate-context="Content/*/Dropdown.Label/Noun">Actions</translate></label> + <label><translate translate-context="Content/*/*/Noun">Actions</translate></label> <select class="ui dropdown" v-model="currentActionName"> <option v-for="action in actions" :value="action.name"> {{ action.label }} diff --git a/front/src/components/common/CopyInput.vue b/front/src/components/common/CopyInput.vue index a422ff758a40b5998a497fd697dfe6717aca743b..415b2fc9bcd88e84aa8e87b996c04808eb6a922b 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 translate-context="Content/*/Paragraph/Short">Text copied to clipboard!</translate> + <translate translate-context="Content/*/Paragraph">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 translate-context="Content/*/Button.Label/Short, Verb">Copy</translate> + <translate translate-context="*/*/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 ae05ccfecc688c8039ce24239cdb354d72a4f3f5..502accf0f9acc8813cfbd4587c199ac8a118b907 100644 --- a/front/src/components/common/DangerousButton.vue +++ b/front/src/components/common/DangerousButton.vue @@ -15,7 +15,7 @@ </div> <div class="actions"> <div class="ui cancel button"> - <translate translate-context="Modal/*/Button.Label/Short, Verb">Cancel</translate> + <translate translate-context="*/*/Button.Label/Verb">Cancel</translate> </div> <div :class="['ui', 'confirm', confirmButtonColor, 'button']" @click="confirm"> <slot name="modal-confirm"> diff --git a/front/src/components/favorites/List.vue b/front/src/components/favorites/List.vue index f531df2310b86c3cb25ee8b1130fe6d2903d6dc5..d1bde0935341934af4988c64d1ec766d8da22c9b 100644 --- a/front/src/components/favorites/List.vue +++ b/front/src/components/favorites/List.vue @@ -22,7 +22,7 @@ <div :class="['ui', {'loading': isLoading}, 'form']"> <div class="fields"> <div class="field"> - <label><translate translate-context="Content/Favorites/Dropdown.Title/Short, Name">Ordering</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Ordering</translate></label> <select class="ui dropdown" v-model="ordering"> <option v-for="option in orderingOptions" :value="option[0]"> {{ sharedLabels.filters[option[1]] }} @@ -30,14 +30,14 @@ </select> </div> <div class="field"> - <label><translate translate-context="Content/*/Dropdown.Label/Short, Name">Order</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Order</translate></label> <select class="ui dropdown" v-model="orderingDirection"> - <option value="+"><translate translate-context="Content/*/Dropdown/Short">Ascending</translate></option> - <option value="-"><translate translate-context="Content/*/Short">Descending</translate></option> + <option value="+"><translate translate-context="Content/Search/Dropdown">Ascending</translate></option> + <option value="-"><translate translate-context="Content/Search/Dropdown">Descending</translate></option> </select> </div> <div class="field"> - <label><translate translate-context="Content/*/Dropdown.Label/Short, Name">Results per page</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Results per page</translate></label> <select class="ui dropdown" v-model="paginateBy"> <option :value="parseInt(12)">12</option> <option :value="parseInt(25)">25</option> diff --git a/front/src/components/favorites/TrackFavoriteIcon.vue b/front/src/components/favorites/TrackFavoriteIcon.vue index 61224ae6c3f396e54f78e2bfdb3dc4363f3374e2..e6cde2265390f99a9b8553951a3e896cd3e186f8 100644 --- a/front/src/components/favorites/TrackFavoriteIcon.vue +++ b/front/src/components/favorites/TrackFavoriteIcon.vue @@ -2,7 +2,7 @@ <button @click="$store.dispatch('favorites/toggle', track.id)" v-if="button" :class="['ui', 'pink', {'inverted': isFavorite}, {'favorited': isFavorite}, 'icon', 'labeled', 'button']"> <i class="heart icon"></i> <translate v-if="isFavorite" translate-context="Content/Track/Button.Message">In favorites</translate> - <translate v-else translate-context="Content/Track/Button.Message">Add to favorites</translate> + <translate v-else translate-context="Content/Track/*/Verb">Add to favorites</translate> </button> <button v-else @@ -23,9 +23,9 @@ export default { computed: { title () { if (this.isFavorite) { - return this.$pgettext('*/Favorites/Icon.Tooltip/Verb', 'Remove from favorites') + return this.$pgettext('Content/Track/Icon.Tooltip/Verb', 'Remove from favorites') } else { - return this.$pgettext('*/Favorites/Icon.Tooltip/Verb', 'Add to favorites') + return this.$pgettext('Content/Track/*/Verb', 'Add to favorites') } }, isFavorite () { diff --git a/front/src/components/instance/Stats.vue b/front/src/components/instance/Stats.vue index b64574c54ff20f82e2da10746278ec44a782831b..9b08d2f3718537ec025d17c3f1350986e5745089 100644 --- a/front/src/components/instance/Stats.vue +++ b/front/src/components/instance/Stats.vue @@ -28,7 +28,7 @@ </div> </div> <div class="column"> - <h3 class="ui left aligned header"><translate translate-context="Content/About/Title/Noun">Library</translate></h3> + <h3 class="ui left aligned header"><translate translate-context="*/*/*">Library</translate></h3> <div class="ui mini horizontal statistics"> <div class="statistic"> <div class="value"> @@ -40,19 +40,19 @@ <div class="value"> {{ stats.artists }} </div> - <div class="label"><translate translate-context="Content/About/Paragraph/Unit">Artists</translate></div> + <div class="label"><translate translate-context="*/*/*/Noun">Artists</translate></div> </div> <div class="statistic"> <div class="value"> {{ stats.albums }} </div> - <div class="label"><translate translate-context="Content/About/Paragraph/Unit">Albums</translate></div> + <div class="label"><translate translate-context="*/*/*">Albums</translate></div> </div> <div class="statistic"> <div class="value"> {{ stats.tracks }} </div> - <div class="label"><translate translate-context="Content/About/Paragraph/Unit">Tracks</translate></div> + <div class="label"><translate translate-context="*/*/*/Noun">Tracks</translate></div> </div> </div> </div> diff --git a/front/src/components/library/Album.vue b/front/src/components/library/Album.vue index 3f5851e3dc4a38b81a0a7a0187193d6f6bb1d3a6..0031aeed8460801bccb77c3545a21abcee77d16b 100644 --- a/front/src/components/library/Album.vue +++ b/front/src/components/library/Album.vue @@ -15,7 +15,7 @@ </h2> <div class="ui hidden divider"></div> <play-button class="orange" :tracks="album.tracks"> - <translate translate-context="Content/*/Button.Label/Verb, Short">Play all</translate> + <translate translate-context="Content/Queue/Button.Label/Short, Verb">Play all</translate> </play-button> <a :href="wikipediaUrl" target="_blank" class="ui icon labeled button"> @@ -24,7 +24,7 @@ </a> <a v-if="musicbrainzUrl" :href="musicbrainzUrl" target="_blank" class="ui icon labeled button"> <i class="external icon"></i> - <translate translate-context="Content/*/Button.Label/Verb">View on MusicBrainz</translate> + <translate translate-context="Content/*/*/Clickable, Verb">View on MusicBrainz</translate> </a> <template v-if="publicLibraries.length > 0"> <button @@ -45,7 +45,7 @@ </div> <div class="actions"> <div class="ui deny button"> - <translate translate-context="Popup/*/Button.Label/Verb">Cancel</translate> + <translate translate-context="*/*/Button.Label/Verb">Cancel</translate> </div> </div> </modal> @@ -61,7 +61,7 @@ translate-context="Content/Album/" >Volume %{ number }</translate> <play-button class="right floated orange" :tracks="tracks"> - <translate translate-context="Content/*/Button.Label/Verb, Short">Play all</translate> + <translate translate-context="Content/Queue/Button.Label/Short, Verb">Play all</translate> </play-button> <track-table :artist="album.artist" :display-position="true" :tracks="tracks"></track-table> </section> @@ -69,14 +69,14 @@ <template v-else> <section class="ui vertical stripe segment"> <h2> - <translate translate-context="Content/*/Title/Name">Tracks</translate> + <translate translate-context="*/*/*/Noun">Tracks</translate> </h2> <track-table v-if="album" :artist="album.artist" :display-position="true" :tracks="album.tracks"></track-table> </section> </template> <section class="ui vertical stripe segment"> <h2> - <translate translate-context="Content/*/Title/Name">User libraries</translate> + <translate translate-context="Content/*/Title/Noun">User libraries</translate> </h2> <library-widget @loaded="libraries = $event" :url="'albums/' + id + '/libraries/'"> <translate slot="subtitle" translate-context="Content/Album/Paragraph">This album is present in the following libraries:</translate> @@ -146,7 +146,7 @@ export default { computed: { labels() { return { - title: this.$pgettext('Head/Album/Title/Name', 'Album') + title: this.$pgettext('*/*/*', 'Album') } }, publicLibraries () { diff --git a/front/src/components/library/Albums.vue b/front/src/components/library/Albums.vue index ea717d77505ff243ada746276ddb00cbde906639..9817af830770142065f1e84f4253cbdda23c41e6 100644 --- a/front/src/components/library/Albums.vue +++ b/front/src/components/library/Albums.vue @@ -8,7 +8,7 @@ <div class="fields"> <div class="field"> <label> - <translate translate-context="Content/Search/Input.Label/Verb">Search</translate> + <translate translate-context="Content/Search/Input.Label/Noun">Search</translate> </label> <input type="text" name="search" v-model="query" :placeholder="labels.searchPlaceholder"/> </div> @@ -117,7 +117,7 @@ export default { computed: { labels() { let searchPlaceholder = this.$pgettext('Content/Search/Input.Placeholder', "Enter album title...") - let title = this.$pgettext('Head/Album/Title', "Albums") + let title = this.$pgettext('*/*/*', "Albums") return { searchPlaceholder, title diff --git a/front/src/components/library/Artist.vue b/front/src/components/library/Artist.vue index f32f2c729e5a1701c22c48f00a308e21d29abdfc..34071e746dde4617308d26b3cb9e646287fa34b8 100644 --- a/front/src/components/library/Artist.vue +++ b/front/src/components/library/Artist.vue @@ -33,7 +33,7 @@ </a> <a v-if="musicbrainzUrl" :href="musicbrainzUrl" target="_blank" class="ui button"> <i class="external icon"></i> - <translate translate-context="Content/*/Button.Label/Verb">View on MusicBrainz</translate> + <translate translate-context="Content/*/*/Clickable, Verb">View on MusicBrainz</translate> </a> <template v-if="publicLibraries.length > 0"> <button @@ -54,7 +54,7 @@ </div> <div class="actions"> <div class="ui deny button"> - <translate translate-context="Popup/*/Button.Label/Verb">Cancel</translate> + <translate translate-context="*/*/Button.Label/Verb">Cancel</translate> </div> </div> </modal> @@ -65,7 +65,7 @@ <div class="ui hidden divider"></div> <div class="ui message"> <p> - <translate>You are currently hiding content related to this artist.</translate> + <translate translate-context="Content/Artist/Paragraph">You are currently hiding content related to this artist.</translate> </p> <router-link class="right floated" :to="{name: 'settings'}"> <translate translate-context="Content/Moderation/Link">Review my filters</translate> @@ -94,7 +94,7 @@ </section> <section class="ui vertical stripe segment"> <h2> - <translate translate-context="Content/Artist/Title">User libraries</translate> + <translate translate-context="Content/*/Title/Noun">User libraries</translate> </h2> <library-widget @loaded="libraries = $event" :url="'artists/' + id + '/libraries/'"> <translate translate-context="Content/Artist/Paragraph" slot="subtitle">This artist is present in the following libraries:</translate> @@ -176,7 +176,7 @@ export default { computed: { labels() { return { - title: this.$pgettext('Head/Artist/Title', "Artist") + title: this.$pgettext('*/*/*/Noun', "Artist") } }, isPlayable() { diff --git a/front/src/components/library/Artists.vue b/front/src/components/library/Artists.vue index f5f1dc47878f18f801807baf36fb306e62780ab2..5f4102ab1c269cc6610bf8cec3fa95b33b9d5b83 100644 --- a/front/src/components/library/Artists.vue +++ b/front/src/components/library/Artists.vue @@ -8,7 +8,7 @@ <div class="fields"> <div class="field"> <label> - <translate translate-context="Content/Search/Input.Label/Verb">Search</translate> + <translate translate-context="Content/Search/Input.Label/Noun">Search</translate> </label> <input type="text" name="search" v-model="query" :placeholder="labels.searchPlaceholder"/> </div> @@ -28,7 +28,7 @@ </select> </div> <div class="field"> - <label><translate translate-context="Content/Search/Dropdown.Label">Results per page</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Results per page</translate></label> <select class="ui dropdown" v-model="paginateBy"> <option :value="parseInt(12)">12</option> <option :value="parseInt(25)">25</option> @@ -114,7 +114,7 @@ export default { computed: { labels() { let searchPlaceholder = this.$pgettext('Content/Search/Input.Placeholder', "Enter artist name…") - let title = this.$pgettext('Head/Artist/Title', "Artists") + let title = this.$pgettext('*/*/*/Noun', "Artists") return { searchPlaceholder, title diff --git a/front/src/components/library/EditCard.vue b/front/src/components/library/EditCard.vue index e3ef71a9b591fcbb6310d1d30daa2a860cf65c94..e72823aa74d7aa406e14bb7e87eea1d7ff3c0179 100644 --- a/front/src/components/library/EditCard.vue +++ b/front/src/components/library/EditCard.vue @@ -23,15 +23,15 @@ </span> <span v-else-if="obj.is_approved"> <i class="green check icon"></i> - <translate translate-context="Content/Library/Card/Short">Approved</translate> + <translate translate-context="Content/*/*/Short">Approved</translate> </span> <span v-else-if="obj.is_approved === null"> <i class="yellow hourglass icon"></i> - <translate translate-context="Content/Library/Card/Short">Pending review</translate> + <translate translate-context="Content/Admin/*/Noun">Pending review</translate> </span> <span v-else-if="obj.is_approved === false"> <i class="red x icon"></i> - <translate translate-context="Content/Library/Card/Short">Rejected</translate> + <translate translate-context="Content/Library/*/Short">Rejected</translate> </span> </span> </div> @@ -79,7 +79,7 @@ v-if="canApprove && obj.is_approved !== true" @click="approve(true)" :class="['ui', {loading: isLoading}, 'green', 'basic', 'button']"> - <translate translate-context="Content/Library/Button.Label">Approve</translate> + <translate translate-context="Content/*/Button.Label/Verb">Approve</translate> </button> <button v-if="canApprove && obj.is_approved === null" @@ -96,7 +96,7 @@ <div slot="modal-content"> <p><translate translate-context="Popup/Library/Paragraph">The suggestion will be completely removed, this action is irreversible.</translate></p> </div> - <p slot="modal-confirm"><translate translate-context="Popup/Library/Button.Label">Delete</translate></p> + <p slot="modal-confirm"><translate translate-context="*/*/*/Verb">Delete</translate></p> </dangerous-button> </div> </div> diff --git a/front/src/components/library/EditForm.vue b/front/src/components/library/EditForm.vue index 55013293f4eea751e56b87607294342a2a0069ef..0001081192048274ac2c8d3d55f5f809aa29093c 100644 --- a/front/src/components/library/EditForm.vue +++ b/front/src/components/library/EditForm.vue @@ -75,7 +75,7 @@ v-if="objectType === 'track'" :to="{name: 'library.tracks.detail', params: {id: object.id }}" > - <translate translate-context="Content/*/Button.Label">Cancel</translate> + <translate translate-context="*/*/Button.Label/Verb">Cancel</translate> </router-link> <button :class="['ui', {'loading': isLoading}, 'right', 'floated', 'green', 'button']" type="submit" :disabled="isLoading || !mutationPayload"> <translate v-if="canEdit" key="1" translate-context="Content/Library/Button.Label/Verb">Submit and apply edit</translate> diff --git a/front/src/components/library/FileUpload.vue b/front/src/components/library/FileUpload.vue index be5ead114dd39aef3536b05e95283f025cc44791..3c669eb180d03d9eaaa6aec25a8bcc5132dccf1d 100644 --- a/front/src/components/library/FileUpload.vue +++ b/front/src/components/library/FileUpload.vue @@ -85,8 +85,8 @@ <thead> <tr> <th><translate translate-context="Content/Library/Table.Label">Filename</translate></th> - <th><translate translate-context="Content/Library/Table.Label">Size</translate></th> - <th><translate translate-context="Content/Library/Table.Label">Status</translate></th> + <th><translate translate-context="Content/Library/*/in MB">Size</translate></th> + <th><translate translate-context="Content/Library/Table.Label (Value is Uploading/Uploaded/Error)">Status</translate></th> </tr> </thead> <tbody> @@ -107,7 +107,7 @@ ({{ parseInt(file.progress) }}%) </span> <template v-else> - <span class="ui label"><translate translate-context="Content/Library/Table" key="3">Pending</translate></span> + <span class="ui label"><translate translate-context="Content/Library/*/Short" key="3">Pending</translate></span> <button class="ui tiny basic red icon button" @click.prevent="$refs.upload.remove(file)"><i class="delete icon"></i></button> </template> </td> diff --git a/front/src/components/library/Home.vue b/front/src/components/library/Home.vue index d26b39b3f8816b722707479f775c9f10784dd49e..eea8f22c5eb8bdf00b6c539455ace0603c2a3d42 100644 --- a/front/src/components/library/Home.vue +++ b/front/src/components/library/Home.vue @@ -14,7 +14,7 @@ </div> <div class="column"> <playlist-widget :url="'playlists/'" :filters="{scope: 'user', playable: true, ordering: '-creation_date'}"> - <template slot="title"><translate translate-context="Content/Home/Title">Playlists</translate></template> + <template slot="title"><translate translate-context="*/*/*">Playlists</translate></template> </playlist-widget> </div> </div> diff --git a/front/src/components/library/Library.vue b/front/src/components/library/Library.vue index bcec59deccbef7f84d1ac99e3db3698b6e2beacb..ea4d98e6543e7382ead061577fc660d01e8a341d 100644 --- a/front/src/components/library/Library.vue +++ b/front/src/components/library/Library.vue @@ -2,19 +2,19 @@ <div class="main library pusher"> <nav class="ui secondary pointing menu" role="navigation" :aria-label="labels.secondaryMenu"> <router-link class="ui item" to="/library" exact> - <translate translate-context="Menu/Home/Link/Verb">Browse</translate> + <translate translate-context="*/Library/*/Verb">Browse</translate> </router-link> <router-link class="ui item" to="/library/albums" exact> - <translate translate-context="Menu/Home/Link">Albums</translate> + <translate translate-context="*/*/*">Albums</translate> </router-link> <router-link class="ui item" to="/library/artists" exact> - <translate translate-context="Menu/Home/Link">Artists</translate> + <translate translate-context="*/*/*/Noun">Artists</translate> </router-link> <router-link class="ui item" to="/library/radios" exact> - <translate translate-context="Menu/Home/Link">Radios</translate> + <translate translate-context="*/*/*">Radios</translate> </router-link> <router-link class="ui item" to="/library/playlists" exact> - <translate translate-context="Menu/Home/Link">Playlists</translate> + <translate translate-context="*/*/*">Playlists</translate> </router-link> </nav> <router-view :key="$route.fullPath"></router-view> diff --git a/front/src/components/library/Radios.vue b/front/src/components/library/Radios.vue index 2567dcfb8dabc30dc28500e863e1d61be40df0f8..68eb11f0b1dd835119577d5c74ceb49eaaa83796 100644 --- a/front/src/components/library/Radios.vue +++ b/front/src/components/library/Radios.vue @@ -27,11 +27,11 @@ <div :class="['ui', {'loading': isLoading}, 'form']"> <div class="fields"> <div class="field"> - <label><translate translate-context="Content/Search/Input.Label/Verb">Search</translate></label> + <label><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label> <input name="search" type="text" v-model="query" :placeholder="labels.searchPlaceholder"/> </div> <div class="field"> - <label><translate translate-context="Content/Search/Dropdown.Label">Ordering</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Ordering</translate></label> <select class="ui dropdown" v-model="ordering"> <option v-for="option in orderingOptions" :value="option[0]"> {{ sharedLabels.filters[option[1]] }} @@ -39,7 +39,7 @@ </select> </div> <div class="field"> - <label><translate translate-context="Content/Search/Dropdown.Label">Order</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Order</translate></label> <select class="ui dropdown" v-model="orderingDirection"> <option value="+"> <translate translate-context="Content/Search/Dropdown">Ascending</translate> @@ -50,7 +50,7 @@ </select> </div> <div class="field"> - <label><translate translate-context="Content/Search/Dropdown.Label">Results per page</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Results per page</translate></label> <select class="ui dropdown" v-model="paginateBy"> <option :value="parseInt(12)">12</option> <option :value="parseInt(25)">25</option> @@ -139,7 +139,7 @@ export default { computed: { labels() { let searchPlaceholder = this.$pgettext('Content/Search/Input.Placeholder', "Enter a radio name…") - let title = this.$pgettext('Head/Radio/Title', "Radios") + let title = this.$pgettext('*/*/*', "Radios") return { searchPlaceholder, title diff --git a/front/src/components/library/TrackBase.vue b/front/src/components/library/TrackBase.vue index 34ce4a2954598cbcb0b83a8509bf26c55dc31ede..8d885e72a4401fc158e34bb506ce771b382d898e 100644 --- a/front/src/components/library/TrackBase.vue +++ b/front/src/components/library/TrackBase.vue @@ -30,11 +30,11 @@ <a :href="wikipediaUrl" target="_blank" class="ui icon labeled button"> <i class="wikipedia w icon"></i> - <translate translate-context="Content/*/Link/Verb">Search on Wikipedia</translate> + <translate translate-context="Content/*/Button.Label/Verb">Search on Wikipedia</translate> </a> <a v-if="musicbrainzUrl" :href="musicbrainzUrl" target="_blank" class="ui icon labeled button"> <i class="external icon"></i> - <translate translate-context="Content/*/Link/Verb">View on MusicBrainz</translate> + <translate translate-context="Content/*/*/Clickable, Verb">View on MusicBrainz</translate> </a> <a v-if="upload" :href="downloadUrl" target="_blank" class="ui icon labeled button"> <i class="download icon"></i> @@ -45,7 +45,7 @@ @click="showEmbedModal = !showEmbedModal" class="ui icon labeled button"> <i class="code icon"></i> - <translate translate-context="Content/Track/Button.Label/Verb">Embed</translate> + <translate translate-context="Content/*/Button.Label/Verb">Embed</translate> </button> <modal :show.sync="showEmbedModal"> <div class="header"> @@ -59,7 +59,7 @@ </div> <div class="actions"> <div class="ui deny button"> - <translate translate-context="Popup/Track/Button/Verb">Cancel</translate> + <translate translate-context="*/*/Button.Label/Verb">Cancel</translate> </div> </div> </modal> @@ -68,7 +68,7 @@ :to="{name: 'library.tracks.edit', params: {id: track.id }}" class="ui icon labeled button"> <i class="edit icon"></i> - <translate translate-context="Content/Track/Button.Label/Verb">Edit…</translate> + <translate translate-context="Content/*/Button.Label/Verb">Edit</translate> </router-link> </div> </section> @@ -136,7 +136,7 @@ export default { }, labels() { return { - title: this.$pgettext('Head/Track/Title', "Track") + title: this.$pgettext('*/*/*/Noun', "Track") } }, wikipediaUrl() { diff --git a/front/src/components/library/TrackDetail.vue b/front/src/components/library/TrackDetail.vue index 8f65a7d0ddcd79ff59acd59dd950a620fa059fce..8438a97c699dd6c8a661c45c25cf54d0ab8618cc 100644 --- a/front/src/components/library/TrackDetail.vue +++ b/front/src/components/library/TrackDetail.vue @@ -18,7 +18,7 @@ </tr> <tr> <td> - <translate translate-context="Content/Track/Table.Label/Noun">License</translate> + <translate translate-context="Content/*/*/Noun">License</translate> </td> <td v-if="license"> <a :href="license.url" target="_blank" rel="noopener noreferrer">{{ license.name }}</a> @@ -29,7 +29,7 @@ </tr> <tr> <td> - <translate translate-context="Content/Track/Table.Label">Duration</translate> + <translate translate-context="Content/*/*">Duration</translate> </td> <td v-if="upload && upload.duration">{{ time.parse(upload.duration) }}</td> <td v-else> @@ -38,7 +38,7 @@ </tr> <tr> <td> - <translate translate-context="Content/Track/Table.Label">Size</translate> + <translate translate-context="Content/Library/*/in MB">Size</translate> </td> <td v-if="upload && upload.size">{{ upload.size | humanSize }}</td> <td v-else> @@ -47,7 +47,7 @@ </tr> <tr> <td> - <translate translate-context="Content/Track/Table.Label">Bitrate</translate> + <translate translate-context="Content/Track/*/Noun">Bitrate</translate> </td> <td v-if="upload && upload.bitrate">{{ upload.bitrate | humanSize }}/s</td> <td v-else> @@ -86,7 +86,7 @@ </section> <section class="ui vertical stripe segment"> <h2> - <translate translate-context="Content/Track/Title">User libraries</translate> + <translate translate-context="Content/*/Title/Noun">User libraries</translate> </h2> <library-widget @loaded="$emit('libraries-loaded', $event)" :url="'tracks/' + id + '/libraries/'"> <translate translate-context="Content/Track/Paragraph" slot="subtitle">This track is present in the following libraries:</translate> @@ -152,7 +152,7 @@ export default { computed: { labels() { return { - title: this.$pgettext('Head/Track/Title', "Track") + title: this.$pgettext('*/*/*/Noun', "Track") } }, upload() { diff --git a/front/src/components/library/radios/Builder.vue b/front/src/components/library/radios/Builder.vue index 58e7b9f099701bcb21fd40c279cc16fa4220326c..c6101a3200b0def3a9b3249dbba6bdbb70e740c1 100644 --- a/front/src/components/library/radios/Builder.vue +++ b/front/src/components/library/radios/Builder.vue @@ -23,7 +23,7 @@ <input id="name" name="name" type="text" v-model="radioName" :placeholder="labels.placeholder.name" /> </div> <div class="field"> - <label for="description"><translate translate-context="Content/Radio/Input.Label">Description</translate></label> + <label for="description"><translate translate-context="Content/*/Input.Label/Noun">Description</translate></label> <textarea rows="2" id="description" type="text" v-model="radioDesc" :placeholder="labels.placeholder.description" /> </div> <div class="ui toggle checkbox"> @@ -32,7 +32,7 @@ </div> <div class="ui hidden divider"></div> <button :disabled="!canSave" @click="save" :class="['ui', 'green', {loading: isLoading}, 'button']"> - <translate translate-context="Content/Radio/Button.Label/Verb">Save</translate> + <translate translate-context="Content/*/Button.Label/Verb">Save</translate> </button> <radio-button v-if="id" type="custom" :custom-radio-id="id"></radio-button> </div> @@ -63,7 +63,7 @@ <th class="one wide"><translate translate-context="Content/Radio/Table.Label/Verb">Exclude</translate></th> <th class="six wide"><translate translate-context="Content/Radio/Table.Label/Verb (Value is a List of Parameters)">Config</translate></th> <th class="five wide"><translate translate-context="Content/Radio/Table.Label/Noun (Value is a number of Tracks)">Candidates</translate></th> - <th class="two wide"><translate translate-context="Content/Radio/Table.Label/Noun (Value is a Button)">Actions</translate></th> + <th class="two wide"><translate translate-context="Content/*/*/Noun">Actions</translate></th> </tr> </thead> <tbody> @@ -83,7 +83,8 @@ class="ui header" v-translate="{count: checkResult.candidates.count}" :translate-n="checkResult.candidates.count" - translate-plural="%{ count } tracks matching combined filters"> + translate-plural="%{ count } tracks matching combined filters" + translate-context="Content/Radio/Table.Paragraph/Short"> %{ count } track matching combined filters </h3> <track-table v-if="checkResult.candidates.sample" :tracks="checkResult.candidates.sample" :playable="true"></track-table> diff --git a/front/src/components/library/radios/Filter.vue b/front/src/components/library/radios/Filter.vue index f9e158320a42c0380e41ceca28c444407e4969f1..b0eabbd6e6054f5be4a6afbee00e16fb2d423a26 100644 --- a/front/src/components/library/radios/Filter.vue +++ b/front/src/components/library/radios/Filter.vue @@ -51,7 +51,7 @@ </div> <div class="actions"> <div class="ui black deny button"> - <translate translate-context="Popup/Radio/Button.Label/Verb">Cancel</translate> + <translate translate-context="*/*/Button.Label/Verb">Cancel</translate> </div> </div> </modal> diff --git a/front/src/components/manage/library/EditsCardList.vue b/front/src/components/manage/library/EditsCardList.vue index c66cfeaa23bb4390f6d5ca4ca8bf58dace7c84ca..28b07f37480b334e5b563e603977bc2a7d5fa245 100644 --- a/front/src/components/manage/library/EditsCardList.vue +++ b/front/src/components/manage/library/EditsCardList.vue @@ -10,24 +10,24 @@ </form> </div> <div class="field"> - <label><translate translate-context="Content/Search/Dropdown.Label">Status</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label (Value is All/Pending review/Approved/Rejected)">Status</translate></label> <select class="ui dropdown" @change="addSearchToken('is_approved', $event.target.value)" :value="getTokenValue('is_approved', '')"> <option value=""> - <translate translate-context="Content/Admin/Dropdown">All</translate> + <translate translate-context="Content/*/Dropdown">All</translate> </option> <option value="null"> - <translate translate-context="Content/Admin/Dropdown">Pending review</translate> + <translate translate-context="Content/Admin/*/Noun">Pending review</translate> </option> <option value="yes"> - <translate translate-context="Content/Admin/Dropdown">Approved</translate> + <translate translate-context="Content/*/*/Short">Approved</translate> </option> <option value="no"> - <translate translate-context="Content/Admin/Dropdown">Rejected</translate> + <translate translate-context="Content/Library/*/Short">Rejected</translate> </option> </select> </div> <div class="field"> - <label><translate translate-context="Content/Search/Dropdown.Label">Ordering</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Ordering</translate></label> <select class="ui dropdown" v-model="ordering"> <option v-for="option in orderingOptions" :value="option[0]"> {{ sharedLabels.filters[option[1]] }} @@ -70,7 +70,7 @@ ></pagination> <span v-if="result && result.results.length > 0"> - <translate translate-context="Content/Library/Paragraph" + <translate translate-context="Content/*/Paragraph" :translate-params="{start: ((page-1) * paginateBy) + 1, end: ((page-1) * paginateBy) + result.results.length, total: result.count}"> Showing results %{ start }-%{ end } on %{ total } </translate> diff --git a/front/src/components/manage/moderation/AccountsTable.vue b/front/src/components/manage/moderation/AccountsTable.vue index 85c316fac4229990bb60b0488672c0874ed490d9..ce91fe43e32df84913066f594442b8adbfdac07e 100644 --- a/front/src/components/manage/moderation/AccountsTable.vue +++ b/front/src/components/manage/moderation/AccountsTable.vue @@ -9,7 +9,7 @@ </form> </div> <div class="field"> - <label><translate translate-context="Content/Search/Input.Label/Noun">Ordering</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Ordering</translate></label> <select class="ui dropdown" v-model="ordering"> <option v-for="option in orderingOptions" :value="option[0]"> {{ sharedLabels.filters[option[1]] }} @@ -17,7 +17,7 @@ </select> </div> <div class="field"> - <label><translate translate-context="Content/Search/Input.Label/Noun">Ordering direction</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Ordering direction</translate></label> <select class="ui dropdown" v-model="orderingDirection"> <option value="+"><translate translate-context="Content/Search/Dropdown">Ascending</translate></option> <option value="-"><translate translate-context="Content/Search/Dropdown">Descending</translate></option> @@ -37,12 +37,12 @@ action-url="manage/accounts/action/" :filters="actionFilters"> <template slot="header-cells"> - <th><translate translate-context="Content/Moderation/Table.Label">Name</translate></th> - <th><translate translate-context="Content/Moderation/Table.Label">Domain</translate></th> + <th><translate translate-context="*/*/*/Noun">Name</translate></th> + <th><translate translate-context="Content/Moderation/*/Noun">Domain</translate></th> <th><translate translate-context="Content/Moderation/Table.Label/Noun">Uploads</translate></th> - <th><translate translate-context="Content/Moderation/Table.Label/Noun">First seen</translate></th> + <th><translate translate-context="Content/Moderation/Table.Label/Short (Value is a date)">First seen</translate></th> <th><translate translate-context="Content/Moderation/Table.Label/Noun">Last seen</translate></th> - <th><translate translate-context="Content/Moderation/Table.Label/Short, Noun">Under moderation rule</translate></th> + <th><translate translate-context="Content/Moderation/Table.Label/Short">Under moderation rule</translate></th> </template> <template slot="row-cells" slot-scope="scope"> <td> @@ -57,7 +57,7 @@ </template> <span role="button" v-else class="ui tiny teal icon link label" @click="addSearchToken('domain', scope.obj.domain)"> <i class="home icon"></i> - <translate translate-context="Content/Moderation/Table/Short, Noun">Local account</translate> + <translate translate-context="Content/Moderation/*/Short, Noun">Local account</translate> </span> </td> <td> @@ -86,7 +86,7 @@ ></pagination> <span v-if="result && result.results.length > 0"> - <translate translate-context="Content/Moderation/Paragraph" + <translate translate-context="Content/*/Paragraph" :translate-params="{start: ((page-1) * paginateBy) + 1, end: ((page-1) * paginateBy) + result.results.length, total: result.count}"> Showing results %{ start }-%{ end } on %{ total } </translate> @@ -185,7 +185,7 @@ export default { return [ { name: 'purge', - label: this.$pgettext('Content/Moderation/Dropdown/Verb', 'Purge'), + label: this.$pgettext('*/*/*/Verb', 'Purge'), isDangerous: true } ] diff --git a/front/src/components/manage/moderation/DomainsTable.vue b/front/src/components/manage/moderation/DomainsTable.vue index 66561b81c2a2c5ba2042e29a34dc4b9736018a48..544d91156f3101236b8395bec133b9248d2d112a 100644 --- a/front/src/components/manage/moderation/DomainsTable.vue +++ b/front/src/components/manage/moderation/DomainsTable.vue @@ -3,11 +3,11 @@ <div class="ui inline form"> <div class="fields"> <div class="ui field"> - <label><translate translate-context="Content/Search/Input.Label/Verb">Search</translate></label> + <label><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label> <input name="search" type="text" v-model="search" :placeholder="labels.searchPlaceholder" /> </div> <div class="field"> - <label><translate translate-context="Content/Search/Input.Label/Noun">Ordering</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Ordering</translate></label> <select class="ui dropdown" v-model="ordering"> <option v-for="option in orderingOptions" :value="option[0]"> {{ sharedLabels.filters[option[1]] }} @@ -15,7 +15,7 @@ </select> </div> <div class="field"> - <label><translate translate-context="Content/Search/Input.Label/Noun">Ordering direction</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Ordering direction</translate></label> <select class="ui dropdown" v-model="orderingDirection"> <option value="+"><translate translate-context="Content/Search/Dropdown">Ascending</translate></option> <option value="-"><translate translate-context="Content/Search/Dropdown">Descending</translate></option> @@ -36,10 +36,10 @@ idField="name" :filters="actionFilters"> <template slot="header-cells"> - <th><translate translate-context="Content/Moderation/Table.Label">Name</translate></th> - <th><translate translate-context="Content/Moderation/Table.Label">Users</translate></th> - <th><translate translate-context="Content/Moderation/Table.Label/Short, Noun">Received messages</translate></th> - <th><translate translate-context="Content/Moderation/Table.Label/Short, Noun">First seen</translate></th> + <th><translate translate-context="*/*/*/Noun">Name</translate></th> + <th><translate translate-context="*/*/*/Noun">Users</translate></th> + <th><translate translate-context="Content/Moderation/*/Noun">Received messages</translate></th> + <th><translate translate-context="Content/Moderation/Table.Label/Short (Value is a date)">First seen</translate></th> <th><translate translate-context="Content/Moderation/Table.Label/Short">Under moderation rule</translate></th> </template> <template slot="row-cells" slot-scope="scope"> @@ -72,7 +72,7 @@ ></pagination> <span v-if="result && result.results.length > 0"> - <translate translate-context="Content/Moderation/Paragraph" + <translate translate-context="Content/*/Paragraph" :translate-params="{start: ((page-1) * paginateBy) + 1, end: ((page-1) * paginateBy) + result.results.length, total: result.count}"> Showing results %{ start }-%{ end } on %{ total } </translate> @@ -165,7 +165,7 @@ export default { return [ { name: 'purge', - label: this.$pgettext('Content/Moderation/Dropdown/Verb', 'Purge'), + label: this.$pgettext('*/*/*/Verb', 'Purge'), isDangerous: true } ] diff --git a/front/src/components/manage/moderation/InstancePolicyCard.vue b/front/src/components/manage/moderation/InstancePolicyCard.vue index 07e6e948d5c5843f3300e5091bc318e2d8e3143f..040195d0975f259a4a613d329284d1c95e84e9b4 100644 --- a/front/src/components/manage/moderation/InstancePolicyCard.vue +++ b/front/src/components/manage/moderation/InstancePolicyCard.vue @@ -17,33 +17,33 @@ <p><strong><translate translate-context="Content/Moderation/Card.Title/Noun">Rule</translate></strong></p> <p v-if="object.block_all"> <i class="ban icon"></i> - <translate translate-context="Content/Moderation/Card.List item/Verb">Block everything</translate> + <translate translate-context="Content/Moderation/*/Verb">Block everything</translate> </p> <div v-else class="ui list"> <div class="ui item" v-if="object.silence_activity"> <i class="feed icon"></i> - <div class="content"><translate translate-context="Content/Moderation/Card.List item/Verb">Mute activity</translate></div> + <div class="content"><translate translate-context="Content/Moderation/*/Verb">Mute activity</translate></div> </div> <div class="ui item" v-if="object.silence_notifications"> <i class="bell icon"></i> - <div class="content"><translate translate-context="Content/Moderation/Card.List item/Verb">Mute notifications</translate></div> + <div class="content"><translate translate-context="Content/Moderation/*/Verb">Mute notifications</translate></div> </div> <div class="ui item" v-if="object.reject_media"> <i class="file icon"></i> - <div class="content"><translate translate-context="Content/Moderation/Card.List item/Verb">Reject media</translate></div> + <div class="content"><translate translate-context="Content/Moderation/*/Verb">Reject media</translate></div> </div> </div> </div> <div v-if="markdown && object.summary"> <div class="ui hidden divider"></div> - <p><strong><translate translate-context="Content/Moderation/Card.Title/Noun">Reason</translate></strong></p> + <p><strong><translate translate-context="Content/Moderation/*/Noun">Reason</translate></strong></p> <div v-html="markdown.makeHtml(object.summary)"></div> </div> <div class="ui hidden divider"></div> <button @click="$emit('update')" class="ui right floated labeled icon button"> <i class="edit icon"></i> - <translate translate-context="Content/Moderation/Card.Button.Label/Verb">Edit</translate> + <translate translate-context="Content/*/Button.Label/Verb">Edit</translate> </button> </div> </template> diff --git a/front/src/components/manage/moderation/InstancePolicyForm.vue b/front/src/components/manage/moderation/InstancePolicyForm.vue index f7dedc55bf4616b8738ca60dbc2644453361cc7e..e5b1c50244378f57abd2ebb51412e703c58dab2e 100644 --- a/front/src/components/manage/moderation/InstancePolicyForm.vue +++ b/front/src/components/manage/moderation/InstancePolicyForm.vue @@ -23,7 +23,7 @@ </div> <div class="field"> <label for="policy-summary"> - <translate translate-context="Content/Moderation/Input.Label/Noun">Reason</translate> + <translate translate-context="Content/Moderation/*/Noun">Reason</translate> <tooltip :content="labels.summaryHelp" /> </label> <textarea name="policy-summary" id="policy-summary" rows="5" v-model="current.summary"></textarea> @@ -32,7 +32,7 @@ <div class="ui toggle checkbox"> <input id="policy-is-active" v-model="current.blockAll" type="checkbox"> <label for="policy-is-active"> - <translate translate-context="Content/Moderation/Checkbox.Label/Verb">Block everything</translate> + <translate translate-context="Content/Moderation/*/Verb">Block everything</translate> <tooltip :content="labels.blockAllHelp" /> </label> </div> @@ -52,14 +52,14 @@ </div> <div class="ui hidden divider"></div> <button @click="$emit('cancel')" class="ui basic left floated button"> - <translate translate-context="Content/Moderation/Card.Button.Label/Verb">Cancel</translate> + <translate translate-context="*/*/Button.Label/Verb">Cancel</translate> </button> <button :class="['ui', 'right', 'floated', 'green', {'disabled loading': isLoading}, 'button']" :disabled="isLoading"> <translate translate-context="Content/Moderation/Card.Button.Label/Verb" v-if="object" key="1">Update</translate> <translate translate-context="Content/Moderation/Card.Button.Label/Verb" v-else key="2">Create</translate> </button> <dangerous-button v-if="object" class="right floated basic button" color='red' @confirm="remove"> - <translate translate-context="Content/Moderation/Card.Button.Label/Verb">Delete</translate> + <translate translate-context="*/*/*/Verb">Delete</translate> <p slot="modal-header"> <translate translate-context="Popup/Moderation/Title">Delete this moderation rule?</translate> </p> @@ -112,15 +112,15 @@ export default { blockAllHelp: this.$pgettext('Content/Moderation/Help text', "Block everything from this account or domain. This will prevent any interaction with the entity, and purge related content (uploads, libraries, follows, etc.)"), silenceActivity: { help: this.$pgettext('Content/Moderation/Help text', "Hide account or domain content, except from followers."), - label: this.$pgettext('Content/Moderation/Checkbox.Label/Verb', "Mute activity"), + label: this.$pgettext('Content/Moderation/*/Verb', "Mute activity"), }, silenceNotifications: { help: this.$pgettext('Content/Moderation/Help text', "Prevent account or domain from triggering notifications, except from followers."), - label: this.$pgettext('Content/Moderation/Checkbox.Label/Verb', "Mute notifications"), + label: this.$pgettext('Content/Moderation/*/Verb', "Mute notifications"), }, rejectMedia: { help: this.$pgettext('Content/Moderation/Help text', "Do not download any media file (audio, album cover, account avatar…) from this account or domain. This will purge existing content as well."), - label: this.$pgettext('Content/Moderation/Checkbox.Label/Verb', "Reject media"), + label: this.$pgettext('Content/Moderation/*/Verb', "Reject media"), } } } diff --git a/front/src/components/manage/users/InvitationForm.vue b/front/src/components/manage/users/InvitationForm.vue index b9569a45196a197edf865df809cc6e036d316606..950e11e08e72c6f5dedbabd72a071b1cdc8f4b0f 100644 --- a/front/src/components/manage/users/InvitationForm.vue +++ b/front/src/components/manage/users/InvitationForm.vue @@ -9,7 +9,7 @@ </div> <div class="inline fields"> <div class="ui field"> - <label><translate translate-context="$1">Invitation code</translate></label> + <label><translate translate-context="Content/*/Input.Label">Invitation code</translate></label> <input name="code" type="text" v-model="code" :placeholder="labels.placeholder" /> </div> <div class="ui field"> diff --git a/front/src/components/manage/users/InvitationsTable.vue b/front/src/components/manage/users/InvitationsTable.vue index 446d2e55783e517b08bd2983b52c2a5771f527d7..6f557c8af2c879a64613f5dff68dbd0fbffd5159 100644 --- a/front/src/components/manage/users/InvitationsTable.vue +++ b/front/src/components/manage/users/InvitationsTable.vue @@ -3,11 +3,11 @@ <div class="ui inline form"> <div class="fields"> <div class="ui field"> - <label><translate translate-context="Content/Search/Input.Label/Verb">Search</translate></label> + <label><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label> <input name="search" type="text" v-model="search" :placeholder="labels.searchPlaceholder" /> </div> <div class="field"> - <label><translate translate-context="Content/Search/Input.Label/Noun">Ordering</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Ordering</translate></label> <select class="ui dropdown" v-model="ordering"> <option v-for="option in orderingOptions" :value="option[0]"> {{ sharedLabels.filters[option[1]] }} @@ -15,9 +15,9 @@ </select> </div> <div class="field"> - <label><translate translate-context="Content/Admin/Dropdown.Label">Status</translate></label> + <label><translate translate-context="Content/Admin/*/Noun (Value is Used/Not used)">Status</translate></label> <select class="ui dropdown" v-model="isOpen"> - <option :value="null"><translate translate-context="Content/Admin/Dropdown">All</translate></option> + <option :value="null"><translate translate-context="Content/*/Dropdown">All</translate></option> <option :value="true"><translate translate-context="Content/Admin/Dropdown/Adjective">Open</translate></option> <option :value="false"><translate translate-context="Content/Admin/Dropdown/Adjective">Expired/used</translate></option> </select> @@ -37,10 +37,10 @@ :filters="actionFilters"> <template slot="header-cells"> <th><translate translate-context="Content/Admin/Table.Label">Owner</translate></th> - <th><translate translate-context="Content/Admin/Table.Label">Status</translate></th> - <th><translate translate-context="Content/Admin/Table.Label">Creation date</translate></th> - <th><translate translate-context="Content/Admin/Table.Label">Expiration date</translate></th> - <th><translate translate-context="Content/Admin/Table.Label">Code</translate></th> + <th><translate translate-context="Content/Admin/*/Noun (Value is Used/Not used)">Status</translate></th> + <th><translate translate-context="Content/*/*/Noun">Creation date</translate></th> + <th><translate translate-context="Content/Admin/Table.Label/Noun">Expiration date</translate></th> + <th><translate translate-context="Content/Admin/Table.Label/Noun">Code</translate></th> </template> <template slot="row-cells" slot-scope="scope"> <td> @@ -74,7 +74,7 @@ ></pagination> <span v-if="result && result.results.length > 0"> - <translate translate-context="Content/Admin/Paragraph" + <translate translate-context="Content/*/Paragraph" :translate-params="{start: ((page-1) * paginateBy) + 1, end: ((page-1) * paginateBy) + result.results.length, total: result.count}"> Showing results %{ start }-%{ end } on %{ total } </translate> @@ -150,7 +150,7 @@ export default { computed: { labels () { return { - searchPlaceholder: this.$gettext('Search by username, e-mail address, code…') + searchPlaceholder: this.$pgettext('Content/Admin/Input.Placeholder/Verb', 'Search by username, e-mail address, code…') } }, actionFilters () { @@ -164,7 +164,7 @@ export default { } }, actions () { - let deleteLabel = this.$gettext('Delete') + let deleteLabel = this.$pgettext('*/*/*/Verb', 'Delete') return [ { name: 'delete', diff --git a/front/src/components/manage/users/UsersTable.vue b/front/src/components/manage/users/UsersTable.vue index 465c33c2374885fee55239686b9af1ba0287f1fc..ee1d3110b2c800e7f1445718ff26f484af82b23e 100644 --- a/front/src/components/manage/users/UsersTable.vue +++ b/front/src/components/manage/users/UsersTable.vue @@ -3,11 +3,11 @@ <div class="ui inline form"> <div class="fields"> <div class="ui field"> - <label><translate translate-context="Content/Search/Input.Label/verb">Search</translate></label> + <label><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label> <input name="search" type="text" v-model="search" :placeholder="labels.searchPlaceholder" /> </div> <div class="field"> - <label><translate translate-context="Content/Search/Input.Label/Noun">Ordering</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Ordering</translate></label> <select class="ui dropdown" v-model="ordering"> <option v-for="option in orderingOptions" :value="option[0]"> {{ sharedLabels.filters[option[1]] }} @@ -35,13 +35,13 @@ :action-url="'manage/library/uploads/action/'" :filters="actionFilters"> <template slot="header-cells"> - <th><translate translate-context="Content/Admin/Table.Label">Username</translate></th> - <th><translate translate-context="Content/Admin/Table.Label">Email</translate></th> + <th><translate translate-context="Content/*/*">Username</translate></th> + <th><translate translate-context="Content/*/*/Noun">Email</translate></th> <th><translate translate-context="Content/Admin/Table.Label/Short, Noun">Account status</translate></th> <th><translate translate-context="Content/Admin/Table.Label/Short, Noun (Value is a date)">Sign-up</translate></th> - <th><translate translate-context="Content/Admin/Table.Label/Short, Noun (Value is a date)">Last activity</translate></th> + <th><translate translate-context="Content/Profile/Table.Label/Short, Noun (Value is a date)">Last activity</translate></th> <th><translate translate-context="Content/Admin/Table.Label/Noun">Permissions</translate></th> - <th><translate translate-context="Content/Admin/Table.Label/Noun">Status</translate></th> + <th><translate translate-context="Content/Admin/Table.Label/Noun (Value is Regular user/Admin)">Status</translate></th> </template> <template slot="row-cells" slot-scope="scope"> <td> @@ -68,8 +68,8 @@ </td> <td> <span v-if="scope.obj.is_superuser" class="ui pink label"><translate translate-context="Content/Admin/Table.User role">Admin</translate></span> - <span v-else-if="scope.obj.is_staff" class="ui purple label"><translate translate-context="Content/Admin/Table.User role">Staff member</translate></span> - <span v-else class="ui basic label"><translate translate-context="Content/Admin/Table, User role">regular user</translate></span> + <span v-else-if="scope.obj.is_staff" class="ui purple label"><translate translate-context="Content/Profile/User role">Staff member</translate></span> + <span v-else class="ui basic label"><translate translate-context="Content/Admin/Table, User role">Regular user</translate></span> </td> </template> </action-table> @@ -85,7 +85,7 @@ ></pagination> <span v-if="result && result.results.length > 0"> - <translate translate-context="Content/Admin/Paragraph" + <translate translate-context="Content/*/Paragraph" :translate-params="{start: ((page-1) * paginateBy) + 1, end: ((page-1) * paginateBy) + result.results.length, total: result.count}"> Showing results %{ start }-%{ end } on %{ total } </translate> @@ -170,15 +170,15 @@ export default { return [ { 'code': 'library', - 'label': this.$pgettext('Content/Admin/Table', 'Library') + 'label': this.$pgettext('*/*/*', 'Library') }, { 'code': 'moderation', - 'label': this.$pgettext('Content/Admin/Table', 'Moderation') + 'label': this.$pgettext('*/Moderation/*', 'Moderation') }, { 'code': 'settings', - 'label': this.$pgettext('Content/Admin/Table', 'Settings') + 'label': this.$pgettext('*/*/*/Noun', 'Settings') } ] }, diff --git a/front/src/components/metadata/ArtistCard.vue b/front/src/components/metadata/ArtistCard.vue index 541f650aa6d09a73e720d927f93c49bf20996ae4..531c2645c147c2504ea2856feb57923572da4bfe 100644 --- a/front/src/components/metadata/ArtistCard.vue +++ b/front/src/components/metadata/ArtistCard.vue @@ -46,7 +46,7 @@ export default Vue.extend({ computed: { labels() { return { - musicbrainz: this.$pgettext('Content/*/Link.Tooltip/Verb', "View on MusicBrainz") + musicbrainz: this.$pgettext('Content/*/*/Clickable, Verb', "View on MusicBrainz") } }, type() { diff --git a/front/src/components/metadata/ReleaseCard.vue b/front/src/components/metadata/ReleaseCard.vue index 449628cb9f5a96d60a5a8e3180574a6e0cd9ff46..08a0fe4a596f57e962b3be6525d0c2c19ecd4e4e 100644 --- a/front/src/components/metadata/ReleaseCard.vue +++ b/front/src/components/metadata/ReleaseCard.vue @@ -50,7 +50,7 @@ export default Vue.extend({ computed: { labels () { return { - musicbrainz: this.$pgettext('Content/*/Link.Tooltip/Verb', 'View on MusicBrainz') + musicbrainz: this.$pgettext('Content/*/*/Clickable, Verb', 'View on MusicBrainz') } }, type () { diff --git a/front/src/components/metadata/Search.vue b/front/src/components/metadata/Search.vue index 9d22c5a33367e3f1b2b416ab227e2dd5bceaef72..f7feb511f095741b77d02e2e45f4fe012173be53 100644 --- a/front/src/components/metadata/Search.vue +++ b/front/src/components/metadata/Search.vue @@ -127,15 +127,15 @@ export default { return [ { value: 'artist', - label: this.$pgettext('*/*/Noun', 'Artist') + label: this.$pgettext('*/*/*/Noun', 'Artist') }, { value: 'release', - label: this.$pgettext('*/*/Noun', 'Album') + label: this.$pgettext('*/*/*', 'Album') }, { value: 'recording', - label: this.$pgettext('*/*/*', 'Track') + label: this.$pgettext('*/*/*/Noun', 'Track') } ] } diff --git a/front/src/components/mixins/Translations.vue b/front/src/components/mixins/Translations.vue index e58ca8addfac91802542a4e5c9737ad73883b706..75bbaef205677bb9a9f796ff8a07290d3b070a96 100644 --- a/front/src/components/mixins/Translations.vue +++ b/front/src/components/mixins/Translations.vue @@ -15,7 +15,7 @@ export default { } }, filters: { - creation_date: this.$pgettext('Content/*/Dropdown/Noun', 'Creation date'), + creation_date: this.$pgettext('Content/*/*/Noun', 'Creation date'), first_seen: this.$pgettext('Content/Moderation/Dropdown/Noun', 'First seen date'), last_seen: this.$pgettext('Content/Moderation/Dropdown/Noun', 'Last seen date'), modification_date: this.$pgettext('Content/Playlist/Dropdown/Noun', 'Modification date'), @@ -23,16 +23,16 @@ export default { track_title: this.$pgettext('Content/*/Dropdown/Noun', 'Track name'), album_title: this.$pgettext('Content/*/Dropdown/Noun', 'Album name'), artist_name: this.$pgettext('Content/*/Dropdown/Noun', 'Artist name'), - name: this.$pgettext('Content/Moderation/*/Noun', 'Name'), - size: this.$pgettext('Content/Library/*/Noun, in MB', 'Size'), - bitrate: this.$pgettext('Content/*/*', 'Bitrate'), + name: this.$pgettext('*/*/*/Noun', 'Name'), + size: this.$pgettext('Content/Library/*/in MB', 'Size'), + bitrate: this.$pgettext('Content/Track/*/Noun', 'Bitrate'), duration: this.$pgettext('Content/*/*', 'Duration'), - date_joined: this.$pgettext('Content/Profile/*/Noun', 'Sign-up date'), - last_activity: this.$pgettext('Content/Profile/*/Noun', 'Last activity'), - username: this.$pgettext('Content/Profile/*/Noun', 'Username'), + date_joined: this.$pgettext('Content/Admin/Table.Label/Noun', 'Sign-up date'), + last_activity: this.$pgettext('Content/Profile/Table.Label/Short, Noun (Value is a date)', 'Last activity'), + username: this.$pgettext('Content/*/*', 'Username'), domain: this.$pgettext('Content/Moderation/*/Noun', 'Domain'), - users: this.$pgettext('Content/Moderation/*/Noun', 'Users'), - received_messages: this.$pgettext('Content/Moderation/Dropdown/Noun', 'Received messages'), + users: this.$pgettext('*/*/*/Noun', 'Users'), + received_messages: this.$pgettext('Content/Moderation/*/Noun', 'Received messages'), uploads: this.$pgettext('Content/Moderation/Table.Label/Noun', 'Uploads'), followers: this.$pgettext('Content/Federation/*/Noun', 'Followers'), } diff --git a/front/src/components/moderation/FilterModal.vue b/front/src/components/moderation/FilterModal.vue index cdcedb800a5daa9294f52c64d1ce9f5bbc5f3edf..8885e61fc08f6f9a5dde2787c1ec77ad56afa2fe 100644 --- a/front/src/components/moderation/FilterModal.vue +++ b/front/src/components/moderation/FilterModal.vue @@ -37,7 +37,7 @@ </div> </div> <div class="actions"> - <div class="ui cancel button"><translate translate-context="Popup/*/Button.Label">Cancel</translate></div> + <div class="ui cancel button"><translate translate-context="*/*/Button.Label/Verb">Cancel</translate></div> <div :class="['ui', 'green', {loading: isLoading}, 'button']" @click="hide"><translate translate-context="Popup/*/Button.Label">Hide content</translate></div> </div> </modal> diff --git a/front/src/components/notifications/NotificationRow.vue b/front/src/components/notifications/NotificationRow.vue index 7843ae145088c2460ebdfd6a04ab2064ca9e28d7..b8e145647d03340fb62b8edc981f25179f341a9a 100644 --- a/front/src/components/notifications/NotificationRow.vue +++ b/front/src/components/notifications/NotificationRow.vue @@ -63,7 +63,7 @@ export default { action = { buttonClass: 'green', icon: 'check', - label: this.$pgettext('Content/Notifications/Button.Label/Short, Verb', 'Approve'), + label: this.$pgettext('Content/*/Button.Label/Verb', 'Approve'), handler: () => { self.approveLibraryFollow(a.related_object) } } } else { diff --git a/front/src/components/playlists/Editor.vue b/front/src/components/playlists/Editor.vue index 4c983cfb9beaff7437c5dccb60d5326fd93d99ef..d0eeae03ddb1d776f79513a9b4da99f726d575a6 100644 --- a/front/src/components/playlists/Editor.vue +++ b/front/src/components/playlists/Editor.vue @@ -38,12 +38,12 @@ </div> <dangerous-button :disabled="plts.length === 0" class="labeled right floated icon" color='yellow' :action="clearPlaylist"> - <i class="eraser icon"></i> <translate translate-context="Content/Playlist/Button.Label/Verb">Clear playlist</translate> + <i class="eraser icon"></i> <translate translate-context="*/Playlist/Button.Label/Verb">Clear playlist</translate> <p slot="modal-header"> <translate translate-context="Popup/Playlist/Title" :translate-params="{playlist: playlist.name}">Do you want to clear the playlist "%{ playlist }"?</translate> </p> <p slot="modal-content"><translate translate-context="Popup/Playlist/Paragraph">This will remove all tracks from this playlist and cannot be undone.</translate></p> - <div slot="modal-confirm"><translate translate-context="Popup/Playlist/Button.Label">Clear playlist</translate></div> + <div slot="modal-confirm"><translate translate-context="*/Playlist/Button.Label/Verb">Clear playlist</translate></div> </dangerous-button> <div class="ui hidden divider"></div> <template v-if="plts.length > 0"> diff --git a/front/src/components/playlists/PlaylistModal.vue b/front/src/components/playlists/PlaylistModal.vue index 0e8ac26945fdd70f8d36bd22655f8e5fc0f0be3f..ef6263d3c9b625c70f90a9a3d4b87ed2e686a483 100644 --- a/front/src/components/playlists/PlaylistModal.vue +++ b/front/src/components/playlists/PlaylistModal.vue @@ -29,9 +29,9 @@ <thead> <tr> <th></th> - <th><translate translate-context="*/*/Table.Label">Name</translate></th> + <th><translate translate-context="*/*/*/Noun">Name</translate></th> <th class="sorted descending"><translate translate-context="Popup/Playlist/Table.Label/Short">Last modification</translate></th> - <th><translate translate-context="*/*/Table.Label">Tracks</translate></th> + <th><translate translate-context="*/*/*/Noun">Tracks</translate></th> <th></th> </tr> </thead> @@ -61,7 +61,7 @@ </div> </div> <div class="actions"> - <div class="ui cancel button"><translate translate-context="Popup/Playlist/Button.Label">Cancel</translate></div> + <div class="ui cancel button"><translate translate-context="*/*/Button.Label/Verb">Cancel</translate></div> </div> </modal> </template> diff --git a/front/src/components/radios/Button.vue b/front/src/components/radios/Button.vue index 7662a5abeab214e743de268c5f607efe485b1577..e66f97ad5fafe1622e6a586c8e2d88155e87a766 100644 --- a/front/src/components/radios/Button.vue +++ b/front/src/components/radios/Button.vue @@ -1,8 +1,8 @@ <template> <button @click="toggleRadio" :class="['ui', 'blue', {'inverted': running}, 'icon', 'labeled', 'button']"> <i class="ui feed icon"></i> - <template v-if="running"><translate translate-context="Content/Radio/Button.Label/Short, Verb">Stop radio</translate></template> - <template v-else><translate translate-context="Content/Radio/Button.Label/Short, Verb">Start radio</translate></template> + <template v-if="running"><translate translate-context="*/Player/Button.Label/Short, Verb">Stop radio</translate></template> + <template v-else><translate translate-context="*/Queue/Button.Label/Short, Verb">Start radio</translate></template> </button> </template> diff --git a/front/src/components/radios/Card.vue b/front/src/components/radios/Card.vue index 38996bec3c0faa90ae3eaf577c8c2dab710a1c74..e72b9f1c1ca65cf6fd10020fe1b0b720de5a49f9 100644 --- a/front/src/components/radios/Card.vue +++ b/front/src/components/radios/Card.vue @@ -21,7 +21,7 @@ class="ui basic yellow button right floated" v-if="$store.state.auth.authenticated && type === 'custom' && radio.user.id === $store.state.auth.profile.id" :to="{name: 'library.radios.edit', params: {id: customRadioId }}"> - <translate translate-context="Content/Radio/Card.Button.Label/Short, Verb">Edit…</translate> + <translate translate-context="Content/*/Button.Label/Verb">Edit</translate> </router-link> </div> </div> diff --git a/front/src/edits.js b/front/src/edits.js index a57680bac533aab95c3fd49815e12c69ecf13949..ccc9c16b39ee27a357ba5f6545228fc1be900697 100644 --- a/front/src/edits.js +++ b/front/src/edits.js @@ -7,14 +7,14 @@ export default { id: 'title', type: 'text', required: true, - label: this.$pgettext('*/*/*/Short, Noun', 'Title'), + label: this.$pgettext('Content/Track/*/Noun', 'Title'), getValue: (obj) => { return obj.title } }, { id: 'license', type: 'text', required: false, - label: this.$pgettext('*/*/*/Short, Noun', 'License'), + label: this.$pgettext('Content/*/*/Noun', 'License'), getValue: (obj) => { return obj.license } }, { diff --git a/front/src/views/Notifications.vue b/front/src/views/Notifications.vue index 435a35017d0a6c76ba8544ba17dce9eb329ada48..648654c8fc1c02ede3fc86a94263bacb528f902e 100644 --- a/front/src/views/Notifications.vue +++ b/front/src/views/Notifications.vue @@ -73,7 +73,7 @@ export default { }), labels() { return { - title: this.$pgettext('Head/Notifications/Title', "Notifications") + title: this.$pgettext('*/Notifications/*', "Notifications") } } }, diff --git a/front/src/views/admin/Settings.vue b/front/src/views/admin/Settings.vue index 58031942d9b750257c7ea6bcb71f240b67bb1862..7102fb311b1b64fa9c63f160d026659ebe06a087 100644 --- a/front/src/views/admin/Settings.vue +++ b/front/src/views/admin/Settings.vue @@ -78,9 +78,9 @@ export default { groups() { // somehow, extraction fails if in the return block directly let instanceLabel = this.$pgettext('Content/Admin/Menu','Instance information') - let usersLabel = this.$pgettext('Content/Admin/Menu', 'Users') - let musicLabel = this.$pgettext('Content/Admin/Menu', 'Music') - let playlistsLabel = this.$pgettext('Content/Admin/Menu', 'Playlists') + let usersLabel = this.$pgettext('*/*/*/Noun', 'Users') + let musicLabel = this.$pgettext('*/*/*/Noun', 'Music') + let playlistsLabel = this.$pgettext('*/*/*', 'Playlists') let federationLabel = this.$pgettext('Content/Admin/Menu', 'Federation') let subsonicLabel = this.$pgettext('Content/Admin/Menu', 'Subsonic') let statisticsLabel = this.$pgettext('Content/Admin/Menu', 'Statistics') diff --git a/front/src/views/admin/library/Base.vue b/front/src/views/admin/library/Base.vue index efec7df66dd719b00f545a7f8a08574baa32cd7c..b521e8f6ece9232d9a8c92221de0e7d5af8ef2ac 100644 --- a/front/src/views/admin/library/Base.vue +++ b/front/src/views/admin/library/Base.vue @@ -3,7 +3,7 @@ <nav class="ui secondary pointing menu" role="navigation" :aria-label="labels.secondaryMenu"> <router-link class="ui item" - :to="{name: 'manage.library.edits'}"><translate translate-context="Menu/Admin/Link">Edits</translate></router-link> + :to="{name: 'manage.library.edits'}"><translate translate-context="*/Admin/*/Noun">Edits</translate></router-link> </nav> <router-view :key="$route.fullPath"></router-view> </div> @@ -14,7 +14,7 @@ export default { computed: { labels() { let title = this.$pgettext('Head/Admin/Title', 'Manage library') - let secondaryMenu = this.$gettext('Menu/*/Hidden text', 'Secondary menu') + let secondaryMenu = this.$pgettext('Menu/*/Hidden text', 'Secondary menu') return { title, secondaryMenu diff --git a/front/src/views/admin/library/EditsList.vue b/front/src/views/admin/library/EditsList.vue index e9b6d74d052ad408b0a13fea78f10013fa2aafd8..ec1ddb15e7e09374bb7c0d1622dad41814e3850e 100644 --- a/front/src/views/admin/library/EditsList.vue +++ b/front/src/views/admin/library/EditsList.vue @@ -21,7 +21,7 @@ export default { computed: { labels() { return { - title: this.$pgettext('Head/Admin/Title/Noun', 'Edits') + title: this.$pgettext('*/Admin/*/Noun', 'Edits') } } } diff --git a/front/src/views/admin/moderation/AccountsDetail.vue b/front/src/views/admin/moderation/AccountsDetail.vue index 189a24cd944322ab038ce04913018a30eb7480ae..c55b9e0b9a2c3850d9903c7d9e712b4a2e2c7884 100644 --- a/front/src/views/admin/moderation/AccountsDetail.vue +++ b/front/src/views/admin/moderation/AccountsDetail.vue @@ -16,7 +16,7 @@ <template v-if="object.user"> <span class="ui tiny teal icon label"> <i class="home icon"></i> - <translate translate-context="Content/Moderation/List item">Local account</translate> + <translate translate-context="Content/Moderation/*/Short, Noun">Local account</translate> </span> </template> @@ -91,7 +91,7 @@ </tr> <tr v-if="!object.user"> <td> - <translate translate-context="Content/*/*">Domain</translate> + <translate translate-context="Content/Moderation/*/Noun">Domain</translate> </td> <td> <router-link :to="{name: 'manage.moderation.domains.detail', params: {id: object.domain }}"> @@ -125,17 +125,17 @@ @change="updateUser('is_active')" v-model="object.user.is_active" type="checkbox"> <label> - <translate v-if="object.user.is_active" key="1" translate-context="Content/*/Label">Enabled</translate> - <translate v-else key="2" translate-context="Content/*/Label">Disabled</translate> + <translate v-if="object.user.is_active" key="1" translate-context="*/*/*">Enabled</translate> + <translate v-else key="2" translate-context="*/*/*">Disabled</translate> </label> </div> - <translate v-else-if="object.user.is_active" key="1" translate-context="Content/*/Label">Enabled</translate> - <translate v-else key="2" translate-context="Content/*/Label">Disabled</translate> + <translate v-else-if="object.user.is_active" key="1" translate-context="*/*/*">Enabled</translate> + <translate v-else key="2" translate-context="*/*/*">Disabled</translate> </td> </tr> <tr v-if="object.user"> <td> - <translate translate-context="Content/Moderation/Table.Label">Permissions</translate> + <translate translate-context="Content/Admin/Table.Label/Noun">Permissions</translate> </td> <td> <select @@ -157,7 +157,7 @@ </tr> <tr v-if="!object.user"> <td> - <translate translate-context="Content/*/Table.Label">First seen</translate> + <translate translate-context="Content/Moderation/Table.Label/Short (Value is a date)">First seen</translate> </td> <td> <human-date :date="object.creation_date"></human-date> @@ -174,7 +174,7 @@ </tr> <tr v-if="object.user"> <td> - <translate translate-context="Content/*/Table.Label">Sign-up date</translate> + <translate translate-context="Content/Admin/Table.Label/Noun">Sign-up date</translate> </td> <td> <human-date :date="object.user.date_joined"></human-date> @@ -182,7 +182,7 @@ </tr> <tr v-if="object.user"> <td> - <translate translate-context="Content/*/Table.Label">Last activity</translate> + <translate translate-context="Content/Profile/Table.Label/Short, Noun (Value is a date)">Last activity</translate> </td> <td> <human-date :date="object.user.last_activity"></human-date> @@ -286,7 +286,7 @@ </tr> <tr> <td> - <translate translate-context="Content/*/*">Total size</translate> + <translate translate-context="Content/Moderation/Table.Label">Total size</translate> </td> <td> {{ stats.media_total_size | humanSize }} @@ -295,7 +295,7 @@ <tr> <td> - <translate translate-context="Content/Moderation/Table.Label">Libraries</translate> + <translate translate-context="*/*/*/Noun">Libraries</translate> </td> <td> {{ stats.libraries }} @@ -311,7 +311,7 @@ </tr> <tr> <td> - <translate translate-context="Content/*/*">Artists</translate> + <translate translate-context="*/*/*/Noun">Artists</translate> </td> <td> {{ stats.artists }} @@ -319,7 +319,7 @@ </tr> <tr> <td> - <translate translate-context="Content/*/*">Albums</translate> + <translate translate-context="*/*/*">Albums</translate> </td> <td> {{ stats.albums}} @@ -327,7 +327,7 @@ </tr> <tr> <td> - <translate translate-context="Content/*/*">Tracks</translate> + <translate translate-context="*/*/*/Noun">Tracks</translate> </td> <td> {{ stats.tracks }} @@ -459,15 +459,15 @@ export default { return [ { code: "library", - label: this.$pgettext('Content/Moderation/Dropdown', "Library") + label: this.$pgettext('*/*/*', "Library") }, { code: "moderation", - label: this.$pgettext('Content/Moderation/Dropdown', "Moderation") + label: this.$pgettext('*/Moderation/*', "Moderation") }, { code: "settings", - label: this.$pgettext('Content/Moderation/Dropdown', "Settings") + label: this.$pgettext('*/*/*/Noun', "Settings") } ] } diff --git a/front/src/views/admin/moderation/AccountsList.vue b/front/src/views/admin/moderation/AccountsList.vue index 1fd937be5290a21babce4cd77ce23ba38234749d..1505619f5754cb5c1af761475d0f6688a9e2f2f5 100644 --- a/front/src/views/admin/moderation/AccountsList.vue +++ b/front/src/views/admin/moderation/AccountsList.vue @@ -1,7 +1,7 @@ <template> <main v-title="labels.accounts"> <section class="ui vertical stripe segment"> - <h2 class="ui header"><translate translate-context="Content/Moderation/Title">Accounts</translate></h2> + <h2 class="ui header"><translate translate-context="*/Moderation/Title">Accounts</translate></h2> <div class="ui hidden divider"></div> <accounts-table :update-url="true" :default-query="defaultQuery"></accounts-table> </section> @@ -21,7 +21,7 @@ export default { computed: { labels() { return { - accounts: this.$pgettext('Head/Moderation/Title', "Accounts") + accounts: this.$pgettext('*/Moderation/Title', "Accounts") } } } diff --git a/front/src/views/admin/moderation/Base.vue b/front/src/views/admin/moderation/Base.vue index 19b87b5e4ed80cdfdd68635c1fbcf20f5c08c211..564debf79ae8f7dcc42abe94e073511de237f1ac 100644 --- a/front/src/views/admin/moderation/Base.vue +++ b/front/src/views/admin/moderation/Base.vue @@ -3,10 +3,10 @@ <nav class="ui secondary pointing menu" role="navigation" :aria-label="labels.secondaryMenu"> <router-link class="ui item" - :to="{name: 'manage.moderation.domains.list'}"><translate translate-context="Menu/Moderation/Tab">Domains</translate></router-link> + :to="{name: 'manage.moderation.domains.list'}"><translate translate-context="*/Moderation/*/Noun">Domains</translate></router-link> <router-link class="ui item" - :to="{name: 'manage.moderation.accounts.list'}"><translate translate-context="Menu/Moderation/Tab">Accounts</translate></router-link> + :to="{name: 'manage.moderation.accounts.list'}"><translate translate-context="*/Moderation/Title">Accounts</translate></router-link> </nav> <router-view :key="$route.fullPath"></router-view> @@ -18,7 +18,7 @@ export default { computed: { labels() { return { - moderation: this.$pgettext('Head/Moderation/Title', "Moderation"), + moderation: this.$pgettext('*/Moderation/*', "Moderation"), secondaryMenu: this.$pgettext('Menu/*/Hidden text', "Secondary menu") } } diff --git a/front/src/views/admin/moderation/DomainsDetail.vue b/front/src/views/admin/moderation/DomainsDetail.vue index 75355ea07a3c6b65044ae5928bc7caa4b934a201..e0e2b5680c2e0e7fa62218873bd2f3f38ad93ce1 100644 --- a/front/src/views/admin/moderation/DomainsDetail.vue +++ b/front/src/views/admin/moderation/DomainsDetail.vue @@ -76,7 +76,7 @@ <tbody> <tr> <td> - <translate translate-context="Content/*/Table.Label">First seen</translate> + <translate translate-context="Content/Moderation/Table.Label/Short (Value is a date)">First seen</translate> </td> <td> <human-date :date="object.creation_date"></human-date> @@ -98,15 +98,15 @@ <translate translate-context="Content/Moderation/Table.Label">Software</translate> </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', $pgettext('*/*/*', 'N/A')) }} ({{ lodash.get(object, 'nodeinfo.payload.software.version', $pgettext('*/*/*', 'N/A')) }}) </td> </tr> <tr> <td> - <translate translate-context="Content/Moderation/Table.Label">Name</translate> + <translate translate-context="*/*/*/Noun">Name</translate> </td> <td> - {{ lodash.get(object, 'nodeinfo.payload.metadata.nodeName', $gettext('N/A')) }} + {{ lodash.get(object, 'nodeinfo.payload.metadata.nodeName', $pgettext('*/*/*', 'N/A')) }} </td> </tr> <tr> @@ -114,14 +114,14 @@ <translate translate-context="Content/*/*">Total users</translate> </td> <td> - {{ lodash.get(object, 'nodeinfo.payload.usage.users.total', $gettext('N/A')) }} + {{ lodash.get(object, 'nodeinfo.payload.usage.users.total', $pgettext('*/*/*', 'N/A')) }} </td> </tr> </template> <template v-if="object.nodeinfo && object.nodeinfo.status === 'error'"> <tr> <td> - <translate translate-context="Content/Moderation/Table.Label">Status</translate> + <translate translate-context="Content/Moderation/Table.Label (Value is Error message)">Status</translate> </td> <td> <translate translate-context="Content/Moderation/Table">Error while fetching node info</translate> @@ -231,7 +231,7 @@ </tr> <tr> <td> - <translate translate-context="Content/Moderation/Table.Label">Libraries</translate> + <translate translate-context="*/*/*/Noun">Libraries</translate> </td> <td> {{ stats.libraries }} @@ -247,7 +247,7 @@ </tr> <tr> <td> - <translate translate-context="Content/*/*">Artists</translate> + <translate translate-context="*/*/*/Noun">Artists</translate> </td> <td> {{ stats.artists }} @@ -255,7 +255,7 @@ </tr> <tr> <td> - <translate translate-context="Content/*/*">Albums</translate> + <translate translate-context="*/*/*">Albums</translate> </td> <td> {{ stats.albums}} @@ -263,7 +263,7 @@ </tr> <tr> <td> - <translate translate-context="Content/*/*">Tracks</translate> + <translate translate-context="*/*/*/Noun">Tracks</translate> </td> <td> {{ stats.tracks }} diff --git a/front/src/views/admin/moderation/DomainsList.vue b/front/src/views/admin/moderation/DomainsList.vue index f39d1bfbd45364c942541875e75d7ce25042dae3..3ce8e6afc44a2e653bc5ecb88a6837c3d80181d9 100644 --- a/front/src/views/admin/moderation/DomainsList.vue +++ b/front/src/views/admin/moderation/DomainsList.vue @@ -1,7 +1,7 @@ <template> <main v-title="labels.domains"> <section class="ui vertical stripe segment"> - <h2 class="ui left floated header"><translate translate-context="Content/Moderation/Title">Domains</translate></h2> + <h2 class="ui left floated header"><translate translate-context="*/Moderation/*/Noun">Domains</translate></h2> <form class="ui right floated form" @submit.prevent="createDomain"> <div v-if="errors && errors.length > 0" class="ui negative message"> <div class="header"><translate translate-context="Content/Moderation/Message.Title">Error while creating domain</translate></div> @@ -45,7 +45,7 @@ export default { computed: { labels() { return { - domains: this.$pgettext('Head/Moderation/Title', "Domains") + domains: this.$pgettext('*/Moderation/*/Noun', "Domains") } } }, diff --git a/front/src/views/admin/users/Base.vue b/front/src/views/admin/users/Base.vue index e1fa6f22e32eea65da64fbc30b5b662eb9d68964..84d70bebb6cbc5c9afbaebbd3b6e0c25d90dd38d 100644 --- a/front/src/views/admin/users/Base.vue +++ b/front/src/views/admin/users/Base.vue @@ -3,10 +3,10 @@ <nav class="ui secondary pointing menu" role="navigation" :aria-label="labels.secondaryMenu"> <router-link class="ui item" - :to="{name: 'manage.users.users.list'}"><translate translate-context="*/Admin/Link">Users</translate></router-link> + :to="{name: 'manage.users.users.list'}"><translate translate-context="*/*/*/Noun">Users</translate></router-link> <router-link class="ui item" - :to="{name: 'manage.users.invitations.list'}"><translate translate-context="Menu/Admin/Link">Invitations</translate></router-link> + :to="{name: 'manage.users.invitations.list'}"><translate translate-context="*/Admin/*/Noun">Invitations</translate></router-link> </nav> <router-view :key="$route.fullPath"></router-view> </div> diff --git a/front/src/views/admin/users/InvitationsList.vue b/front/src/views/admin/users/InvitationsList.vue index 4e3920c50915478eda7004768a11f9a9fb9f4a49..5071dc6618f30149e90e6ad81614390bc8054a0f 100644 --- a/front/src/views/admin/users/InvitationsList.vue +++ b/front/src/views/admin/users/InvitationsList.vue @@ -1,7 +1,7 @@ <template> <main v-title="labels.invitations"> <section class="ui vertical stripe segment"> - <h2 class="ui header"><translate translate-context="*/Admin/Title">Invitations</translate></h2> + <h2 class="ui header">{{ labels.invitations }}</h2> <invitation-form></invitation-form> <div class="ui hidden divider"></div> <invitations-table></invitations-table> @@ -21,7 +21,7 @@ export default { computed: { labels() { return { - invitations: this.$pgettext('*/Admin/Title', 'Invitations') + invitations: this.$pgettext('*/Admin/*/Noun', 'Invitations') } } } diff --git a/front/src/views/admin/users/UsersList.vue b/front/src/views/admin/users/UsersList.vue index fc307074ca62bfc6e6b2070eb1b0e73eaa57bd41..781a2e2d11bd500a2324c80d8afb2fd8405160d3 100644 --- a/front/src/views/admin/users/UsersList.vue +++ b/front/src/views/admin/users/UsersList.vue @@ -1,7 +1,7 @@ <template> <main v-title="labels.users"> <section class="ui vertical stripe segment"> - <h2 class="ui header"><translate translate-context="*/Admin/Title">Users</translate></h2> + <h2 class="ui header">{{ labels.users }}</h2> <div class="ui hidden divider"></div> <users-table></users-table> </section> @@ -18,7 +18,7 @@ export default { computed: { labels() { return { - users: this.$pgettext('*/Admin/Title', 'Users') + users: this.$pgettext('*/*/*/Noun', 'Users') } } } diff --git a/front/src/views/auth/EmailConfirm.vue b/front/src/views/auth/EmailConfirm.vue index 9b11c4efd2cefc64e2ab72f14d315470eae73bab..466a13c9fa899b15816c077882a3b524880342fe 100644 --- a/front/src/views/auth/EmailConfirm.vue +++ b/front/src/views/auth/EmailConfirm.vue @@ -2,7 +2,7 @@ <main class="main pusher" v-title="labels.confirm"> <section class="ui vertical stripe segment"> <div class="ui small text container"> - <h2><translate translate-context="Content/Signup/Title">Confirm your e-mail address</translate></h2> + <h2>{{ labels.confirm }}</h2> <form v-if="!success" class="ui form" @submit.prevent="submit()"> <div v-if="errors.length > 0" class="ui negative message"> <div class="header"><translate translate-context="Content/Signup/Paragraph">Could not confirm your e-mail address</translate></div> @@ -18,7 +18,7 @@ <translate translate-context="Content/Signup/Link/Verb">Return to login</translate> </router-link> <button :class="['ui', {'loading': isLoading}, 'right', 'floated', 'green', 'button']" type="submit"> - <translate translate-context="Content/Signup/Button.Label/Verb">Confirm your e-mail address</translate></button> + {{ labels.confirm }}</button> </form> <div v-else class="ui positive message"> <div class="header"><translate translate-context="Content/Signup/Message">E-mail address confirmed</translate></div> diff --git a/front/src/views/auth/PasswordReset.vue b/front/src/views/auth/PasswordReset.vue index 8b304fac476417a77928ad074b11162a961498bf..b1aab6f855699955419f0cd29df95fb6d18fbce9 100644 --- a/front/src/views/auth/PasswordReset.vue +++ b/front/src/views/auth/PasswordReset.vue @@ -2,7 +2,7 @@ <main class="main pusher" v-title="labels.reset"> <section class="ui vertical stripe segment"> <div class="ui small text container"> - <h2><translate translate-context="Content/Signup/Title">Reset your password</translate></h2> + <h2><translate translate-context="*/Login/*/Verb">Reset your password</translate></h2> <form class="ui form" @submit.prevent="submit()"> <div v-if="errors.length > 0" class="ui negative message"> <div class="header"><translate translate-context="Content/Signup/Card.Title">Error while asking for a password reset</translate></div> @@ -50,7 +50,7 @@ export default { }, computed: { labels() { - let reset = this.$pgettext('Head/Signup/Title', "Reset your password") + let reset = this.$pgettext('*/Login/*/Verb', "Reset your password") let placeholder = this.$pgettext('Content/Signup/Input.Placeholder', "Enter the email address binded to your account" ) return { diff --git a/front/src/views/auth/PasswordResetConfirm.vue b/front/src/views/auth/PasswordResetConfirm.vue index 2ed96a986c65fb4364481fce6882a7e4bf2f7cdb..c2a7c677818059cccd84cc2986fdb732a18cdea3 100644 --- a/front/src/views/auth/PasswordResetConfirm.vue +++ b/front/src/views/auth/PasswordResetConfirm.vue @@ -2,7 +2,7 @@ <main class="main pusher" v-title="labels.changePassword"> <section class="ui vertical stripe segment"> <div class="ui small text container"> - <h2><translate translate-context="Content/Signup/Title">Change your password</translate></h2> + <h2>{{ labels.changePassword }}</h2> <form v-if="!success" class="ui form" @submit.prevent="submit()"> <div v-if="errors.length > 0" class="ui negative message"> <div class="header"><translate translate-context="Content/Signup/Card.Title">Error while changing your password</translate></div> @@ -12,7 +12,7 @@ </div> <template v-if="token && uid"> <div class="field"> - <label><translate translate-context="Content/Signup/Input.Label">New password</translate></label> + <label><translate translate-context="Content/Settings/Input.Label">New password</translate></label> <password-input v-model="newPassword" /> </div> <router-link :to="{path: '/login'}"> @@ -59,7 +59,7 @@ export default { computed: { labels() { return { - changePassword: this.$pgettext('Head/Signup/Title', "Change your password") + changePassword: this.$pgettext('*/Signup/Title', "Change your password") } } }, diff --git a/front/src/views/content/Base.vue b/front/src/views/content/Base.vue index c6523b744a92917cbcbcd0a330005698c3db9742..4e755ee1a8790c1311d7c0a542f44582758f56e2 100644 --- a/front/src/views/content/Base.vue +++ b/front/src/views/content/Base.vue @@ -3,10 +3,10 @@ <nav class="ui secondary pointing menu" role="navigation" :aria-label="labels.secondaryMenu"> <router-link class="ui item" - :to="{name: 'content.libraries.index'}"><translate translate-context="Menu/Library/Tab.Link">Libraries</translate></router-link> + :to="{name: 'content.libraries.index'}"><translate translate-context="*/*/*/Noun">Libraries</translate></router-link> <router-link class="ui item" - :to="{name: 'content.libraries.files'}"><translate translate-context="Menu/Library/Tab.Link">Tracks</translate></router-link> + :to="{name: 'content.libraries.files'}"><translate translate-context="*/*/*/Noun">Tracks</translate></router-link> </nav> <router-view :key="$route.fullPath"></router-view> </main> @@ -15,7 +15,7 @@ export default { computed: { labels() { - let title = this.$pgettext('Head/Library/Title', "Add content") + let title = this.$pgettext('*/Library/*/Verb', "Add content") let secondaryMenu = this.$pgettext('Menu/*/Hidden text', "Secondary menu") return { title, diff --git a/front/src/views/content/libraries/Card.vue b/front/src/views/content/libraries/Card.vue index 5af71c4f60d9ab23318cc40476d743619ac6eaec..bd940083e084f085f2d4f3c40827c32a7e918719 100644 --- a/front/src/views/content/libraries/Card.vue +++ b/front/src/views/content/libraries/Card.vue @@ -37,7 +37,7 @@ {{ library.size | humanSize }} </span> <i class="music icon"></i> - <translate translate-context="Content/Library/Card.List item" :translate-params="{count: library.uploads_count}" :translate-n="library.uploads_count" translate-plural="%{ count } tracks">%{ count } track</translate> + <translate translate-context="*/*/*" :translate-params="{count: library.uploads_count}" :translate-n="library.uploads_count" translate-plural="%{ count } tracks">%{ count } track</translate> </div> </div> <div class="ui bottom basic attached buttons"> diff --git a/front/src/views/content/libraries/Detail.vue b/front/src/views/content/libraries/Detail.vue index c3f6f0cb087e0a2284cebafcd2bbbd3ed79f004a..d879ab71c7731ae9e1aae82f0f3fc2197675267c 100644 --- a/front/src/views/content/libraries/Detail.vue +++ b/front/src/views/content/libraries/Detail.vue @@ -5,9 +5,9 @@ </div> <detail-area v-else :library="library"> <div class="ui top attached tabular menu"> - <a :class="['item', {active: currentTab === 'follows'}]" @click="currentTab = 'follows'"><translate translate-context="Content/Library/Tab.Title">Followers</translate></a> - <a :class="['item', {active: currentTab === 'tracks'}]" @click="currentTab = 'tracks'"><translate translate-context="*/*/*">Tracks</translate></a> - <a :class="['item', {active: currentTab === 'edit'}]" @click="currentTab = 'edit'"><translate translate-context="*/*/*/Verb">Edit</translate></a> + <a :class="['item', {active: currentTab === 'follows'}]" @click="currentTab = 'follows'"><translate translate-context="Content/Federation/*/Noun">Followers</translate></a> + <a :class="['item', {active: currentTab === 'tracks'}]" @click="currentTab = 'tracks'"><translate translate-context="*/*/*/Noun">Tracks</translate></a> + <a :class="['item', {active: currentTab === 'edit'}]" @click="currentTab = 'edit'"><translate translate-context="Content/*/Button.Label/Verb">Edit</translate></a> </div> <div :class="['ui', 'bottom', 'attached', 'segment', {hidden: currentTab != 'follows'}]"> <div class="ui form"> @@ -26,7 +26,7 @@ <tr> <th><translate translate-context="Content/Library/Table.Label">User</translate></th> <th><translate translate-context="Content/Library/Table.Label">Date</translate></th> - <th><translate translate-context="Content/Library/Table.Label">Status</translate></th> + <th><translate translate-context="Content/Library.Federation/Table.Label (Value is Approved/Rejected)">Status</translate></th> <th><translate translate-context="Content/Library/Table.Label">Action</translate></th> </tr> </thead> @@ -41,7 +41,7 @@ <translate translate-context="Content/Library/Table/Short">Accepted</translate> </span> <span :class="['ui', 'red', 'basic', 'label']" v-else-if="follow.approved === false"> - <translate translate-context="Content/Library/Table/Short">Rejected</translate> + <translate translate-context="Content/Library/*/Short">Rejected</translate> </span> </td> <td> diff --git a/front/src/views/content/libraries/FilesTable.vue b/front/src/views/content/libraries/FilesTable.vue index 9d76607140d645f3df3d0203ab4d7b9797896dec..e630373a2ee5539744677df89bfe4a23025bd5fc 100644 --- a/front/src/views/content/libraries/FilesTable.vue +++ b/front/src/views/content/libraries/FilesTable.vue @@ -3,23 +3,23 @@ <div class="ui inline form"> <div class="fields"> <div class="ui six wide field"> - <label><translate translate-context="Content/Library/Input.Label/Verb">Search</translate></label> + <label><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label> <form @submit.prevent="search.query = $refs.search.value"> <input name="search" ref="search" type="text" :value="search.query" :placeholder="labels.searchPlaceholder" /> </form> </div> <div class="field"> - <label><translate translate-context="Content/Library/Dropdown.Label/Noun">Import status</translate></label> + <label><translate translate-context="Content/Library/*/Noun">Import status</translate></label> <select class="ui dropdown" @change="addSearchToken('status', $event.target.value)" :value="getTokenValue('status', '')"> - <option value=""><translate translate-context="Content/Library/Dropdown">All</translate></option> - <option value="pending"><translate translate-context="Content/Library/Dropdown">Pending</translate></option> - <option value="skipped"><translate translate-context="Content/Library/Dropdown">Skipped</translate></option> + <option value=""><translate translate-context="Content/*/Dropdown">All</translate></option> + <option value="pending"><translate translate-context="Content/Library/*/Short">Pending</translate></option> + <option value="skipped"><translate translate-context="Content/Library/*">Skipped</translate></option> <option value="errored"><translate translate-context="Content/Library/Dropdown">Failed</translate></option> - <option value="finished"><translate translate-context="Content/Library/Dropdown">Finished</translate></option> + <option value="finished"><translate translate-context="Content/Library/*">Finished</translate></option> </select> </div> <div class="field"> - <label><translate translate-context="Content/Library/Dropdown.Label/Noun">Ordering</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Ordering</translate></label> <select class="ui dropdown" v-model="ordering"> <option v-for="option in orderingOptions" :value="option[0]"> {{ sharedLabels.filters[option[1]] }} @@ -27,10 +27,10 @@ </select> </div> <div class="field"> - <label><translate translate-context="Content/Library/Dropdown.Label/Noun">Ordering direction</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Ordering direction</translate></label> <select class="ui dropdown" v-model="orderingDirection"> - <option value="+"><translate translate-context="Content/Library/Dropdown">Ascending</translate></option> - <option value="-"><translate translate-context="Content/Library/Dropdown">Descending</translate></option> + <option value="+"><translate translate-context="Content/Search/Dropdown">Ascending</translate></option> + <option value="-"><translate translate-context="Content/Search/Dropdown">Descending</translate></option> </select> </div> </div> @@ -52,13 +52,13 @@ @refresh="fetchData" :filters="actionFilters"> <template slot="header-cells"> - <th><translate translate-context="*/*/*">Title</translate></th> - <th><translate translate-context="*/*/*">Artist</translate></th> + <th><translate translate-context="Content/Track/*/Noun">Title</translate></th> + <th><translate translate-context="*/*/*/Noun">Artist</translate></th> <th><translate translate-context="*/*/*">Album</translate></th> <th><translate translate-context="*/*/*/Noun">Upload date</translate></th> - <th><translate translate-context="*/*/*/Noun">Import status</translate></th> - <th><translate translate-context="*/*/*">Duration</translate></th> - <th><translate translate-context="*/*/*">Size</translate></th> + <th><translate translate-context="Content/Library/*/Noun">Import status</translate></th> + <th><translate translate-context="Content/*/*">Duration</translate></th> + <th><translate translate-context="Content/Library/*/in MB">Size</translate></th> </template> <template slot="row-cells" slot-scope="scope"> <template v-if="scope.obj.track"> @@ -112,7 +112,7 @@ ></pagination> <span v-if="result && result.results.length > 0"> - <translate translate-context="Content/Library/Paragraph" + <translate translate-context="Content/*/Paragraph" :translate-params="{start: ((page-1) * paginateBy) + 1, end: ((page-1) * paginateBy) + result.results.length, total: result.count}"> Showing results %{ start }-%{ end } on %{ total } </translate> @@ -201,11 +201,11 @@ export default { searchPlaceholder: this.$pgettext('Content/Library/Input.Placeholder', 'Search by title, artist, album…'), importStatuses: { skipped: { - label: this.$pgettext('Content/Library/Table/Short', 'Skipped'), + label: this.$pgettext('Content/Library/*', 'Skipped'), help: this.$pgettext('Content/Library/Help text', 'This track is already present in one of your libraries'), }, pending: { - label: this.$pgettext('Content/Library/Table/Short', 'Pending'), + label: this.$pgettext('Content/Library/*/Short', 'Pending'), help: this.$pgettext('Content/Library/Help text', 'This track has been uploaded, but hasn\'t been processed by the server yet'), }, errored: { @@ -213,7 +213,7 @@ export default { help: this.$pgettext('Content/Library/Help text', 'This track could not be processed, please it is tagged correctly'), }, finished: { - label: this.$pgettext('Content/Library/Table/Short', 'Finished'), + label: this.$pgettext('Content/Library/*', 'Finished'), help: this.$pgettext('Content/Library/Help text', 'Imported'), }, } @@ -230,7 +230,7 @@ export default { } }, actions () { - let deleteMsg = this.$pgettext('Content/Library/Dropdown/Verb', 'Delete') + let deleteMsg = this.$pgettext('*/*/*/Verb', 'Delete') let relaunchMsg = this.$pgettext('Content/Library/Dropdown/Verb', 'Restart import') return [ { diff --git a/front/src/views/content/libraries/Form.vue b/front/src/views/content/libraries/Form.vue index c269e27212cb6a95ae301ae7443a00a320887379..93530df41b875cf80c61883eaad6389b92dbc8c0 100644 --- a/front/src/views/content/libraries/Form.vue +++ b/front/src/views/content/libraries/Form.vue @@ -2,17 +2,17 @@ <form class="ui form" @submit.prevent="submit"> <p v-if="!library"><translate translate-context="Content/Library/Paragraph">Libraries help you organize and share your music collections. You can upload your own music collection to Funkwhale and share it with your friends and family.</translate></p> <div v-if="errors.length > 0" class="ui negative message"> - <div class="header"><translate translate-context="Content/Library/Error message.Title">Error</translate></div> + <div class="header"><translate translate-context="Content/*/Error message.Title">Error</translate></div> <ul class="list"> <li v-for="error in errors">{{ error }}</li> </ul> </div> <div class="required field"> - <label><translate translate-context="Content/Library/Input.Label">Name</translate></label> + <label><translate translate-context="*/*/*/Noun">Name</translate></label> <input name="name" v-model="currentName" :placeholder="labels.namePlaceholder" required maxlength="100"> </div> <div class="field"> - <label><translate translate-context="Content/Library/Input.Label">Description</translate></label> + <label><translate translate-context="Content/*/Input.Label/Noun">Description</translate></label> <textarea v-model="currentDescription" :placeholder="labels.descriptionPlaceholder" maxlength="2000"></textarea> </div> <div class="field"> @@ -27,7 +27,7 @@ <translate translate-context="Content/Library/Button.Label/Verb" v-else>Create library</translate> </button> <dangerous-button v-if="library" class="right floated basic button" color='red' @confirm="remove()"> - <translate translate-context="Content/Library/Button.Label/Verb">Delete</translate> + <translate translate-context="*/*/*/Verb">Delete</translate> <p slot="modal-header"> <translate translate-context="Popup/Library/Title">Delete this library?</translate> </p> diff --git a/front/src/views/content/libraries/Quota.vue b/front/src/views/content/libraries/Quota.vue index fc6a8db284d117e99cbf86f95bf386c90b2b3979..687a825cf78e1d89b5770c98a7cfced695cead7e 100644 --- a/front/src/views/content/libraries/Quota.vue +++ b/front/src/views/content/libraries/Quota.vue @@ -34,10 +34,10 @@ color="grey" class="basic tiny" :action="purgePendingFiles"> - <translate translate-context="Content/Library/Button.Label/Verb">Purge</translate> + <translate translate-context="*/*/*/Verb">Purge</translate> <p slot="modal-header"><translate translate-context="Popup/Library/Title">Purge pending files?</translate></p> <p slot="modal-content"><translate translate-context="Popup/Library/Paragraph">Removes uploaded but yet to be processed tracks completely, adding the corresponding data to your quota.</translate></p> - <div slot="modal-confirm"><translate translate-context="Popup/Library/Button.Label">Purge</translate></div> + <div slot="modal-confirm"><translate translate-context="*/*/*/Verb">Purge</translate></div> </dangerous-button> </div> </div> @@ -60,10 +60,10 @@ color="grey" class="basic tiny" :action="purgeSkippedFiles"> - <translate translate-context="Content/Library/Button.Label/Verb">Purge</translate> + <translate translate-context="*/*/*/Verb">Purge</translate> <p slot="modal-header"><translate translate-context="Popup/Library/Title">Purge skipped files?</translate></p> <p slot="modal-content"><translate translate-context="Popup/Library/Paragraph">Removes uploaded tracks skipped during the import processes completely, adding the corresponding data to your quota.</translate></p> - <div slot="modal-confirm"><translate translate-context="Popup/Library/Button.Label">Purge</translate></div> + <div slot="modal-confirm"><translate translate-context="*/*/*/Verb">Purge</translate></div> </dangerous-button> </div> </div> @@ -86,10 +86,10 @@ color="grey" class="basic tiny" :action="purgeErroredFiles"> - <translate translate-context="Content/Library/Button.Label/Verb">Purge</translate> + <translate translate-context="*/*/*/Verb">Purge</translate> <p slot="modal-header"><translate translate-context="Popup/Library/Title">Purge errored files?</translate></p> <p slot="modal-content"><translate translate-context="Popup/Library/Paragraph">Removes uploaded tracks that could not be processed by the server completely, adding the corresponding data to your quota.</translate></p> - <div slot="modal-confirm"><translate translate-context="Popup/Library/Button.Label">Purge</translate></div> + <div slot="modal-confirm"><translate translate-context="*/*/*/Verb">Purge</translate></div> </dangerous-button> </div> </div> diff --git a/front/src/views/content/remote/Card.vue b/front/src/views/content/remote/Card.vue index 3bbdfa518ef12cc2c1a5f251749d7cb2547d0f7c..7c3637e4db73b8f7bb300f097d6e8eacb151c1f7 100644 --- a/front/src/views/content/remote/Card.vue +++ b/front/src/views/content/remote/Card.vue @@ -24,7 +24,7 @@ </div> <div class="meta"> <i class="music icon"></i> - <translate translate-context="Content/Library/Card.List item" :translate-params="{count: library.uploads_count}" :translate-n="library.uploads_count" translate-plural="%{ count } tracks">%{ count } track</translate> + <translate translate-context="*/*/*" :translate-params="{count: library.uploads_count}" :translate-n="library.uploads_count" translate-plural="%{ count } tracks">%{ count } track</translate> </div> <div v-if="displayScan && latestScan" class="meta"> <template v-if="latestScan.status === 'pending'"> @@ -48,7 +48,7 @@ <translate translate-context="Content/Library/Card.List item">Scanned with errors</translate> </template> <span class="link right floated" @click="showScan = !showScan"> - <translate translate-context="Content/Library/Card.Link">Details</translate> + <translate translate-context="Content/Library/Card.Button.Label/Noun">Details</translate> <i v-if="showScan" class="angle down icon" /> <i v-else class="angle right icon" /> </span> @@ -98,12 +98,12 @@ color="" :class="['ui', 'button']" :action="unfollow"> - <translate translate-context="Content/Library/Card.Button.Label/Verb">Unfollow</translate> + <translate translate-context="*/Library/Button.Label/Verb">Unfollow</translate> <p slot="modal-header"><translate translate-context="Popup/Library/Title">Unfollow this library?</translate></p> <div slot="modal-content"> <p><translate translate-context="Popup/Library/Paragraph">By unfollowing this library, you loose access to its content.</translate></p> </div> - <div slot="modal-confirm"><translate translate-context="Popup/Library/Button.Label">Unfollow</translate></div> + <div slot="modal-confirm"><translate translate-context="*/Library/Button.Label/Verb">Unfollow</translate></div> </dangerous-button> </div> </div> diff --git a/front/src/views/content/remote/Home.vue b/front/src/views/content/remote/Home.vue index 1e74ff6a3a5439c1fb78c64c45d1058598492866..35d56cd95c2642f4b480353739a915020ee51fcf 100644 --- a/front/src/views/content/remote/Home.vue +++ b/front/src/views/content/remote/Home.vue @@ -13,7 +13,7 @@ </div> <template v-if="existingFollows && existingFollows.count > 0"> <h2><translate translate-context="Content/Library/Title">Known libraries</translate></h2> - <i @click="fetch()" :class="['ui', 'circular', 'refresh', 'icon']" /> <translate translate-context="Content/Library/Button.Label">Refresh</translate> + <i @click="fetch()" :class="['ui', 'circular', 'refresh', 'icon']" /> <translate translate-context="Content/*/Button.Label/Short, Verb">Refresh</translate> <div class="ui hidden divider"></div> <div class="ui two cards"> <library-card diff --git a/front/src/views/playlists/Detail.vue b/front/src/views/playlists/Detail.vue index a2430433fccf1a957c7569c99cc8f2f44d5be361..35a277440e662aba199fd2bd76f094486c8d3e95 100644 --- a/front/src/views/playlists/Detail.vue +++ b/front/src/views/playlists/Detail.vue @@ -22,17 +22,17 @@ </div> </h2> <div class="ui hidden divider"></div> - <play-button class="orange" :is-playable="playlist.is_playable" :tracks="tracks"><translate translate-context="Content/*/Button.Label/Verb, Short">Play all</translate></play-button> + <play-button class="orange" :is-playable="playlist.is_playable" :tracks="tracks"><translate translate-context="Content/Queue/Button.Label/Short, Verb">Play all</translate></play-button> <button class="ui icon labeled button" v-if="$store.state.auth.profile && playlist.user.id === $store.state.auth.profile.id" @click="edit = !edit"> <i class="pencil icon"></i> <template v-if="edit"><translate translate-context="Content/Playlist/Button.Label/Verb">End edition</translate></template> - <template v-else><translate translate-context="Content/*/Button.Label/Verb">Edit…</translate></template> + <template v-else><translate translate-context="Content/*/Button.Label/Verb">Edit</translate></template> </button> <dangerous-button v-if="$store.state.auth.profile && playlist.user.id === $store.state.auth.profile.id" class="labeled icon" :action="deletePlaylist"> - <i class="trash icon"></i> <translate translate-context="Content/*/Button.Label/Verb">Delete</translate> + <i class="trash icon"></i> <translate translate-context="*/*/*/Verb">Delete</translate> <p slot="modal-header"> <translate :translate-params="{playlist: playlist.name}" translate-context="Popup/Playlist/Title/Call to action">Do you want to delete the playlist "%{ playlist }"?</translate> </p> @@ -49,7 +49,7 @@ :playlist="playlist" :playlist-tracks="playlistTracks"></playlist-editor> </template> <template v-else> - <h2><translate translate-context="Content/*/Title/Name">Tracks</translate></h2> + <h2><translate translate-context="*/*/*/Noun">Tracks</translate></h2> <track-table :display-position="true" :tracks="tracks"></track-table> </template> </section> @@ -88,7 +88,7 @@ export default { computed: { labels() { return { - playlist: this.$gettext('Playlist') + playlist: this.$pgettext('Head/Playlist/Title', 'Playlist') } } }, diff --git a/front/src/views/playlists/List.vue b/front/src/views/playlists/List.vue index 74b584f96b3029f38a377492846869843c50e7c9..160b7b83c3785ee44bb3b449c97ef99bc54a756b 100644 --- a/front/src/views/playlists/List.vue +++ b/front/src/views/playlists/List.vue @@ -11,11 +11,11 @@ </template> <div class="fields"> <div class="field"> - <label><translate translate-context="Content/*/Form.Label/Short, Noun">Search</translate></label> + <label><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label> <input type="text" name="search" v-model="query" :placeholder="labels.searchPlaceholder"/> </div> <div class="field"> - <label><translate translate-context="Content/*/Dropdown.Label/Short, Noun">Ordering</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Ordering</translate></label> <select class="ui dropdown" v-model="ordering"> <option v-for="option in orderingOptions" :value="option[0]"> {{ sharedLabels.filters[option[1]] }} @@ -23,14 +23,14 @@ </select> </div> <div class="field"> - <label><translate translate-context="Content/*/Dropdown.Label/Short, Noun">Order</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Order</translate></label> <select class="ui dropdown" v-model="orderingDirection"> - <option value="+"><translate translate-context="Content/*/Dropdown/Short">Ascending</translate></option> - <option value="-"><translate translate-context="Content/*/Dropdown/Short">Descending</translate></option> + <option value="+"><translate translate-context="Content/Search/Dropdown">Ascending</translate></option> + <option value="-"><translate translate-context="Content/Search/Dropdown">Descending</translate></option> </select> </div> <div class="field"> - <label><translate translate-context="Content/*/Dropdown.Label/Short, Noun">Results per page</translate></label> + <label><translate translate-context="Content/Search/Dropdown.Label/Noun">Results per page</translate></label> <select class="ui dropdown" v-model="paginateBy"> <option :value="parseInt(12)">12</option> <option :value="parseInt(25)">25</option> @@ -103,7 +103,7 @@ export default { }, computed: { labels() { - let playlists = this.$pgettext('Head/Playlist/Title/Noun', 'Playlists') + let playlists = this.$pgettext('*/*/*', 'Playlists') let searchPlaceholder = this.$pgettext('Content/Playlist/Placeholder/Call to action', 'Enter playlist name…') return { playlists, diff --git a/front/src/views/radios/Detail.vue b/front/src/views/radios/Detail.vue index 615265ac969ada00eb13044ff8ab722962237c58..c350cb1f9f4b29ba65de3852ae2dbcb3e9562a08 100644 --- a/front/src/views/radios/Detail.vue +++ b/front/src/views/radios/Detail.vue @@ -32,7 +32,7 @@ </div> </section> <section class="ui vertical stripe segment"> - <h2><translate translate-context="Content/*/*">Tracks</translate></h2> + <h2><translate translate-context="*/*/*/Noun">Tracks</translate></h2> <track-table :tracks="tracks"></track-table> <div class="ui center aligned basic segment"> <pagination