mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-30 03:32:26 +08:00
chore(i18n): translate font selection headings
This commit is contained in:
parent
0304f1e5e9
commit
c6b3cc7882
@ -3,27 +3,38 @@ import utils from "../../../../services/utils.js";
|
|||||||
import { t } from "../../../../services/i18n.js";
|
import { t } from "../../../../services/i18n.js";
|
||||||
import { OptionMap, OptionNames } from "../../../../../../services/options_interface.js";
|
import { OptionMap, OptionNames } from "../../../../../../services/options_interface.js";
|
||||||
|
|
||||||
const FONT_FAMILIES = {
|
const FONT_FAMILIES = [
|
||||||
"Generic fonts": [
|
{
|
||||||
|
title: t("fonts.generic-fonts"),
|
||||||
|
items: [
|
||||||
{ value: "theme", label: t("fonts.theme_defined") },
|
{ value: "theme", label: t("fonts.theme_defined") },
|
||||||
{ value: "serif", label: "Serif" },
|
{ value: "serif", label: "Serif" },
|
||||||
{ value: "sans-serif", label: "Sans Serif" },
|
{ value: "sans-serif", label: "Sans Serif" },
|
||||||
{ value: "monospace", label: "Monospace" },
|
{ value: "monospace", label: "Monospace" },
|
||||||
],
|
]
|
||||||
"Sans-serif system fonts": [
|
},
|
||||||
|
{
|
||||||
|
title: t("fonts.sans-serif-system-fonts"),
|
||||||
|
items: [
|
||||||
{ value: "Arial", label: "Arial" },
|
{ value: "Arial", label: "Arial" },
|
||||||
{ value: "Verdana", label: "Verdana" },
|
{ value: "Verdana", label: "Verdana" },
|
||||||
{ value: "Helvetica", label: "Helvetica" },
|
{ value: "Helvetica", label: "Helvetica" },
|
||||||
{ value: "Tahoma", label: "Tahoma" },
|
{ value: "Tahoma", label: "Tahoma" },
|
||||||
{ value: "Trebuchet MS", label: "Trebuchet MS" },
|
{ value: "Trebuchet MS", label: "Trebuchet MS" },
|
||||||
{ value: "Microsoft YaHei", label: "Microsoft YaHei" },
|
{ value: "Microsoft YaHei", label: "Microsoft YaHei" },
|
||||||
],
|
]
|
||||||
"Serif system fonts": [
|
},
|
||||||
|
{
|
||||||
|
title: t("fonts.serif-system-fonts"),
|
||||||
|
items: [
|
||||||
{ value: "Times New Roman", label: "Times New Roman" },
|
{ value: "Times New Roman", label: "Times New Roman" },
|
||||||
{ value: "Georgia", label: "Georgia" },
|
{ value: "Georgia", label: "Georgia" },
|
||||||
{ value: "Garamond", label: "Garamond" },
|
{ value: "Garamond", label: "Garamond" },
|
||||||
],
|
]
|
||||||
"Monospace system fonts": [
|
},
|
||||||
|
{
|
||||||
|
title: t("fonts.monospace-system-fonts"),
|
||||||
|
items: [
|
||||||
{ value: "Courier New", label: "Courier New" },
|
{ value: "Courier New", label: "Courier New" },
|
||||||
{ value: "Brush Script MT", label: "Brush Script MT" },
|
{ value: "Brush Script MT", label: "Brush Script MT" },
|
||||||
{ value: "Impact", label: "Impact" },
|
{ value: "Impact", label: "Impact" },
|
||||||
@ -31,13 +42,17 @@ const FONT_FAMILIES = {
|
|||||||
{ value: "Andalé Mono", label: "Andalé Mono" },
|
{ value: "Andalé Mono", label: "Andalé Mono" },
|
||||||
{ value: "Lucida Console", label: "Lucida Console" },
|
{ value: "Lucida Console", label: "Lucida Console" },
|
||||||
{ value: "Monaco", label: "Monaco" },
|
{ value: "Monaco", label: "Monaco" },
|
||||||
],
|
]
|
||||||
"Handwriting system fonts": [
|
},
|
||||||
|
{
|
||||||
|
title: t("fonts.handwriting-system-fonts"),
|
||||||
|
items: [
|
||||||
{ value: "Bradley Hand", label: "Bradley Hand" },
|
{ value: "Bradley Hand", label: "Bradley Hand" },
|
||||||
{ value: "Luminari", label: "Luminari" },
|
{ value: "Luminari", label: "Luminari" },
|
||||||
{ value: "Comic Sans MS", label: "Comic Sans MS" }
|
{ value: "Comic Sans MS", label: "Comic Sans MS" }
|
||||||
]
|
]
|
||||||
};
|
}
|
||||||
|
];
|
||||||
|
|
||||||
const TPL = `
|
const TPL = `
|
||||||
<div class="options-section">
|
<div class="options-section">
|
||||||
@ -196,11 +211,11 @@ export default class FontsOptions extends OptionsWidget {
|
|||||||
fillFontFamilyOptions($select: JQuery<HTMLElement>, currentValue: string) {
|
fillFontFamilyOptions($select: JQuery<HTMLElement>, currentValue: string) {
|
||||||
$select.empty();
|
$select.empty();
|
||||||
|
|
||||||
for (const [group, fonts] of Object.entries(FONT_FAMILIES)) {
|
for (const { title, items } of Object.values(FONT_FAMILIES)) {
|
||||||
$select.append($("<optgroup>")
|
$select.append($("<optgroup>")
|
||||||
.attr("label", group));
|
.attr("label", title));
|
||||||
|
|
||||||
for (const {value, label} of fonts) {
|
for (const {value, label} of items) {
|
||||||
$select.append($("<option>")
|
$select.append($("<option>")
|
||||||
.attr("value", value)
|
.attr("value", value)
|
||||||
.prop("selected", value === currentValue)
|
.prop("selected", value === currentValue)
|
||||||
|
@ -1063,7 +1063,12 @@
|
|||||||
"note_tree_and_detail_font_sizing": "Note that tree and detail font sizing is relative to the main font size setting.",
|
"note_tree_and_detail_font_sizing": "Note that tree and detail font sizing is relative to the main font size setting.",
|
||||||
"not_all_fonts_available": "Not all listed fonts may be available on your system.",
|
"not_all_fonts_available": "Not all listed fonts may be available on your system.",
|
||||||
"apply_font_changes": "To apply font changes, click on",
|
"apply_font_changes": "To apply font changes, click on",
|
||||||
"reload_frontend": "reload frontend"
|
"reload_frontend": "reload frontend",
|
||||||
|
"generic-fonts": "Generic fonts",
|
||||||
|
"sans-serif-system-fonts": "Sans-serif system fonts",
|
||||||
|
"serif-system-fonts": "Serif system fonts",
|
||||||
|
"monospace-system-fonts": "Monospace system fonts",
|
||||||
|
"handwriting-system-fonts": "Handwriting system fonts"
|
||||||
},
|
},
|
||||||
"max_content_width": {
|
"max_content_width": {
|
||||||
"title": "Content Width",
|
"title": "Content Width",
|
||||||
|
@ -553,7 +553,12 @@
|
|||||||
"note_tree_font": "Fontul arborelui de notițe",
|
"note_tree_font": "Fontul arborelui de notițe",
|
||||||
"reload_frontend": "reîncarcă interfața",
|
"reload_frontend": "reîncarcă interfața",
|
||||||
"size": "Mărime",
|
"size": "Mărime",
|
||||||
"theme_defined": "Definit de temă"
|
"theme_defined": "Definit de temă",
|
||||||
|
"generic-fonts": "Fonturi generice",
|
||||||
|
"handwriting-system-fonts": "Fonturi de sistem cu stil de scris de mână",
|
||||||
|
"monospace-system-fonts": "Fonturi de sistem monospațiu",
|
||||||
|
"sans-serif-system-fonts": "Fonturi de sistem fără serifuri",
|
||||||
|
"serif-system-fonts": "Fonturi de sistem cu serifuri"
|
||||||
},
|
},
|
||||||
"global_menu": {
|
"global_menu": {
|
||||||
"about": "Despre TriliumNext Notes",
|
"about": "Despre TriliumNext Notes",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user