Skip to content

Commit

Permalink
feat(Add): translations
Browse files Browse the repository at this point in the history
  • Loading branch information
YU000jp committed Jul 27, 2024
1 parent 8d38682 commit 23a3260
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,25 @@ import '@logseq/libs' //https://plugins-doc.logseq.com/
import { BlockEntity } from '@logseq/libs/dist/LSPlugin.user'
import { setup as l10nSetup, t } from "logseq-l10n" //https://github.com/sethyuan/logseq-l10n
import { settingsTemplate } from "./settings"
import af from "./translations/af.json"
import de from "./translations/de.json"
import es from "./translations/es.json"
import fr from "./translations/fr.json"
import id from "./translations/id.json"
import it from "./translations/it.json"
import ja from "./translations/ja.json"
import ko from "./translations/ko.json"
import nbNO from "./translations/nb-NO.json"
import nl from "./translations/nl.json"
import pl from "./translations/pl.json"
import ptBR from "./translations/pt-BR.json"
import ptPT from "./translations/pt-PT.json"
import ru from "./translations/ru.json"
import sk from "./translations/sk.json"
import tr from "./translations/tr.json"
import uk from "./translations/uk.json"
import zhCN from "./translations/zh-CN.json"
import zhHant from "./translations/zh-Hant.json"
const keyNameToolbarPopup = "toolbar-box-itft"//ポップアップのキー名
const keyRefreshButton = "tbft--refresh"//リフレッシュボタンのキー名
const pluginName = "Template-Block from Toolbar"//プラグイン名
Expand All @@ -14,7 +32,12 @@ const icon = "🛢️"
const main = async () => {

//多言語化 L10N
await l10nSetup({ builtinTranslations: { ja } })
await l10nSetup({
builtinTranslations: {//Full translations
ja, af, de, es, fr, id, it, ko, "nb-NO": nbNO, nl, pl, "pt-BR": ptBR, "pt-PT": ptPT, ru, sk, tr, uk, "zh-CN": zhCN, "zh-Hant": zhHant
}
})

// 設定の読み込み ※設定項目なし
logseq.useSettingsSchema(settingsTemplate())

Expand Down

0 comments on commit 23a3260

Please sign in to comment.