Skip to content

Commit

Permalink
style: clearer caution next to config custom upload
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Sep 24, 2024
1 parent 5a35b87 commit 3572c30
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ As this project is a user-facing application, the places in the semantic version

- Improved repo documentation
- Replaced Font Awesome with Phosphor Icons
- Clearer message of caution next to custom config upload form

### Fixed

Expand Down
10 changes: 9 additions & 1 deletion src/corpus/config/CorpusConfigCustom.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="ts">
import type { AxiosError } from "axios";
import { PhWarning } from "@phosphor-icons/vue";
import useCorpusIdParam from "@/corpus/corpusIdParam.composable";
import useConfig from "@/corpus/config/config.composable";
import { useAuth } from "@/auth/auth.composable";
Expand Down Expand Up @@ -53,7 +54,14 @@ async function upload(files: File[]) {
</LayoutBox>

<LayoutBox class="w-96 grow" :title="$t('upload')">
<HelpBox>{{ $t("config.custom.upload.help") }}</HelpBox>
<HelpBox important>
<PhWarning class="inline mb-1 mr-1" />
{{ $t("config.custom.upload.caution") }}
</HelpBox>
<HelpBox important>
<PhWarning class="inline mb-1 mr-1" />
{{ $t("config.custom.upload.overwrite") }}
</HelpBox>
<PendingContent :on="`corpus/${corpusId}/config`" blocking>
<FileUpload :file-handler="upload" accept=".yaml,.yml" />
</PendingContent>
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ metadata.description.help: |
fileFormat: Source format
config.custom: Custom configuration
config.custom.help: Mink uses {sparv}, a modular and configurable pipeline for text analysis, to process your corpus. The standard configuration form only exposes a few of the available Sparv options. On this page, you can view and submit your own config file, written in the YAML format. Please refer to the Sparv documentation on {topic} for more information.
config.custom.upload.help: Please note that submitting an invalid config file may cause unexpected behaviour. Saving the standard configuration form may overwrite your custom config.
config.custom.upload.caution: Please note that submitting an invalid config file may cause unexpected behaviour.
config.custom.upload.overwrite: Saving the standard configuration form may overwrite your custom config.
config.format.help: Select the file format of the source texts. All files must be of the selected format.
config.format.note.pdf: The PDF file format is primarily designed for display. Please note that extracting text from them can sometimes give unsatisfactory results. Performing OCR on scanned documents is (currently) outside the scope of Mink.
config.text_annotation: Text element
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/sv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ metadata.description.help: |
fileFormat: Källformat
config.custom: Egen konfiguration
config.custom.help: Mink använder {sparv}, en modulär och konfigurerbar pipeline för textanalys, för att processa korpusen. Det vanliga formuläret visar endast en liten del av alla inställningar. På den här sidan kan du undersöka den faktiska configfilen och ladda upp en egen, i formatet YAML. Använd Sparvdokumentationens avsnitt {topic} för att tolka filens struktur.
config.custom.upload.help: Notera att en ogiltig configfil kan leda till oväntat beteende. Om du sparar i det vanliga formuläret igen kan den egna konfigurationen skrivas över.
config.custom.upload.caution: Notera att en ogiltig configfil kan leda till oväntat beteende.
config.custom.upload.overwrite: Om du sparar i det vanliga formuläret igen kan den egna konfigurationen skrivas över.
config.format.help: Ange vilket filformat källtexterna har. Alla filer måste ha det valda formatet.
config.format.note.pdf: PDF-formatet är byggt främst för visuell presentation. Text som extraheras från PDF-filer kan ibland ge bristfälliga resultat. OCR-behandling av scannade dokument är (för närvarande) inget som Mink stödjer.
config.text_annotation: Textelement
Expand Down

0 comments on commit 3572c30

Please sign in to comment.