Skip to content

Commit

Permalink
Merge pull request #9177 from CitizenLabDotCo/master
Browse files Browse the repository at this point in the history
Release 2024-10-21-2
  • Loading branch information
jamesspeake authored Oct 21, 2024
2 parents 9f6aa15 + 2da4a9b commit 3face95
Show file tree
Hide file tree
Showing 83 changed files with 148 additions and 2,402 deletions.
16 changes: 15 additions & 1 deletion back/config/blocked_words/en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ cyberfucked
cyberfucker
cyberfuckers
cyberfucking
darkie
darky
d1ck
dick
dickhead
Expand Down Expand Up @@ -154,6 +156,8 @@ muther
mutherfucker
n1gga
n1gger
n1ggers
n1gger5
nigg3r
nigg4h
nigga
Expand All @@ -162,8 +166,16 @@ niggas
niggaz
nigger
niggers
nigger5
numbnuts
nutsack
paki
pak1
pakis
paki5
pak15
pakki
pakkis
p0rn
penisfucker
phonesex
Expand Down Expand Up @@ -239,4 +251,6 @@ w00se
wank
wanker
wanky
whore
whore
yid
yids
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def self.format_for_deserializer!(template)
def serialize_models
email_campaigns = EmailCampaigns::Campaign.manual
groups = Group.where(membership_type: 'manual')
ideas = Idea.published
ideas = Idea.submitted_or_published
initiatives = Initiative.published
users = User.where('invite_status IS NULL OR invite_status != ?', 'pending')

Expand Down
2 changes: 1 addition & 1 deletion back/engines/free/email_campaigns/config/locales/nl-BE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ nl-BE:
main_header: '%{firstName} noemde je in een interne reactie.'
preheader: '%{authorNameFull} noemde je in een interne reactie.'
moderator_digest:
subject: 'Je weekoverzicht als projectbeheerder van %{time}'
subject: 'Je weekoverzicht als projectbeheerder van "%{project_title}"'
preheader: 'Het weekoverzicht voor projectbeheerders van %{organizationName}'
title_your_weekly_report: '%{firstName}, je wekelijkse overzicht'
text_introduction: 'Ontdek rond welke ideeën er het meest werd gediscussieerd de afgelopen week. Hieronder kom je te weten wat er gebeurt met je project!'
Expand Down
2 changes: 1 addition & 1 deletion back/engines/free/email_campaigns/config/locales/nl-NL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ nl:
main_header: '%{firstName} noemde je in een interne reactie.'
preheader: '%{authorNameFull} noemde je in een interne reactie.'
moderator_digest:
subject: 'Je weekoverzicht als projectbeheerder van %{time}'
subject: 'Je weekoverzicht als projectbeheerder van "%{project_title}"'
preheader: 'Het weekoverzicht voor projectbeheerders van %{organizationName}'
title_your_weekly_report: '%{firstName}, je wekelijks overzicht'
text_introduction: 'Ontdek rond welke bijdrages er het meest werd gediscussieerd de afgelopen week. Hieronder kom je te weten wat er leeft in je project!'
Expand Down
20 changes: 18 additions & 2 deletions front/app/components/PhaseTimeLeft/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';

import useAppConfiguration from 'api/app_configuration/useAppConfiguration';

import { useIntl } from 'utils/cl-intl';
import { getPeriodRemainingUntil } from 'utils/dateUtils';

Expand All @@ -10,14 +12,28 @@ interface Props {
}

const PhaseTimeLeft = ({ currentPhaseEndsAt }: Props) => {
const { data: appConfiguration } = useAppConfiguration();
const tenantTimezone =
appConfiguration?.data.attributes.settings?.core.timezone;
const { formatMessage } = useIntl();
let timeLeft = getPeriodRemainingUntil(currentPhaseEndsAt, 'weeks');

if (!tenantTimezone) return null;

let timeLeft = getPeriodRemainingUntil(
currentPhaseEndsAt,
tenantTimezone,
'weeks'
);
let timeLeftMessage = messages.xWeeksLeft;

// If less than 2 weeks left
if (timeLeft < 2) {
// Get timeLeft in days
timeLeft = getPeriodRemainingUntil(currentPhaseEndsAt, 'days');
timeLeft = getPeriodRemainingUntil(
currentPhaseEndsAt,
tenantTimezone,
'days'
);
timeLeftMessage = messages.xDayLeft;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import useCraftComponentDefaultPadding from '../../useCraftComponentDefaultPaddi
import messages from './messages';

type AboutBoxProps = {
hideParticipationNumbers?: boolean;
hideParticipationAvatars?: boolean;
};

const AboutBox = ({ hideParticipationNumbers }: AboutBoxProps) => {
const AboutBox = ({ hideParticipationAvatars }: AboutBoxProps) => {
const { projectId, slug } = useParams() as {
projectId: string;
slug: string;
Expand All @@ -36,7 +36,7 @@ const AboutBox = ({ hideParticipationNumbers }: AboutBoxProps) => {
{projectID && (
<ProjectInfoSideBar
projectId={projectID}
hideParticipationNumbers={hideParticipationNumbers}
hideParticipationAvatars={hideParticipationAvatars}
/>
)}
</Box>
Expand All @@ -47,23 +47,23 @@ const AboutBoxSettings = () => {
const { formatMessage } = useIntl();
const {
actions: { setProp },
hideParticipationNumbers,
hideParticipationAvatars,
} = useNode((node) => ({
hideParticipationNumbers: node.data.props.hideParticipationNumbers,
hideParticipationAvatars: node.data.props.hideParticipationAvatars,
id: node.id,
}));

return (
<Box background={colors.white} my="32px">
<Toggle
checked={hideParticipationNumbers}
checked={hideParticipationAvatars}
onChange={() => {
setProp(
(props: AboutBoxProps) =>
(props.hideParticipationNumbers = !hideParticipationNumbers)
(props.hideParticipationAvatars = !hideParticipationAvatars)
);
}}
label={formatMessage(messages.hideParticipationNumbersText)}
label={formatMessage(messages.hideParticipationAvatarsText)}
/>
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export default defineMessages({
id: 'app.containers.admin.ContentBuilder.participationBox',
defaultMessage: 'Participation Box',
},
hideParticipationNumbersText: {
id: 'app.containers.admin.ContentBuilder.hideParticipationNumbersText',
defaultMessage: 'Hide participation numbers',
hideParticipationAvatarsText: {
id: 'app.containers.admin.ContentBuilder.hideParticipationAvatarsText',
defaultMessage: 'Hide participation avatars',
},
});
Loading

0 comments on commit 3face95

Please sign in to comment.