Project

General

Profile

Actions

Anomalie #1706

closed

Translated activities added in list as new activities

Added by Guillaume AGNIERAY 10 months ago. Updated 9 months ago.

Status:
Fermé
Priority:
Bas
Assignee:
-
Start date:
09/26/2023
Due date:
% Done:

100%

Estimated time:
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
Actions #1

Updated by Johan Cwiklinski 9 months ago

  • Priority changed from Normal to 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).

Actions #2

Updated by Johan Cwiklinski 9 months ago

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

Actions #3

Updated by Johan Cwiklinski 9 months ago

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

Actions #4

Updated by Guillaume AGNIERAY 9 months ago

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 ?

Actions #5

Updated by Johan Cwiklinski 9 months ago

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

Actions #6

Updated by Johan Cwiklinski 9 months ago

  • Status changed from Nouveau to Résolu
  • % Done changed from 0 to 100
Actions #7

Updated by Johan Cwiklinski 9 months ago

  • Status changed from Résolu to Fermé
Actions #8

Updated by Johan Cwiklinski 9 months ago

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.

Actions #9

Updated by Johan Cwiklinski 9 months ago

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

Also available in: Atom PDF