هناك شيء غريب هنا (عنوان سيء، يرجى تسميته بشكل صحيح يا فريق العمل ):
3 إعجابات
شكرًا لتبليغك عن هذا! أعتقد أن هذا مرتبط بالمشكلة المبلغ عنها في Quick access to bookmarks and messages on user menu - #52 by xrav3nz . إذا كان الأمر كذلك، فإن @xrav3nz لديه طلب سحب (PR) جاهز لذلك
4 إعجابات
rishabh:
أضف إلى مُبلغ المشكلة
نعم، يبدو أنها نفس الخطأ. يرجى إغلاق هذا التكرار.
إعجابَين (2)
اتضح أن الأمر ليس نفس الخطأ، لذا سنحتاج إلى إبقاء هذا مفتوحًا. @xrav3nz استطاع إعادة إنتاج المشكلة وقد ينظر في إصلاحها قريبًا
4 إعجابات
أردتُ هنا حتى يتوفر للآخرين السياق.
ظننتُ أن هذا غريب لأن تبويب الإشعارات لا يشارك نفس مسار التمثيل (rendering codepath) مع التبويبات الأخرى، لذا قمتُ بإرجاع ميزة الوصول السريع الجديدة محليًا، وما زلتُ أستطيع تكرار المشكلة:
أعتقد أن هذه حالة هامشية للغاية مع دالة I18n.t من جانب العميل، وإليك اختبارًا فاشلاً بسيطًا لها: https://github.com/xrav3nz/discourse/commit/3d7324281a285158fe75f9e7b42574906c940e49 .
تم الإصلاح عبر:
master ← xrav3nz:fix/i18n-js-edge-case
merged 05:52PM - 16 Sep 19 UTC
> Context: https://meta.discourse.org/t/notification-character-bug/128461/8
I… was almost pulling my hairs out wondering why this would happen, then I took a closer look at [the `replace(pattern, replacement)` function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter):
> The `replacement` string can include the following special replacement patterns:
>
> Pattern | Inserts
> -- | --
> $& | Inserts the matched substring.
> ... | ...
The dollar sign (`$`) is a special replace pattern, and `$&` inserts the matched string... 😅 Thus dollars signs need to be escaped with the special pattern `$$`, which inserts a single `$`.
Let me know what you think, thanks!
9 إعجابات