Moin
2024 年 7 月 25 日午後 2:22
1
Make the settings descriptions of all official theme components translatable からの議論を続けます。
現在、Category Groups の設定を翻訳可能にしようとしています。
[]
json_schema: >-
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"title": "ID",
"description": "A unique identifier for the link"
},
"url": {
"type": "string",
"title": "URL",
"description": "The URL for the link"
},
"color": {
"type": "string",
"title": "Color",
"description": "The color associated with the link",
しかし、locales/en.yml からの説明を JSON エディタに表示するための正しい構文を見つけるのに苦労しています。Objects type for theme setting を見つけましたが、これは objects type 設定の構文を説明しています。JSON スキーマについても同様のものがありますか?
例も見つけようとしましたが、カレンダープラグインの説明さえ現時点では翻訳できません。
# frozen_string_literal: true
module DiscourseCalendar
module SiteSettings
class MapEventTagColorsJsonSchema
def self.schema
@schema ||= {
type: "array",
uniqueItems: true,
items: {
type: "object",
title: "Color Mapping",
properties: {
type: {
type: "string",
description: "Type of mapping (tag or category)",
enum: %w[tag category],
},
slug: {
type: "string",
This file has been truncated. show original
「いいね!」 1
確認しましたが、何か見落とさない限り、不可能だと思います。
json_schema は objects 型に置き換えられる予定です。
公式のプラグインやコンポーネントも、いずれは変換されると考えています。
もしできれば、私も協力します!