-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Context size fixed #248
Context size fixed #248
Conversation
assets/js/translator.js
Outdated
$(this).attr('id', 'wordGettingSuggested'); | ||
var wrapLength = parseInt(config.SUGGESTIONS.context_size); | ||
context = getContext(fromWord, wrapLength); | ||
$('#translatedTextClone').html(context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'context' is not defined no-undef
assets/js/translator.js
Outdated
var fromWord = $(this).html(); | ||
$(this).attr('id', 'wordGettingSuggested'); | ||
var wrapLength = parseInt(config.SUGGESTIONS.context_size); | ||
context = getContext(fromWord, wrapLength); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'context' is not defined no-undef
assets/js/translator.js
Outdated
$('#translatedTextClone').html($('#translatedText').attr('pristineText')); | ||
var fromWord = $(this).html(); | ||
$(this).attr('id', 'wordGettingSuggested'); | ||
var wrapLength = parseInt(config.SUGGESTIONS.context_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing radix parameter radix
assets/js/translator.js
Outdated
var markedWord = mark + fromWord; | ||
var rawText = $("#translatedText").html(); | ||
var cleanMarkedText = rawText.replace(/<span[^>]*id="wordGettingSuggested"[^>]*>/g, mark); | ||
var cleanMarkedText = cleanMarkedText.replace(/<[/]?span[^>]*>/g, ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'cleanMarkedText' is already defined no-redeclare
assets/js/translator.js
Outdated
function getContext(fromWord, wrapLength) { | ||
var mark = 'MEGAWORD!'; | ||
var markedWord = mark + fromWord; | ||
var rawText = $("#translatedText").html(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strings must use singlequote quotes
Deconflicts #78
I don't really know what this does but I'm going to merge it anyway since the suggestions branch will be reviewed fully in the future anyway. |
Deconflicts #78