mirror of
https://github.com/silvanocerza/github-gitless-sync.git
synced 2026-07-22 12:10:28 +00:00
Translate gitignore comments to English
This commit is contained in:
parent
fefde46afa
commit
19130111a2
3 changed files with 8 additions and 8 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<Ignore> {
|
||||
const matcher = createGitignoreMatcher();
|
||||
|
|
@ -22,7 +22,7 @@ export async function loadGitignoreMatcher(vault: Vault): Promise<Ignore> {
|
|||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
|
|
|
|||
|
|
@ -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(".")
|
||||
|
|
|
|||
Loading…
Reference in a new issue