mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 06:18:14 +08:00
DEV: Do not translate font names (#10723)
Use the names as provided by discourse-fonts and remove the translated strings. It also ensures that the selected font is present in case a font will be removed in the future.
This commit is contained in:
@ -43,13 +43,17 @@ module Stylesheet
|
||||
register_import "font" do
|
||||
font = DiscourseFonts.fonts.find { |f| f[:key] == SiteSetting.base_font }
|
||||
|
||||
contents = <<~EOF
|
||||
#{font_css(font)}
|
||||
contents = if font.present?
|
||||
<<~EOF
|
||||
#{font_css(font)}
|
||||
|
||||
:root {
|
||||
--font-family: #{font[:stack]};
|
||||
}
|
||||
EOF
|
||||
:root {
|
||||
--font-family: #{font[:stack]};
|
||||
}
|
||||
EOF
|
||||
else
|
||||
""
|
||||
end
|
||||
|
||||
Import.new("font.scss", source: contents)
|
||||
end
|
||||
|
Reference in New Issue
Block a user