Hi.
I’m using Drupal 11.1.4 with PHP 8.3, along with date_recur 3.9.3 and date_recur_modular 3.3.0, using the Sierra widget. I encountered an issue where recurrence pattern variables do not get properly translated.For example:
t('Weekly on @weekday', $tArgs);
Results in: "Semanalmente el Wednesday" instead of "Semanalmente el miércoles".
Proposed Solution:
I implemented a fix that ensures translations respect the current Drupal language. This approach allows recurrence pattern variables to be correctly translated. The patch affects DateRecurModularSierraWidget and DateRecurModularSierraModalForm.For the modal form, I used hook_form_alter(), but the logic remains the same. My current implementation only checks for Spanish and a specific timezone case, but it can be improved if integrated into the module directly.
Looking forward to feedback and improvements from the community. Thanks!
Hello, I didn't express myself well in my comment #4.
I modified and applied this patch to make the site language translations work for me.
It works for me in Spanish.
It should work for other languages.