Commit c9d8bb75 authored by Curtis Adam's avatar Curtis Adam

Offer a deepl translation for single words

parent 3dc68fd7
......@@ -23,21 +23,19 @@
<template name="cardSidebarItemDictionaryDeepL">
{{#unless isSmartphone}}
{{#if gotDictionary}}
{{#if gotRequiredWordCount this}}
{{#unless isMobilePreview}}
<img class="hidden-xs showDeepLTranslation card-button btn cardHeaderItem {{#if
isDeepLActive}}pressed{{/if}}"
data-type="cardNavigation"
data-toggle="collapse"
data-target="#collapseLecture-{{_id}}"
src="/img/deepl.png" title="{{_ "card.tooltip.dictionaryDeepL"}}">
{{/unless}}
<span class="{{#unless
isMobilePreview}}visible-xs-inline-block{{/unless}} card-button btn cardHeaderItem fa showDeepLTranslation {{#if
isDeepLActive}}pressed{{/if}}" data-id="{{this._id}}"
title="{{_ "card.tooltip.dictionaryDeepL"}}"><strong>D</strong>
{{#unless isMobilePreview}}
<img class="hidden-xs showDeepLTranslation card-button btn cardHeaderItem {{#if
isDeepLActive}}pressed{{/if}}"
data-type="cardNavigation"
data-toggle="collapse"
data-target="#collapseLecture-{{_id}}"
src="/img/deepl.png" title="{{_ "card.tooltip.dictionaryDeepL"}}">
{{/unless}}
<span class="{{#unless
isMobilePreview}}visible-xs-inline-block{{/unless}} card-button btn cardHeaderItem fa showDeepLTranslation {{#if
isDeepLActive}}pressed{{/if}}" data-id="{{this._id}}"
title="{{_ "card.tooltip.dictionaryDeepL"}}"><strong>D</strong>
</span>
{{/if}}
{{/if}}
{{/unless}}
</template>
......@@ -54,15 +54,6 @@ Template.cardSidebarItemDictionaryDeepL.helpers({
},
isMobilePreview: function () {
return MarkdeepEditor.getMobilePreview();
},
gotRequiredWordCount: function () {
if (Dictionary.getWordCount() > 1) {
return true;
} else {
if (Dictionary.checkMode(2)) {
Dictionary.setMode(0);
}
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment