mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 05:21:50 +08:00
DEV: Update javascript:update_constants rake task following template colocation (#20365)
As of ba3f62f576
, handlebars templates are colocated with js files so the path to hbs templates referenced by this rake task is no longer valid. This commit fixes the path to hbs templates and updates a couple of files that are generated by the rake task.
This commit is contained in:
parent
7ad92b7ab9
commit
f91631b625
|
@ -38,4 +38,10 @@ export const NOTIFICATION_TYPES = {
|
|||
chat_quoted: 33,
|
||||
assigned: 34,
|
||||
question_answer_user_commented: 35,
|
||||
watching_category_or_tag: 36,
|
||||
new_features: 37,
|
||||
following: 800,
|
||||
following_created_topic: 801,
|
||||
following_replied: 802,
|
||||
circles_activity: 900,
|
||||
};
|
||||
|
|
|
@ -16,7 +16,6 @@ export const emojis = [
|
|||
"blush",
|
||||
"slightly_smiling_face",
|
||||
"upside_down_face",
|
||||
"relaxed",
|
||||
"yum",
|
||||
"relieved",
|
||||
"heart_eyes",
|
||||
|
@ -2341,6 +2340,7 @@ export const aliases = {
|
|||
face_vomiting: ["puke"],
|
||||
smile: ["grinning_face_with_smiling_eyes"],
|
||||
frowning_with_open_mouth: ["frowning_face_with_open_mouth"],
|
||||
smiling_face: ["relaxed"],
|
||||
};
|
||||
export const searchAliases = {
|
||||
sad: [
|
||||
|
@ -6376,7 +6376,7 @@ export const replacements = {
|
|||
"😊": "blush",
|
||||
"🙂": "slightly_smiling_face",
|
||||
"🙃": "upside_down_face",
|
||||
"☺": "relaxed",
|
||||
"☺": "smiling_face",
|
||||
"😋": "yum",
|
||||
"😌": "relieved",
|
||||
"😍": "heart_eyes",
|
||||
|
|
|
@ -232,7 +232,6 @@ class Emoji
|
|||
replacements["\u{263B}"] = "slight_smile"
|
||||
replacements["\u{2661}"] = "heart"
|
||||
replacements["\u{2665}"] = "heart"
|
||||
replacements["\u{263A}"] = "relaxed"
|
||||
|
||||
replacements
|
||||
end
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
},
|
||||
{
|
||||
"code": "263a",
|
||||
"name": "relaxed"
|
||||
"name": "smiling_face"
|
||||
},
|
||||
{
|
||||
"code": "1f60b",
|
||||
|
@ -8310,6 +8310,9 @@
|
|||
],
|
||||
"frowning_with_open_mouth": [
|
||||
"frowning_face_with_open_mouth"
|
||||
],
|
||||
"smiling_face": [
|
||||
"relaxed"
|
||||
]
|
||||
},
|
||||
"searchAliases": {
|
||||
|
|
|
@ -196,7 +196,7 @@ task "javascript:update_constants" => :environment do
|
|||
|
||||
emoji_sections = groups_json.map { |group| html_for_section(group) }
|
||||
|
||||
components_dir = "discourse/app/templates/components"
|
||||
components_dir = "discourse/app/components"
|
||||
write_hbs_template("#{components_dir}/emoji-group-buttons.hbs", task_name, emoji_buttons.join)
|
||||
write_hbs_template("#{components_dir}/emoji-group-sections.hbs", task_name, emoji_sections.join)
|
||||
end
|
||||
|
|
|
@ -1461,7 +1461,7 @@ RSpec.describe PrettyText do
|
|||
|
||||
it "replaces some glyphs that are not in the emoji range" do
|
||||
expect(PrettyText.cook("☹")).to match(/\:frowning\:/)
|
||||
expect(PrettyText.cook("☺")).to match(/\:relaxed\:/)
|
||||
expect(PrettyText.cook("☺")).to match(/\:smiling_face\:/)
|
||||
expect(PrettyText.cook("☻")).to match(/\:slight_smile\:/)
|
||||
expect(PrettyText.cook("♡")).to match(/\:heart\:/)
|
||||
expect(PrettyText.cook("❤")).to match(/\:heart\:/)
|
||||
|
|
Loading…
Reference in New Issue
Block a user