Skip to content

Commit

Permalink
➕ merge pull request #77 from devmount/tag-management
Browse files Browse the repository at this point in the history
Tag management
  • Loading branch information
devmount authored Nov 4, 2021
2 parents d560e3f + 016b027 commit 3392fbe
Show file tree
Hide file tree
Showing 8 changed files with 204 additions and 141 deletions.
70 changes: 10 additions & 60 deletions src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
},
"button": {
"addLanguage": "Sprache Hinzufügen",
"addTag": "Tag Hinzufügen",
"addUser": "Benutzer Hinzufügen",
"back": "Zurück",
"cancel": "Abbrechen",
Expand Down Expand Up @@ -39,6 +40,7 @@
"updateLanguage": "Sprache Aktualisieren",
"updateSetlist": "Setlist Aktualisieren",
"updateSong": "Song Aktualisieren",
"updateTag": "Tag Aktualisieren",
"updateUser": "Benutzer Aktualisieren"
},
"divider": {
Expand Down Expand Up @@ -83,6 +85,7 @@
"requiredLanguage": "Die Sprache muss ausgewählt werden.",
"requiredName": "Ein Name muss angegeben werden.",
"requiredPassword": "Ein Passwort muss angegeben werden.",
"requiredTagKey": "Ein Tag Key muss angegeben werden.",
"requiredTitle": "Ein Titel muss angegeben werden.",
"setlistAlreadyExists": "Eine Setlist mit diesem Titel existiert bereits an diesem Datum. Bitte entweder den Titel oder das Datum ändern.",
"songAlreadyExists": "Ein Song mit diesem Titel existiert bereits in dieser Sprache. Bitte entweder den Titel oder die Sprache ändern."
Expand All @@ -95,6 +98,7 @@
"date": "Datum der Veranstaltung",
"email": "Email",
"isocode": "ISO Code",
"key": "Key",
"label": "Bezeichnung",
"language": "Sprache",
"name": "Name",
Expand Down Expand Up @@ -128,6 +132,7 @@
},
"modal": {
"addLanguage": "Sprache hinzufügen",
"addTag": "Tag hinzufügen",
"addUser": "Benutzer hinzufügen",
"deleteLanguage": "Sprache Löschen",
"deleteSetlist": "Setlist Löschen",
Expand All @@ -136,6 +141,7 @@
"editLanguage": "Sprache Bearbeiten",
"editSetlist": "Setlist Bearbeiten",
"editSong": "Song Bearbeiten",
"editTag": "Tag Bearbeiten",
"editUser": "Benutzer Bearbeiten",
"newSetlist": "Neue Setlist",
"newSong": "Neuer Song",
Expand Down Expand Up @@ -171,6 +177,7 @@
"exampleSongTitle": "z.B. Erstaunliche Gnade",
"exampleSongYear": "z.B. 2016",
"exampleSongYoutubeId": "z.B. cF0S3uKdVJA",
"exampleTagKey": "z.B. worship",
"exampleUserEmail": "z.B. [email protected]",
"exampleUserName": "z.B. Max Muster",
"language": "Sprache ...",
Expand All @@ -194,66 +201,6 @@
"chords": "Akkorde",
"sync": "Sync"
},
"tag": {
"adoration": "Verehrung",
"assurance": "Zuspruch",
"beauty": "Schönheit",
"blessing": "Segen",
"celebration": "Feiern",
"children": "Kinder",
"christmas": "Weihnachten",
"comfort": "Trost",
"commitment": "Hingabe",
"communion": "Abendmahl",
"creation": "Schöpfung",
"cross": "Kreuz",
"declaration": "Verkündigung",
"desire": "Verlangen",
"easter": "Ostern",
"encouragement": "Ermutigung",
"evangelism": "Evangelisation",
"faith": "Glaube",
"faithfulness": "Treue",
"father": "Vater",
"forgiveness": "Vergebung",
"freedom": "Freiheit",
"glory": "Herrlichkeit",
"grace": "Gnade",
"greatness": "Größe",
"guidance": "Weisung",
"healing": "Heilung",
"holiness": "Heiligkeit",
"holyspirit": "Heiliger Geist",
"hope": "Hoffnung",
"humility": "Bescheidenheit",
"jesus": "Jesus",
"joy": "Freude",
"kingship": "Königtum",
"life": "Leben",
"light": "Licht",
"longing": "Sehnsucht",
"love": "Liebe",
"obedience": "Gehorsam",
"peace": "Frieden",
"petition": "Bitte",
"power": "Macht",
"praise": "Lob",
"prayer": "Gebet",
"presence": "Gegenwart",
"rest": "Ruhe",
"resurrection": "Auferstehung",
"revival": "Erweckung",
"sacrifice": "Opfer",
"salvation": "Rettung",
"strength": "Stärke",
"surrender": "Ergebung",
"thankfulness": "Dankbarkeit",
"trust": "Vertrauen",
"truth": "Wahrheit",
"unity": "Einheit",
"victory": "Sieg",
"worship": "Anbetung"
},
"text": {
"cannotBeUndone": "Das kann nicht rückgängig gemacht werden.",
"createNewAccount": "Erstelle ein neues SongDrive Konto.",
Expand Down Expand Up @@ -332,6 +279,9 @@
"songUpdated": "Song aktualisiert",
"syncActivated": "Synchronisierung aktiviert",
"syncDeactivated": "Synchronisierung deaktiviert",
"tagAdded": "Tag hinzugefügt",
"tagSavedText": "Das Tag wurden erfolgreich gespeichert.",
"tagUpdated": "Tag aktualisiert",
"userAdded": "Benutzer hinzugefügt",
"userDeleted": "Benutzer gelöscht",
"userDeletedText": "Der Benutzer wurde erfolgreich entfernt.",
Expand Down
70 changes: 10 additions & 60 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
},
"button": {
"addLanguage": "Add Language",
"addTag": "Add Tag",
"addUser": "Add User",
"back": "Back",
"cancel": "Cancel",
Expand Down Expand Up @@ -39,6 +40,7 @@
"updateLanguage": "Update Language",
"updateSetlist": "Update Setlist",
"updateSong": "Update Song",
"updateTag": "Update Tag",
"updateUser": "Update User"
},
"divider": {
Expand Down Expand Up @@ -83,6 +85,7 @@
"requiredLanguage": "The language is required.",
"requiredName": "A name is required.",
"requiredPassword": "A password is required.",
"requiredTagKey": "A tag key is required.",
"requiredTitle": "A title is required.",
"setlistAlreadyExists": "A setlist with this title already exists on this date. Please change either the title or the date.",
"songAlreadyExists": "A song with this title already exists in this language. Please change either the title or the language."
Expand All @@ -95,6 +98,7 @@
"date": "Date of event",
"email": "Email",
"isocode": "ISO Code",
"key": "Key",
"label": "Label",
"language": "Language",
"name": "Name",
Expand Down Expand Up @@ -128,6 +132,7 @@
},
"modal": {
"addLanguage": "Add Language",
"addTag": "Add Tag",
"addUser": "Add User",
"deleteLanguage": "Delete Language",
"deleteSetlist": "Delete Setlist",
Expand All @@ -136,6 +141,7 @@
"editLanguage": "Edit Language",
"editSetlist": "Edit Setlist",
"editSong": "Edit Song",
"editTag": "Edit Tag",
"editUser": "Edit User",
"newSetlist": "New Setlist",
"newSong": "New Song",
Expand Down Expand Up @@ -171,6 +177,7 @@
"exampleSongTitle": "e.g. Amazing Grace",
"exampleSongYear": "e.g. 2016",
"exampleSongYoutubeId": "e.g. cF0S3uKdVJA",
"exampleTagKey": "e.g. worship",
"exampleUserEmail": "e.g. [email protected]",
"exampleUserName": "e.g. John Doe",
"language": "Language ...",
Expand All @@ -194,66 +201,6 @@
"chords": "Chords",
"sync": "Sync"
},
"tag": {
"adoration": "Adoration",
"assurance": "Assurance",
"beauty": "Beauty",
"blessing": "Blessing",
"celebration": "Celebration",
"children": "Children",
"christmas": "Christmas",
"comfort": "Comfort",
"commitment": "Commitment",
"communion": "Communion",
"creation": "Creation",
"cross": "Cross",
"declaration": "Declaration",
"desire": "Desire",
"easter": "Easter",
"encouragement": "Encouragement",
"evangelism": "Evangelism",
"faith": "Faith",
"faithfulness": "Faithfulness",
"father": "Father",
"forgiveness": "Forgiveness",
"freedom": "Freedom",
"glory": "Glory",
"grace": "Grace",
"greatness": "Greatness",
"guidance": "Guidance",
"healing": "Healing",
"holiness": "Holiness",
"holyspirit": "Holy Spirit",
"hope": "Hope",
"humility": "Humility",
"jesus": "Jesus",
"joy": "Joy",
"kingship": "Kingship",
"life": "Life",
"light": "Light",
"longing": "Longing",
"love": "Love",
"obedience": "Obedience",
"peace": "Peace",
"petition": "Petition",
"power": "Power",
"praise": "Praise",
"prayer": "Prayer",
"presence": "Presence",
"rest": "Rest",
"resurrection": "Resurrection",
"revival": "Revival",
"sacrifice": "Sacrifice",
"salvation": "Salvation",
"strength": "Strength",
"surrender": "Surrender",
"thankfulness": "Thankfulness",
"trust": "Trust",
"truth": "Truth",
"unity": "Unity",
"victory": "Victory",
"worship": "Worship"
},
"text": {
"cannotBeUndone": "This cannot be undone.",
"createNewAccount": "Create a new SongDrive account.",
Expand Down Expand Up @@ -332,6 +279,9 @@
"songUpdated": "Song updated",
"syncActivated": "Setlist Sync activated",
"syncDeactivated": "Setlist Sync deactivated",
"tagAdded": "Tag added",
"tagSavedText": "Tag data was successfully saved.",
"tagUpdated": "Tag updated",
"userAdded": "User added",
"userDeleted": "User deleted",
"userDeletedText": "The user was successfully removed.",
Expand Down
2 changes: 1 addition & 1 deletion src/modals/SetlistSet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<select v-model="filter" class="form-select select-lg filter" required>
<option value="" disabled selected>{{ $t('placeholder.tag') }}</option>
<option v-for="tag in tags" :key="tag.key" :value="tag.key">
{{ $t('tag.' + tag.key) }}
{{ tag[$i18n.locale] ? tag[$i18n.locale] : tag.key }}
</option>
</select>
</li>
Expand Down
11 changes: 7 additions & 4 deletions src/modals/SongSet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
<div class="form-group">
<label class="form-label" for="tags">{{ $t('field.tags') }}</label>
<div v-for="tag in song.tags" :key="tag" class="chip s-rounded">
<ion-icon name="pricetag-outline" class="icon-sm mr-2"></ion-icon> {{ $t('tag.' + tag) }}
<ion-icon name="pricetag-outline" class="icon-sm mr-2"></ion-icon>
{{ tags[tag][$i18n.locale] ? tags[tag][$i18n.locale] : tag }}
<a
href="#"
class="btn btn-clear"
Expand Down Expand Up @@ -239,7 +240,8 @@
<div class="form-group max-column mt-2">
<label v-for="tag in filteredTags" :key="tag.key" class="form-checkbox">
<input v-model="song.tags" :value="tag.key" type="checkbox">
<i class="form-icon"></i> {{ $t('tag.' + tag.key) }}
<i class="form-icon"></i>
{{ tag[$i18n.locale] ? tag[$i18n.locale] : tag.key }}
</label>
</div>
</div>
Expand All @@ -257,7 +259,7 @@
<div class="tile-content">
<div class="tile-title">
<ion-icon name="pricetag-outline" class="mr-2"></ion-icon>
{{ $t('tag.' + tag) }}
{{ tags[tag][$i18n.locale] ? tags[tag][$i18n.locale] : tag }}
</div>
</div>
<div class="tile-action">
Expand Down Expand Up @@ -528,7 +530,8 @@ export default {
const tag = this.tags[key];
var search = this.search.tags.toLowerCase();
// search in tag labels
if (this.$parent.$t('tag.' + tag.key).toLowerCase().indexOf(search) !== -1) {
let label = tag[this.$i18n.locale] ? tag[this.$i18n.locale] : key;
if (label.toLowerCase().indexOf(search) !== -1) {
tags[key] = tag;
}
}
Expand Down
Loading

0 comments on commit 3392fbe

Please sign in to comment.