Skip to content

Commit

Permalink
[Privacy] moves account section from core plugin (#2489)
Browse files Browse the repository at this point in the history
* moving privacy account core=> main->privacy

* translation privacy and menu jauge

* core/privacy

* privacy core branch translations

* translate desktop -> administration

* delete therm_of_service translation json

* changement domain

* delete core privacy

* correction suite echec PHPUnit
  • Loading branch information
Noelle-M authored May 19, 2023
1 parent d994f26 commit 3fd36bc
Show file tree
Hide file tree
Showing 21 changed files with 51 additions and 157 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ class PlatformStatus extends Component {
}
</h3>

{this.props.disabled && 'La plateforme est désactivée et n\'est plus accessible.'}
{!this.props.disabled && !this.props.maintenance && 'La plateforme est ouverte aux utilisateurs.'}
{!this.props.disabled && this.props.maintenance && 'La plateforme est fermée et uniquement accessible aux administrateurs.'}
{this.props.disabled && trans('platform_opened', {}, 'administration')}
{!this.props.disabled && !this.props.maintenance && trans('platform_desactive', {}, 'administration')}
{!this.props.disabled && this.props.maintenance && trans('platform_active_admin', {}, 'administration')}
</div>
</section>
)
Expand Down
6 changes: 5 additions & 1 deletion src/main/app/Resources/translations/administration.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@
"platform_not_started_alert": "The platform is not yet accessible.",
"platform_not_started_desc": "The platform will be open from %date%.",
"platform_ended_alert": "The platform is no longer accessible.",
"platform_ended_desc": "The platform has been closed since %date%."
"platform_ended_desc": "The platform has been closed since %date%.",

"platform_opened": "The platform is open to users.",
"platform_desactive": "The platform is deactivated and no longer accessible.",
"platform_active_admin": "The platform is closed and only accessible to administrators."
}
6 changes: 5 additions & 1 deletion src/main/app/Resources/translations/administration.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@
"platform_not_started_alert": "La plateforme n'est pas encore accessible.",
"platform_not_started_desc": "La plateforme sera ouverte à partir du %date%.",
"platform_ended_alert": "La plateforme n'est plus accessible.",
"platform_ended_desc": "La plateforme est fermée depuis le %date%."
"platform_ended_desc": "La plateforme est fermée depuis le %date%.",

