diff --git a/src/Resources/Locales/de_DE.axaml b/src/Resources/Locales/de_DE.axaml index 9c59fd3de..6e5c67501 100644 --- a/src/Resources/Locales/de_DE.axaml +++ b/src/Resources/Locales/de_DE.axaml @@ -858,6 +858,7 @@ $1, $2, … Werte der Eingabe-Steuerelemente Patch wurde erfolgreich gespeichert! Durchsuche Repositorys Stammverzeichnis: + Zielgruppe: Anderes benutzerdefiniertes Verzeichnis durchsuchen Suche nach Aktualisierungen… Eine neue Version dieses Programms ist verfügbar: diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml index 603d223a9..9cfe968ea 100644 --- a/src/Resources/Locales/en_US.axaml +++ b/src/Resources/Locales/en_US.axaml @@ -900,6 +900,7 @@ Manually add a branch/tag history filter will disable this feature automatically Patch has been saved successfully! Scan Repositories Root Dir: + Target Group: Scan another custom directory Check for Updates... New version of this software is available: diff --git a/src/Resources/Locales/es_ES.axaml b/src/Resources/Locales/es_ES.axaml index 026caeede..e5eca6d91 100644 --- a/src/Resources/Locales/es_ES.axaml +++ b/src/Resources/Locales/es_ES.axaml @@ -896,6 +896,7 @@ ¡El parche se ha guardado exitosamente! Escanear Repositorios Directorio Raíz: + Grupo objetivo: Escanear otro directorio personalizado Buscar Actualizaciones... Nueva versión de este software disponible: diff --git a/src/Resources/Locales/fr_FR.axaml b/src/Resources/Locales/fr_FR.axaml index 6b7bacef1..8cd47ed87 100644 --- a/src/Resources/Locales/fr_FR.axaml +++ b/src/Resources/Locales/fr_FR.axaml @@ -818,6 +818,7 @@ Le patch a été sauvegardé ! Analyser les repositories Dossier racine : + Groupe cible : Scanner un autre répertoire personnalisé Rechercher des mises à jour... Une nouvelle version du logiciel est disponible : diff --git a/src/Resources/Locales/id_ID.axaml b/src/Resources/Locales/id_ID.axaml index d8eda31ee..5fc14a60d 100644 --- a/src/Resources/Locales/id_ID.axaml +++ b/src/Resources/Locales/id_ID.axaml @@ -859,6 +859,7 @@ Patch berhasil disimpan! Pindai Repositori Direktori Root: + Grup Target: Pindai direktori kustom lain Periksa Pembaruan... Versi baru dari perangkat lunak ini tersedia: diff --git a/src/Resources/Locales/it_IT.axaml b/src/Resources/Locales/it_IT.axaml index eee191ced..e6ff70235 100644 --- a/src/Resources/Locales/it_IT.axaml +++ b/src/Resources/Locales/it_IT.axaml @@ -763,6 +763,7 @@ ${pure_files:N} Come ${files:N}, ma senza cartelle La patch è stata salvata con successo! Scansiona Repository Cartella Principale: + Gruppo di destinazione: Scansiona un'altra cartella personalizzata Controlla Aggiornamenti... È disponibile una nuova versione del software: diff --git a/src/Resources/Locales/ja_JP.axaml b/src/Resources/Locales/ja_JP.axaml index fdef11c27..29314caec 100644 --- a/src/Resources/Locales/ja_JP.axaml +++ b/src/Resources/Locales/ja_JP.axaml @@ -878,6 +878,7 @@ パッチが正常に保存されました! リポジトリをスキャン ルートディレクトリ: + ターゲットグループ: 任意の別ディレクトリをスキャン 更新を確認... このソフトウェアの新しいバージョンが利用できます: diff --git a/src/Resources/Locales/ko_KR.axaml b/src/Resources/Locales/ko_KR.axaml index e3dda7a43..0eced2e48 100644 --- a/src/Resources/Locales/ko_KR.axaml +++ b/src/Resources/Locales/ko_KR.axaml @@ -826,6 +826,7 @@ 패치가 성공적으로 저장되었습니다! 저장소 스캔 루트 디렉터리: + 대상 그룹: 다른 사용자 정의 디렉터리 스캔 업데이트 확인... 이 소프트웨어의 새 버전을 사용할 수 있습니다: diff --git a/src/Resources/Locales/pt_BR.axaml b/src/Resources/Locales/pt_BR.axaml index 5084f0180..bfacc108d 100644 --- a/src/Resources/Locales/pt_BR.axaml +++ b/src/Resources/Locales/pt_BR.axaml @@ -543,6 +543,7 @@ Patch salvo com sucesso! Escanear Repositórios Diretório Raiz: + Grupo alvo: Verificar atualizações... Nova versão deste software disponível: Falha ao verificar atualizações! diff --git a/src/Resources/Locales/ru_RU.axaml b/src/Resources/Locales/ru_RU.axaml index 9353c001b..6db24a098 100644 --- a/src/Resources/Locales/ru_RU.axaml +++ b/src/Resources/Locales/ru_RU.axaml @@ -904,6 +904,7 @@ Заплатка успешно сохранена! Обнаружение репозиториев Корневой каталог: + Целевая группа: Сканировать другой пользовательский каталог Проверить обновления... Доступна новая версия программного обеспечения: diff --git a/src/Resources/Locales/ta_IN.axaml b/src/Resources/Locales/ta_IN.axaml index 3473ff1ca..3b0a5453a 100644 --- a/src/Resources/Locales/ta_IN.axaml +++ b/src/Resources/Locales/ta_IN.axaml @@ -552,6 +552,7 @@ ஒட்டு வெற்றிகரமாக சேமிக்கப்பட்டது! களஞ்சியங்களை வருடு வேர் அடைவு: + இலக்கு குழு: புதுப்பிப்புகளைச் சரிபார்... இந்த மென்பொருளின் புதிய பதிப்பு கிடைக்கிறது: புதுப்பிப்புகளைச் சரிபார்க்க முடியவில்லை! diff --git a/src/Resources/Locales/uk_UA.axaml b/src/Resources/Locales/uk_UA.axaml index 5f44193e3..cde11ac34 100644 --- a/src/Resources/Locales/uk_UA.axaml +++ b/src/Resources/Locales/uk_UA.axaml @@ -556,6 +556,7 @@ Патч успішно збережено! Сканувати сховища Коренева тека: + Цільова група: Перевірити оновлення... Доступна нова версія програми: Не вдалося перевірити оновлення! diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml index ed7e588af..452968417 100644 --- a/src/Resources/Locales/zh_CN.axaml +++ b/src/Resources/Locales/zh_CN.axaml @@ -904,6 +904,7 @@ 补丁已成功保存! 扫描仓库 根路径 : + 目标分组 : 扫描其他自定义路径 检测更新... 检测到软件有版本更新: diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml index 92bfffb3e..e84d2f084 100644 --- a/src/Resources/Locales/zh_TW.axaml +++ b/src/Resources/Locales/zh_TW.axaml @@ -889,6 +889,7 @@ 修補檔已成功儲存! 掃描存放庫 頂層目錄: + 目標分組: 掃描其他自訂目錄 檢查更新... 軟體有版本更新: diff --git a/src/ViewModels/Preferences.cs b/src/ViewModels/Preferences.cs index 9d9fb3f9f..14336e648 100644 --- a/src/ViewModels/Preferences.cs +++ b/src/ViewModels/Preferences.cs @@ -541,7 +541,11 @@ public RepositoryNode FindNode(string id) public RepositoryNode FindOrCreateGroupRecursive(string path) { - List collection = RepositoryNodes; + return FindOrCreateGroupRecursive(RepositoryNodes, path); + } + + public RepositoryNode FindOrCreateGroupRecursive(List collection, string path) + { RepositoryNode node = null; foreach (var name in path.Split('/')) diff --git a/src/ViewModels/ScanRepositories.cs b/src/ViewModels/ScanRepositories.cs index 693c4ca41..870d5743b 100644 --- a/src/ViewModels/ScanRepositories.cs +++ b/src/ViewModels/ScanRepositories.cs @@ -31,6 +31,12 @@ public Models.ScanDir Selected set => SetProperty(ref _selected, value, true); } + public string TargetGroupPath + { + get => _targetGroupPath; + set => SetProperty(ref _targetGroupPath, value); + } + public ScanRepositories() { ScanDirs = new List(); @@ -92,6 +98,15 @@ public override async Task Sure() // Make sure this task takes at least 0.5s to avoid the popup panel disappearing too quickly. await minDelay; + RepositoryNode targetParent = null; + var targetCollection = Preferences.Instance.RepositoryNodes; + var groupPath = _targetGroupPath?.Trim().Trim('/'); + if (!string.IsNullOrEmpty(groupPath)) + { + targetParent = Preferences.Instance.FindOrCreateGroupRecursive(groupPath); + targetCollection = targetParent.SubNodes; + } + var normalizedRoot = rootDir.FullName.Replace('\\', '/').TrimEnd('/'); for (var i = 0; i < found.Count; i++) { @@ -100,13 +115,13 @@ public override async Task Sure() var parent = new DirectoryInfo(f).Parent!.FullName.Replace('\\', '/').TrimEnd('/'); if (parent.Equals(normalizedRoot, StringComparison.OrdinalIgnoreCase)) { - var node = Preferences.Instance.FindOrAddNodeByRepositoryPath(f, null, false, false); + var node = Preferences.Instance.FindOrAddNodeByRepositoryPath(f, targetParent, false, false); await node.UpdateStatusAsync(false, null); } else if (parent.StartsWith(normalizedRoot, StringComparison.OrdinalIgnoreCase)) { var relative = parent.Substring(normalizedRoot.Length).TrimStart('/'); - var group = Preferences.Instance.FindOrCreateGroupRecursive(relative); + var group = Preferences.Instance.FindOrCreateGroupRecursive(targetCollection, relative); var node = Preferences.Instance.FindOrAddNodeByRepositoryPath(f, group, false, false); await node.UpdateStatusAsync(false, null); } @@ -191,5 +206,6 @@ private bool IsManaged(string path) private string _customDir = string.Empty; private Models.ScanDir _selected = null; private int _untrusted = 0; + private string _targetGroupPath = string.Empty; } } diff --git a/src/Views/ScanRepositories.axaml b/src/Views/ScanRepositories.axaml index 58c9c5665..05f7965c6 100644 --- a/src/Views/ScanRepositories.axaml +++ b/src/Views/ScanRepositories.axaml @@ -18,7 +18,7 @@ Text="{DynamicResource Text.ScanRepositories}"/> - + + + +