diff --git a/src/events-listener.ts b/src/events-listener.ts index 93845ca..7264158 100644 --- a/src/events-listener.ts +++ b/src/events-listener.ts @@ -169,8 +169,8 @@ export default class EventsListener { return false; } - // O ficheiro pode mudar durante a sessão, por isso os eventos leem sempre - // a versão atual antes de decidir se atualizam o manifesto local. + // The file can change during the session, so events always read + // the current version before deciding whether to update local metadata. return isGitignored(await loadGitignoreMatcher(this.vault), filePath); } } diff --git a/src/gitignore.ts b/src/gitignore.ts index ca23eac..46df7f7 100644 --- a/src/gitignore.ts +++ b/src/gitignore.ts @@ -8,7 +8,7 @@ export function createGitignoreMatcher(patterns = ""): Ignore { } /** - * Carrega as regras da raiz do cofre e devolve um matcher equivalente ao gitignore. + * Loads root vault rules and returns a matcher equivalent to gitignore. */ export async function loadGitignoreMatcher(vault: Vault): Promise { const matcher = createGitignoreMatcher(); @@ -22,7 +22,7 @@ export async function loadGitignoreMatcher(vault: Vault): Promise { } /** - * Normaliza caminhos do Obsidian para o formato relativo esperado pelo parser. + * Normalizes Obsidian paths to the relative format expected by the parser. */ export function isGitignored( matcher: Ignore | null, diff --git a/src/sync-manager.ts b/src/sync-manager.ts index 0ac68d1..609df13 100644 --- a/src/sync-manager.ts +++ b/src/sync-manager.ts @@ -85,8 +85,8 @@ export default class SyncManager { } private getZipEntryTargetPath(entry: Entry): string { - // Os ZIPs do GitHub incluem uma pasta raiz artificial; removemo-la para - // testar os padrões como caminhos relativos ao cofre. + // GitHub ZIPs include an artificial root folder; we remove it so patterns + // are tested as vault-relative paths. const pathParts = entry.filename.split("/"); return pathParts.length > 1 ? pathParts.slice(1).join("/") : entry.filename; } @@ -320,8 +320,8 @@ export default class SyncManager { return; } - // O .gitignore também é um ficheiro escondido, mas tem de ser - // descarregado para manter as mesmas regras em todos os cofres. + // .gitignore is also a hidden file, but it must be downloaded to keep + // the same rules across vaults. if ( targetPath !== GITIGNORE_FILE_NAME && targetPath.split("/").last()?.startsWith(".")