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 f874f41 commit cac138a
Show file tree
Hide file tree
Showing 20 changed files with 291 additions and 16 deletions.
32 changes: 27 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
import '@logseq/libs' //https://plugins-doc.logseq.com/
import { settingsTemplate } from './settings'
import { setup as l10nSetup, t } from "logseq-l10n" //https://github.com/sethyuan/logseq-l10n
import ja from "./translations/ja.json"
import CSS from "./style.css?inline"
import { BlockEntity, LSPluginBaseInfo } from '@logseq/libs/dist/LSPlugin.user'
import { setup as l10nSetup, t } from "logseq-l10n" //https://github.com/sethyuan/logseq-l10n
import { removeProvideStyle } from './lib'
import { settingsTemplate } from './settings'
import CSS from "./style.css?inline"
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"
export const keyPopup = "toolbar-box"//ポップアップのキー名
const keyStyle = "side-block-style"//CSSのキー名
const keyToolbar = "sideBlockToolbar"//ツールバーのキー名
Expand All @@ -20,7 +38,11 @@ const keyShowSettingsUI = "showSettingsUI"//設定画面を開くボタンのキ
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
}
})

/* user settings */
logseq.useSettingsSchema(await settingsTemplate())
Expand Down
14 changes: 14 additions & 0 deletions src/translations/af.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Aan/af",
"unset": "Unset",
"Width": "Breedte",
"Tag name": "Merk naam",
"Size": "Grootte",
"Tags containing \".side\" are displayed only when editing.": "Etikette wat \".side\" bevat, word slegs vertoon tydens redigering.",
"Select a parent block first, then click the tag name to insert that tag.": "Kies eers 'n ouerblok en klik dan op die etiketnaam om die etiket in te voeg.",
"Insert at editing block: #": "Voeg by redigeringsblok in: #",
"No block selected.": "Geen blok gekies nie.",
"Click here to insert a tag at the end of the current block.": "Klik hier om 'n merker aan die einde van die huidige blok in te voeg.",
"The current block is empty.": "Die huidige blok is leeg.",
"plugin settings": "Inprop-instellings"
}
14 changes: 14 additions & 0 deletions src/translations/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Ein/Aus",
"unset": "Unset",
"Width": "Breite",
"Tag name": "Tag name",
"Size": "Größe",
"Tags containing \".side\" are displayed only when editing.": "Tags, die \".side\" enthalten, werden nur beim Bearbeiten angezeigt.",
"Select a parent block first, then click the tag name to insert that tag.": "Wählen Sie zuerst einen übergeordneten Block aus und klicken Sie dann auf den Tag-Namen, um diesen Tag einzufügen.",
"Insert at editing block: #": "Einfügen im Bearbeitungsblock: #",
"No block selected.": "Kein Block ausgewählt.",
"Click here to insert a tag at the end of the current block.": "Klicken Sie hier, um ein Tag am Ende des aktuellen Blocks einzufügen.",
"The current block is empty.": "Der aktuelle Block ist leer.",
"plugin settings": "Plugin-Einstellungen"
}
14 changes: 14 additions & 0 deletions src/translations/es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Encendido/Apagado",
"unset": "Unset",
"Width": "Ancho",
"Tag name": "Nombre de la etiqueta",
"Size": "Tamaño",
"Tags containing \".side\" are displayed only when editing.": "Las etiquetas que contienen \".side\" solo se muestran durante la edición.",
"Select a parent block first, then click the tag name to insert that tag.": "Seleccione primero un bloque principal, luego haga clic en el nombre de la etiqueta para insertar esa etiqueta.",
"Insert at editing block: #": "Insertar en el bloque de edición: #",
"No block selected.": "No se ha seleccionado ningún bloque.",
"Click here to insert a tag at the end of the current block.": "Haga clic aquí para insertar una etiqueta al final del bloque actual.",
"The current block is empty.": "El bloque actual está vacío.",
"plugin settings": "Configuración del plugin"
}
14 changes: 14 additions & 0 deletions src/translations/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Marche/Arrêt",
"unset": "Unset",
"Width": "Largeur",
"Tag name": "Nom de la balise",
"Size": "Taille",
"Tags containing \".side\" are displayed only when editing.": "Les balises contenant « .side » ne sont affichées que lors de l’édition.",
"Select a parent block first, then click the tag name to insert that tag.": "Sélectionnez d’abord un bloc parent, puis cliquez sur le nom de la balise pour insérer cette balise.",
"Insert at editing block: #": "Insérer dans le bloc d’édition : #",
"No block selected.": "Aucun bloc sélectionné.",
"Click here to insert a tag at the end of the current block.": "Cliquez ici pour insérer une balise à la fin du bloc en cours.",
"The current block is empty.": "Le bloc actuel est vide.",
"plugin settings": "Paramètres du plugin"
}
14 changes: 14 additions & 0 deletions src/translations/id.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Hidup/Mati",
"unset": "tidak diatur",
"Width": "Lebar",
"Tag name": "Nama tag",
"Size": "Tingginya",
"Tags containing \".side\" are displayed only when editing.": "Tag yang berisi \".side\" hanya ditampilkan saat mengedit.",
"Select a parent block first, then click the tag name to insert that tag.": "Pilih blok induk terlebih dahulu, lalu klik nama tag untuk menyisipkan tag tersebut.",
"Insert at editing block: #": "Sisipkan di blok pengeditan: #",
"No block selected.": "Tidak ada blok yang dipilih.",
"Click here to insert a tag at the end of the current block.": "Klik di sini untuk menyisipkan tag di akhir blok saat ini.",
"The current block is empty.": "Blok saat ini kosong.",
"plugin settings": "Pengaturan plugin"
}
14 changes: 14 additions & 0 deletions src/translations/it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Acceso spento",
"unset": "Annullata",
"Width": "Larghezza",
"Tag name": "Nome del tag",
"Size": "Grandezza",
"Tags containing \".side\" are displayed only when editing.": "I tag contenenti \".side\" vengono visualizzati solo durante la modifica.",
"Select a parent block first, then click the tag name to insert that tag.": "Seleziona prima un blocco padre, quindi fai clic sul nome del tag per inserire quel tag.",
"Insert at editing block: #": "Inserisci nel blocco di modifica: #",
"No block selected.": "Nessun blocco selezionato.",
"Click here to insert a tag at the end of the current block.": "Fare clic qui per inserire un tag alla fine del blocco corrente.",
"The current block is empty.": "Il blocco corrente è vuoto.",
"plugin settings": "Impostazioni del plug-in"
}
23 changes: 12 additions & 11 deletions src/translations/ja.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"On/Off": "オン/オフ",
"unset": "設定しない",
"Width": "",
"Tag name": "タグ名",
"Size": "サイズ",
"Tags containing \".side\" are displayed only when editing.": "\".side\"を含むタグは編集時のみ表示",
"Select a parent block first, then click the tag name to insert that tag.": "先にターゲットの親ブロックを選択してから、タグ名をクリックしてください。そのタグが挿入されます。",
"Insert at editing block: #": "編集中のブロックに挿入: #",
"No block selected.": "ブロックが選択されていません。",
"Click here to insert a tag at the end of the current block.": "ここをクリックすると、現在のブロックの末尾にタグが挿入されます。",
"The current block is empty.": "現在のブロックは空です。空のブロックには配置用のタグは挿入できません。"
"On/Off": "オン/オフ",
"unset": "設定しない",
"Width": "",
"Tag name": "タグ名",
"Size": "サイズ",
"Tags containing \".side\" are displayed only when editing.": "\".side\"を含むタグは編集時のみ表示",
"Select a parent block first, then click the tag name to insert that tag.": "先にターゲットの親ブロックを選択してから、タグ名をクリックしてください。そのタグが挿入されます。",
"Insert at editing block: #": "編集中のブロックに挿入: #",
"No block selected.": "ブロックが選択されていません。",
"Click here to insert a tag at the end of the current block.": "ここをクリックすると、現在のブロックの末尾にタグが挿入されます。",
"The current block is empty.": "現在のブロックは空です。空のブロックには配置用のタグは挿入できません。",
"plugin settings": "プラグイン設定"
}
14 changes: 14 additions & 0 deletions src/translations/ko.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "온 / 오프",
"unset": "해제",
"Width": "너비",
"Tag name": "태그 이름",
"Size": "크기",
"Tags containing \".side\" are displayed only when editing.": "\".side\"가 포함된 태그는 편집할 때만 표시됩니다.",
"Select a parent block first, then click the tag name to insert that tag.": "먼저 상위 블록을 선택한 다음 태그 이름을 클릭하여 해당 태그를 삽입합니다.",
"Insert at editing block: #": "편집 블록에 삽입: #",
"No block selected.": "선택한 블록이 없습니다.",
"Click here to insert a tag at the end of the current block.": "현재 블록의 끝에 태그를 삽입하려면 여기를 클릭하십시오.",
"The current block is empty.": "현재 블록은 비어 있습니다.",
"plugin settings": "플러그인 설정"
}
14 changes: 14 additions & 0 deletions src/translations/nb-NO.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "På av",
"unset": "Fjern",
"Width": "Bredde",
"Tag name": "Navn på tagg",
"Size": "Størrelse",
"Tags containing \".side\" are displayed only when editing.": "Tagger som inneholder \".side\" vises bare når du redigerer.",
"Select a parent block first, then click the tag name to insert that tag.": "Velg en overordnet blokk først, og klikk deretter på merkenavnet for å sette inn den koden.",
"Insert at editing block: #": "Sett inn ved redigeringsblokk: #",
"No block selected.": "Ingen blokk valgt.",
"Click here to insert a tag at the end of the current block.": "Klikk her for å sette inn en tag på slutten av den gjeldende blokken.",
"The current block is empty.": "Den nåværende blokken er tom.",
"plugin settings": "plugin-innstillinger"
}
14 changes: 14 additions & 0 deletions src/translations/nl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Aan/Uit",
"unset": "Unset",
"Width": "Breedte",
"Tag name": "Naam van de tag",
"Size": "Grootte",
"Tags containing \".side\" are displayed only when editing.": "Tags die \".side\" bevatten, worden alleen weergegeven tijdens het bewerken.",
"Select a parent block first, then click the tag name to insert that tag.": "Selecteer eerst een bovenliggend blok en klik vervolgens op de naam van de tag om die tag in te voegen.",
"Insert at editing block: #": "Invoegen bij bewerkingsblok: #",
"No block selected.": "Geen blok geselecteerd.",
"Click here to insert a tag at the end of the current block.": "Klik hier om een tag in te voegen aan het einde van het huidige blok.",
"The current block is empty.": "Het huidige blok is leeg.",
"plugin settings": "Plug-in-instellingen"
}
14 changes: 14 additions & 0 deletions src/translations/pl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Wł./Wył.",
"unset": "Unset",
"Width": "Szerokość",
"Tag name": "Nazwa tagu",
"Size": "Rozmiar",
"Tags containing \".side\" are displayed only when editing.": "Znaczniki zawierające ciąg \".side\" są wyświetlane tylko podczas edycji.",
"Select a parent block first, then click the tag name to insert that tag.": "Najpierw zaznacz blok nadrzędny, a następnie kliknij nazwę znacznika, aby wstawić ten znacznik.",
"Insert at editing block: #": "Wstaw w bloku edycyjnym: #",
"No block selected.": "Nie wybrano żadnego bloku.",
"Click here to insert a tag at the end of the current block.": "Kliknij tutaj, aby wstawić tag na końcu bieżącego bloku.",
"The current block is empty.": "Bieżący blok jest pusty.",
"plugin settings": "Ustawienia wtyczki"
}
14 changes: 14 additions & 0 deletions src/translations/pt-BR.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Ligado/Desligado",
"unset": "Unset",
"Width": "Largura",
"Tag name": "Nome da tag",
"Size": "Tamanho",
"Tags containing \".side\" are displayed only when editing.": "As tags que contêm \".side\" são exibidas somente durante a edição.",
"Select a parent block first, then click the tag name to insert that tag.": "Selecione um bloco pai primeiro e, em seguida, clique no nome da tag para inserir essa tag.",
"Insert at editing block: #": "Inserir no bloco de edição: #",
"No block selected.": "Nenhum bloco selecionado.",
"Click here to insert a tag at the end of the current block.": "Clique aqui para inserir uma tag no final do bloco atual.",
"The current block is empty.": "O bloco atual está vazio.",
"plugin settings": "Configurações do plug-in"
}
14 changes: 14 additions & 0 deletions src/translations/pt-PT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Ligado/Desligado",
"unset": "desconfigurado",
"Width": "Largura",
"Tag name": "Nome da tag",
"Size": "Tamanho",
"Tags containing \".side\" are displayed only when editing.": "As tags que contêm \".side\" são exibidas somente durante a edição.",
"Select a parent block first, then click the tag name to insert that tag.": "Selecione primeiro um bloco pai e, em seguida, clique no nome da etiqueta para inserir essa etiqueta.",
"Insert at editing block: #": "Inserir no bloco de edição: #",
"No block selected.": "Nenhum bloco selecionado.",
"Click here to insert a tag at the end of the current block.": "Clique aqui para inserir uma tag no final do bloco atual.",
"The current block is empty.": "O bloco atual está vazio.",
"plugin settings": "Configurações do plugin"
}
14 changes: 14 additions & 0 deletions src/translations/ru.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Вкл/Выкл",
"unset": "Не установлено",
"Width": "Ширина",
"Tag name": "Имя тега",
"Size": "Размер",
"Tags containing \".side\" are displayed only when editing.": "Теги, содержащие \".side\", отображаются только при редактировании.",
"Select a parent block first, then click the tag name to insert that tag.": "Сначала выберите родительский блок, а затем нажмите на имя тега, чтобы вставить его.",
"Insert at editing block: #": "Вставить в блок редактирования: #",
"No block selected.": "Блок не выбран.",
"Click here to insert a tag at the end of the current block.": "Нажмите здесь, чтобы вставить тег в конец текущего блока.",
"The current block is empty.": "Текущий блок пуст.",
"plugin settings": "Настройки плагина"
}
14 changes: 14 additions & 0 deletions src/translations/sk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Zapnuté/vypnuté",
"unset": "Nepoužitého",
"Width": "Šírka",
"Tag name": "Názov značky",
"Size": "Veľkosť",
"Tags containing \".side\" are displayed only when editing.": "Značky obsahujúce \".side\" sa zobrazujú iba pri úpravách.",
"Select a parent block first, then click the tag name to insert that tag.": "Najprv vyberte nadradený blok a potom kliknutím na názov tagu vložte danú značku.",
"Insert at editing block: #": "Vložiť do editačného bloku: #",
"No block selected.": "Nie je vybratý žiadny blok.",
"Click here to insert a tag at the end of the current block.": "Kliknutím sem vložíte značku na koniec aktuálneho bloku.",
"The current block is empty.": "Aktuálny blok je prázdny.",
"plugin settings": "Nastavenia pluginu"
}
14 changes: 14 additions & 0 deletions src/translations/tr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Açık/Kapalı",
"unset": "Unset",
"Width": "Genişlik",
"Tag name": "Etiket adı",
"Size": "Boyut",
"Tags containing \".side\" are displayed only when editing.": "\".side\" içeren etiketler yalnızca düzenleme sırasında görüntülenir.",
"Select a parent block first, then click the tag name to insert that tag.": "Önce bir üst blok seçin, ardından bu etiketi eklemek için etiket adını tıklayın.",
"Insert at editing block: #": "Düzenleme bloğuna ekle: #",
"No block selected.": "Hiçbir blok seçilmedi.",
"Click here to insert a tag at the end of the current block.": "Geçerli bloğun sonuna bir etiket eklemek için buraya tıklayın.",
"The current block is empty.": "Mevcut blok boş.",
"plugin settings": "Eklenti ayarları"
}
14 changes: 14 additions & 0 deletions src/translations/uk.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "Увімкнення/вимкнення",
"unset": "Не встановлено",
"Width": "Ширина",
"Tag name": "Ім'я тегу",
"Size": "Розмір",
"Tags containing \".side\" are displayed only when editing.": "Теги, що містять \".side\", відображаються лише під час редагування.",
"Select a parent block first, then click the tag name to insert that tag.": "Спочатку виберіть батьківський блок, а потім натисніть на ім'я тегу, щоб вставити цей тег.",
"Insert at editing block: #": "Вставка при редагуванні блоку: #",
"No block selected.": "Блок не вибрано.",
"Click here to insert a tag at the end of the current block.": "Натисніть тут, щоб вставити тег в кінці поточного блоку.",
"The current block is empty.": "Поточний блок порожній.",
"plugin settings": "Налаштування плагіна"
}
14 changes: 14 additions & 0 deletions src/translations/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "开/关",
"unset": "未凝固的",
"Width": "宽度",
"Tag name": "标签名称",
"Size": "大小",
"Tags containing \".side\" are displayed only when editing.": "包含“.side”的标签仅在编辑时显示。",
"Select a parent block first, then click the tag name to insert that tag.": "首先选择一个父块,然后单击标签名称以插入该标签。",
"Insert at editing block: #": "在编辑块处插入:#",
"No block selected.": "未选择任何块。",
"Click here to insert a tag at the end of the current block.": "单击此处在当前块的末尾插入标签。",
"The current block is empty.": "当前块是空的。",
"plugin settings": "插件设置"
}
14 changes: 14 additions & 0 deletions src/translations/zh-Hant.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"On/Off": "開/關",
"unset": "未凝固的",
"Width": "寬度",
"Tag name": "標籤名稱",
"Size": "大小",
"Tags containing \".side\" are displayed only when editing.": "包含“.side”的標籤僅在編輯時顯示。",
"Select a parent block first, then click the tag name to insert that tag.": "首先選擇一個父塊,然後按下標籤名稱以插入該標籤。",
"Insert at editing block: #": "在編輯區塊插入:#",
"No block selected.": "未選擇任何塊。",
"Click here to insert a tag at the end of the current block.": "按兩下此處在當前塊的末尾插入標籤。",
"The current block is empty.": "當前塊是空的。",
"plugin settings": "外掛程式設置"
}

0 comments on commit cac138a

Please sign in to comment.