Fix missing and unused i18n translations
This commit is contained in:

committed by
Sebastian Serth

parent
f6041af4c3
commit
1589c9472b
@ -236,7 +236,7 @@ CodeOceanEditorEvaluation = {
|
||||
this.submission_deadline = new Date(deadline);
|
||||
let deadline_text = I18n.l("time.formats.long", this.submission_deadline);
|
||||
deadline_text += ` (${this.getUTCTime(this.submission_deadline, I18n.locale === 'en')})`;
|
||||
const bullet_point = I18n.t('exercises.editor.hints.' + translation_key,
|
||||
const bullet_point = I18n.t(`exercises.editor.hints.${translation_key}`,
|
||||
{ deadline: deadline_text, otherwise: otherwise })
|
||||
let text = $.parseHTML(bullet_point);
|
||||
$(li).append(text);
|
||||
@ -270,10 +270,13 @@ CodeOceanEditorEvaluation = {
|
||||
const ul = document.createElement("ul");
|
||||
|
||||
if (submission_deadline && late_submission_deadline) {
|
||||
// i18n-tasks-use t('exercises.editor.hints.submission_deadline')
|
||||
ul.append(this.getDeadlineInformation(submission_deadline, 'submission_deadline', ''));
|
||||
// i18n-tasks-use t('exercises.editor.hints.late_submission_deadline')
|
||||
ul.append(this.getDeadlineInformation(late_submission_deadline, 'late_submission_deadline', ''));
|
||||
} else {
|
||||
const otherwise_no_points = I18n.t('exercises.editor.hints.otherwise');
|
||||
// i18n-tasks-use t('exercises.editor.hints.submission_deadline')
|
||||
ul.append(this.getDeadlineInformation(submission_deadline, 'submission_deadline', otherwise_no_points));
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ class InternalUsersController < ApplicationController
|
||||
respond_to do |format|
|
||||
if @user.update(params[:internal_user].permit(:password, :password_confirmation))
|
||||
@user.change_password!(params[:internal_user][:password])
|
||||
format.html { redirect_to(sign_in_path, notice: t('.success')) }
|
||||
format.html { redirect_to(sign_in_path, notice: t('internal_users.reset_password.success')) }
|
||||
format.json { head :ok }
|
||||
else
|
||||
respond_with_invalid_object(format, object: @user, template: :reset_password)
|
||||
@ -42,7 +42,7 @@ class InternalUsersController < ApplicationController
|
||||
if params[:email].present?
|
||||
user = InternalUser.arel_table
|
||||
InternalUser.where(user[:email].matches(params[:email])).first&.deliver_reset_password_instructions!
|
||||
redirect_to(:root, notice: t('.success'))
|
||||
redirect_to(:root, notice: t('internal_users.forgot_password.success'))
|
||||
end
|
||||
end
|
||||
private :deliver_reset_password_instructions
|
||||
@ -130,7 +130,7 @@ class InternalUsersController < ApplicationController
|
||||
respond_to do |format|
|
||||
if @user.update(params[:internal_user].permit(:password, :password_confirmation))
|
||||
@user.activate!
|
||||
format.html { redirect_to(sign_in_path, notice: t('.success')) }
|
||||
format.html { redirect_to(sign_in_path, notice: t('internal_users.activate.success')) }
|
||||
format.json { head :ok }
|
||||
else
|
||||
respond_with_invalid_object(format, object: @user, template: :activate)
|
||||
|
@ -10,4 +10,5 @@
|
||||
ul.horizontal.dash.pull-start
|
||||
- ApplicationController::LEGAL_SETTINGS.each do |name, link|
|
||||
li
|
||||
/ i18n-tasks-use t('shared.help.privacy_policy') t('shared.help.imprint')
|
||||
= link_to(t("shared.help.#{name.delete_suffix('_url')}"), link, target: '_blank', rel: 'noopener')
|
||||
|
@ -4,8 +4,15 @@ h1 = @execution_environment
|
||||
table.table.table-striped class=(@execution_environment.present? ? 'sortable' : '')
|
||||
thead
|
||||
tr
|
||||
- ['.exercise', '.users_and_programming_groups', '.score', '.maximum_score', '.stddev_score', '.percentage_correct', '.runs', '.worktime', '.stddev_worktime'].each do |title|
|
||||
th.header = t(title)
|
||||
th.header = t('.exercise')
|
||||
th.header = t('.users_and_programming_groups')
|
||||
th.header = t('.score')
|
||||
th.header = t('.maximum_score')
|
||||
th.header = t('.stddev_score')
|
||||
th.header = t('.percentage_correct')
|
||||
th.header = t('.runs')
|
||||
th.header = t('.worktime')
|
||||
th.header = t('.stddev_worktime')
|
||||
tbody
|
||||
- @execution_environment.exercises.each do |exercise|
|
||||
- us = contributor_statistics[exercise.id]
|
||||
|
@ -8,6 +8,7 @@ h1 = @exercise
|
||||
= row(label: '.participants', value: @exercise.contributors.size)
|
||||
|
||||
- %i[intermediate final].each do |scope|
|
||||
/ i18n-tasks-use t('.intermediate_submissions') t('.final_submissions')
|
||||
= row(label: ".#{scope}_submissions") do
|
||||
/TODO: Refactor next line
|
||||
= "#{@exercise.submissions.send(scope).count} (#{t('.users_and_programming_groups', count: Submission.from(@exercise.submissions.send(scope).group(:contributor_id, :contributor_type).select(:contributor_id, :contributor_type)).count)})"
|
||||
|
@ -9,6 +9,7 @@
|
||||
.input-group.mb-3
|
||||
= f.text_field(:programming_partner_ids, class: 'form-control', required: true, value: (@programming_group.programming_partner_ids - [current_user.id_with_type]).join(', '))
|
||||
= render('shared/submit_button', f:, object: @programming_group)
|
||||
/ i18n-tasks-use t('.hints.programming_partner_ids')
|
||||
/.help-block.form-text = t('.hints.programming_partner_ids')
|
||||
.col-md-6
|
||||
.join_programming_pair.button.btn.btn-primary.d-none.d-md-block
|
||||
|
@ -3,9 +3,9 @@ h1
|
||||
- if policy(@programming_group).edit?
|
||||
= render('shared/edit_button', object: @programming_group)
|
||||
|
||||
= row(label: 'activerecord.attributes.programming_group.name', value: @programming_group.displayname)
|
||||
= row(label: 'activerecord.attributes.programming_group.exercise', value: link_to_if(policy(@programming_group.exercise).show?, @programming_group.exercise.title, @programming_group.exercise))
|
||||
= row(label: 'activerecord.attributes.programming_group.member_count', value: @programming_group.users.size)
|
||||
= row(label: 'programming_group.name', value: @programming_group.displayname)
|
||||
= row(label: 'programming_group.exercise', value: link_to_if(policy(@programming_group.exercise).show?, @programming_group.exercise.title, @programming_group.exercise))
|
||||
= row(label: 'programming_group.member_count', value: @programming_group.users.size)
|
||||
= row(label: 'shared.created_at', value: l(@programming_group.created_at, format: :short))
|
||||
|
||||
h2.mt-4 = t('activerecord.attributes.study_group.members')
|
||||
|
@ -1,7 +1,9 @@
|
||||
h1 = t('.headline')
|
||||
|
||||
p
|
||||
/ i18n-tasks-use t('.success_with_outcome') t('.success_without_outcome')
|
||||
= t(".success_#{@lti_parameter ? 'with' : 'without'}_outcome", consumer: current_user.consumer)
|
||||
/ i18n-tasks-use t('.finished_with_consumer') t('.finished_without_consumer')
|
||||
==< t(".finished_#{@lti_parameter ? 'with' : 'without'}_consumer", consumer: h(current_user.consumer.name), url: @url)
|
||||
=< t('.do_not_use_backbutton')
|
||||
|
||||
|
Reference in New Issue
Block a user