mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-10-25 10:33:21 +00:00
fix(i18n): wire Maintenance, Hatch and Fast Setup text to the Spanish catalogue
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
13 files changed
+363
-141
No files matched your search
@@ -6,12 +6,15 @@ import { mount, unmount } from "svelte";
|
||||
import type { ObsidianLiveSyncSettingTab } from "./ObsidianLiveSyncSettingTab.ts";
|
||||
import type { PageFunctions } from "./SettingPane.ts";
|
||||
import { visibleOnly } from "./SettingPane.ts";
|
||||
import { $msg } from "@/common/translation";
|
||||
export function paneSelector(this: ObsidianLiveSyncSettingTab, paneEl: HTMLElement, { addPanel }: PageFunctions): void {
|
||||
void addPanel(paneEl, "Normal Files").then((paneEl) => {
|
||||
void addPanel(paneEl, $msg("Normal Files")).then((paneEl) => {
|
||||
const syncFilesSetting = new Setting(paneEl)
|
||||
.setName("Synchronising files")
|
||||
.setName($msg("Synchronising files"))
|
||||
.setDesc(
|
||||
"(RegExp) Empty to sync all files. Set filter as a regular expression to limit synchronising files."
|
||||
$msg(
|
||||
"(RegExp) Empty to sync all files. Set filter as a regular expression to limit synchronising files."
|
||||
)
|
||||
);
|
||||
const syncFilesControl = mount(MultipleRegExpControl, {
|
||||
target: syncFilesSetting.controlEl,
|
||||
@@ -28,8 +31,8 @@ export function paneSelector(this: ObsidianLiveSyncSettingTab, paneEl: HTMLEleme
|
||||
this.lifetimeComponent.register(() => void unmount(syncFilesControl));
|
||||
|
||||
const nonSyncFilesSetting = new Setting(paneEl)
|
||||
.setName("Non-Synchronising files")
|
||||
.setDesc("(RegExp) If this is set, any changes to local and remote files that match this will be skipped.");
|
||||
.setName($msg("Non-Synchronising files"))
|
||||
.setDesc($msg("(RegExp) If this is set, any changes to local and remote files that match this will be skipped."));
|
||||
|
||||
const nonSyncFilesControl = mount(MultipleRegExpControl, {
|
||||
target: nonSyncFilesSetting.controlEl,
|
||||
@@ -51,10 +54,10 @@ export function paneSelector(this: ObsidianLiveSyncSettingTab, paneEl: HTMLEleme
|
||||
onUpdate: visibleOnly(() => this.isConfiguredAs("useIgnoreFiles", true)),
|
||||
});
|
||||
});
|
||||
void addPanel(paneEl, "Hidden Files", undefined, undefined, LEVEL_ADVANCED).then((paneEl) => {
|
||||
void addPanel(paneEl, $msg("Hidden Files"), undefined, undefined, LEVEL_ADVANCED).then((paneEl) => {
|
||||
const targetPatternSetting = new Setting(paneEl)
|
||||
.setName("Target patterns")
|
||||
.setDesc("Patterns to match files for syncing");
|
||||
.setName($msg("Target patterns"))
|
||||
.setDesc($msg("Patterns to match files for syncing"));
|
||||
const patTarget = splitCustomRegExpList(this.editingSettings.syncInternalFilesTargetPatterns, ",");
|
||||
const targetPatternControl = mount(MultipleRegExpControl, {
|
||||
target: targetPatternSetting.controlEl,
|
||||
@@ -75,7 +78,7 @@ export function paneSelector(this: ObsidianLiveSyncSettingTab, paneEl: HTMLEleme
|
||||
defaultSkipPattern + ",\\/workspace$ ,\\/workspace.json$,\\/workspace-mobile.json$";
|
||||
|
||||
const pat = splitCustomRegExpList(this.editingSettings.syncInternalFilesIgnorePatterns, ",");
|
||||
const patSetting = new Setting(paneEl).setName("Ignore patterns").setDesc("");
|
||||
const patSetting = new Setting(paneEl).setName($msg("Ignore patterns")).setDesc("");
|
||||
|
||||
const ignorePatternControl = mount(MultipleRegExpControl, {
|
||||
target: patSetting.controlEl,
|
||||
@@ -104,21 +107,21 @@ export function paneSelector(this: ObsidianLiveSyncSettingTab, paneEl: HTMLEleme
|
||||
};
|
||||
|
||||
new Setting(paneEl)
|
||||
.setName("Add default patterns")
|
||||
.setName($msg("Add default patterns"))
|
||||
.addButton((button) => {
|
||||
button.setButtonText("Default").onClick(async () => {
|
||||
button.setButtonText($msg("Default")).onClick(async () => {
|
||||
await addDefaultPatterns(defaultSkipPattern);
|
||||
});
|
||||
})
|
||||
.addButton((button) => {
|
||||
button.setButtonText("Cross-platform").onClick(async () => {
|
||||
button.setButtonText($msg("Cross-platform")).onClick(async () => {
|
||||
await addDefaultPatterns(defaultSkipPatternXPlat);
|
||||
});
|
||||
});
|
||||
|
||||
const overwritePatterns = new Setting(paneEl)
|
||||
.setName("Overwrite patterns")
|
||||
.setDesc("Patterns to match files for overwriting instead of merging");
|
||||
.setName($msg("Overwrite patterns"))
|
||||
.setDesc($msg("Patterns to match files for overwriting instead of merging"));
|
||||
const patTarget2 = splitCustomRegExpList(this.editingSettings.syncInternalFileOverwritePatterns, ",");
|
||||
const overwritePatternControl = mount(MultipleRegExpControl, {
|
||||
target: overwritePatterns.controlEl,
|
||||
|
||||
Reference in new issue
Block a user