From 7f6805b4985b6b230e6f81b67172a17134244632 Mon Sep 17 00:00:00 2001 From: sabinammm Date: Wed, 12 Jan 2022 15:19:14 +0100 Subject: [PATCH 1/3] apps/livequestions apps/plans: fixed missing translations by moving translation strings into variables at top of files in all affected jsx files Fixes Issues #4150 and #4149 as caused by PR #4126 --- .../livequestions/assets/CategorySelect.jsx | 7 ++++-- .../apps/livequestions/assets/QuestionBox.jsx | 18 ++++++++----- .../livequestions/assets/QuestionForm.jsx | 16 ++++++++---- .../apps/plans/assets/FilterSecondary.jsx | 25 ++++++++++++------- meinberlin/apps/plans/assets/PlansList.jsx | 15 +++++------ meinberlin/apps/plans/assets/PlansMap.jsx | 19 +++++++++----- meinberlin/apps/plans/assets/PopUp.jsx | 22 ++++++++++------ meinberlin/apps/plans/assets/Toggles.jsx | 24 ++++++++++++------ 8 files changed, 96 insertions(+), 50 deletions(-) diff --git a/meinberlin/apps/livequestions/assets/CategorySelect.jsx b/meinberlin/apps/livequestions/assets/CategorySelect.jsx index 5a67a70483..061517c778 100644 --- a/meinberlin/apps/livequestions/assets/CategorySelect.jsx +++ b/meinberlin/apps/livequestions/assets/CategorySelect.jsx @@ -2,6 +2,9 @@ import django from 'django' import React from 'react' import $ from 'jquery' // FIXME needed to run test but file should be refactored to not include jquery +const affiliationStr = django.gettext('Affiliation') +const answeredQuestionsStr = django.gettext('Answered questions will be displayed in the statistics according to the chosen affiliation.') + export default class SelectCategory extends React.Component { componentDidMount () { const select = $('#categorySelect') @@ -13,9 +16,9 @@ export default class SelectCategory extends React.Component {
{Object.keys(this.props.category_dict).length > 0 &&
- +
- {django.gettext('Answered questions will be displayed in the statistics according to the chosen affiliation.')} + {answeredQuestionsStr}