Skip to content

Commit

Permalink
kwic translations
Browse files Browse the repository at this point in the history
  • Loading branch information
ctot-nondef committed Jan 22, 2024
1 parent 731bfa2 commit e94dd62
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 11 deletions.
19 changes: 11 additions & 8 deletions src/components/DataDisplay/DataDisplayKeywordInContext.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ const corporaStore = useCorporaStore();
const { corporaForSearchWithoutSubCorpus, selectedCorpus } = storeToRefs(corporaStore);
async function createSubcorpus() {
const { isConfirmed } = await Swal.fire({
title: "Create Subcorpus",
text: `Do you really want to create a subcorpus named '${subCorpusName.value}' containing ${
title: t("createSubcorpus"),
text: `${t("createSubcorpusConfirm1")} '${subCorpusName.value}' ${t("createSubcorpusConfirm2")} ${
selected.value.length || 0
} documents in subcorpus ${selectedCorpus.value?.name}?`,
} ${t("createSubcorpusConfirm3")} ${selectedCorpus.value?.name}?`,
showDenyButton: true,
});
Expand All @@ -55,9 +55,8 @@ async function createSubcorpus() {
`${CREATE_SUBCORPUS_URL}?${corporaForSearchWithoutSubCorpus.value};subcname=${
subCorpusName.value
};create=True;${selected.value.map((docid: string) => `sca_doc.id=${docid}`).join(";")}`,
// "${CREATE_SUBCORPUS_URL}?${corporaForSearchWithoutSubCorpus};reload=;subcname=testcorbussi;create=Trueundefined;sca_doc.id=APA_19860220_APA0002;sca_doc.id=APA_19860220_APA0003",
);
Swal.fire("Confirmed", "Subcorpus created successfully!").then().catch(console.error);
Swal.fire("Confirmed", t("corpusCreated")).then().catch(console.error);
await corporaStore.fetchSubCorpora();
}
}
Expand All @@ -67,12 +66,16 @@ const selectedKWIC: Ref<KeywordInContext | null> = ref(null);

<template>
<VCard>
<VCardItem title="Keyword in Context View"></VCardItem>
<VCardItem :title="t('keywordInContext')">
<template #subtitle>
{{ t("keywordInContextDesc") }}
</template>
</VCardItem>
<VCardText class="py-0">
<VCheckbox v-model="createSubcorpusMode" label="Show Subcorpus Creation"></VCheckbox>
<VCheckbox v-model="createSubcorpusMode" :label="t('showSubcorpusCreation')"></VCheckbox>
<div v-if="createSubcorpusMode">
<p>
Create Sub-Corpus from Selection ({{ selected.length }}) in Corpus
{{t('createSubcorpus')}} {{t('fromSelection')}} ({{ selected.length }}) in Corpus
{{ selectedCorpus?.name }}
</p>
<VTextField
Expand Down
10 changes: 9 additions & 1 deletion src/messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,15 @@
"docid": "Dokument",
"topic": "Thema",
"toknum": "Token Nummer",
"link": "Link"
"link": "Link",
"showSubcorpusCreation": "Subkorpusmaske anzeigen",
"createSubcorpus": "Subkorpus erstellen",
"fromSelection": "mit der Auswahl",
"inCorpus": "im Korpus",
"createSubcorpusConfirm1": "Moechten Sie einen Subkorpus erstellen mit dem Namen",
"createSubcorpusConfirm2": "und einem Inhalt von",
"createSubcorpusConfirm3": "Dokumenten aus dem Korpus",
"corpusCreated": "Subkorpus erfolgreich erstellt!"
},
"DefaultLayout": {
"meta": {
Expand Down
12 changes: 10 additions & 2 deletions src/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"regionalFrequenciesDesc": "Shows absolute and relative Values.",
"mediaSources": "Media Sources",
"mediaSourcesDesc": "Shows absolute and relative Values.",
"keywordInContext": "keyword In Context",
"keywordInContext": "Keyword In Context",
"keywordInContextDesc": "",
"compiledDate": "Date of compilation",
"tokencount": "Number of tokens",
Expand All @@ -59,7 +59,15 @@
"docid": "Document",
"topic": "Topic",
"toknum": "Token Number",
"link": "Link"
"link": "Link",
"showSubcorpusCreation": "Show Subcorpus Creation",
"createSubcorpus": "Create Subcorpus",
"fromSelection": "from Selection",
"inCorpus": "in Corpus",
"createSubcorpusConfirm1": "Do you really want to create a subcorpus named",
"createSubcorpusConfirm2": "containing",
"createSubcorpusConfirm3": "documents from Corpus",
"corpusCreated": "Subcorpus created successfully!"
},
"DefaultLayout": {
"meta": {
Expand Down

0 comments on commit e94dd62

Please sign in to comment.