Skip to content

Commit

Permalink
Wrapped javascript text on new quests page in gettext for translation.
Browse files Browse the repository at this point in the history
  • Loading branch information
straumer committed Nov 5, 2019
1 parent 797fc1e commit 29eb386
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/assets/v2/js/pages/quests.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(document).ready(function() {
e.preventDefault();

if ($(this).parents('.question').children('span').length >= ANSWERS_LIMIT) {
alert('The number of answers for each question are limited to ' + ANSWERS_LIMIT);
alert(gettext('The number of answers for each question are limited to ') + ANSWERS_LIMIT);
return;
}

Expand All @@ -38,7 +38,7 @@ $(document).ready(function() {
e.preventDefault();

if ($('.form-group.question').length > QUESTIONS_LIMIT) {
alert('The number of questions are limited to ' + QUESTIONS_LIMIT);
alert(gettext('The number of questions are limited to ') + QUESTIONS_LIMIT);
return;
}

Expand All @@ -51,7 +51,7 @@ $(document).ready(function() {
$(document).on('click', '.close_answer', function(e) {
e.preventDefault();
if ($(this).parents('.question').find('span').length <= 1) {
alert('you cannot have 0 answers per question');
alert(gettext('You cannot have 0 answers per question'));
return;
}
var ele = $(this).parents('span');
Expand All @@ -72,7 +72,7 @@ $(document).ready(function() {
$(document).on('click', '.close_question', function(e) {
e.preventDefault();
if ($('div.question').length <= 1) {
alert('you cannot have 0 questsions');
alert(gettext('you cannot have 0 questsions'));
return;
}
var ele = $(this).parents('div.question');
Expand Down

0 comments on commit 29eb386

Please sign in to comment.