From 64f6f088f5ba50e81f71f6686c21a7c9ff0bd4bc Mon Sep 17 00:00:00 2001 From: Karol Date: Tue, 8 Oct 2019 18:31:29 +0200 Subject: [PATCH] add warnings --- app/controllers/exercises_controller.rb | 4 ++-- config/locales/en.yml | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index 8a9ed527..d3a5b31c 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -123,9 +123,9 @@ class ExercisesController < ApplicationController uuid = params[:uuid] exercise = Exercise.find_by(uuid: uuid) - return render json: {exercise_found: false, message: t('exercises.export_codeharbor.check.no_exercise')} if exercise.nil? + return render json: {exercise_found: false, message: t('exercises.import_codeharbor.check.no_exercise')} if exercise.nil? - render json: {exercise_found: true, message: 'exercise found, be careful when overwriting or else!'} + render json: {exercise_found: true, message: t('exercises.import_codeharbor.check.exercise_found')} end def import_proforma_xml diff --git a/config/locales/en.yml b/config/locales/en.yml index af6f191d..493dd631 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -316,9 +316,11 @@ en: request_for_comments_sent: "Request for comments sent." editor_file_tree: file_root: Files - export_codeharbor: + import_codeharbor: check: - no_exercise: No exercise found + no_exercise: No corresponding exercise found on Codeocean. Pushing this exercise will create a new one on Codeocean, which will be linked to this one on Codeharbor, any changes to either one can be pushed to the respective other platform. + exercise_found: A corresponding exercise has been found on Codeocean. You can either + export_codeharbor: fail: Failed to push the exercise to CodeHarbor. label: Export to Codeharbor success: Successfully pushed the exercise to CodeHarbor.