Projet

Général

Profil

Actions

Anomalie #1706

fermé

Translated activities added in list as new activities

Ajouté par Guillaume AGNIERAY il y a environ un an. Mis à jour il y a environ un an.

Statut:
Fermé
Priorité:
Bas
Assigné à:
-
Début:
26/09/2023
Echéance:
% réalisé:

100%

Temps estimé:
Version utilisée:

Description

On the list of activities, switching to another language adds the default activities' translations as new activities.

How to reproduce :
  1. initiliaze the plugin database
  2. display the list of activities : only the default ones for the current language are in the list
  3. switch to another language : the translations are added to the list
  4. switch back to the previous language : all translations are in the list

Mis à jour par Johan Cwiklinski il y a environ un an

  • Priorité changé de Normal à Bas

Indeed I can confirm the issue; and I have no quick solution. Currently, activities are stored in the database in their translated form; and this must be changed.

This issue probably exists since the very beginning or the plugin, and since impact is quite low (no everyone really uses Galette in several languages at the same time) - I think I'll delay a fix for now (sorry).

Mis à jour par Johan Cwiklinski il y a environ un an

I wonder if the simplest solution would not be to drop those defaults, I'm not sure they make sense.

Mis à jour par Johan Cwiklinski il y a environ un an

Johan Cwiklinski a écrit (#note-2):

I wonder if the simplest solution would not be to drop those defaults, I'm not sure they make sense.

Done in https://github.com/galette/plugin-events/pull/36

Mis à jour par Guillaume AGNIERAY il y a environ un an

I don't know if it's the right way to proceed, but I opened a PR on your PR : https://github.com/galette/plugin-events/pull/37

When no activity exists, a mention should be added on the event form.

And as explained in the PR description :

As the town field is required, I think it makes sense to also move the "Activities" section at the end of the form. Otherwise it is necessary to fill the town field first to be able to add an activity.

Maybe adding a link to the activity form could be useful too ?

Mis à jour par Johan Cwiklinski il y a environ un an

Guillaume AGNIERAY a écrit (#note-4):

I don't know if it's the right way to proceed, but I opened a PR on your PR : https://github.com/galette/plugin-events/pull/37

That's perfect ;)

When no activity exists, a mention should be added on the event form.

And as explained in the PR description :

As the town field is required, I think it makes sense to also move the "Activities" section at the end of the form. Otherwise it is necessary to fill the town field first to be able to add an activity.

Maybe adding a link to the activity form could be useful too ?

I'm OK with that too

Mis à jour par Johan Cwiklinski il y a environ un an

  • Statut changé de Nouveau à Résolu
  • % réalisé changé de 0 à 100

Mis à jour par Johan Cwiklinski il y a environ un an

  • Statut changé de Résolu à Fermé

Mis à jour par Johan Cwiklinski il y a environ un an

Guillaume AGNIERAY a écrit (#note-4):

Maybe adding a link to the activity form could be useful too ?

I took a look, and that is not that simple. Indeed a simple link would redirect user to another page; and he will entirely loose all entered information on event he is creating/editing.
Therefore, it should rather be a modal that will bring the add form, and we also have to handle the update on avent add page (add an entry to select list if empty, or (worst) display a select list because there is no one... Also note adding activities is limited to admin and staff members.

That seems a huge work for very few benefits.

Mis à jour par Johan Cwiklinski il y a environ un an

Guillaume AGNIERAY a écrit (#note-4):

When no activity exists, a mention should be added on the event form.

I've remove the condition to display the empty message, that seems useless since we're in a else that seems to tell the same story, see 62a3eddc1599a4ba5692557d5730b313596b7cb7

Actions

Formats disponibles : Atom PDF