Skip to content

Commit

Permalink
- FIX: Added missing i18n.
Browse files Browse the repository at this point in the history
- ADD: Added confirm dialog to hide citation action.
  • Loading branch information
sebastian-raubach committed Jun 15, 2022
1 parent 2ddc011 commit 608df5e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<span>{{ language.name }}</span>
</b-dropdown-item>
</b-nav-item-dropdown>
<b-nav-item :to="{ name: 'about' }"><BIconInfoCircle /> About</b-nav-item>
<b-nav-item :to="{ name: 'about' }"><BIconInfoCircle /> {{ $t('menuAbout') }}</b-nav-item>
</b-navbar-nav>
</b-collapse>
</b-navbar>
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/i18n/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": "<p>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 <a href='https://twitter.com/HuttonICS'>@HuttonICS</a> oder <a href='https://twitter.com/GerminateHub'>@GerminateHub</a> oder <a href='mailto:[email protected]?subject=GridScore'>per eMail</a>. Wir freuen uns immer zu hören wie Leute GridScore benutzen. Feedback zu Verbesserungen ist auch willkommen.</p><p class='lead'><a href='https://doi.org/10.1186/s12859-022-04755-2'>GridScore: a tool for accurate, cross-platform phenotypic data collection and visualization</a></p><p>Raubach, S., Schreiber, M. &amp; Shaw, P.D., <i>BMC Bioinformatics</i> <b>23</b>, 214 (2022).</p>",
"modalTitleHelp": "Hilfe",
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/i18n/en_GB.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": "<p>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 <a href='https://twitter.com/HuttonICS'>@HuttonICS</a> or <a href='https://twitter.com/GerminateHub'>@GerminateHub</a> or <a href='mailto:[email protected]?subject=GridScore'>email us</a> as we would love to hear about how you are using it. Feedback on how we can improve GridScore is always welcome!</p><p class='lead'><a href='https://doi.org/10.1186/s12859-022-04755-2'>GridScore: a tool for accurate, cross-platform phenotypic data collection and visualization</a></p><p>Raubach, S., Schreiber, M. &amp; Shaw, P.D., <i>BMC Bioinformatics</i> <b>23</b>, 214 (2022).</p>",
"modalTitleHelp": "Help",
Expand Down
32 changes: 26 additions & 6 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,18 @@
</b-col>
</b-row>
</div>
<b-card bg-variant="light" class="my-5" v-if="!storeHideCitationMessage">
<b-card-title><span>{{ $t('modalTitleCitation') }}</span><button type="button" @click.prevent="hideCitation" v-b-tooltip="$t('tooltipDontShowAgain')" aria-label="Close" class="close">×</button></b-card-title>
<div v-html="$t('modalTextCitation')" />
<b-card bg-variant="light" class="my-3" v-if="!storeHideCitationMessage" no-body>
<b-card-body>
<b-row>
<b-col cols=12 sm=3 md=2 class="d-flex align-items-center justify-content-center">
<BIconNewspaper class="display-1 p-2" />
</b-col>
<b-col cols=12 sm=9 md=10>
<b-card-title><span>{{ $t('modalTitleCitation') }}</span><button type="button" @click.prevent="hideCitation" v-b-tooltip="$t('tooltipDontShowAgain')" aria-label="Close" class="close">×</button></b-card-title>
<div v-html="$t('modalTextCitation')" />
</b-col>
</b-row>
</b-card-body>
</b-card>
<AddTraitModal :dataset="selectedDataset" ref="addTraitModal" />
<BarcodeViewerModal ref="barcodeViewModal" :text="selectedDataset.uuid" :title="selectedDataset.name" v-if="selectedDataset && selectedDataset.uuid" />
Expand All @@ -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')
Expand All @@ -90,6 +99,7 @@ export default {
AddTraitModal,
BarcodeViewerModal,
HelpModal,
BIconNewspaper,
BIconArrowRepeat,
BIconJournalPlus,
BIconFileSpreadsheet,
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 608df5e

Please sign in to comment.