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

オープン 初心者向け
#66,969 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
75/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php

調査の方向性

lib/private/Activity/EventMerger.php の getExtendedSubject() から始めてください。ここで、統合されたファイルアクティビティ用の接続語 'and' が作られています。翻訳オブジェクトがどのように取得されているか、また受信者の言語ではなくサーバーの既定言語を使っていないかを確認してください。既定以外の言語を設定しているユーザーの統合された件名が、アクティビティのメールでその言語の 'and' を使い、アクティビティのテストがすべて引き続き通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
PHP
スター
37.6k
フォーク
5.4k
平均マージ
1日 13時間
マージ済み PR(30日)
623

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nextcloud/server のほかの issue

nextcloud/server の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。