From 608df5e0e2bfef5b6e6cf7c735d1b1961bf3f1ed Mon Sep 17 00:00:00 2001 From: sebastian-raubach Date: Wed, 15 Jun 2022 08:51:51 +0100 Subject: [PATCH] - FIX: Added missing i18n. - ADD: Added confirm dialog to hide citation action. --- src/App.vue | 2 +- src/plugins/i18n/de_DE.json | 3 +++ src/plugins/i18n/en_GB.json | 3 +++ src/views/Home.vue | 32 ++++++++++++++++++++++++++------ 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/src/App.vue b/src/App.vue index 062d632..d9f222f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -36,7 +36,7 @@ {{ language.name }} - About + {{ $t('menuAbout') }} diff --git a/src/plugins/i18n/de_DE.json b/src/plugins/i18n/de_DE.json index c754f04..e885b10 100644 --- a/src/plugins/i18n/de_DE.json +++ b/src/plugins/i18n/de_DE.json @@ -161,6 +161,7 @@ "labelNoData": "Keine Daten gefunden.", "labelAdvancedSettingsWarning": "Bitte Vorsicht walten lassen beim Benutzen dieser Einstellungen - alle Daten könnten verloren gehen.", "linkExport": "Als Datei herunterladen", + "menuAbout": "Über", "menuHome": "Daten", "menuHeatmap": "Feld-Heatmap", "menuLocale": "Sprache", @@ -169,6 +170,8 @@ "menuStats": "Statistiken", "menuTimeSeries": "Zeitreihe", "modalButtonCloseIn": "Schließen | Schließen (1) | Schließen ({count})", + "modalTitleHideCitation": "Veröffentlichungsinformationen ausblenden", + "modalTextHideCitation": "Sicher, dass diese Information ausgeblendet werden soll? Sie kann weiterhin auf der 'Über' Seite gefunden werden.", "modalTitleCitation": "GridScore Veröffentlichung", "modalTextCitation": "

Wusstest du, dass wir GridScore veröffentlicht haben? Schau dir das Paper doch mal an oder zitier es, falls du GridScore nützlich findest - oder meld dich bei @HuttonICS oder @GerminateHub oder per eMail. Wir freuen uns immer zu hören wie Leute GridScore benutzen. Feedback zu Verbesserungen ist auch willkommen.

GridScore: a tool for accurate, cross-platform phenotypic data collection and visualization

Raubach, S., Schreiber, M. & Shaw, P.D., BMC Bioinformatics 23, 214 (2022).

", "modalTitleHelp": "Hilfe", diff --git a/src/plugins/i18n/en_GB.json b/src/plugins/i18n/en_GB.json index e9cf19b..88c75f9 100644 --- a/src/plugins/i18n/en_GB.json +++ b/src/plugins/i18n/en_GB.json @@ -162,6 +162,7 @@ "labelNoData": "No data found.", "labelAdvancedSettingsWarning": "Please take care when using these settings - they may delete your data.", "linkExport": "Download as file", + "menuAbout": "About", "menuHome": "Data", "menuHeatmap": "Field heatmap", "menuLocale": "Language", @@ -170,6 +171,8 @@ "menuStats": "Statistics", "menuTimeSeries": "Time series", "modalButtonCloseIn": "Close | Close (1) | Close ({count})", + "modalTitleHideCitation": "Hide citation information", + "modalTextHideCitation": "Are you sure you want to hide this information? You can still find the reference on the 'About' page.", "modalTitleCitation": "GridScore Publication", "modalTextCitation": "

Did you know we have a GridScore publication? Why not have a read and cite us if you find the software useful - give us a shout out too @HuttonICS or @GerminateHub or email us as we would love to hear about how you are using it. Feedback on how we can improve GridScore is always welcome!

GridScore: a tool for accurate, cross-platform phenotypic data collection and visualization

Raubach, S., Schreiber, M. & Shaw, P.D., BMC Bioinformatics 23, 214 (2022).

", "modalTitleHelp": "Help", diff --git a/src/views/Home.vue b/src/views/Home.vue index 0481307..8146731 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -63,9 +63,18 @@ - - {{ $t('modalTitleCitation') }} -
+ + + + + + + + {{ $t('modalTitleCitation') }} +
+ + + @@ -81,7 +90,7 @@ import BarcodeViewerModal from '@/components/modals/BarcodeViewerModal' import HelpModal from '@/components/modals/HelpModal' import idb from '@/plugins/idb' import api from '@/mixin/api' -import { BIconJournalPlus, BIconFileSpreadsheet, BIconArrowRepeat, BIconQuestionCircleFill, BIconCloudDownloadFill, BIconCloudUploadFill, BIconPlayFill, BIconGear, BIconTags, BIconArrowCounterclockwise, BIconTrash, BIconLayoutThreeColumns, BIconCalendarDate } from 'bootstrap-vue' +import { BIconJournalPlus, BIconFileSpreadsheet, BIconNewspaper, BIconArrowRepeat, BIconQuestionCircleFill, BIconCloudDownloadFill, BIconCloudUploadFill, BIconPlayFill, BIconGear, BIconTags, BIconArrowCounterclockwise, BIconTrash, BIconLayoutThreeColumns, BIconCalendarDate } from 'bootstrap-vue' const emitter = require('tiny-emitter/instance') @@ -90,6 +99,7 @@ export default { AddTraitModal, BarcodeViewerModal, HelpModal, + BIconNewspaper, BIconArrowRepeat, BIconJournalPlus, BIconFileSpreadsheet, @@ -121,9 +131,19 @@ export default { mixins: [api], methods: { hideCitation: function () { - this.$store.dispatch('setHideCitationMessage', true) + this.$bvModal.msgBoxConfirm(this.$t('modalTextHideCitation'), { + title: this.$t('modalTitleHideCitation'), + okTitle: this.$t('buttonYes'), + okVariant: 'danger', + cancelTitle: this.$t('buttonNo') + }) + .then(value => { + if (value) { + this.$store.dispatch('setHideCitationMessage', true) - this.plausibleEvent('citation-hide') + this.plausibleEvent('citation-hide') + } + }) }, startTour: function () { emitter.emit('show-introduction-tour')