Skip to content

Commit

Permalink
Merge pull request #830 from alpheios-project/html-text-update
Browse files Browse the repository at this point in the history
Update text in html output
  • Loading branch information
irina060981 authored Jun 15, 2022
2 parents caeda87 + 90f5ba6 commit 6e6d788
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 7 deletions.
3 changes: 1 addition & 2 deletions build/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const webpack = {
library: 'AlignmentEditor',
libraryTarget: 'window',
chunkFilename: 'alignment-editor.[name].js',
path: path.join(projectRoot, 'public/dist'),
clean: true
path: path.join(projectRoot, 'public/dist')
},
resolve: {
alias: {
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="css/style.css"/>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/style/style-components.min.css" />
<link rel="stylesheet" href="dist/style/style-alignment-editor.min.css"/>
<script src="dist/alpheios-alignment-editor.min.js"></script>
<script src="dist/alpheios-alignment-editor.js"></script>
<!--
<script src="https://cdn.auth0.com/js/lock/11.14.0/lock.js"></script>
<script src="dist/auth0/env-embed.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion src/_output/_dist/alpheios-alignment-editor-output.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/_output/_dist/html-temp-final.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/_output/vue/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default {
return this.identList[this.viewType].filter(langData => !langData.hidden)
},
noticeText () {
return `This view displays the first <b>${this.shownTabs.length}</b> of the translations <b>${this.identList[this.viewType].length}</b> available. The menu in the upper left lets you change the selection and their order.`
return `This view displays the first <b>${this.shownTabs.length}</b> of the <b>${this.identList[this.viewType].length}</b> translations available. The menu in the upper left lets you change the selection and their order.`
}
},
methods: {
Expand Down
5 changes: 5 additions & 0 deletions src/locales/en-us/messages-aligned-groups-editor.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,10 @@
"message": "Save locally",
"description": "Button",
"component": "AlignEditor"
},
"ALIGN_EDITOR_CLICK_TOKEN_UNAVAILABLE": {
"message": "You are not able to start create alignment groups while you have not tokenized texts",
"description": "Click token",
"component": "SegmentEditor"
}
}
8 changes: 8 additions & 0 deletions src/vue/align-editor/segment-block.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import MetadataBlock from '@/vue/text-editor/metadata-block.vue'
import MetadataIcons from '@/vue/common/metadata-icons.vue'
import SettingsController from '@/lib/controllers/settings-controller.js'
import NotificationSingleton from '@/lib/notifications/notification-singleton'
export default {
name: 'SegmentBlock',
Expand Down Expand Up @@ -300,8 +301,15 @@ export default {
* @param {Token}
*/
updateAlignmentGroup (token) {
if (this.alignmentGroupsWorkflowAvailable && this.currentTargetId) {
this.$alignedGC.clickToken(token, this.currentTargetId)
} else if (!this.alignmentGroupsWorkflowAvailable) {
console.error(L10nSingleton.getMsgS('ALIGN_EDITOR_CLICK_TOKEN_UNAVAILABLE'))
NotificationSingleton.addNotification({
text: L10nSingleton.getMsgS('ALIGN_EDITOR_CLICK_TOKEN_UNAVAILABLE'),
type: NotificationSingleton.types.ERROR
})
}
},
/**
Expand Down
4 changes: 3 additions & 1 deletion src/vue/text-editor/text-editor-single-block.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ export default {
},
async '$store.state.uploadCheck' () {
await this.updateFromExternal()
this.$refs.fileupload.value = ''
if (this.$refs.fileupload) {
this.$refs.fileupload.value = ''
}
this.uploadFile = ''
},
async '$store.state.docSourceLangDetected' () {
Expand Down

0 comments on commit 6e6d788

Please sign in to comment.