RGJ
(Richard - Communiteq)
8 فبراير 2026، 12:32م
1
أبلغت عن مشكلة في تجربة المستخدم (UX)
أشار لي موين إلى أنه كان مكررًا
ثم أغلقت الموضوع وجعلته مخفيًا
أعجب موين بمنشوري
رأيت إشعارًا صينيًا ونقرت عليه
تم تغيير عنوان الموضوع إلى الصينية
الموضوع هنا
لست متأكدًا مما إذا كانت النقاط 2-5 مهمة، ولكن ربما تكون كذلك، ولهذا السبب أذكرها.
مشابه لـ Another title localization issue
لست متأكدًا مما إذا كان هو نفسه، لذا سأفتح تقرير خطأ جديد.
إعجاب واحد (1)
Moin
8 فبراير 2026، 12:43م
2
إعجاب واحد (1)
nat
(Natalie T)
9 فبراير 2026، 3:19ص
4
شكرًا على التقرير. سألقي نظرة.
تعديل: رائع. بفضل السجلات يمكنني الآن تحديد السبب.
3 إعجابات
nat
(Natalie T)
10 فبراير 2026، 2:53م
5
لدينا حل هنا:
main ← fancy-title-write
merged 02:22PM - 10 Feb 26 UTC
Related: https://meta.discourse.org/t/yet-another-title-localization-issue/39546… 9
### bug context
tldr; `Topic#fancy_title` saves a fancy_title to db when the fancy_title is null.
This bug requires a certain incantation to trigger.
- Topic 395465 exists with `title = "Notification level button always says \"tracking\""` and
`fancy_title = NULL` in the DB
- A `TopicLocalization` exists for this topic in `zh_CN`
- `content_localization_enabled` is on
When a crawler hits `GET /t/.../395465?tl=zh_CN`, localization replacement happens on the topic, which writes the title attribute, so the state is now
- `title` = Chinese (modified)
- `fancy_title` = NULL (untouched, still what was loaded from DB)
When serializing via `TopicViewSerializer` which uses `LocalizedFancyTopicTitleMixin`, we call `topic.fancy_title`. The `topic#fancy_title` generates the fancy_title from the title value, then writes the chinese fancy title to db 😢
https://github.com/discourse/discourse/blob/e935ed63b28a30ee7ae6a7783ae05fe33edf3367/app/models/topic.rb#L532-L545
### fix
This PR fixes the issue by ensuring the fancy_title is always written along with the title, preventing the need for invoking `topic#fancy_title`.
هذا الحل يجب أن يحل المشكلة التي كنا نراها من الناحية التقنية. السؤال الأكبر الذي لم أحله هو سبب كون العنوان المزين (fancy_title) للموضوع المتورط قد يكون فارغًا (null) في قاعدة البيانات، حيث أن هذا هو السيناريو الذي سيؤدي إلى حفظ الترجمة.
سأستمر في مراقبة هذا الأمر هنا. سأبقي هذا مفتوحًا حتى نهاية الأسبوع.
إعجابَين (2)