"platform_opened": "La plateforme est ouverte aux utilisateurs.",
"platform_desactive": "La plateforme est désactivée et n'est plus accessible.",
"platform_active_admin": "La plateforme est fermée et uniquement accessible aux administrateurs."
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ const ParametersMenu = (props) =>
label: trans('general'),
target: props.path+'/',
exact: true
}, {
name: 'privacy',
type: LINK_BUTTON,
icon: 'fa fa-fw fa-shield',
label: trans('privacy'),
target: props.path+'/privacy'
}, {
name: 'appearance',
type: LINK_BUTTON,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {Routes} from '#/main/app/router'
import {ToolPage} from '#/main/core/tool/containers/page'
import {Meta} from '#/main/core/administration/parameters/main/containers/meta'
import {Technical} from '#/main/core/administration/parameters/technical/containers/technical'
import {PrivacyMain} from '#/main/core/administration/parameters/privacy/containers/main'

import {AppearanceTool} from '#/main/theme/administration/appearance/containers/tool'

Expand All @@ -22,7 +21,6 @@ const ParametersTool = (props) => {
path={props.path}
routes={[
{path: '/', exact: true, render: () => trans('general')},
{path: '/privacy', render: () => trans('privacy')},
{path: '/technical', render: () => trans('technical')},
{path: '/appearance', render: () => trans('appearance')}
]}
Expand All @@ -36,9 +34,6 @@ const ParametersTool = (props) => {
path: '/',
exact: true,
component: Meta
}, {
path: '/privacy',
component: PrivacyMain
},
{
path: '/technical',
Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion src/main/core/Resources/modules/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ registry.add('ClarolineCoreBundle', {
*/
account: {
'parameters': () => { return import(/* webpackChunkName: "core-account-parameters" */ '#/main/core/account/parameters') },
'privacy' : () => { return import(/* webpackChunkName: "core-account-privacy" */ '#/main/core/account/privacy') }
},

/**
Expand Down
5 changes: 0 additions & 5 deletions src/main/core/Resources/translations/platform.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,11 +608,6 @@
"tag": "Tag",
"tags": "Tags",
"technical": "Technical",
"terms_of_service": "Terms of service",
"terms_of_service_activation_message": "Activate the terms of service",
"terms_of_service_activation_help": "New users will need to accept the terms to be able to use the platform.",
"terms_enabled_but_empty": "Terms of service can only be enabled if a text is provided in at least one language.",
"terms_of_service_acceptance": "I accept the terms of service",
"text": "Text",
"text_left_align": "Align left",
"text_length": "Length of the text",
Expand Down
5 changes: 0 additions & 5 deletions src/main/core/Resources/translations/platform.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,11 +626,6 @@
"tag": "Tag",
"tags": "Tags",
"technical": "Technique",
"terms_of_service": "Conditions d'utilisation",
"terms_of_service_activation_message": "Activer les conditions d'utilisation",
"terms_of_service_activation_help": "Les nouveaux utilisateurs devront accepter les conditions avant de pouvoir utiliser la plateforme.",
"terms_enabled_but_empty": "Les conditions d'utilisation ne peuvent être activées que si le texte est fourni dans au moins une langue.",
"terms_of_service_acceptance": "J'accepte les conditions d'utilisation",
"text": "Texte",
"text_left_align": "Aligner à gauche",
"text_length": "Longueur du texte",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const PrivacyMain = (props) =>
title={trans('privacy')}
>
<ContentTitle
title={trans('terms_of_service')}
title={trans('terms_of_service',{}, 'privacy')}
style={{marginTop: 60}}
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {connect} from 'react-redux'
import {selectors as configSelectors} from '#/main/app/config/store'
import {selectors as securitySelectors} from '#/main/app/security/store'

import {actions} from '#/main/core/account/privacy/store'
import {PrivacyMain as PrivacyMainComponent} from '#/main/core/account/privacy/components/main'
import {actions} from '#/main/privacy/account/privacy/store'
import {PrivacyMain as PrivacyMainComponent} from '#/main/privacy/account/privacy/components/main'

const PrivacyMain = connect(
(state) => ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {trans} from '#/main/app/intl/translation'

import {PrivacyMain} from '#/main/core/account/privacy/containers/main'
import {PrivacyMain} from '#/main/privacy/account/privacy/containers/main'

export default {
name: 'privacy',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

import {actions} from '#/main/privacy/account/privacy/store/actions'
import {selectors} from '#/main/privacy/account/privacy/store/selectors'

export {
actions,
selectors
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const PrivacyTool = (props) =>
fields: [
{
name: 'privacy.countryStorage',
label: trans('Pays de stockage des données'),
label: trans('country_storage', {}, 'privacy'),
type: 'country'
}
]
Expand Down Expand Up @@ -57,18 +57,18 @@ const PrivacyTool = (props) =>
]
}, {
icon: 'fa fa-fw fa-copyright',
title: trans('terms_of_service'),
title: trans('terms_of_service', {}, 'privacy'),
fields: [
{
name: 'tos.enabled',
type: 'boolean',
label: trans('terms_of_service_activation_message'),
help: trans('terms_of_service_activation_help'),
label: trans('terms_of_service_activation_message', {}, 'privacy'),
help: trans('terms_of_service_activation_help', {}, 'privacy'),
linked: [
{
name: 'tos.text',
type: 'translated',
label: trans('terms_of_service'),
label: trans('terms_of_service', {}, 'privacy'),
required: true,
displayed: get(props.parameters, 'tos.enabled')
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/privacy/Resources/modules/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ registry.add('ClarolinePrivacyBundle', {
'privacy': () => {
return import(/* webpackChunkName: "main-privacy-admin-privacy" */ '#/main/privacy/administration/privacy')
}
},
account: {
'privacy' : () => { return import(/* webpackChunkName: "main-privacy-account-privacy" */ '#/main/privacy/account/privacy') }
}
})
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@
"no_accept_terms": "You have not yet accepted the terms of use of the platform.",
"title_my_data": "My personal data",
"export_data": "Export data",
"country_storage": "data storage country",
"request_deletion" : "Request deletion of my account",
"title_dialog_delete_account" : "Request to delete my account",
"message_dialog_delete_account" : "Are you sure you want to request the deletion of your account?",
"account_deletion": {
"subject": "Account deletion request",
"body": "User %name% <br/> ID: %id% <br/> wishes to delete their account. Please take the appropriate measures.<br/><hr/>"
}
},

"terms_of_service": "Terms of service",
"terms_of_service_activation_message": "Activate the terms of service",
"terms_of_service_activation_help": "New users will need to accept the terms to be able to use the platform.",
"terms_enabled_but_empty": "Terms of service can only be enabled if a text is provided in at least one language.",
"terms_of_service_acceptance": "I accept the terms of service"
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{
"accept_terms": "Vous avez accepté les conditions d'utilisation de la plateforme.",
"no_accept_terms": "Vous n'avez pas encore accepté les conditions d'utilisation de la plateforme.",
"title_my_datas": "Mes données personnelles",
"export_datas": "Exporter mes données",
"title_my_data": "Mes données personnelles",
"export_data": "Exporter mes données",
"country_storage": "Pays de stockage des données",
"request_deletion" : "Demander la suppression de mon compte",
"title_dialog_delete_account" : "Demande de suppression de mon compte",
"message_dialog_delete_account" : "Êtes-vous sûr de vouloir demander la suppression de votre compte ?",
"account_deletion": {
"subject": "Demande de suppression de compte",
"body": "L'utilisateur %name% <br/> ID : %id% <br/> souhaite supprimer son compte. Veuillez prendre les mesures appropriées.<br/><hr/>"
}
},

"terms_of_service": "Conditions d'utilisation",
"terms_of_service_activation_message": "Activer les conditions d'utilisation",
"terms_of_service_activation_help": "Les nouveaux utilisateurs devront accepter les conditions avant de pouvoir utiliser la plateforme.",
"terms_enabled_but_empty": "Les conditions d'utilisation ne peuvent être activées que si le texte est fourni dans au moins une langue.",
"terms_of_service_acceptance": "J'accepte les conditions d'utilisation"
}

0 comments on commit 3fd36bc

Please sign in to comment.