diff --git a/frontend/src/components/AuthorsAddEdit.vue b/frontend/src/components/AuthorsAddEdit.vue
index d252143..1259ee6 100644
--- a/frontend/src/components/AuthorsAddEdit.vue
+++ b/frontend/src/components/AuthorsAddEdit.vue
@@ -71,7 +71,7 @@
methods: {
insertOrUpdateAuthor: function () {
if (this.author.Lastname === '') {
- this.error = {message: 'Please provide at least a lastname.'}
+ this.error = {message: this.translate('authors').errorNoTitle}
} else {
this.loading = true
@@ -81,7 +81,7 @@
HTTP.post('authors/' + this.author.ID, {author: this.author})
.then(response => {
this.loading = false
- this.success = 'The author was successfully updated!'
+ this.success = this.translate('authors').updatedSuccess
this.error = ''
})
.catch(e => {
@@ -92,7 +92,7 @@
HTTP.put('authors', {author: this.author})
.then(response => {
this.loading = false
- this.success = 'The author was successfully inserted!'
+ this.success = this.translate('authors').insertedSuccess
this.error = ''
})
.catch(e => {
diff --git a/frontend/src/components/BooksAddEdit.vue b/frontend/src/components/BooksAddEdit.vue
index 5a0fb01..7459da8 100644
--- a/frontend/src/components/BooksAddEdit.vue
+++ b/frontend/src/components/BooksAddEdit.vue
@@ -55,9 +55,9 @@
@@ -76,14 +76,14 @@
@@ -139,6 +139,9 @@
langBooks () {
return this.translate('books')
},
+ langPublishers () {
+ return this.translate('publishers')
+ },
langGeneral () {
return this.translate('general')
}
@@ -223,7 +226,7 @@
},
insertNewBook: function () {
if (this.book.Title === '') {
- this.error = {message: 'Please provide at least a title.'}
+ this.error = {message: this.translate('books').errorNoTitle}
} else {
this.loading = true
@@ -267,7 +270,7 @@
HTTP.post('books/' + this.book.ID, {book: this.book})
.then(response => {
this.loading = false
- this.success = 'The book was successfully updated!'
+ this.success = this.translate('books').updatedSuccess
this.error = ''
})
.catch(e => {
@@ -278,7 +281,7 @@
HTTP.put('books', {book: this.book})
.then(response => {
this.loading = false
- this.success = 'The book was successfully inserted!'
+ this.success = this.translate('books').insertedSuccess
this.error = ''
})
.catch(e => {
diff --git a/frontend/src/lang/de.js b/frontend/src/lang/de.js
index ddef257..74533b7 100644
--- a/frontend/src/lang/de.js
+++ b/frontend/src/lang/de.js
@@ -10,7 +10,11 @@ export default {
edit: 'Bearbeiten',
cancel: 'Abbrechen',
approve: 'Ja!',
- action: 'Aktion'
+ action: 'Aktion',
+ submit: 'Senden',
+ selectOne: 'Wähle einen aus',
+ selectOneOrMore: 'Wähle einen oder mehr',
+ name: 'Name'
},
login: {
title: 'Einloggen',
@@ -36,6 +40,41 @@ export default {
add: 'Buch hinzufügen',
deleteHeader: 'Buch löschen',
deleteMsg: 'Bist du sicher dass du dieses Buch löschen willst? Das kann nicht Rückgängig gemacht werden!',
- deleteSuccess: 'Das Buch wurde erfolgreich gelöscht'
+ deleteSuccess: 'Das Buch wurde erfolgreich gelöscht.',
+ gridColumns: {
+ title: 'Titel',
+ isbn: 'ISBN',
+ year: 'Jahr',
+ price: 'Preis',
+ authors: 'Autor',
+ publisher: 'Verlag',
+ quantity: 'Menge',
+ status: 'Status'
+ },
+ errorNoTitle: 'Bitte gib mindestens einen Titel an.',
+ updatedSuccess: 'Das Buch wurde erfolgreich geupdated!',
+ insertedSuccess: 'Das Buch wurde erfolgreich erstellt!'
+ },
+ authors: {
+ title: 'Autorenübersicht',
+ newAuthor: 'Neuen Autor hinzufügen',
+ deleteHeader: 'Autor löschen',
+ deleteMsg: 'Bist du sicher dass du diesen Autor löschen willst? Das kann nicht Rückgängig gemacht werden!',
+ deleteSuccess: 'Der Autor wurde erfolgreich gelöscht.',
+ forename: 'Vorname',
+ lastname: 'Nachname',
+ errorNoName: 'Bitte gibt mindestens einen Nachnamen an.',
+ updatedSuccess: 'Der Autor wurde erfolgreich geupdated!',
+ insertedSuccess: 'Der Autor wurde erfolgreich erstellt!'
+ },
+ publishers: {
+ title: 'Verlagsübersicht',
+ newPublisher: 'Neuen Verlag hinzufügen',
+ deleteHeader: 'Verlag löschen',
+ deleteText: 'Bist du sicher dass du diesen Verlag löschen willst? Das kann nicht Rückgängig gemacht werden!',
+ deleteSuccess: 'Der Verlag wurde erfolgreich gelöscht.',
+ errorNoName: 'Bitte gib einen Namen ein.',
+ updatedSuccess: 'Der Verlag wurde erfolgreich geupdated!',
+ insertedSuccess: 'Der Verlag wurde erfolgreich erstellt!'
}
}
diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js
index 933a4d4..ef40f46 100644
--- a/frontend/src/lang/en.js
+++ b/frontend/src/lang/en.js
@@ -51,8 +51,9 @@ export default {
quantity: 'Quantity',
status: 'Status'
},
- newPublisher: 'Add new publisher',
- newAuthor: 'Add new author'
+ errorNoTitle: 'Please provide at least a title.',
+ updatedSuccess: 'The book was successfully updated!',
+ insertedSuccess: 'The book was successfully inserted!'
},
authors: {
title: 'Authors overview',
@@ -61,7 +62,10 @@ export default {
deleteMsg: 'Are you sure you want to delete this author? This cannot be undone!',
deleteSuccess: 'The author was deleted successfully.',
forename: 'Forename',
- lastname: 'Lastname'
+ lastname: 'Lastname',
+ errorNoName: 'Please provide at least a lastname.',
+ updatedSuccess: 'The author was successfully updated!',
+ insertedSuccess: 'The author was successfully inserted!'
},
publishers: {
title: 'Publishers overview',
@@ -70,7 +74,7 @@ export default {
deleteText: 'Are you sure you want to delete this publisher? This cannot be undone!',
deleteSuccess: 'The publisher was deleted successfully.',
errorNoName: 'Please provide a name.',
- updatedSuccess: 'The publisher was successfully updated!'
+ updatedSuccess: 'The publisher was successfully updated!',
insertedSuccess: 'The publisher was successfully inserted!'
}
}