[Bug]: EventMerger.php->getExtendedSubject() uses server default language for "and" in activity emails instead of user preference

Aperta Adatta ai principianti
#66,969 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
75/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
php

Direzione di ricerca

Inizia in lib/private/Activity/EventMerger.php da getExtendedSubject(), dove viene costruita la parola di congiunzione 'and' per l'attività sui file unita. Verifica come viene ottenuto lì l'oggetto di traduzione e se usa la lingua predefinita del server invece di quella del destinatario. È completato quando l'oggetto unito per un utente con una lingua non predefinita usa il 'and' di quella lingua nell'email di attività e i test sull'attività continuano a passare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

34-feedback

Submit a report and help us improve Nextcloud Server

Bug description

When receiving an email notification for file activity, the language of those emails is set to the user's preferred language.

However, the word "and" in sentences like {user} created {folder} and {file}, parsed by https://github.com/nextcloud/server/blob/master/lib/private/Activity/EventMerger.php#L182 uses the server's default language.

Steps to reproduce
  1. Enable email notifications for file changes
  2. Set your user's (interface) language to anything different from the default
  3. Upload a few files at once
  4. Receive an email that says You created {file} AND {file} AND {file}, where AND is not in the same language as the rest of the email.
Expected behavior

and should be in the same preferred language.

Nextcloud Server version

34

Additional info

and is correctly translated in the Activity app.


gitGost helps developers protect their privacy by removing identifying information from commits and squashing changes.

While this may limit context for maintainers, remember that not everyone enjoys the same freedoms. For some, privacy is a necessity.

Learn more at gitGost.

Lingua principale
PHP
Stelle
37.6k
Fork
5.4k
Merge medio
1g 13h
PR unite (30g)
623

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nextcloud/server

Tutte le issue di nextcloud/server

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.