Made translations variables more descriptive

This commit is contained in:
RemixDev
2020-09-06 12:17:35 +02:00
parent d1105901ed
commit 65036d98b1
25 changed files with 194 additions and 194 deletions

View File

@@ -95,7 +95,7 @@ export default {
downloadQualities.forEach((quality, index) => {
options[quality.objName] = {
label: `${this.$t('globals.download', [quality.label])}`,
label: `${this.$t('globals.download', {thing: quality.label})}`,
show: false,
position: nextValuePosition + index,
action: this.tryToDownloadTrack.bind(null, quality.value)
@@ -313,4 +313,4 @@ button {
border: unset;
}
}
</style>
</style>

View File

@@ -127,7 +127,7 @@ export default {
item.silent = true
this.addToQueue(item)
});
toast(this.$t('toasts.addedMoreToQueue', [queueItem.length]), 'playlist_add_check')
toast(this.$t('toasts.addedMoreToQueue', {n: queueItem.length}), 'playlist_add_check')
return
}else{
queueItem = queueItem[0]
@@ -205,7 +205,7 @@ export default {
}
if (!queueItem.silent) {
toast(this.$t('toasts.addedToQueue', [queueItem.title]), 'playlist_add_check')
toast(this.$t('toasts.addedToQueue', {item: queueItem.title}), 'playlist_add_check')
}
},
updateQueue(update) {
@@ -302,7 +302,7 @@ export default {
},
finishDownload(uuid) {
if (this.queue.indexOf(uuid) > -1) {
toast(this.$t('toasts.finishDownload', [this.queueList[uuid].title]), 'done')
toast(this.$t('toasts.finishDownload', {item: this.queueList[uuid].title}), 'done')
$('#bar_' + uuid).css('width', '100%')

View File

@@ -1,6 +1,6 @@
<template>
<div id="errors_tab" class="main_tabcontent">
<h1>{{ $t('errors.title', [title]) }}</h1>
<h1>{{ $t('errors.title', {name: title}) }}</h1>
<table class="table table--tracklist">
<tr>
<th>ID</th>

View File

@@ -47,7 +47,7 @@
</div>
<p class="primary-text">{{ release.title }}</p>
<p class="secondary-text">
{{ `${$t('globals.by', [release.creator.name])} - ${$tc('globals.listTabs.trackN', release.nb_tracks)}` }}
{{ `${$t('globals.by', {artist: release.creator.name})} - ${$tc('globals.listTabs.trackN', release.nb_tracks)}` }}
</p>
</div>
<div
@@ -70,7 +70,7 @@
</div>
<p class="primary-text">{{ release.title }}</p>
<p class="secondary-text">
{{ `${$t('globals.by', [release.creator.name])} - ${$tc('globals.listTabs.trackN', release.nb_tracks)}` }}
{{ `${$t('globals.by', {artist: release.creator.name})} - ${$tc('globals.listTabs.trackN', release.nb_tracks)}` }}
</p>
</div>
</div>
@@ -94,7 +94,7 @@
</div>
</div>
<p class="primary-text">{{ release.title }}</p>
<p class="secondary-text">{{ `${$t('globals.by', [release.artist.name])}` }}</p>
<p class="secondary-text">{{ `${$t('globals.by', {artist: release.artist.name})}` }}</p>
</div>
</div>
</div>

View File

@@ -29,7 +29,7 @@
</div>
<p class="primary-text">{{ release.title }}</p>
<p class="secondary-text">
{{ `${$t('globals.by', [release.user.name])} - ${$tc('globals.listTabs.trackN', release.nb_tracks)}` }}
{{ `${$t('globals.by', {artist: release.user.name})} - ${$tc('globals.listTabs.trackN', release.nb_tracks)}` }}
</p>
</div>
</div>
@@ -57,7 +57,7 @@
</div>
</div>
<p class="primary-text">{{ release.title }}</p>
<p class="secondary-text">{{ `${$t('globals.by', [release.artist.name])}` }}</p>
<p class="secondary-text">{{ `${$t('globals.by', {artist: release.artist.name})}` }}</p>
</div>
</div>
</section>

View File

@@ -25,20 +25,20 @@
<h1>{{ title }}</h1>
<h2 v-if="type == 'track'">
<i18n path="globals.by" tag="span">
<span place="0" class="clickable" @click="artistView" :data-id="data.artist.id">{{
<span place="artist" class="clickable" @click="artistView" :data-id="data.artist.id">{{
data.artist.name
}}</span>
</i18n>
<i18n path="globals.in" tag="span">
<span place="0" class="clickable" @click="albumView" :data-id="data.album.id">{{
<span place="album" class="clickable" @click="albumView" :data-id="data.album.id">{{
data.album.title
}}</span>
</i18n>
</h2>
<h2 v-else-if="type == 'album'">
<i18n path="globals.by" tag="span">
<span place="0" class="clickable" @click="artistView" :data-id="data.artist.id">{{
<span place="artist" class="clickable" @click="artistView" :data-id="data.artist.id">{{
data.artist.name
}}</span>
</i18n>

View File

@@ -62,8 +62,8 @@
<p class="secondary-text">
{{
results.allTab.TOP_RESULT[0].type == 'artist'
? $t('search.fans', [$n(results.allTab.TOP_RESULT[0].nb_fan)])
: $t('globals.by', [results.allTab.TOP_RESULT[0].artist]) +
? $t('search.fans', {n: $n(results.allTab.TOP_RESULT[0].nb_fan)})
: $t('globals.by', {artist: results.allTab.TOP_RESULT[0].artist}) +
' - ' +
$tc('globals.listTabs.trackN', results.allTab.TOP_RESULT[0].nb_song)
}}
@@ -155,7 +155,7 @@
</div>
</div>
<p class="primary-text">{{ release.ART_NAME }}</p>
<p class="secondary-text">{{ $t('search.fans', [$n(release.NB_FAN)]) }}</p>
<p class="secondary-text">{{ $t('search.fans', {n: $n(release.NB_FAN)}) }}</p>
</div>
</div>
<div v-else-if="section == 'ALBUM'" class="release_grid firstrow_only">
@@ -360,7 +360,7 @@
</p>
<p class="secondary-text">
{{
$t('globals.by', [release.artist.name]) + ' - ' + $tc('globals.listTabs.trackN', release.nb_tracks)
$t('globals.by', {artist: release.artist.name}) + ' - ' + $tc('globals.listTabs.trackN', release.nb_tracks)
}}
</p>
</div>
@@ -423,7 +423,7 @@
</div>
<p class="primary-text">{{ release.title }}</p>
<p class="secondary-text">
{{ `${$t('globals.by', [release.user.name])} - ${$tc('globals.listTabs.trackN', release.nb_tracks)}` }}
{{ `${$t('globals.by', {artist: release.user.name})} - ${$tc('globals.listTabs.trackN', release.nb_tracks)}` }}
</p>
</div>
</div>

View File

@@ -1,17 +1,17 @@
<template>
<div id="modal_quality" class="smallmodal" v-show="open" @click="tryToDownloadTrack($event)" ref="modal">
<div class="smallmodal-content">
<button class="quality-button" data-quality-value="9">{{ $t('globals.download', ['FLAC']) }}</button>
<button class="quality-button" data-quality-value="3">{{ $t('globals.download', ['MP3 320kbps']) }}</button>
<button class="quality-button" data-quality-value="1">{{ $t('globals.download', ['MP3 128kbps']) }}</button>
<button class="quality-button" data-quality-value="9">{{ $t('globals.download', {thing: 'FLAC'}) }}</button>
<button class="quality-button" data-quality-value="3">{{ $t('globals.download', {thing: 'MP3 320kbps'}) }}</button>
<button class="quality-button" data-quality-value="1">{{ $t('globals.download', {thing: 'MP3 128kbps'}) }}</button>
<button class="quality-button" data-quality-value="15">
{{ $t('globals.download', ['360 Reality Audio [HQ]']) }}
{{ $t('globals.download', {thing: '360 Reality Audio [HQ]'}) }}
</button>
<button class="quality-button" data-quality-value="14">
{{ $t('globals.download', ['360 Reality Audio [MQ]']) }}
{{ $t('globals.download', {thing: '360 Reality Audio [MQ]'}) }}
</button>
<button class="quality-button" data-quality-value="13">
{{ $t('globals.download', ['360 Reality Audio [LQ]']) }}
{{ $t('globals.download', {thing: '360 Reality Audio [LQ]'}) }}
</button>
</div>
</div>

View File

@@ -437,13 +437,13 @@
<option value="nothing">{{ $t('settings.other.multiArtistSeparator.nothing') }}</option>
<option value="default">{{ $t('settings.other.multiArtistSeparator.default') }}</option>
<option value="andFeat">{{ $t('settings.other.multiArtistSeparator.andFeat') }}</option>
<option value=" & ">{{ $t('settings.other.multiArtistSeparator.using', [' & ']) }}</option>
<option value=",">{{ $t('settings.other.multiArtistSeparator.using', [',']) }}</option>
<option value=", ">{{ $t('settings.other.multiArtistSeparator.using', [', ']) }}</option>
<option value="/">{{ $t('settings.other.multiArtistSeparator.using', ['/']) }}</option>
<option value=" / ">{{ $t('settings.other.multiArtistSeparator.using', [' / ']) }}</option>
<option value=";">{{ $t('settings.other.multiArtistSeparator.using', [';']) }}</option>
<option value="; ">{{ $t('settings.other.multiArtistSeparator.using', ['; ']) }}</option>
<option value=" & ">{{ $t('settings.other.multiArtistSeparator.using', {separator: ' & '}) }}</option>
<option value=",">{{ $t('settings.other.multiArtistSeparator.using', {separator: ','}) }}</option>
<option value=", ">{{ $t('settings.other.multiArtistSeparator.using', {separator: ', '}) }}</option>
<option value="/">{{ $t('settings.other.multiArtistSeparator.using', {separator: '/'}) }}</option>
<option value=" / ">{{ $t('settings.other.multiArtistSeparator.using', {separator: ' / '}) }}</option>
<option value=";">{{ $t('settings.other.multiArtistSeparator.using', {separator: ';'}) }}</option>
<option value="; ">{{ $t('settings.other.multiArtistSeparator.using', {separator: '; '}) }}</option>
</select>
</div>

View File

@@ -134,7 +134,7 @@
<span v-if="label" style="opacity: 0.4; margin-top: 8px; display: inline-block; font-size: 13px;">{{ label }}</span>
<footer>
<button @click.stop="addToQueue" :data-link="link">
{{ `${$t('globals.download', [$tc(`globals.listTabs.${type}`, 1)])}` }}
{{ `${$t('globals.download', {thing: $tc(`globals.listTabs.${type}`, 1)})}` }}
</button>
<button class="with_icon" @click.stop="addToQueue" :data-link="selectedLinks()">
{{ $t('tracklist.downloadSelection') }}<i class="material-icons">file_download</i>
@@ -246,7 +246,7 @@ export default {
this.title = playlistTitle
this.image = playlistCover
this.release_date = creation_date.substring(0, 10)
this.metadata = `${this.$t('globals.by', [creatorName])}${this.$tc('globals.listTabs.trackN', numberOfTracks)}`
this.metadata = `${this.$t('globals.by', {artist: creatorName})}${this.$tc('globals.listTabs.trackN', numberOfTracks)}`
if (isEmpty(playlistTracks)) {
this.body = null
@@ -272,7 +272,7 @@ export default {
? images[0].url
: 'https://e-cdns-images.dzcdn.net/images/cover/d41d8cd98f00b204e9800998ecf8427e/1000x1000-000000-80-0-0.jpg'
this.release_date = ''
this.metadata = `${this.$t('globals.by', [ownerName])}${this.$tc('globals.listTabs.trackN', numberOfTracks)}`
this.metadata = `${this.$t('globals.by', {artist: ownerName})}${this.$tc('globals.listTabs.trackN', numberOfTracks)}`
if (isEmpty(playlistTracks)) {
this.body = null