diff --git a/extensions/shared/src/main/java/app/revanced/extension/youtube/settings/Settings.java b/extensions/shared/src/main/java/app/revanced/extension/youtube/settings/Settings.java index 6b239e004..a24d38e4f 100644 --- a/extensions/shared/src/main/java/app/revanced/extension/youtube/settings/Settings.java +++ b/extensions/shared/src/main/java/app/revanced/extension/youtube/settings/Settings.java @@ -475,15 +475,15 @@ public class Settings extends BaseSettings { // PreferenceScreen: Shorts - Shorts player components - Custom actions public static final BooleanSetting ENABLE_SHORTS_CUSTOM_ACTIONS_FLYOUT_MENU = new BooleanSetting("revanced_enable_shorts_custom_actions_flyout_menu", FALSE, true); public static final BooleanSetting ENABLE_SHORTS_CUSTOM_ACTIONS_TOOLBAR = new BooleanSetting("revanced_enable_shorts_custom_actions_toolbar", FALSE, true); - public static final BooleanSetting SHORTS_CUSTOM_ACTIONS_COPY_VIDEO_URL = new BooleanSetting("revanced_shorts_custom_actions_copy_video_url", FALSE, true, + public static final BooleanSetting SHORTS_CUSTOM_ACTIONS_COPY_VIDEO_URL = new BooleanSetting("revanced_shorts_custom_actions_copy_video_url", TRUE, true, parentsAny(ENABLE_SHORTS_CUSTOM_ACTIONS_FLYOUT_MENU, ENABLE_SHORTS_CUSTOM_ACTIONS_TOOLBAR)); - public static final BooleanSetting SHORTS_CUSTOM_ACTIONS_COPY_VIDEO_URL_TIMESTAMP = new BooleanSetting("revanced_shorts_custom_actions_copy_video_url_timestamp", FALSE, true, + public static final BooleanSetting SHORTS_CUSTOM_ACTIONS_COPY_VIDEO_URL_TIMESTAMP = new BooleanSetting("revanced_shorts_custom_actions_copy_video_url_timestamp", TRUE, true, parentsAny(ENABLE_SHORTS_CUSTOM_ACTIONS_FLYOUT_MENU, ENABLE_SHORTS_CUSTOM_ACTIONS_TOOLBAR)); - public static final BooleanSetting SHORTS_CUSTOM_ACTIONS_EXTERNAL_DOWNLOADER = new BooleanSetting("revanced_shorts_custom_actions_external_downloader", FALSE, true, + public static final BooleanSetting SHORTS_CUSTOM_ACTIONS_EXTERNAL_DOWNLOADER = new BooleanSetting("revanced_shorts_custom_actions_external_downloader", TRUE, true, parentsAny(ENABLE_SHORTS_CUSTOM_ACTIONS_FLYOUT_MENU, ENABLE_SHORTS_CUSTOM_ACTIONS_TOOLBAR)); - public static final BooleanSetting SHORTS_CUSTOM_ACTIONS_OPEN_VIDEO = new BooleanSetting("revanced_shorts_custom_actions_open_video", FALSE, true, + public static final BooleanSetting SHORTS_CUSTOM_ACTIONS_OPEN_VIDEO = new BooleanSetting("revanced_shorts_custom_actions_open_video", TRUE, true, parentsAny(ENABLE_SHORTS_CUSTOM_ACTIONS_FLYOUT_MENU, ENABLE_SHORTS_CUSTOM_ACTIONS_TOOLBAR)); - public static final BooleanSetting SHORTS_CUSTOM_ACTIONS_REPEAT_STATE = new BooleanSetting("revanced_shorts_custom_actions_repeat_state", FALSE, true, + public static final BooleanSetting SHORTS_CUSTOM_ACTIONS_REPEAT_STATE = new BooleanSetting("revanced_shorts_custom_actions_repeat_state", TRUE, true, parentsAny(ENABLE_SHORTS_CUSTOM_ACTIONS_FLYOUT_MENU, ENABLE_SHORTS_CUSTOM_ACTIONS_TOOLBAR)); // Experimental Flags diff --git a/patches/src/main/resources/music/settings/host/values/strings.xml b/patches/src/main/resources/music/settings/host/values/strings.xml index a3c86cbac..6bf9d0005 100644 --- a/patches/src/main/resources/music/settings/host/values/strings.xml +++ b/patches/src/main/resources/music/settings/host/values/strings.xml @@ -1,4 +1,4 @@ - + Continue Don\'t show again @@ -428,4 +428,4 @@ Limitations: iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/bg-rBG/missing_strings.xml b/patches/src/main/resources/music/translations/bg-rBG/missing_strings.xml index 165745f35..c020ff6a2 100644 --- a/patches/src/main/resources/music/translations/bg-rBG/missing_strings.xml +++ b/patches/src/main/resources/music/translations/bg-rBG/missing_strings.xml @@ -1,4 +1,4 @@ - + Continue Don\'t show again @@ -229,4 +229,4 @@ Limitations: iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/bg-rBG/strings.xml b/patches/src/main/resources/music/translations/bg-rBG/strings.xml index 766518530..9f758276b 100644 --- a/patches/src/main/resources/music/translations/bg-rBG/strings.xml +++ b/patches/src/main/resources/music/translations/bg-rBG/strings.xml @@ -1,4 +1,4 @@ - + Хит-парад Преглед @@ -195,4 +195,4 @@ Задайте желаната фалшива версия на приложението. Подлъгване за версията на приложението Подлъгване за версията на приложението - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/bn/missing_strings.xml b/patches/src/main/resources/music/translations/bn/missing_strings.xml index 9037a1948..6da1b342d 100644 --- a/patches/src/main/resources/music/translations/bn/missing_strings.xml +++ b/patches/src/main/resources/music/translations/bn/missing_strings.xml @@ -1,4 +1,4 @@ - + Continue Don\'t show again @@ -360,4 +360,4 @@ Limitations: iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/bn/strings.xml b/patches/src/main/resources/music/translations/bn/strings.xml index a3dc0538b..cb4608773 100644 --- a/patches/src/main/resources/music/translations/bn/strings.xml +++ b/patches/src/main/resources/music/translations/bn/strings.xml @@ -1,4 +1,4 @@ - + ভিন্ন লাইনে ফিল্টারযোগ্য উপাদানের নাম লিখুন। কাস্টম ফিল্টার সম্পাদনা করুন @@ -64,4 +64,4 @@ ভিডিওর অপছন্দ কাউন্ট দেখায়। অপছন্দ পাওয়া যাচ্ছে না (ক্লায়েন্ট API সর্বোচ্চ সীমা পৌঁছেছে) অ্যাপ সংস্করণ স্পুফ করুন - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/cs-rCZ/missing_strings.xml b/patches/src/main/resources/music/translations/cs-rCZ/missing_strings.xml index c8cf0332f..57803b8aa 100644 --- a/patches/src/main/resources/music/translations/cs-rCZ/missing_strings.xml +++ b/patches/src/main/resources/music/translations/cs-rCZ/missing_strings.xml @@ -1,4 +1,4 @@ - + Continue Don\'t show again @@ -380,4 +380,4 @@ Limitations: iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/cs-rCZ/strings.xml b/patches/src/main/resources/music/translations/cs-rCZ/strings.xml index dc15d2fd1..ca5d15cdb 100644 --- a/patches/src/main/resources/music/translations/cs-rCZ/strings.xml +++ b/patches/src/main/resources/music/translations/cs-rCZ/strings.xml @@ -1,4 +1,4 @@ - + Upravit vlastní filtr Povolit vlastní filtry @@ -21,7 +21,7 @@ Přidá šedý odstín do přehrávače videa ke snížení namáhání očí. Povolit zen mod Obnovit na výchozí hodnoty. - + Obnovit a restartovat ReVanced Extended %s není instalován. Prosím, nainstalujte jej. @@ -42,6 +42,6 @@ Skrýt hudební reklamy Skrýt popisky v navigačním panelu. Skrýt popisky navigačního panelu - + Zfalšovat verzi aplikace - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/el-rGR/missing_strings.xml b/patches/src/main/resources/music/translations/el-rGR/missing_strings.xml index a687f9a25..973422826 100644 --- a/patches/src/main/resources/music/translations/el-rGR/missing_strings.xml +++ b/patches/src/main/resources/music/translations/el-rGR/missing_strings.xml @@ -1,6 +1,6 @@ - + Don\'t show again Displays the optimization dialog for GMSCore at each application startup. Show optimization dialog for GMSCore - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/el-rGR/strings.xml b/patches/src/main/resources/music/translations/el-rGR/strings.xml index 9fa3e4fb0..7196eb478 100644 --- a/patches/src/main/resources/music/translations/el-rGR/strings.xml +++ b/patches/src/main/resources/music/translations/el-rGR/strings.xml @@ -1,4 +1,4 @@ - + Συνέχεια "Το MicroG GmsCore δεν έχει άδεια να τρέχει στο παρασκήνιο. @@ -421,4 +421,4 @@ iOS Music Καθορισμός ενός προεπιλεγμένου προγράμματος-πελάτη για την λήψη δεδομένων ροής. Προεπιλεγμένο πρόγραμμα πελάτη - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/es-rES/missing_strings.xml b/patches/src/main/resources/music/translations/es-rES/missing_strings.xml index e1d35ced6..12f4c5c09 100644 --- a/patches/src/main/resources/music/translations/es-rES/missing_strings.xml +++ b/patches/src/main/resources/music/translations/es-rES/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again Disables DRC (Dynamic Range Compression) applied to audio. @@ -19,4 +19,4 @@ iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/es-rES/strings.xml b/patches/src/main/resources/music/translations/es-rES/strings.xml index 9a5dd542a..86a91fa37 100644 --- a/patches/src/main/resources/music/translations/es-rES/strings.xml +++ b/patches/src/main/resources/music/translations/es-rES/strings.xml @@ -1,4 +1,4 @@ - + Continuar "GmsCore no tiene permiso para ejecutarse en segundo plano. @@ -400,4 +400,4 @@ Limitaciones: • La miniatura de la barra de Seekbar puede no estar presente. • El historial de la vista no funciona con una cuenta de marca." Falsificar cliente - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/fr-rFR/missing_strings.xml b/patches/src/main/resources/music/translations/fr-rFR/missing_strings.xml index f40ce2896..e8dd4fd0b 100644 --- a/patches/src/main/resources/music/translations/fr-rFR/missing_strings.xml +++ b/patches/src/main/resources/music/translations/fr-rFR/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again Disables DRC (Dynamic Range Compression) applied to audio. @@ -28,4 +28,4 @@ Limitations: iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/fr-rFR/strings.xml b/patches/src/main/resources/music/translations/fr-rFR/strings.xml index 3cdbad82b..111126993 100644 --- a/patches/src/main/resources/music/translations/fr-rFR/strings.xml +++ b/patches/src/main/resources/music/translations/fr-rFR/strings.xml @@ -1,4 +1,4 @@ - + Continuer "GmsCore n'a pas les permissions pour fonctionner en arrière-plan. @@ -397,4 +397,4 @@ Cliquez ici pour découvrir comment créer une clé API." Sélectionner la version de l\'application à falsifier. Choisir la version à falsifier Falsifier la version de l\'app - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/hu-rHU/missing_strings.xml b/patches/src/main/resources/music/translations/hu-rHU/missing_strings.xml index 38f212eeb..c79b39417 100644 --- a/patches/src/main/resources/music/translations/hu-rHU/missing_strings.xml +++ b/patches/src/main/resources/music/translations/hu-rHU/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again To open YouTube Music links in RVX Music, enable \'Open supported links\' and enable the supported web addresses. @@ -53,4 +53,4 @@ Limitations: iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/hu-rHU/strings.xml b/patches/src/main/resources/music/translations/hu-rHU/strings.xml index 641b1d03a..09fb8ad12 100644 --- a/patches/src/main/resources/music/translations/hu-rHU/strings.xml +++ b/patches/src/main/resources/music/translations/hu-rHU/strings.xml @@ -1,4 +1,4 @@ - + Folytatás "A GmsCore-nak nincs engedélye a háttérben történő futtatásra. @@ -372,4 +372,4 @@ Előfordulhat, hogy egyes funkciók nem működnek megfelelően a régi lejátsz Válaszd ki, hogy melyik alkalmazásverziót akarod használni. Cél alkalmazásverzió Alkalmazásverzió hamisítása - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/id-rID/missing_strings.xml b/patches/src/main/resources/music/translations/id-rID/missing_strings.xml index 329568fd4..b58613746 100644 --- a/patches/src/main/resources/music/translations/id-rID/missing_strings.xml +++ b/patches/src/main/resources/music/translations/id-rID/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again To open YouTube Music links in RVX Music, enable \'Open supported links\' and enable the supported web addresses. @@ -68,4 +68,4 @@ Limitations: iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/id-rID/strings.xml b/patches/src/main/resources/music/translations/id-rID/strings.xml index ac8f8d19e..3e9c64d8b 100644 --- a/patches/src/main/resources/music/translations/id-rID/strings.xml +++ b/patches/src/main/resources/music/translations/id-rID/strings.xml @@ -1,4 +1,4 @@ - + Continue "GmsCore does not have permission to run in the background. @@ -353,4 +353,4 @@ Some features may not work properly in the old player layout." Pilih target pemalsuan versi aplikasi. Target pemalsuan versi aplikasi Palsukan versi aplikasi - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/in/missing_strings.xml b/patches/src/main/resources/music/translations/in/missing_strings.xml index 329568fd4..b58613746 100644 --- a/patches/src/main/resources/music/translations/in/missing_strings.xml +++ b/patches/src/main/resources/music/translations/in/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again To open YouTube Music links in RVX Music, enable \'Open supported links\' and enable the supported web addresses. @@ -68,4 +68,4 @@ Limitations: iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/in/strings.xml b/patches/src/main/resources/music/translations/in/strings.xml index ac8f8d19e..3e9c64d8b 100644 --- a/patches/src/main/resources/music/translations/in/strings.xml +++ b/patches/src/main/resources/music/translations/in/strings.xml @@ -1,4 +1,4 @@ - + Continue "GmsCore does not have permission to run in the background. @@ -353,4 +353,4 @@ Some features may not work properly in the old player layout." Pilih target pemalsuan versi aplikasi. Target pemalsuan versi aplikasi Palsukan versi aplikasi - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/it-rIT/missing_strings.xml b/patches/src/main/resources/music/translations/it-rIT/missing_strings.xml index a765b633b..1266d129a 100644 --- a/patches/src/main/resources/music/translations/it-rIT/missing_strings.xml +++ b/patches/src/main/resources/music/translations/it-rIT/missing_strings.xml @@ -1,4 +1,4 @@ - + Continue Don\'t show again @@ -365,4 +365,4 @@ Limitations: iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/it-rIT/strings.xml b/patches/src/main/resources/music/translations/it-rIT/strings.xml index 4d587a4d4..b61dc80be 100644 --- a/patches/src/main/resources/music/translations/it-rIT/strings.xml +++ b/patches/src/main/resources/music/translations/it-rIT/strings.xml @@ -1,4 +1,4 @@ - + Filtra i nomi dei componenti separati da righe. Modifica i filtri personalizzati @@ -59,4 +59,4 @@ Mostra il numero di \"Non mi piace\" dei video. \"Non mi piace\" non disponibile (limite API client raggiunto) Versione dell\'app falsificata - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/ja-rJP/missing_strings.xml b/patches/src/main/resources/music/translations/ja-rJP/missing_strings.xml index 9f0c442d6..1f009d65c 100644 --- a/patches/src/main/resources/music/translations/ja-rJP/missing_strings.xml +++ b/patches/src/main/resources/music/translations/ja-rJP/missing_strings.xml @@ -1,4 +1,4 @@ - + Disables DRC (Dynamic Range Compression) applied to audio. Disable DRC audio @@ -16,4 +16,4 @@ iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/ja-rJP/strings.xml b/patches/src/main/resources/music/translations/ja-rJP/strings.xml index a96014bd7..51e597648 100644 --- a/patches/src/main/resources/music/translations/ja-rJP/strings.xml +++ b/patches/src/main/resources/music/translations/ja-rJP/strings.xml @@ -1,4 +1,4 @@ - + 続行 今後表示しない @@ -399,4 +399,4 @@ API キーの発行方法については、ここをタップしてください • シークバーのサムネイルが表示されない場合があります。 • 再生履歴はブランドアカウントでは動作しません。" クライアントを偽装 - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/ko-rKR/strings.xml b/patches/src/main/resources/music/translations/ko-rKR/strings.xml index 15bd28c38..f74a57b4f 100644 --- a/patches/src/main/resources/music/translations/ko-rKR/strings.xml +++ b/patches/src/main/resources/music/translations/ko-rKR/strings.xml @@ -1,4 +1,4 @@ - + 계속하기 다시 보지 않기 @@ -427,4 +427,4 @@ API Key를 발급받는 방법을 보려면 여기를 누르세요." iOS Music 스트리밍 데이터를 가져오는 데 사용되는 기본 클라이언트를 정의할 수 있습니다. 기본 클라이언트 - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/nl-rNL/missing_strings.xml b/patches/src/main/resources/music/translations/nl-rNL/missing_strings.xml index 812fc68eb..d7da61397 100644 --- a/patches/src/main/resources/music/translations/nl-rNL/missing_strings.xml +++ b/patches/src/main/resources/music/translations/nl-rNL/missing_strings.xml @@ -1,4 +1,4 @@ - + Continue Don\'t show again @@ -232,4 +232,4 @@ Limitations: iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/nl-rNL/strings.xml b/patches/src/main/resources/music/translations/nl-rNL/strings.xml index 7e2f855ff..1190e8654 100644 --- a/patches/src/main/resources/music/translations/nl-rNL/strings.xml +++ b/patches/src/main/resources/music/translations/nl-rNL/strings.xml @@ -1,4 +1,4 @@ - + Componentnamen filteren op lijn spatie Wijzig aangepaste filter @@ -189,4 +189,4 @@ Bekende problemen: Selecteer het doel van de spoof app versie Spoof app versie doel Spoof app versie - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/pl-rPL/missing_strings.xml b/patches/src/main/resources/music/translations/pl-rPL/missing_strings.xml index a687f9a25..973422826 100644 --- a/patches/src/main/resources/music/translations/pl-rPL/missing_strings.xml +++ b/patches/src/main/resources/music/translations/pl-rPL/missing_strings.xml @@ -1,6 +1,6 @@ - + Don\'t show again Displays the optimization dialog for GMSCore at each application startup. Show optimization dialog for GMSCore - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/pl-rPL/strings.xml b/patches/src/main/resources/music/translations/pl-rPL/strings.xml index 35eb53ccd..5dcc17803 100644 --- a/patches/src/main/resources/music/translations/pl-rPL/strings.xml +++ b/patches/src/main/resources/music/translations/pl-rPL/strings.xml @@ -1,4 +1,4 @@ - + Kontynuuj "GmsCore nie ma uprawnień do działania w tle. @@ -426,4 +426,4 @@ Ograniczenia: iOS Music Denifiuje domyślnego klienta, z którego będzie przechwytywany strumień danych. Domyślny klient - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/pt-rBR/missing_strings.xml b/patches/src/main/resources/music/translations/pt-rBR/missing_strings.xml index a687f9a25..973422826 100644 --- a/patches/src/main/resources/music/translations/pt-rBR/missing_strings.xml +++ b/patches/src/main/resources/music/translations/pt-rBR/missing_strings.xml @@ -1,6 +1,6 @@ - + Don\'t show again Displays the optimization dialog for GMSCore at each application startup. Show optimization dialog for GMSCore - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/pt-rBR/strings.xml b/patches/src/main/resources/music/translations/pt-rBR/strings.xml index e167f43fd..e70d28e97 100644 --- a/patches/src/main/resources/music/translations/pt-rBR/strings.xml +++ b/patches/src/main/resources/music/translations/pt-rBR/strings.xml @@ -1,4 +1,4 @@ - + Continuar "O GmsCore não tem permissão para executar em segundo plano. @@ -425,4 +425,4 @@ Limitações: iOS Music Define um cliente padrão que busca dados de streaming. Cliente padrão - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/ro-rRO/missing_strings.xml b/patches/src/main/resources/music/translations/ro-rRO/missing_strings.xml index 3866e90fd..7fc10855c 100644 --- a/patches/src/main/resources/music/translations/ro-rRO/missing_strings.xml +++ b/patches/src/main/resources/music/translations/ro-rRO/missing_strings.xml @@ -1,4 +1,4 @@ - + Continue Don\'t show again @@ -349,4 +349,4 @@ Limitations: iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/ro-rRO/strings.xml b/patches/src/main/resources/music/translations/ro-rRO/strings.xml index 28cef9ec1..2bf3556b5 100644 --- a/patches/src/main/resources/music/translations/ro-rRO/strings.xml +++ b/patches/src/main/resources/music/translations/ro-rRO/strings.xml @@ -1,4 +1,4 @@ - + Filtrează numele componentelor după linie separat. Editați filtrul personalizat @@ -75,4 +75,4 @@ Probleme cunoscute: Curăță link-urile de partajare Setări copiate în clipboard. 4.27.53 - Dezactivare mod radio în regiunile canadiene - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/ru-rRU/missing_strings.xml b/patches/src/main/resources/music/translations/ru-rRU/missing_strings.xml index e1d35ced6..12f4c5c09 100644 --- a/patches/src/main/resources/music/translations/ru-rRU/missing_strings.xml +++ b/patches/src/main/resources/music/translations/ru-rRU/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again Disables DRC (Dynamic Range Compression) applied to audio. @@ -19,4 +19,4 @@ iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/ru-rRU/strings.xml b/patches/src/main/resources/music/translations/ru-rRU/strings.xml index 243d778d8..c24d6679b 100644 --- a/patches/src/main/resources/music/translations/ru-rRU/strings.xml +++ b/patches/src/main/resources/music/translations/ru-rRU/strings.xml @@ -1,4 +1,4 @@ - + Продолжить "MicroG GmsCore не имеет разрешения на запуск в фоновом режиме. @@ -404,4 +404,4 @@ • Превью во время перемотки может отсутствовать. • История просмотра не работает при использовании аккаунта компании." Подмена клиента - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/tr-rTR/missing_strings.xml b/patches/src/main/resources/music/translations/tr-rTR/missing_strings.xml index e1d35ced6..12f4c5c09 100644 --- a/patches/src/main/resources/music/translations/tr-rTR/missing_strings.xml +++ b/patches/src/main/resources/music/translations/tr-rTR/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again Disables DRC (Dynamic Range Compression) applied to audio. @@ -19,4 +19,4 @@ iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/tr-rTR/strings.xml b/patches/src/main/resources/music/translations/tr-rTR/strings.xml index f928fb05b..9b8fdd002 100644 --- a/patches/src/main/resources/music/translations/tr-rTR/strings.xml +++ b/patches/src/main/resources/music/translations/tr-rTR/strings.xml @@ -1,4 +1,4 @@ - + Devam Et "GmsCore'un arka planda çalışma izni yoktur. @@ -414,4 +414,4 @@ Sınırlamalar: • Arama çubuğu küçük resmi mevcut olmayabilir. • İzleme geçmişi marka hesabında çalışmaz." Sahte istemci - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/uk-rUA/missing_strings.xml b/patches/src/main/resources/music/translations/uk-rUA/missing_strings.xml index e1d35ced6..12f4c5c09 100644 --- a/patches/src/main/resources/music/translations/uk-rUA/missing_strings.xml +++ b/patches/src/main/resources/music/translations/uk-rUA/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again Disables DRC (Dynamic Range Compression) applied to audio. @@ -19,4 +19,4 @@ iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/uk-rUA/strings.xml b/patches/src/main/resources/music/translations/uk-rUA/strings.xml index 262da69ca..4012e80de 100644 --- a/patches/src/main/resources/music/translations/uk-rUA/strings.xml +++ b/patches/src/main/resources/music/translations/uk-rUA/strings.xml @@ -1,4 +1,4 @@ - + Продовжити "GmsCore не дозволено працювати у фоні. @@ -407,4 +407,4 @@ • Мініатюри перемотки можуть бути відсутніми. • Історія переглядів не працює з обліковим записом бренду." Підміна клієнта - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/vi-rVN/missing_strings.xml b/patches/src/main/resources/music/translations/vi-rVN/missing_strings.xml index a687f9a25..973422826 100644 --- a/patches/src/main/resources/music/translations/vi-rVN/missing_strings.xml +++ b/patches/src/main/resources/music/translations/vi-rVN/missing_strings.xml @@ -1,6 +1,6 @@ - + Don\'t show again Displays the optimization dialog for GMSCore at each application startup. Show optimization dialog for GMSCore - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/vi-rVN/strings.xml b/patches/src/main/resources/music/translations/vi-rVN/strings.xml index 840e15118..d25201760 100644 --- a/patches/src/main/resources/music/translations/vi-rVN/strings.xml +++ b/patches/src/main/resources/music/translations/vi-rVN/strings.xml @@ -1,4 +1,4 @@ - + Tiếp tục "Hiện GmsCore không có quyền chạy nền. @@ -425,4 +425,4 @@ Hạn chế: Music iOS Xác định một ứng dụng khách mặc định để nạp luồng dữ liệu trực tuyến. Ứng dụng khách mặc định - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/zh-rCN/missing_strings.xml b/patches/src/main/resources/music/translations/zh-rCN/missing_strings.xml index 856174fa1..f43c15c66 100644 --- a/patches/src/main/resources/music/translations/zh-rCN/missing_strings.xml +++ b/patches/src/main/resources/music/translations/zh-rCN/missing_strings.xml @@ -1,4 +1,4 @@ - + Continue Don\'t show again @@ -177,4 +177,4 @@ Limitations: iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/zh-rCN/strings.xml b/patches/src/main/resources/music/translations/zh-rCN/strings.xml index d2767077a..f7a47df8d 100644 --- a/patches/src/main/resources/music/translations/zh-rCN/strings.xml +++ b/patches/src/main/resources/music/translations/zh-rCN/strings.xml @@ -1,4 +1,4 @@ - + 图表 探索 @@ -244,4 +244,4 @@ 选择伪装的应用版本 伪装应用版本 伪装应用版本 - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/zh-rTW/missing_strings.xml b/patches/src/main/resources/music/translations/zh-rTW/missing_strings.xml index fbf7867b6..9472c85c5 100644 --- a/patches/src/main/resources/music/translations/zh-rTW/missing_strings.xml +++ b/patches/src/main/resources/music/translations/zh-rTW/missing_strings.xml @@ -1,4 +1,4 @@ - + Continue Don\'t show again @@ -127,4 +127,4 @@ Limitations: iOS Music Defines a default client that fetches streaming data. Default client - + \ No newline at end of file diff --git a/patches/src/main/resources/music/translations/zh-rTW/strings.xml b/patches/src/main/resources/music/translations/zh-rTW/strings.xml index cae089372..55743697a 100644 --- a/patches/src/main/resources/music/translations/zh-rTW/strings.xml +++ b/patches/src/main/resources/music/translations/zh-rTW/strings.xml @@ -1,4 +1,4 @@ - + 圖表 探索 @@ -303,4 +303,4 @@ 選擇欲偽裝的應用程式版本 偽裝應用程式版本 偽裝應用程式版本 - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/settings/host/values/strings.xml b/patches/src/main/resources/youtube/settings/host/values/strings.xml index d0662f75d..697c5915d 100644 --- a/patches/src/main/resources/youtube/settings/host/values/strings.xml +++ b/patches/src/main/resources/youtube/settings/host/values/strings.xml @@ -1,4 +1,4 @@ - + Enable accessibility controls for the video player? Your controls are modified because an accessibility service is on. @@ -1627,18 +1627,23 @@ Limitation: Dislikes may not appear if the user is not logged in or in incognito Most bugs cannot be fixed due to client-side limitations, so use it only for testing purposes." About Custom actions + Copy video URL Copy video URL menu is hidden. Copy video URL menu is shown. + Copy timestamp URL Copy timestamp URL menu is hidden. Copy timestamp URL menu is shown. Show copy timestamp URL menu Show copy video URL menu + External downloader External downloader menu is hidden. External downloader menu is shown. Show external downloader menu + Open video Open video menu is hidden. Open video menu is shown. Show open video menu + Repeat state Repeat state menu is hidden. Repeat state menu is shown. Show repeat state menu @@ -1768,6 +1773,7 @@ Also, ads will no longer be blocked in Shorts. If this setting do not take effect, try switching to Incognito mode." Stock RVX Music + Warning %s is not installed. Please install it. Package name of installed RVX Music. RVX Music package name @@ -1795,4 +1801,4 @@ If this setting do not take effect, try switching to Incognito mode." Check or remove the list of channels added to the whitelist. Channel whitelist SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/ar/missing_strings.xml b/patches/src/main/resources/youtube/translations/ar/missing_strings.xml index ba5b9eaf3..c10f47629 100644 --- a/patches/src/main/resources/youtube/translations/ar/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/ar/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again Courses / Learning @@ -25,4 +25,4 @@ Rewind by Specified Time (Default: 150ms) "• Videos may end 1 second early. • OPUS audio codec may not be supported." - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/ar/strings.xml b/patches/src/main/resources/youtube/translations/ar/strings.xml index 95306125f..f838146be 100644 --- a/patches/src/main/resources/youtube/translations/ar/strings.xml +++ b/patches/src/main/resources/youtube/translations/ar/strings.xml @@ -1,4 +1,4 @@ - + تمكين عناصر التحكم في إمكانية الوصول لمشغل الفيديو؟ تم تعديل عناصر التحكم الخاصة بك لأن خدمة إمكانية الوصول قيد التشغيل. @@ -1613,18 +1613,23 @@ لا يمكن إصلاح معظم الأخطاء بسبب القيود المفروضة على جانب العميل، لذا استخدمها لأغراض الاختبار فقط." لمحة عن الإجراءات المخصصة + نسخ رابط الفيديو تم إخفاء قائمة نسخ الفيديو. يتم عرض قائمة نسخ الفيديو. + نسخ الرابط مع الطابع الزمني تم إخفاء قائمة نسخ URL مع الطابع الزمني. يتم عرض قائمة نسخ URL مع الطابع الزمني. عرض قائمة نسخ URL مع الطابع الزمني عرض قائمة نسخ رابط الفيديو + التنزيل الخارجي تم إخفاء قائمة التنزيل الخارجي. يتم عرض قائمة التنزيل الخارجي. عرض قائمة التنزيل الخارجي + فتح الفيديو تم إخفاء قائمة فتح الفيديو. يتم عرض قائمة فتح الفيديو. عرض قائمة فتح الفيديو + حالة التكرار تم إخفاء قائمة حالة التكرار. يتم عرض قائمة حالة التكرار. عرض قائمة حالة التكرار @@ -1760,6 +1765,7 @@ إذا لم يتم تفعيل هذا الإعداد، فحاول التبديل إلى وضع التصفح المتخفي." الإفتراضي موسيقى RVX + تحذير %s لم يتم تثبيته. الرجاء تثبيته. اسم الحزمة لموسيقى RVX المثبتة. اسم حزمة موسيقى RVX @@ -1787,4 +1793,4 @@ التحقق من قائمة القنوات المضافة إلى القائمة البيضاء أو إزالتها. قائمة القناة البيضاء SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/bg-rBG/missing_strings.xml b/patches/src/main/resources/youtube/translations/bg-rBG/missing_strings.xml index 46f7ab017..f54038efc 100644 --- a/patches/src/main/resources/youtube/translations/bg-rBG/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/bg-rBG/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again The domain to fetch images from.\nNote: Only enter the domain name, i.e., without the \"https\:\/\/\" prefix. @@ -50,18 +50,23 @@ Press and hold the More button to show the Custom actions dialog." Most bugs cannot be fixed due to client-side limitations, so use it only for testing purposes." About Custom actions + Copy video URL Copy video URL menu is hidden. Copy video URL menu is shown. + Copy timestamp URL Copy timestamp URL menu is hidden. Copy timestamp URL menu is shown. Show copy timestamp URL menu Show copy video URL menu + External downloader External downloader menu is hidden. External downloader menu is shown. Show external downloader menu + Open video Open video menu is hidden. Open video menu is shown. Show open video menu + Repeat state Repeat state menu is hidden. Repeat state menu is shown. Show repeat state menu @@ -72,4 +77,4 @@ Most bugs cannot be fixed due to client-side limitations, so use it only for tes • OPUS audio codec may not be supported." • Videos may end 1 second early. iOS Music - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/bg-rBG/strings.xml b/patches/src/main/resources/youtube/translations/bg-rBG/strings.xml index 77685044c..0657fb7fa 100644 --- a/patches/src/main/resources/youtube/translations/bg-rBG/strings.xml +++ b/patches/src/main/resources/youtube/translations/bg-rBG/strings.xml @@ -1,4 +1,4 @@ - + Включване на контролите за достъпност на видеоплеaра? Вашите контроли са променени, защото е активирана услуга за достъпност. @@ -1677,6 +1677,7 @@ Note: Ако деактивирането не влезе в сила, опитайте да превключите към режим „инкогнито“." По подразбиране RVX Music + Внимание %s не е инсталирано. Моля инсталирайте го. Името на пакета с инсталиран RVX Music. Име на пакета RVX Music @@ -1704,4 +1705,4 @@ Note: Проверка или премахване на листа с канали доб. в белия списък. Добавяне на канал към белия списък SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/de-rDE/missing_strings.xml b/patches/src/main/resources/youtube/translations/de-rDE/missing_strings.xml index e8c6fa71f..fffdac417 100644 --- a/patches/src/main/resources/youtube/translations/de-rDE/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/de-rDE/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again In-app share sheet is used. @@ -328,18 +328,23 @@ Click to see how to issue a API key." Most bugs cannot be fixed due to client-side limitations, so use it only for testing purposes." About Custom actions + Copy video URL Copy video URL menu is hidden. Copy video URL menu is shown. + Copy timestamp URL Copy timestamp URL menu is hidden. Copy timestamp URL menu is shown. Show copy timestamp URL menu Show copy video URL menu + External downloader External downloader menu is hidden. External downloader menu is shown. Show external downloader menu + Open video Open video menu is hidden. Open video menu is shown. Show open video menu + Repeat state Repeat state menu is hidden. Repeat state menu is shown. Show repeat state menu @@ -390,6 +395,7 @@ Also, ads will no longer be blocked in Shorts. If this setting do not take effect, try switching to Incognito mode." RVX Music + Warning %s is not installed. Please install it. Package name of installed RVX Music. RVX Music package name @@ -404,4 +410,4 @@ If this setting do not take effect, try switching to Incognito mode." Replace domain Block watch history Watch history type - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/de-rDE/strings.xml b/patches/src/main/resources/youtube/translations/de-rDE/strings.xml index ed5f7ebd4..b1951ba69 100644 --- a/patches/src/main/resources/youtube/translations/de-rDE/strings.xml +++ b/patches/src/main/resources/youtube/translations/de-rDE/strings.xml @@ -1,4 +1,4 @@ - + Bedienungshilfen für den Video-Player aktivieren? Ihre Steuerungen wurden angepasst, da ein Barrierefreiheitsdienst aktiviert ist. @@ -727,7 +727,7 @@ Wenn sich das Layout des Wiedergabebildschirms aufgrund serverseitiger Änderung Verstecke selbstgesponserte Karten \"Im TV anschauen\"-Menü wird angezeigt. Privatsphäre-Menü wird angezeigt. - + Elemente im YouTube-Einstellungsmenü verstecken YouTube Einstellungsmenü verstecken Share button is shown. @@ -1390,4 +1390,4 @@ Wenn später ausgeschaltet wird empfohlen, die App-Daten zu löschen, um UI-Fehl Überprüfen oder die Liste der Kanäle entfernen, die zur Whitelist hinzugefügt wurden. Kanal Whitelist Sponsorenblock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/el-rGR/missing_strings.xml b/patches/src/main/resources/youtube/translations/el-rGR/missing_strings.xml index 3b8776d42..67023a11f 100644 --- a/patches/src/main/resources/youtube/translations/el-rGR/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/el-rGR/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again Courses / Learning @@ -23,4 +23,4 @@ Forward by Specified Time (Default: 150ms) Publish Created Segment Rewind by Specified Time (Default: 150ms) - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/el-rGR/strings.xml b/patches/src/main/resources/youtube/translations/el-rGR/strings.xml index 2a12ff9e7..35295ae09 100644 --- a/patches/src/main/resources/youtube/translations/el-rGR/strings.xml +++ b/patches/src/main/resources/youtube/translations/el-rGR/strings.xml @@ -1,4 +1,4 @@ - + Ενεργοποίηση των στοιχείων ελέγχου προσβασιμότητας για το πρόγραμμα αναπαραγωγής βίντεο; Τα στοιχεία ελέγχου σας τροποποιούνται επειδή είναι ενεργή κάποια υπηρεσία προσβασιμότητας. @@ -1640,18 +1640,23 @@ Playlists Τα περισσότερα σφάλματα δεν γίνεται να διορθωθούν λόγω περιορισμών, οπότε χρησιμοποιήστε την μόνο για σκοπούς δοκιμής." Σχετικά με τις προσαρμοσμένες ενέργειες + Αντιγραφή διεύθυνσης URL του βίντεο Το μενού αντιγραφής διεύθυνσης URL του βίντεο δεν εμφανίζεται. Το μενού αντιγραφής διεύθυνσης URL του βίντεο εμφανίζεται. + Αντιγραφή διεύθυνσης URL με χρονική σήμανση Το μενού αντιγραφής διεύθυνσης URL με χρονική σήμανση δεν εμφανίζεται. Το μενού αντιγραφής διεύθυνσης URL με χρονική σήμανση εμφανίζεται. Εμφάνιση μενού αντιγραφή διεύθυνσης URL με χρονική σήμανση Εμφάνιση μενού αντιγραφής διεύθυνσης URL του βίντεο + Εξωτερικό πρόγραμμα λήψης Το μενού εξωτερικού προγράμματος λήψης δεν εμφανίζεται. Το μενού εξωτερικού προγράμματος λήψης εμφανίζεται. Εμφάνιση μενού εξωτερικού προγράμματος λήψης + Άνοιγμα βίντεο Το μενού ανοίγματος του βίντεο δεν εμφανίζεται. Το μενού ανοίγματος του βίντεο εμφανίζεται. Εμφάνιση μενού ανοίγματος του βίντεο + Κατάσταση επανάληψης Το μενού κατάστασης επανάληψης δεν εμφανίζεται. Το μενού κατάστασης επανάληψης εμφανίζεται. Εμφάνιση μενού κατάστασης επανάληψης @@ -1780,6 +1785,7 @@ Playlists Αν η απενεργοποίηση δεν τεθεί σε ισχύ, δοκιμάστε να μεταβείτε σε λειτουργία ανώνυμης περιήγησης." Προεπιλογή RVX Music + Προειδοποίηση %s δεν έχει εγκατασταθεί. Παρακαλούμε εγκαταστήστε το. Όνομα πακέτου του εγκατεστημένου RVX Music. Όνομα πακέτου RVX Music @@ -1807,4 +1813,4 @@ Playlists Ελέγξτε ή καταργήστε την λίστα των καναλιών που έχουν προστεθεί στη λίστα επιτρεπόμενων. Λίστα επιτρεπόμενων καναλιών SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/es-rES/missing_strings.xml b/patches/src/main/resources/youtube/translations/es-rES/missing_strings.xml index 889d838ca..5123a943d 100644 --- a/patches/src/main/resources/youtube/translations/es-rES/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/es-rES/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again Change Shorts background repeat state @@ -48,18 +48,23 @@ Press and hold the More button to show the Custom actions dialog." Most bugs cannot be fixed due to client-side limitations, so use it only for testing purposes." About Custom actions + Copy video URL Copy video URL menu is hidden. Copy video URL menu is shown. + Copy timestamp URL Copy timestamp URL menu is hidden. Copy timestamp URL menu is shown. Show copy timestamp URL menu Show copy video URL menu + External downloader External downloader menu is hidden. External downloader menu is shown. Show external downloader menu + Open video Open video menu is hidden. Open video menu is shown. Show open video menu + Repeat state Repeat state menu is hidden. Repeat state menu is shown. Show repeat state menu @@ -69,4 +74,4 @@ Most bugs cannot be fixed due to client-side limitations, so use it only for tes "• Videos may end 1 second early. • OPUS audio codec may not be supported." iOS Music - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/es-rES/strings.xml b/patches/src/main/resources/youtube/translations/es-rES/strings.xml index b2a286750..596996fe0 100644 --- a/patches/src/main/resources/youtube/translations/es-rES/strings.xml +++ b/patches/src/main/resources/youtube/translations/es-rES/strings.xml @@ -1,4 +1,4 @@ - + ¿Activar controles de accesibilidad para el reproductor de vídeo? Tus controles se modifican porque un servicio de accesibilidad está activado. @@ -1700,6 +1700,7 @@ Además, los anuncios ya no se bloquearán en Shorts. Si este ajuste no surte efecto, prueba a cambiar al modo incógnito." Predeterminado RVX Music + Advertencia %s no está instalado. Por favor, instálalo. Nombre del paquete de RVX Music instalado. Nombre del paquete de RVX Music @@ -1727,4 +1728,4 @@ Si este ajuste no surte efecto, prueba a cambiar al modo incógnito." Verifique o elimine la lista de canales agregados a la lista blanca. Lista blanca de canales SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/fr-rFR/missing_strings.xml b/patches/src/main/resources/youtube/translations/fr-rFR/missing_strings.xml index 6a57ee6bd..8317322b6 100644 --- a/patches/src/main/resources/youtube/translations/fr-rFR/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/fr-rFR/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again Change Shorts background repeat state @@ -58,18 +58,23 @@ Miniplayer can be dragged off screen to the left or right." Most bugs cannot be fixed due to client-side limitations, so use it only for testing purposes." About Custom actions + Copy video URL Copy video URL menu is hidden. Copy video URL menu is shown. + Copy timestamp URL Copy timestamp URL menu is hidden. Copy timestamp URL menu is shown. Show copy timestamp URL menu Show copy video URL menu + External downloader External downloader menu is hidden. External downloader menu is shown. Show external downloader menu + Open video Open video menu is hidden. Open video menu is shown. Show open video menu + Repeat state Repeat state menu is hidden. Repeat state menu is shown. Show repeat state menu @@ -80,4 +85,4 @@ Most bugs cannot be fixed due to client-side limitations, so use it only for tes • OPUS audio codec may not be supported." • Videos may end 1 second early. iOS Music - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/fr-rFR/strings.xml b/patches/src/main/resources/youtube/translations/fr-rFR/strings.xml index e0136163f..47dd17d2d 100644 --- a/patches/src/main/resources/youtube/translations/fr-rFR/strings.xml +++ b/patches/src/main/resources/youtube/translations/fr-rFR/strings.xml @@ -1,4 +1,4 @@ - + Activer les contrôles d\'accessibilité pour le lecteur vidéo ? Vos contrôles sont modifiés car un service d\'accessibilité est activé. @@ -1697,6 +1697,7 @@ Note : Activer ceci masquera également les publicités vidéos." Si ce paramètre ne fait pas effet, essayer de passer en mode Incognito." Officiel RVX Music + Attention %s n\'est pas installé. Veuillez l’installer. Nom du paquet de RVX Music installé. Nom du paquet de RVX Music @@ -1724,4 +1725,4 @@ Si ce paramètre ne fait pas effet, essayer de passer en mode Incognito."Vérifier ou supprimer les chaînes ajoutés à la liste blanche. Liste blanche des chaînes SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/hu-rHU/missing_strings.xml b/patches/src/main/resources/youtube/translations/hu-rHU/missing_strings.xml index 741e5e2e2..b910965ea 100644 --- a/patches/src/main/resources/youtube/translations/hu-rHU/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/hu-rHU/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again Courses / Learning @@ -26,4 +26,4 @@ "• Videos may end 1 second early. • OPUS audio codec may not be supported." • Videos may end 1 second early. - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/hu-rHU/strings.xml b/patches/src/main/resources/youtube/translations/hu-rHU/strings.xml index b9be42380..c23e50339 100644 --- a/patches/src/main/resources/youtube/translations/hu-rHU/strings.xml +++ b/patches/src/main/resources/youtube/translations/hu-rHU/strings.xml @@ -1,4 +1,4 @@ - + Engedélyezi a videolejátszó akadálymentesítési vezérlőit? Az eszközök azért módosulnak, mert egy akadálymentesítési szolgáltatás be van kapcsolva. @@ -1599,18 +1599,23 @@ Korlátozás: A nem tetszések lehet nem jelennek meg kijelentkezett felhasznál A legtöbb hiba nem javítható az ügyféloldali korlátozások miatt, ezért csak tesztelési célokra használja." Az egyéni műveletekről + Videó URL másolása A videó URL másolás menü el van rejtve. A videó URL másolás menü látható. + Időbélyeg URL másolása Az időbélyeg URL másolás menü el van rejtve. Az időbélyeg URL másolás menü látható. Időbélyeg URL másolás menü mutatása Videó URL másolás menü mutatása + Külső letöltéskezelő A külső letöltéskezelő menü el van rejtve. A külső letöltéskezelő menü látható. Külső letöltéskezelő menü mutatása + Videó megnyitása A videó megnyitás menü el van rejtve. A videó megnyitás menü látható. Videó megnyitás menü mutatása + Ismétlés állapota Az ismétlés állapot menü el van rejtve. Az ismétlés állapot menü látható. Ismétlés állapot menü mutatása @@ -1734,6 +1739,7 @@ Tovább, a reklámok nem lesznek tiltva a Shortokban. Ha ez a beállítás nem működik, váltson inkognító módra." Alap RVX Music + Figyelmeztetés %s nincs telepítve. Kérlek telepítsd. A telepített RVX Music csomag neve. RVX Music csomag név @@ -1761,4 +1767,4 @@ Ha ez a beállítás nem működik, váltson inkognító módra." Ellenőrizd vagy távolítsd el az kivétellistához hozzáadott csatornákat. Csatorna kivétellista Szponzor Blokk - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/it-rIT/missing_strings.xml b/patches/src/main/resources/youtube/translations/it-rIT/missing_strings.xml index 333e15c26..0b1ec7c60 100644 --- a/patches/src/main/resources/youtube/translations/it-rIT/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/it-rIT/missing_strings.xml @@ -1,4 +1,4 @@ - + Package name of your installed external downloader app, such as NewPipe or YTDLnis, on long press. Long press video downloader package name @@ -6,4 +6,4 @@ MMT Pink MMT Turquoise YouTube Black - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/it-rIT/strings.xml b/patches/src/main/resources/youtube/translations/it-rIT/strings.xml index 0f887692a..5c696491e 100644 --- a/patches/src/main/resources/youtube/translations/it-rIT/strings.xml +++ b/patches/src/main/resources/youtube/translations/it-rIT/strings.xml @@ -1,4 +1,4 @@ - + Vuoi attivare i controlli di accessibilità del riproduttore? I tuoi controlli sono diversi poiché un servizio di accessibilità è attivato. @@ -1626,18 +1626,23 @@ Nota: i non mi piace potrebbero non apparire se l'utente non ha effettuato l'acc La maggior parte dei bug non può essere risolta a causa di limitazioni lato client, quindi usala solo per scopi di test." Informazioni sulle azioni personalizzate + Copia l\'URL del video Il menù URL del Video Copiato è nascosto. Il menù URL del Video Copiato è visibile. + Copia l\'URL del video con timestamp Il menù URL del Video con Timestamp Copiato è nascosto. Il menù URL del Video con Timestamp Copiato è visibile. Mostra il menù URL del Video con Timestamp Copiato Mostra il menù URL del Video Copiato + Downloader esterno Il menù Downloader Esterno è nascosto. Il menù Downloader Esterno è visibile. Mostra il menù Downloader Esterno + Apri il video Il menù Apri il Video è nascosto. Il menù Apri il Video è visibile. Mostra il menù Apri il Video + Stato di ripetizione Il menù Stato di Ripetizione è visibile. Il menù Stato di Ripetizione è nascosto. Mostra il menù Stato di Ripetizione @@ -1769,6 +1774,7 @@ Inoltre, gli annunci degli Shorts non saranno più bloccati. Se questa impostazione non ha effetto, prova a passare alla navigazione in incognito." Predefinito RVX Music + Attenzione %s non è installato. Per favore installalo. Il nome del pacchetto dell\'app RVX Music installata. Nome del pacchetto dell\'app RVX Music @@ -1796,4 +1802,4 @@ Se questa impostazione non ha effetto, prova a passare alla navigazione in incog Controlla o rimuovi l\'elenco dei canali aggiunti alla whitelist. Whitelist dei canali SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/ja-rJP/missing_strings.xml b/patches/src/main/resources/youtube/translations/ja-rJP/missing_strings.xml index 66efd6fde..e00e51305 100644 --- a/patches/src/main/resources/youtube/translations/ja-rJP/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/ja-rJP/missing_strings.xml @@ -1,4 +1,4 @@ - + Chat summary is shown. Chat summary is hidden. @@ -7,4 +7,4 @@ MMT Pink MMT Turquoise YouTube Black - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/ja-rJP/strings.xml b/patches/src/main/resources/youtube/translations/ja-rJP/strings.xml index 1dfbea229..ee3cc479d 100644 --- a/patches/src/main/resources/youtube/translations/ja-rJP/strings.xml +++ b/patches/src/main/resources/youtube/translations/ja-rJP/strings.xml @@ -1,4 +1,4 @@ - + 動画プレーヤーのアクセシビリティコントロールを有効化しますか? ユーザー補助サービスがオンになっているため、操作方法が変わります。 @@ -1625,18 +1625,23 @@ API キーの発行方法については、ここをタップしてください ほとんどのバグはクライアント側の制限により、修正できないため、テスト目的でのみ使用してください。" カスタムアクションについて + 動画の URL をコピー 動画の URL をコピーするメニューを表示します。 動画の URL をコピーするメニューを表示します。 + タイムスタンプの URL をコピー タイムスタンプの URL をコピーするメニューを表示します。 タイムスタンプの URL をコピーするメニューを表示します。 タイムスタンプの URL をコピーするメニューを表示 動画の URL をコピーするメニューを表示 + 外部ダウンローダー 外部ダウンローダーのメニューを表示します。 外部ダウンローダーのメニューを表示します。 外部ダウンローダーのメニューを表示 + 動画を開く 動画を開くメニューを表示します。 動画を開くメニューを表示します。 動画を開くメニューを表示 + リピート状態 リピート状態のメニューを表示します。 リピート状態のメニューを表示します。 リピート状態のメニューを表示 @@ -1766,6 +1771,7 @@ API キーの発行方法については、ここをタップしてください この設定が有効にならない場合は、シークレットモードに切り替えてみてください。" オリジナル RVX Music + 注意 %s はインストールされていません。インストールしてください。 インストールされている RVX Music のパッケージ名です。 RVX Music のパッケージ名 @@ -1793,4 +1799,4 @@ API キーの発行方法については、ここをタップしてください ホワイトリストに登録したチャンネルのリストを確認/削除します。 チャンネルのホワイトリスト SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/ko-rKR/missing_strings.xml b/patches/src/main/resources/youtube/translations/ko-rKR/missing_strings.xml index 995cb6cd6..6b3b422eb 100644 --- a/patches/src/main/resources/youtube/translations/ko-rKR/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/ko-rKR/missing_strings.xml @@ -1,4 +1,4 @@ - + YouTube Black - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/ko-rKR/strings.xml b/patches/src/main/resources/youtube/translations/ko-rKR/strings.xml index 8c317188b..1a88396bf 100644 --- a/patches/src/main/resources/youtube/translations/ko-rKR/strings.xml +++ b/patches/src/main/resources/youtube/translations/ko-rKR/strings.xml @@ -1,4 +1,4 @@ - + 플레이어에 접근성 컨트롤을 표시하시겠습니까? 접근성 서비스가 켜져있기 때문에 플레이어 컨트롤을 변경합니다. @@ -1641,18 +1641,23 @@ API Key를 발급받는 방법을 보려면 여기를 누르세요." 대부분의 버그는 클라이언트 측의 제한으로 인해 수정할 수 없으므로 테스트 목적으로만 사용하세요." 사용자 정의 동작 정보 + 동영상 URL 복사하기 \'동영상 URL 복사하기\' 메뉴가 숨겨집니다. \'동영상 URL 복사하기\' 메뉴가 표시됩니다. + 타임스탬프 URL 복사하기 \'타임스탬프 URL 복사하기\' 메뉴가 숨겨집니다. \'타임스탬프 URL 복사하기\' 메뉴가 표시됩니다. \'타임스탬프 URL 복사하기\' 메뉴 표시하기 \'동영상 URL 복사하기\' 메뉴 표시하기 + 외부 다운로더 \'외부 다운로더\' 메뉴가 숨겨집니다. \'외부 다운로더\' 메뉴가 표시됩니다. \'외부 다운로더\' 메뉴 표시하기 + 동영상 열기 \'동영상 열기\' 메뉴가 숨겨집니다. \'동영상 열기\' 메뉴가 표시됩니다. \'동영상 열기\' 메뉴 표시하기 + 반복 상태 \'반복 상태\' 메뉴가 숨겨집니다. \'반복 상태\' 메뉴가 표시됩니다. \'반복 상태\' 메뉴 표시하기 @@ -1775,6 +1780,7 @@ API Key를 발급받는 방법을 보려면 여기를 누르세요." 이 설정이 적용되지 않는 경우에는 시크릿 모드로 전환해 보세요." YouTube RVX Music + 경고 %s 이 설치되어 있지 않습니다. 설치하세요. 이 기기에 설치된 RVX Music 앱 패키지명을 설정하세요. RVX Music 앱 패키지명 @@ -1802,4 +1808,4 @@ API Key를 발급받는 방법을 보려면 여기를 누르세요." 화이트리스트에 추가된 채널을 확인 또는 제거할 수 있습니다. 채널 화이트리스트 SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/pl-rPL/strings.xml b/patches/src/main/resources/youtube/translations/pl-rPL/strings.xml index 77392edb2..57772ae7e 100644 --- a/patches/src/main/resources/youtube/translations/pl-rPL/strings.xml +++ b/patches/src/main/resources/youtube/translations/pl-rPL/strings.xml @@ -1,4 +1,4 @@ - + Włączyć gesty ułatwień dostępu dla odtwarzacza filmów? Twoje ustawienia są zmienione, ponieważ serwis ułatwień dostępu jest włączony. @@ -1627,18 +1627,23 @@ Ograniczenie: Liczba łapek w dół może nie być widoczna, gdy użytkownik nie Większość błędów nie może być naprawiona w skutek ograniczeń po stronie klienta, więc używaj tej funkcji jedynie do celów testowych." O własnych akcjach + Kopiowanie adresu filmu Ukryte Widoczne + Kopiowanie adresu z czasem Ukryte Widoczne Menu od kopiowania adresu filmu z czasem Menu od kopiowania adresu filmu + Zewnętrzna aplikacja od pobierania Ukryte Widoczne Menu od zewnętrznej aplikacji do pobierania + Otwieranie filmów Ukryte Widoczne Menu od otwierania filmu + Stan powtarzania Shortsów Ukryte Widoczne Menu od stanu powtarzania Shortsów @@ -1769,6 +1774,7 @@ Dodatkowo, reklamy nie będą już blokowane w Shortsach. Jeśli opcja nie przynosi skutku, spróbuj przełączyć się na tryb incognito." Domyślny RVX Music + Ostrzeżenie %s nie jest zainstalowany. Proszę go zainstalować. Nazwa pakietu zainstalowanego RVX Music Nazwa pakietu RVX Music @@ -1796,4 +1802,4 @@ Jeśli opcja nie przynosi skutku, spróbuj przełączyć się na tryb incognito. Sprawdź lub usuń listę kanałów dodanych do białej listy Biała lista kanałów SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/pt-rBR/missing_strings.xml b/patches/src/main/resources/youtube/translations/pt-rBR/missing_strings.xml index ba5b9eaf3..c10f47629 100644 --- a/patches/src/main/resources/youtube/translations/pt-rBR/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/pt-rBR/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again Courses / Learning @@ -25,4 +25,4 @@ Rewind by Specified Time (Default: 150ms) "• Videos may end 1 second early. • OPUS audio codec may not be supported." - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/pt-rBR/strings.xml b/patches/src/main/resources/youtube/translations/pt-rBR/strings.xml index c8b093d74..4131a1061 100644 --- a/patches/src/main/resources/youtube/translations/pt-rBR/strings.xml +++ b/patches/src/main/resources/youtube/translations/pt-rBR/strings.xml @@ -1,4 +1,4 @@ - + Ativar os controles de acessibilidade para o reprodutor de vídeo? Seus controles foram modificados porque um serviço de acessibilidade está ativado. @@ -1605,18 +1605,23 @@ Limitação: Dislikes pode não aparecer no modo incógnito." A maioria dos bugs não podem ser corrigidos devido a limitações no lado do cliente, então use-o apenas para fins de teste." Sobre ações personalizadas + Copiar URL do vídeo O menu Copiar URL do vídeo está oculto. O menu Copiar URL do vídeo será exibido. + Copiar URL com marcação de tempo O menu Copiar URL com marcação de tempo está oculto. O menu Copiar URL com marcação de tempo será exibido. Exibir menu copiar URL com marcação de tempo Exibir menu copiar URL do vídeo + Download externo O menu Download externo está oculto. O menu Download externo será exibido. Exibir menu de download externo + Abrir vídeo O menu Abrir vídeo está oculto. O menu Abrir vídeo será exibido. Exibir menu Abrir vídeo + Estado de repetição O menu Estado de repetição está oculto. O menu Estado de repetição será exibido. Exibir menu Estado de repetição @@ -1741,6 +1746,7 @@ Além disso, os anúncios não serão mais bloqueados no Shorts. Se essa configuração não surtir efeito, tente alternar para o modo anônimo." Padrão RVX Music + Aviso %s não está instalado. Por favor, instale-o. Nome do pacote do RVX Music instalado. Nome do pacote do RVX Music @@ -1768,4 +1774,4 @@ Se essa configuração não surtir efeito, tente alternar para o modo anônimo." Verifique ou remova a lista de canais adicionados à lista branca. Lista branca de canais SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/ru-rRU/missing_strings.xml b/patches/src/main/resources/youtube/translations/ru-rRU/missing_strings.xml index 25739b199..43d8d708d 100644 --- a/patches/src/main/resources/youtube/translations/ru-rRU/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/ru-rRU/missing_strings.xml @@ -1,4 +1,4 @@ - + Package name of your installed external downloader app, such as NewPipe or YTDLnis, on long press. Long press video downloader package name @@ -15,4 +15,4 @@ Rewind by Specified Time (Default: 150ms) "• Videos may end 1 second early. • OPUS audio codec may not be supported." - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/ru-rRU/strings.xml b/patches/src/main/resources/youtube/translations/ru-rRU/strings.xml index 809f4670a..c3830fd0a 100644 --- a/patches/src/main/resources/youtube/translations/ru-rRU/strings.xml +++ b/patches/src/main/resources/youtube/translations/ru-rRU/strings.xml @@ -1,4 +1,4 @@ - + Включить специальные возможности в плеере? Служба специальных возможностей включена. Управление изменено. @@ -1633,18 +1633,23 @@ Shorts Большинство ошибок не может быть исправлено из-за ограничений со стороны клиента, поэтому используйте их только для тестирования." О пользовательских действиях + Копировать URL-адрес видео Меню копирования URL видео скрыто. Меню копирования URL видео отображено. + Скопировать URL-адрес метки времени Копирование URL с меткой времени скрыто. Копирование URL с меткой времени отображено. Копирование URL с меткой времени Меню копирования URL видео + Внешний загрузчик Меню внешнего загрузчика скрыто. Меню внешнего загрузчика отображено. Меню внешнего загрузчика + Открыть видео Меню открыть видео скрыто. Меню открыть видео отображено. Меню открыть видео + Режим повтора Меню режима повтора скрыто. Меню режима повтора отображено. Меню режима повтора @@ -1776,6 +1781,7 @@ Shorts Если эта настройка не вступила в силу, попробуйте перейти в режим инкогнито." По умолчанию RVX Music + Предупреждение %s не установлен. Установите его. Название пакета установленной RVX Music. Имя пакета RVX Music @@ -1803,4 +1809,4 @@ Shorts Управление каналами в белом списке. \"Белый список\" канала SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/tr-rTR/missing_strings.xml b/patches/src/main/resources/youtube/translations/tr-rTR/missing_strings.xml index bea9eaf5a..cdc05e429 100644 --- a/patches/src/main/resources/youtube/translations/tr-rTR/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/tr-rTR/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again In-app share sheet is used. @@ -219,18 +219,23 @@ Click to see how to issue a API key." Most bugs cannot be fixed due to client-side limitations, so use it only for testing purposes." About Custom actions + Copy video URL Copy video URL menu is hidden. Copy video URL menu is shown. + Copy timestamp URL Copy timestamp URL menu is hidden. Copy timestamp URL menu is shown. Show copy timestamp URL menu Show copy video URL menu + External downloader External downloader menu is hidden. External downloader menu is shown. Show external downloader menu + Open video Open video menu is hidden. Open video menu is shown. Show open video menu + Repeat state Repeat state menu is hidden. Repeat state menu is shown. Show repeat state menu @@ -273,4 +278,4 @@ Most bugs cannot be fixed due to client-side limitations, so use it only for tes "• Follows the watch history settings of Google account. • Watch history may not work due to DNS or VPN." • Follows the watch history settings of Google account. - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/tr-rTR/strings.xml b/patches/src/main/resources/youtube/translations/tr-rTR/strings.xml index 3649fba45..d3d1686f4 100644 --- a/patches/src/main/resources/youtube/translations/tr-rTR/strings.xml +++ b/patches/src/main/resources/youtube/translations/tr-rTR/strings.xml @@ -1,4 +1,4 @@ - + Video oynatıcı için erişilebilirlik kontrolleri açılsın mı? Bir erişilebilirlik hizmeti açık olduğundan kontrolleriniz değiştirildi. @@ -1485,6 +1485,7 @@ Ayrıca artık Shorts'ta reklamlar engellenmeyecek. Bu ayar etkili olmazsa Gizli moda geçmeyi deneyin." Stok RVX Music + Uyarı %s kurulu değil. Lütfen kurun. Yüklenmiş RVX Music\'in paket adı. RVX Müzik paketi adı @@ -1509,4 +1510,4 @@ Bu ayar etkili olmazsa Gizli moda geçmeyi deneyin." Beyaz listeye eklenen kanalların listesini kontrol edin veya kaldırın. Kanal beyaz listesi SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/uk-rUA/missing_strings.xml b/patches/src/main/resources/youtube/translations/uk-rUA/missing_strings.xml index 39ae98ab8..d7c0f2266 100644 --- a/patches/src/main/resources/youtube/translations/uk-rUA/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/uk-rUA/missing_strings.xml @@ -1,6 +1,6 @@ - + YouTube Black "• Videos may end 1 second early. • OPUS audio codec may not be supported." - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/uk-rUA/strings.xml b/patches/src/main/resources/youtube/translations/uk-rUA/strings.xml index f45bd0c24..a65450a58 100644 --- a/patches/src/main/resources/youtube/translations/uk-rUA/strings.xml +++ b/patches/src/main/resources/youtube/translations/uk-rUA/strings.xml @@ -1,4 +1,4 @@ - + Увімкнути спеціальні можливості для відеоплеєра? Керування змінено, оскільки служба спеціальних можливостей увімкнена. @@ -1628,18 +1628,23 @@ Більшість помилок неможливо виправити через обмеження на стороні клієнта, тому використовуйте лише для тестування." Про Спеціальні дії + Копіювати URL відео Меню копіювання URL приховано. Меню копіювання URL показується. + Копіювати URL з міткою часу Меню копіювання URL з міткою часу приховано. Меню копіювання URL з міткою часу показується. Показувати меню копіювання URL з міткою часу Показувати меню копіювання URL відео + Зовнішній завантажувач Меню зовнішнього завантажувача приховано. Меню зовнішнього завантажувача показується. Показувати меню зовнішнього завантажувача + Відкрити відео Меню Відкрити відео приховано. Меню Відкрити відео показується. Показувати меню Відкрити відео + Стан повторення Меню Стан повторення приховано. Меню Стан повторення показується. Показувати меню Стан повторення @@ -1767,6 +1772,7 @@ Якщо це налаштування не діє, спробуйте перемкнути Анонімний режим." Стандартна RVX Music + Зауваження %s не встановлено. Будь ласка, встановіть. Назва пакету встановленого RVX Music. Назва пакету RVX Music @@ -1794,4 +1800,4 @@ Перевірити чи вилучити список каналів, доданих до білого списку. Білий список каналів Спонсорблок - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/vi-rVN/missing_strings.xml b/patches/src/main/resources/youtube/translations/vi-rVN/missing_strings.xml index 3b8776d42..67023a11f 100644 --- a/patches/src/main/resources/youtube/translations/vi-rVN/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/vi-rVN/missing_strings.xml @@ -1,4 +1,4 @@ - + Don\'t show again Courses / Learning @@ -23,4 +23,4 @@ Forward by Specified Time (Default: 150ms) Publish Created Segment Rewind by Specified Time (Default: 150ms) - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/vi-rVN/strings.xml b/patches/src/main/resources/youtube/translations/vi-rVN/strings.xml index 7829aab08..2f2e56fb7 100644 --- a/patches/src/main/resources/youtube/translations/vi-rVN/strings.xml +++ b/patches/src/main/resources/youtube/translations/vi-rVN/strings.xml @@ -1,4 +1,4 @@ - + Bật các điều khiển trợ năng cho trình phát video? Các điều khiển của bạn đã được sửa đổi vì dịch vụ trợ năng đang bật. @@ -1612,18 +1612,23 @@ Hạn chế: Số lượt không thích có thể không hiển thị nếu ngư Hầu hết các lỗi không thể sửa được do hạn chế tới từ phía ứng dụng, vì vậy vui lòng chỉ sử dụng cho mục đích thử nghiệm." Giới thiệu về Tác vụ tuỳ chọn + Sao chép URL của video Mục sao chép URL của video đã ẩn. Mục sao chép URL của video được hiển thị. + Sao chép URL kèm dấu thời gian Mục sao chép URL kèm dấu thời gian đã ẩn. Mục sao chép URL kèm dấu thời gian được hiển thị. Mục sao chép URL kèm dấu thời gian Mục sao chép URL của video + Trình tải xuống bên ngoài Mục trình tải xuống bên ngoài đã ẩn. Mục trình tải xuống bên ngoài được hiển thị. Mục trình tải xuống bên ngoài + Mở video Mục mở video đã ẩn. Mục mở video được hiển thị. Mục mở video + Trạng thái lặp lại Mục trạng thái lặp lại đã ẩn. Mục trạng thái lặp lại được hiển thị. Mục trạng thái lặp lại @@ -1753,6 +1758,7 @@ Ngoài ra, quảng cáo sẽ không còn bị chặn trong trình phát Shorts. Nếu cài đặt này không có hiệu lực, hãy thử chuyển sang chế độ Ẩn danh." Nguyên bản RVX Music + Chú ý Hiện %s chưa được cài đặt. Hãy cài đặt và thử lại. Tên gói của RVX Music đã được cài đặt. Tên gói của RVX Music @@ -1780,4 +1786,4 @@ Nếu cài đặt này không có hiệu lực, hãy thử chuyển sang chế Kiểm tra hoặc xóa các kênh đã thêm vào Danh sách trắng. Danh sách trắng SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/zh-rCN/missing_strings.xml b/patches/src/main/resources/youtube/translations/zh-rCN/missing_strings.xml index f0e299ece..c727e26ea 100644 --- a/patches/src/main/resources/youtube/translations/zh-rCN/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/zh-rCN/missing_strings.xml @@ -1,4 +1,4 @@ - + Change Shorts background repeat state Invalid seekbar color value. @@ -80,18 +80,23 @@ Info: Most bugs cannot be fixed due to client-side limitations, so use it only for testing purposes." About Custom actions + Copy video URL Copy video URL menu is hidden. Copy video URL menu is shown. + Copy timestamp URL Copy timestamp URL menu is hidden. Copy timestamp URL menu is shown. Show copy timestamp URL menu Show copy video URL menu + External downloader External downloader menu is hidden. External downloader menu is shown. Show external downloader menu + Open video Open video menu is hidden. Open video menu is shown. Show open video menu + Repeat state Repeat state menu is hidden. Repeat state menu is shown. Show repeat state menu @@ -102,4 +107,4 @@ Most bugs cannot be fixed due to client-side limitations, so use it only for tes • OPUS audio codec may not be supported." • Videos may end 1 second early. iOS Music - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/zh-rCN/strings.xml b/patches/src/main/resources/youtube/translations/zh-rCN/strings.xml index 6953246d0..cd812fb7b 100644 --- a/patches/src/main/resources/youtube/translations/zh-rCN/strings.xml +++ b/patches/src/main/resources/youtube/translations/zh-rCN/strings.xml @@ -1,4 +1,4 @@ - + 开启视频播放器的访问控制? 由于无障碍服务已启用,您的控制被修改 @@ -1661,6 +1661,7 @@ Note: 如果此设置未生效,请尝试切换到隐身模式" Stock RVX Music + 警告 %s 未安装,请先安装 已安装的 RVX Music 包名 RVX Music 包名 @@ -1688,4 +1689,4 @@ Note: 检查或删除添加到白名单的频道列表 频道白名单 SponsorBlock - + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/zh-rTW/missing_strings.xml b/patches/src/main/resources/youtube/translations/zh-rTW/missing_strings.xml index 82ade89c2..c9a489aa2 100644 --- a/patches/src/main/resources/youtube/translations/zh-rTW/missing_strings.xml +++ b/patches/src/main/resources/youtube/translations/zh-rTW/missing_strings.xml @@ -1,4 +1,64 @@ - - - - + + + Change Shorts background repeat state + Custom actions are disabled in flyout menu. + "Custom actions are enabled in flyout menu. + +Limitations: +• Does not work if app version is spoofed to 18.49.37 or earlier. +• Does not work with livestream." + Enable custom actions in flyout menu + Custom actions are disabled in toolbar. + "Custom actions are enabled in toolbar. + +Press and hold the More button to show the Custom actions dialog." + Enable custom actions in toolbar + Package name of your installed external downloader app, such as NewPipe or YTDLnis, on long press. + Long press video downloader package name + Chat summary is shown. + Chat summary is hidden. + Hide Chat summary in live chat + MMT Orange + MMT Pink + MMT Turquoise + Xisr Yellow + YouTube Black + All contents (Sort by time, Ascending) + Custom actions + Adjust: Mark Start and End Time for segment + Verify the Segment + Edit the Segment + Forward by Specified Time (Default: 150ms) + Publish Created Segment + Rewind by Specified Time (Default: 150ms) + "This feature is still experimental, so there is no guarantee that it will work perfectly. + +Most bugs cannot be fixed due to client-side limitations, so use it only for testing purposes." + About Custom actions + Copy video URL + Copy video URL menu is hidden. + Copy video URL menu is shown. + Copy timestamp URL + Copy timestamp URL menu is hidden. + Copy timestamp URL menu is shown. + Show copy timestamp URL menu + Show copy video URL menu + External downloader + External downloader menu is hidden. + External downloader menu is shown. + Show external downloader menu + Open video + Open video menu is hidden. + Open video menu is shown. + Show open video menu + Repeat state + Repeat state menu is hidden. + Repeat state menu is shown. + Show repeat state menu + Custom actions + 19.26.42 - Disable Cairo icon in navigation and toolbar + 19.33.37 - Restore old playback speed flyout panel + "• Videos may end 1 second early. +• OPUS audio codec may not be supported." + iOS Music + \ No newline at end of file diff --git a/patches/src/main/resources/youtube/translations/zh-rTW/strings.xml b/patches/src/main/resources/youtube/translations/zh-rTW/strings.xml index 934459643..13df50911 100644 --- a/patches/src/main/resources/youtube/translations/zh-rTW/strings.xml +++ b/patches/src/main/resources/youtube/translations/zh-rTW/strings.xml @@ -1,4 +1,4 @@ - + 是否啟用影片播放器的無障礙控制? 由於已啟用無障礙服務,因此您的控制選項已被修改。 @@ -1770,6 +1770,7 @@ Note: 若此設定未生效,請嘗試切換至無痕模式。" 預設 RVX 音樂 + 警告 %s 未安裝。 請安裝它。 已安裝的 RVX 音樂 套件名稱。 RVX 音樂包名稱 @@ -1797,4 +1798,4 @@ Note: 查看或刪除已新增至白名單的頻道清單。 頻道白名單 SponsorBlock - + \ No newline at end of file diff --git a/xml_tools/config/__init__.py b/xml_tools/config/__init__.py new file mode 100644 index 000000000..601b0f127 --- /dev/null +++ b/xml_tools/config/__init__.py @@ -0,0 +1,5 @@ +"""Config package for application settings.""" + +from .settings import Settings + +__all__: list[str] = ["Settings"] diff --git a/xml_tools/config/settings.py b/xml_tools/config/settings.py index d7e534140..e3d252b7a 100644 --- a/xml_tools/config/settings.py +++ b/xml_tools/config/settings.py @@ -1,11 +1,12 @@ +"""Settings.""" + from dataclasses import dataclass from pathlib import Path @dataclass class Settings: - """ - Application settings and configuration for XML processing tools. + """Application settings and configuration for XML processing tools. This class manages all path configurations and settings for the XML processing tools. It automatically resolves absolute paths based on the project structure and @@ -16,11 +17,11 @@ class Settings: BASE_DIR (Path): Absolute path to the project root directory SRC_DIR (Path): Absolute path to the source directory RESOURCES_DIR (Path): Absolute path to the resources directory + """ - def __post_init__(self): - """ - Initialize all path attributes with absolute paths. + def __post_init__(self) -> None: + """Initialize all path attributes with absolute paths. This method is automatically called after class instantiation and sets up all directory paths as absolute paths based on the location of this settings file. @@ -30,6 +31,7 @@ def __post_init__(self): Raises: FileNotFoundError: If critical directories cannot be found + """ # Get absolute path to the xml_tools directory (where settings.py is located) self.XML_TOOLS_DIR = Path(__file__).resolve().parent.parent @@ -46,8 +48,7 @@ def __post_init__(self): MAX_LINE_LENGTH: int = 120 def get_resource_path(self, app: str, resource_type: str) -> Path: - """ - Get absolute path to a specific resource directory or file. + """Get absolute path to a specific resource directory or file. Args: app (str): Application identifier (e.g., 'youtube' or 'music') @@ -62,5 +63,6 @@ def get_resource_path(self, app: str, resource_type: str) -> Path: >>> path = settings.get_resource_path('youtube', 'settings/xml/prefs.xml') >>> str(path) '/absolute/path/to/project/src/main/resources/youtube/settings/xml/prefs.xml' + """ return (self.RESOURCES_DIR / app / resource_type).resolve() diff --git a/xml_tools/core/__init__.py b/xml_tools/core/__init__.py new file mode 100644 index 000000000..fd37dbd5b --- /dev/null +++ b/xml_tools/core/__init__.py @@ -0,0 +1,5 @@ +"""Core package for application logging.""" + +from .logging import log_process, setup_logging + +__all__: list[str] = ["log_process", "setup_logging"] diff --git a/xml_tools/core/exceptions.py b/xml_tools/core/exceptions.py deleted file mode 100644 index 3c3555c36..000000000 --- a/xml_tools/core/exceptions.py +++ /dev/null @@ -1,13 +0,0 @@ -class XMLToolsError(Exception): - """Base exception for XML tools.""" - pass - - -class ConfigError(XMLToolsError): - """Configuration related errors.""" - pass - - -class XMLProcessingError(XMLToolsError): - """XML processing related errors.""" - pass diff --git a/xml_tools/core/logging.py b/xml_tools/core/logging.py index 60c7add16..6bb0c3a18 100644 --- a/xml_tools/core/logging.py +++ b/xml_tools/core/logging.py @@ -1,6 +1,13 @@ +"""Core package for application logging.""" + +from __future__ import annotations + import logging -from pathlib import Path -from typing import Optional +import sys +from typing import TYPE_CHECKING, ClassVar + +if TYPE_CHECKING: + from pathlib import Path # ANSI escape codes for colors BLUE: str = "\033[94m" @@ -13,13 +20,14 @@ class ColorFormatter(logging.Formatter): - """ - Custom formatter to add colors based on log level and special message formatting. + """Custom formatter to add colors based on log level and special message formatting. Attributes: level_colors (dict): Mapping of log levels to their corresponding colors. + """ - level_colors = { + + level_colors: ClassVar[dict[str, str]] = { "DEBUG": BLUE, "INFO": GREEN, "WARNING": YELLOW, @@ -28,8 +36,7 @@ class ColorFormatter(logging.Formatter): } def format(self, record: logging.LogRecord) -> str: - """ - Format the log record with colors and special message handling. + """Format the log record with colors and special message handling. Args: record (logging.LogRecord): The log record to format. @@ -41,6 +48,7 @@ def format(self, record: logging.LogRecord) -> str: - Preserves original record attributes by saving and restoring them - Applies special coloring to "Starting process:" messages - Colors log levels according to severity + """ # Save original values original_levelname = record.levelname @@ -64,9 +72,22 @@ def format(self, record: logging.LogRecord) -> str: return formatted_message -def setup_logging(log_file: Optional[Path] = None, debug: bool = True) -> logging.Logger: - """ - Configure logging with colored level names for console output and optional file logging. +class ExitOnErrorHandler(logging.Handler): + """Custom handler to exit the program on ERROR or CRITICAL log levels.""" + + def emit(self, record: logging.LogRecord) -> None: + """Check the log level and exit if it's ERROR or CRITICAL. + + Args: + record (logging.LogRecord): The log record to evaluate. + + """ + if record.levelno >= logging.ERROR: + sys.exit(1) + + +def setup_logging(log_file: Path | None = None, *, debug: bool = True) -> logging.Logger: + """Configure logging with colored level names for console output and optional file logging. Args: log_file (Optional[Path]): Path to the log file. If None, only console logging is configured. @@ -75,11 +96,6 @@ def setup_logging(log_file: Optional[Path] = None, debug: bool = True) -> loggin Returns: logging.Logger: Configured logger instance. - Note: - - Console output uses colors for better readability - - File output (if enabled) uses plain text without colors - - DEBUG messages are enabled by default - - Clears any existing handlers before configuration """ # Create logger logger = logging.getLogger("xml_tools") @@ -94,9 +110,7 @@ def setup_logging(log_file: Optional[Path] = None, debug: bool = True) -> loggin # Console handler with colors console_handler = logging.StreamHandler() console_handler.setLevel(base_level) # Use same level as logger - console_formatter = ColorFormatter( - "%(asctime)s - %(levelname)s - %(message)s" - ) + console_formatter = ColorFormatter("%(asctime)s - %(levelname)s - %(message)s") console_handler.setFormatter(console_formatter) logger.addHandler(console_handler) @@ -104,23 +118,24 @@ def setup_logging(log_file: Optional[Path] = None, debug: bool = True) -> loggin if log_file: file_handler = logging.FileHandler(log_file) file_handler.setLevel(base_level) # Use same level as logger - file_formatter = logging.Formatter( - "%(asctime)s - %(name)s - %(levelname)s - %(message)s" - ) + file_formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") file_handler.setFormatter(file_formatter) logger.addHandler(file_handler) + # Add the ExitOnErrorHandler + exit_handler = ExitOnErrorHandler() + logger.addHandler(exit_handler) + # Log initial setup logger.debug("Logging system initialized") if log_file: - logger.debug(f"Log file created at: {log_file}") + logger.debug("Log file created at: %s", log_file) return logger def log_process(logger: logging.Logger, process_name: str) -> None: - """ - Log the start of a process with special formatting. + """Log the start of a process with special formatting. Args: logger (logging.Logger): The logger instance to use. @@ -128,5 +143,6 @@ def log_process(logger: logging.Logger, process_name: str) -> None: Note: Uses special color formatting for "Starting process:" messages. + """ - logger.info(f"Starting process: {process_name}") + logger.info("Starting process: %s", process_name) diff --git a/xml_tools/handlers/__init__.py b/xml_tools/handlers/__init__.py new file mode 100644 index 000000000..63ec6a478 --- /dev/null +++ b/xml_tools/handlers/__init__.py @@ -0,0 +1 @@ +"""Handlers package for application XML functions.""" diff --git a/xml_tools/handlers/missing_prefs.py b/xml_tools/handlers/check_prefs.py similarity index 74% rename from xml_tools/handlers/missing_prefs.py rename to xml_tools/handlers/check_prefs.py index 314b424ac..2e16e56a2 100644 --- a/xml_tools/handlers/missing_prefs.py +++ b/xml_tools/handlers/check_prefs.py @@ -1,40 +1,38 @@ -from pathlib import Path -from typing import Set -import re +"""Check missing prefs keys.""" + import logging +import re +from pathlib import Path from config.settings import Settings -from core.exceptions import XMLProcessingError logger = logging.getLogger("xml_tools") -def extract_keys(path: Path) -> Set[str]: +def extract_keys(path: Path) -> set[str]: """Extract keys from XML file. Args: path: Path to XML file Returns: - Set of extracted keys + set of extracted keys - Raises: - XMLProcessingError: If parsing fails """ try: key_pattern = re.compile(r'android:key="(\w+)"') # Compile the regex pattern to match keys keys_found = set() # Use a set to store unique keys # Open the XML file and search for the keys - with open(path, "r", encoding="utf-8") as file: + with path.open(encoding="utf-8") as file: for line in file: matches = key_pattern.findall(line) # Find all keys in the line keys_found.update(matches) # Add found keys to the set + except FileNotFoundError: + logger.exception("Failed to extract keys from %s: ", path) + else: return keys_found - except Exception as e: - logger.error(f"Failed to extract keys from {path}: {e}") - raise XMLProcessingError(f"Failed to extract keys from {path}: {e}") def process(app: str, base_dir: Path) -> None: @@ -43,6 +41,7 @@ def process(app: str, base_dir: Path) -> None: Args: app: Application name (youtube/music) base_dir: Base directory of RVX patches operations + """ settings = Settings() base_path = settings.get_resource_path(app, "settings") @@ -67,6 +66,5 @@ def process(app: str, base_dir: Path) -> None: else: logger.info("No missing keys found") - except XMLProcessingError as e: - logger.error(f"Failed to process preference files: {e}") - raise + except Exception: + logger.exception("Failed to process preference files: ") diff --git a/xml_tools/handlers/check_strings.py b/xml_tools/handlers/check_strings.py new file mode 100644 index 000000000..a5a499686 --- /dev/null +++ b/xml_tools/handlers/check_strings.py @@ -0,0 +1,70 @@ +"""Check missing strings keys.""" + +import logging +import re +from pathlib import Path + +from config.settings import Settings + +logger = logging.getLogger("xml_tools") + + +def extract_keys(path: Path) -> set[str]: + """Extract keys from XML file. + + Args: + path: Path to XML file + + Returns: + set of extracted keys + + """ + try: + key_pattern = re.compile(r'name="(\w+)"') # Compile the regex pattern to match keys + keys_found = set() # Use a set to store unique keys + + # Open the XML file and search for the keys + with path.open(encoding="utf-8") as file: + for line in file: + matches = key_pattern.findall(line) # Find all keys in the line + keys_found.update(matches) # Add found keys to the set + + except FileNotFoundError: + logger.exception("Failed to extract keys from %s: ", path) + else: + return keys_found + + +def process(app: str, base_dir: Path) -> None: + """Process prefs files to find missing keys. + + Args: + app: Application name (youtube/music) + base_dir: Base directory of RVX patches operations + + """ + settings = Settings() + base_path = settings.get_resource_path(app, "settings") + + # Define file paths using base_dir + prefs_path_1 = base_dir / "src/main/resources/youtube/settings/host/values/strings.xml" + prefs_path_2 = base_path / "host/values/strings.xml" + + try: + # Extract keys from both files + keys_1 = extract_keys(prefs_path_1) + keys_2 = extract_keys(prefs_path_2) + + # Find missing keys + missing_keys = keys_1 - keys_2 + + # Log results + if missing_keys: + logger.info("Missing keys found:") + for key in sorted(missing_keys): + logger.info(key) + else: + logger.info("No missing keys found") + + except Exception: + logger.exception("Failed to process preference files: ") diff --git a/xml_tools/handlers/missing_strings.py b/xml_tools/handlers/missing_strings.py index bcfe84085..d385d733e 100644 --- a/xml_tools/handlers/missing_strings.py +++ b/xml_tools/handlers/missing_strings.py @@ -1,9 +1,11 @@ -from pathlib import Path +"""Find missing strings and create the file with them.""" + import logging -from lxml import etree as ET +from pathlib import Path + +from lxml import etree as et from config.settings import Settings -from core.exceptions import XMLProcessingError from utils.xml import XMLProcessor logger = logging.getLogger("xml_tools") @@ -16,6 +18,7 @@ def compare_and_update(source_path: Path, dest_path: Path, missing_path: Path) - source_path: Path to source XML file dest_path: Path to destination XML file missing_path: Path to missing strings file + """ try: # Parse source and destination files @@ -25,28 +28,25 @@ def compare_and_update(source_path: Path, dest_path: Path, missing_path: Path) - # Find missing strings missing_strings = {} - for name, data in source_strings.items(): - if name not in dest_strings: - missing_strings[name] = data + missing_strings = {name: data for name, data in source_strings.items() if name not in dest_strings} if missing_strings: # Create new root with missing strings - root = ET.Element("resources") - for name, data in sorted(missing_strings.items()): - string_elem = ET.Element("string", **data["attributes"]) + root = et.Element("resources") + for _name, data in sorted(missing_strings.items()): + string_elem = et.Element("string", **data["attributes"]) string_elem.text = data["text"] root.append(string_elem) # Write missing strings file XMLProcessor.write_file(missing_path, root) - logger.info(f"Modified missing strings file: {missing_path}") + logger.info("Modified missing strings file: %s", missing_path) elif missing_path.exists(): missing_path.unlink() - logger.info(f"Removed empty missing strings file: {missing_path}") + logger.info("Removed empty missing strings file: %s", missing_path) - except Exception as e: - logger.error(f"Failed to process missing strings: {e}") - raise XMLProcessingError(str(e)) + except Exception: + logger.exception("Failed to process missing strings: ") def process(app: str) -> None: @@ -54,6 +54,7 @@ def process(app: str) -> None: Args: app: Application name (youtube/music) + """ settings = Settings() source_path = settings.get_resource_path(app, "settings") / "host/values/strings.xml" @@ -66,6 +67,5 @@ def process(app: str) -> None: missing_path = lang_dir / "missing_strings.xml" compare_and_update(source_path, dest_path, missing_path) - except Exception as e: - logger.error(f"Failed to process {app} translations: {e}") - raise XMLProcessingError(str(e)) + except Exception: + logger.exception("Failed to process %s translations: ", app) diff --git a/xml_tools/handlers/remove_unused_strings.py b/xml_tools/handlers/remove_unused_strings.py index 4047008dc..45e95e7a0 100644 --- a/xml_tools/handlers/remove_unused_strings.py +++ b/xml_tools/handlers/remove_unused_strings.py @@ -1,44 +1,44 @@ -from typing import Set, Dict, List +"""Remove unused strings.""" + import logging import os -from lxml import etree as ET from pathlib import Path +from lxml import etree as et + from config.settings import Settings -from core.exceptions import XMLProcessingError from utils.xml import XMLProcessor logger = logging.getLogger("xml_tools") # Constants -BLACKLISTED_STRINGS: Set[str] = { +BLACKLISTED_STRINGS: set[str] = { "revanced_remember_video_quality_mobile", "revanced_remember_video_quality_wifi", "revanced_sb_api_url_sum", "revanced_sb_enabled", "revanced_sb_enabled_sum", "revanced_sb_toast_on_skip", - "revanced_sb_toast_on_skip_sum" + "revanced_sb_toast_on_skip_sum", + "revanced_third_party_youtube_music_not_installed_dialog_title", } PREFIX_TO_IGNORE: tuple[str, ...] = ( "revanced_icon_", + "revanced_shorts_custom_actions_", "revanced_spoof_app_version_target_entry_", - "revanced_spoof_streaming_data_side_effects_" + "revanced_spoof_streaming_data_side_effects_", ) settings_instance = Settings() SCRIPT_DIR = settings_instance.BASE_DIR -SEARCH_DIRECTORIES = [ - str(SCRIPT_DIR.parent / "revanced-patches") -] +SEARCH_DIRECTORIES = [str(SCRIPT_DIR.parent / "revanced-patches")] ALLOWED_EXTENSIONS = (".kt", ".java", ".xml") def get_base_name(name: str) -> str: - """ - Return the base name by stripping known suffixes from a string name. + """Return the base name by stripping known suffixes from a string name. Args: name (str): The original string name. @@ -49,29 +49,24 @@ def get_base_name(name: str) -> str: Example: >>> get_base_name("my_setting_summary_on") 'my_setting' + """ - suffixes = [ - "_title", - "_summary_off", - "_summary_on", - "_summary" - ] + suffixes = ["_title", "_summary_off", "_summary_on", "_summary"] for suffix in suffixes: if name.endswith(suffix): - return name[:-len(suffix)] + return name[: -len(suffix)] return name -def search_in_files(directories: List[str], name_values: Set[str]) -> Dict[str, List[str]]: - """ - Search for string names in all files within specified directories. +def search_in_files(directories: list[str], name_values: set[str]) -> dict[str, list[str]]: + """Search for string names in all files within specified directories. Args: - directories (List[str]): List of directory paths to search. - name_values (Set[str]): Set of string names to search for. + directories (list[str]): list of directory paths to search. + name_values (set[str]): set of string names to search for. Returns: - Dict[str, List[str]]: Dictionary mapping each string name to a list of file paths where it was found. + dict[str, list[str]]: Dictionary mapping each string name to a list of file paths where it was found. Raises: OSError: If there are problems accessing the directories or files. @@ -82,42 +77,42 @@ def search_in_files(directories: List[str], name_values: Set[str]) -> Dict[str, - Ignores 'strings.xml' and 'missing_strings.xml' files - Only searches files with extensions defined in ALLOWED_EXTENSIONS - Searches for both original names and their base forms (without suffixes) + """ results = {name: [] for name in name_values} for directory in directories: - abs_dir = os.path.abspath(directory) - logger.info(f"Searching in directory: {abs_dir} (exists: {os.path.exists(abs_dir)})") + abs_dir = Path(directory).resolve() + logger.info("Searching in directory: %s (exists: %s)", abs_dir, Path(abs_dir).exists()) for root, dirs, files in os.walk(directory): # Skip hidden and build directories dirs[:] = [d for d in dirs if not d.startswith(".") and d != "build"] for file in files: - if (file in ("strings.xml", "missing_strings.xml") or not file.endswith(ALLOWED_EXTENSIONS)): + if file in ("strings.xml", "missing_strings.xml") or not file.endswith(ALLOWED_EXTENSIONS): continue - file_path = os.path.join(root, file) + file_path = Path(root) / file try: - with open(file_path, "r", encoding="utf-8") as f: + with file_path.open(encoding="utf-8") as f: content = f.read() for name in name_values: # Check both original name and base name if name in content or get_base_name(name) in content: results[name].append(file_path) - except Exception as e: - logger.error(f"Error reading {file_path}: {e}") + except Exception: + logger.exception("Error reading %s: ", file_path) return results -def should_remove(name: str, unused_names: Set[str]) -> bool: - """ - Determine if a string should be removed based on various criteria. +def should_remove(name: str, unused_names: set[str]) -> bool: + """Determine if a string should be removed based on various criteria. Args: name (str): The string name to check. - unused_names (Set[str]): Set of string names that were not found in any source files. + unused_names (set[str]): set of string names that were not found in any source files. Returns: bool: True if the string should be removed, False otherwise. @@ -127,30 +122,28 @@ def should_remove(name: str, unused_names: Set[str]) -> bool: - The string or its base name is in the unused_names set - The string is not in BLACKLISTED_STRINGS - The string does not start with any prefix in PREFIX_TO_IGNORE + """ base_name = get_base_name(name) return ( - (name in unused_names or base_name in unused_names) and - name not in BLACKLISTED_STRINGS and - not any(name.startswith(prefix) for prefix in PREFIX_TO_IGNORE) + (name in unused_names or base_name in unused_names) + and name not in BLACKLISTED_STRINGS + and not any(name.startswith(prefix) for prefix in PREFIX_TO_IGNORE) ) -def process_xml_file(file_path: Path, unused_names: Set[str]) -> None: - """ - Process a single XML file to remove unused strings. +def process_xml_file(file_path: Path, unused_names: set[str]) -> None: + """Process a single XML file to remove unused strings. Args: file_path (Path): Path to the XML file to process. - unused_names (Set[str]): Set of string names that should be considered for removal. - - Raises: - XMLProcessingError: If there are any errors during XML processing. + unused_names (set[str]): set of string names that should be considered for removal. Notes: - Creates a new XML tree containing only the strings that should be kept - Only writes the file if strings were actually removed - Maintains original XML structure and attributes + """ try: _, _, strings_dict = XMLProcessor.parse_file(file_path) @@ -159,11 +152,11 @@ def process_xml_file(file_path: Path, unused_names: Set[str]) -> None: initial_count = len(strings_dict) # Create new root with only used strings - new_root = ET.Element("resources") + new_root = et.Element("resources") kept_strings = 0 for name, data in sorted(strings_dict.items()): if not should_remove(name, unused_names): - string_elem = ET.Element("string", **data["attributes"]) + string_elem = et.Element("string", **data["attributes"]) string_elem.text = data["text"] new_root.append(string_elem) kept_strings += 1 @@ -172,33 +165,30 @@ def process_xml_file(file_path: Path, unused_names: Set[str]) -> None: if kept_strings < initial_count: XMLProcessor.write_file(file_path, new_root) logger.info( - f"Updated {file_path}: " - f"removed {initial_count - kept_strings} strings, " - f"kept {kept_strings} strings" + "Updated %s: removed %s strings, kept %s strings", + file_path, + initial_count - kept_strings, + kept_strings, ) else: - logger.info(f"No changes needed for {file_path}") + logger.info("No changes needed for %s", file_path) - except Exception as e: - logger.error(f"Error processing {file_path}: {e}") - raise XMLProcessingError(f"Failed to process {file_path}: {str(e)}") + except Exception: + logger.exception("Error processing %s: ", file_path) def process(app: str) -> None: - """ - Remove unused strings from XML files for a given application. + """Remove unused strings from XML files for a given application. Args: app (str): The application identifier to process. - Raises: - XMLProcessingError: If there are any errors during XML processing. - Notes: - Processes both the source strings file and all translation files - Uses settings from the Settings class to determine file locations - Maintains a log of all operations - Skips writing files if no changes are needed + """ settings = Settings() base_path = settings.get_resource_path(app, "settings") @@ -224,6 +214,5 @@ def process(app: str) -> None: if dest_path.exists(): process_xml_file(dest_path, unused_names) - except Exception as e: - logger.error(f"Error during processing: {e}") - raise XMLProcessingError(str(e)) + except Exception: + logger.exception("Error during processing: ") diff --git a/xml_tools/handlers/replace_strings.py b/xml_tools/handlers/replace_strings.py index 55c63832f..568983716 100644 --- a/xml_tools/handlers/replace_strings.py +++ b/xml_tools/handlers/replace_strings.py @@ -1,9 +1,11 @@ -from pathlib import Path +"""Get strings from provided source and replace strings in destination.""" + import logging -from lxml import etree as ET +from pathlib import Path + +from lxml import etree as et from config.settings import Settings -from core.exceptions import XMLProcessingError from utils.xml import XMLProcessor logger = logging.getLogger("xml_tools") @@ -15,6 +17,7 @@ def update_strings(target_path: Path, source_path: Path) -> None: Args: target_path: Path to target XML file source_path: Path to source XML file + """ try: # Parse source and target files @@ -31,18 +34,17 @@ def update_strings(target_path: Path, source_path: Path) -> None: del source_strings[name] # Add new strings - for name, data in sorted(source_strings.items()): - string_elem = ET.Element("string", **data["attributes"]) + for _name, data in sorted(source_strings.items()): + string_elem = et.Element("string", **data["attributes"]) string_elem.text = data["text"] target_root.append(string_elem) # Write updated file XMLProcessor.write_file(target_path, target_root) - logger.info(f"Updated strings in {target_path}") + logger.info("Updated strings in %s", target_path) - except Exception as e: - logger.error(f"Failed to update strings in {target_path}: {e}") - raise XMLProcessingError(str(e)) + except Exception: + logger.exception("Failed to update strings in %s: ", target_path) def process(app: str, base_dir: Path) -> None: @@ -51,6 +53,7 @@ def process(app: str, base_dir: Path) -> None: Args: app: Application name (youtube/music) base_dir: Base directory of RVX patches operations + """ settings = Settings() base_path = settings.get_resource_path(app, "settings") @@ -73,6 +76,5 @@ def process(app: str, base_dir: Path) -> None: if rvx_lang_path.exists(): update_strings(target_path, rvx_lang_path) - except Exception as e: - logger.error(f"Failed to process {app} translations: {e}") - raise XMLProcessingError(str(e)) + except Exception: + logger.exception("Failed to process %s translations: ", app) diff --git a/xml_tools/handlers/sort_strings.py b/xml_tools/handlers/sort_strings.py index 20eebd7ca..0e432ff26 100644 --- a/xml_tools/handlers/sort_strings.py +++ b/xml_tools/handlers/sort_strings.py @@ -1,9 +1,11 @@ -from pathlib import Path -from lxml import etree as ET +"""Check strings in destination.""" + import logging +from pathlib import Path + +from lxml import etree as et from config.settings import Settings -from core.exceptions import XMLProcessingError from utils.xml import XMLProcessor logger = logging.getLogger("xml_tools") @@ -14,24 +16,24 @@ def sort_file(path: Path) -> None: Args: path: Path to XML file to sort + """ try: _, root, strings = XMLProcessor.parse_file(path) # Create new root with sorted strings - new_root = ET.Element("resources") + new_root = et.Element("resources") for name in sorted(strings.keys()): data = strings[name] - string_elem = ET.Element("string", **data["attributes"]) + string_elem = et.Element("string", **data["attributes"]) string_elem.text = data["text"] new_root.append(string_elem) XMLProcessor.write_file(path, new_root) - logger.info(f"Sorted strings in {path}") + logger.info("Sorted strings in %s", path) - except Exception as e: - logger.error(f"Failed to sort {path}: {e}") - raise XMLProcessingError(f"Failed to sort {path}: {e}") + except Exception: + logger.exception("Failed to sort %s: ", path) def process(app: str) -> None: @@ -39,6 +41,7 @@ def process(app: str) -> None: Args: app: Application name (youtube/music) + """ settings = Settings() base_path = settings.get_resource_path(app, "settings") diff --git a/xml_tools/main.py b/xml_tools/main.py index 6097d81e8..237dd73bf 100644 --- a/xml_tools/main.py +++ b/xml_tools/main.py @@ -1,90 +1,102 @@ -from pathlib import Path -import click +"""CLI tool to run xml commands.""" + +from __future__ import annotations + import os import sys -from typing import Optional, List, Tuple, Callable -from logging import Logger +from dataclasses import dataclass +from pathlib import Path +from typing import TYPE_CHECKING, Callable + +import click + +from config import Settings +from core import log_process, setup_logging +from handlers import ( + check_prefs, + check_strings, + missing_strings, + remove_unused_strings, + replace_strings, + sort_strings, +) +from utils import GitClient + +if TYPE_CHECKING: + from logging import Logger -from config.settings import Settings -from core.exceptions import ConfigError -from core.logging import setup_logging, log_process -from utils.git import GitClient -from handlers import missing_prefs, missing_strings, remove_unused_strings, replace_strings, sort_strings settings = Settings() -def get_rvx_base_dir() -> Path: - """Get RVX base directory from environment variable. +@dataclass +class CLIConfig: + """Configuration for CLI commands.""" - Returns: - Path: The path to the RVX base directory. + log_file: str | None + rvx_base_dir: Path | None + app: str + logger: Logger - Raises: - ConfigError: If RVX_BASE_DIR environment variable is not set. - Note: - This function checks for the RVX_BASE_DIR environment variable - which must be set before running the application. - """ +def get_rvx_base_dir(logger: Logger) -> Path: + """Get the RVX base directory from the environment.""" rvx_dir = os.getenv("RVX_BASE_DIR") if not rvx_dir: - raise ConfigError("RVX_BASE_DIR environment variable must be set") + logger.error("RVX_BASE_DIR must be provided for replace operation.") + sys.exit(1) return Path(rvx_dir) -def validate_rvx_base_dir(ctx: click.Context, base_dir: Optional[str] = None) -> Path: - """Validate and return the RVX base directory path. - - Args: - ctx (click.Context): The Click context object containing shared resources. - base_dir (Optional[str], optional): The base directory path string. Defaults to None. - - Returns: - Path: A validated Path object for the RVX base directory. - - Raises: - SystemExit: If the base directory validation fails. - - Note: - If base_dir is not provided, the function attempts to get it from - the RVX_BASE_DIR environment variable. - """ - if not base_dir: - try: - base_dir = str(get_rvx_base_dir()) - except ConfigError as e: - ctx.obj['logger'].error(str(e)) - sys.exit(1) - return Path(base_dir) - - -def process_all(app: str, base_dir: Path, logger: Logger) -> None: - """Run all processing steps in sequence for the specified application. - - Args: - app (str): The application to process ('youtube' or 'music'). - base_dir (Path): The base directory path for RVX operations. - logger (Logger): The logger instance for recording operations. - - Raises: - SystemExit: If any processing step fails or Git sync fails. - Exception: If any handler encounters an error during execution. - - Note: - This function executes the following steps in order: - 1. Syncs the Git repository - 2. Replaces strings for YouTube and YouTube Music - 3. Removes unused strings - 4. Sorts strings - 5. Checks for missing strings - 6. Checks for missing preferences - """ +def is_rvx_dir_needed(options: dict) -> bool: + """Determine if rvx_base_dir validation is needed based on options.""" + return options.get("run_all") or options.get("replace") or options.get("prefs") or options.get("check") + + +@click.group(invoke_without_command=True) +@click.option("--log-file", type=str, help="Path to log file") +@click.option("--rvx-base-dir", type=str, envvar="RVX_BASE_DIR", help="Path to RVX 'patches' directory") +@click.option("-a", "--all", "run_all", is_flag=True, help="Run all commands in order") +@click.option("-m", "--missing", is_flag=True, help="Run missing strings check") +@click.option("-r", "--replace", is_flag=True, help="Run replace strings operation") +@click.option("--remove", is_flag=True, help="Remove unused strings") +@click.option("-s", "--sort", is_flag=True, help="Sort strings in XML files") +@click.option("-c", "--check", is_flag=True, help="Run missing strings check") +@click.option("-p", "--prefs", is_flag=True, help="Run missing preferences check") +@click.option("--youtube/--music", default=True, help="Process YouTube or Music strings") +@click.pass_context +def cli(ctx: click.Context, **kwargs: dict[str, bool | str | None]) -> None: + """CLI tool for processing XML commands.""" + log_file = kwargs.get("log_file") + app = "youtube" if kwargs.get("youtube") else "music" + + logger = setup_logging(Path(log_file) if log_file else None) + + rvx_base_dir = kwargs.get("rvx_base_dir") or get_rvx_base_dir(logger) if is_rvx_dir_needed(kwargs) else None + + ctx.obj = CLIConfig( + log_file=log_file, + rvx_base_dir=Path(rvx_base_dir) if rvx_base_dir else None, + app=app, + logger=logger, + ) + + if kwargs.get("run_all"): + process_all(ctx.obj) + + handle_individual_operations(ctx.obj, kwargs) + + +def process_all(config: CLIConfig) -> None: + """Run all operations in sequence.""" + logger = config.logger + base_dir = config.rvx_base_dir + git = GitClient(base_dir) if not git.sync_repository(): sys.exit(1) - handlers: List[Tuple[str, Callable, List[str]]] = [ + handlers: list[tuple[str, Callable, list[str]]] = [ ("Replace Strings (YouTube)", replace_strings.process, ["youtube", base_dir]), ("Replace Strings (YouTube Music)", replace_strings.process, ["music", base_dir]), ("Remove Unused Strings (YouTube)", remove_unused_strings.process, ["youtube"]), @@ -93,114 +105,50 @@ def process_all(app: str, base_dir: Path, logger: Logger) -> None: ("Sort Strings (YouTube Music)", sort_strings.process, ["music"]), ("Missing Strings Check (YouTube)", missing_strings.process, ["youtube"]), ("Missing Strings Check (YouTube Music)", missing_strings.process, ["music"]), - ("Missing Prefs Check", missing_prefs.process, ["youtube", base_dir]), + ("Missing Prefs Check", check_prefs.process, ["youtube", base_dir]), + ("Missing Strings Check", check_strings.process, ["youtube", base_dir]), ] - for process_name, handler, args in handlers: - try: - log_process(logger, process_name) - handler(*args) - except Exception as e: - logger.error(f"Handler {process_name} failed: {e}") - sys.exit(1) + for name, handler, args in handlers: + log_process(logger, name) + handler(*args) -@click.group(invoke_without_command=True) -@click.option("--log-file", type=str, help="Path to log file") -@click.option("--rvx-base-dir", type=str, help="Path to RVX 'patches' directory", envvar="RVX_BASE_DIR") -@click.option("-a", "--all", "run_all", is_flag=True, help="Run all commands in order") -@click.option("-m", "--missing", is_flag=True, help="Run missing strings check") -@click.option("-r", "--replace", is_flag=True, help="Run replace strings operation") -@click.option("--remove", is_flag=True, help="Remove unused strings") -@click.option("-s", "--sort", is_flag=True, help="Sort strings in XML files") -@click.option("-p", "--prefs", is_flag=True, help="Run missing preferences check") -@click.option("--youtube/--music", default=True, help="Process YouTube or Music strings") -@click.pass_context -def cli(ctx: click.Context, - log_file: Optional[str], - rvx_base_dir: Optional[str], - run_all: bool, - missing: bool, - replace: bool, - remove: bool, - sort: bool, - prefs: bool, - youtube: bool) -> None: - """XML processing tools for RVX patches with backwards compatibility. - - Args: - ctx (click.Context): Click context object for sharing resources between commands. - log_file (Optional[str]): Path to the log file. If None, logs to stdout. - rvx_base_dir (Optional[str]): Base directory for RVX operations. Can be set via RVX_BASE_DIR env var. - run_all (bool): Flag to run all processing steps in sequence. - missing (bool): Flag to run missing strings check. - replace (bool): Flag to run string replacement operation. - remove (bool): Flag to remove unused strings. - sort (bool): Flag to sort strings in XML files. - prefs (bool): Flag to run missing preferences check. - youtube (bool): Flag to process YouTube (--youtube) or Music (--music) strings. - - Raises: - SystemExit: If any processing step fails. - Exception: If any operation encounters an error. - - Note: - - The function initializes logging and validates the RVX base directory when required. - - Operations are executed in the order specified by command line flags. - - The --youtube/--music flag determines which application's strings to process. - - When --all is specified, all operations are run in a predefined sequence. - """ - # Initialize the logger - logger = setup_logging(Path(log_file) if log_file else None) +def handle_individual_operations(config: CLIConfig, options: dict) -> None: + """Handle individual operations based on user flags.""" + logger = config.logger + base_dir = config.rvx_base_dir + app = config.app - app = "youtube" if youtube else "music" - - # Store common context - ctx.obj = { - "app": app, - "logger": logger - } - - # Only validate RVX_BASE_DIR for commands that need it - needs_rvx_dir = run_all or replace or prefs - if needs_rvx_dir: - base_dir = validate_rvx_base_dir(ctx, rvx_base_dir) - - # Handle all operations if --all is specified - if run_all: - try: - process_all(app, base_dir, logger) - return - except Exception as e: - logger.error(f"Error during processing: {e}") - sys.exit(1) - - # Handle individual operations try: - if missing: + if options.get("missing"): log_process(logger, "Missing Strings Check") missing_strings.process(app) - if prefs: - log_process(logger, "Missing Preferences Check") - missing_prefs.process(app, base_dir) - - if remove: + if options.get("remove"): log_process(logger, "Remove Unused Strings") remove_unused_strings.process(app) - if replace: + if options.get("replace"): git = GitClient(base_dir) if git.sync_repository(): log_process(logger, "Replace Strings") replace_strings.process(app, base_dir) - if sort: + if options.get("sort"): log_process(logger, "Sort Strings") sort_strings.process(app) - except Exception as e: - logger.error(f"Error during processing: {e}") + if options.get("check"): + log_process(logger, "Check Strings") + check_strings.process(app, base_dir) + + if options.get("prefs"): + log_process(logger, "Check Preferences") + check_prefs.process(app, base_dir) + + except Exception: + logger.exception("Error during processing: ") sys.exit(1) diff --git a/xml_tools/utils/__init__.py b/xml_tools/utils/__init__.py new file mode 100644 index 000000000..8d5b94c9a --- /dev/null +++ b/xml_tools/utils/__init__.py @@ -0,0 +1,5 @@ +"""Utils package for application utilities.""" + +from .git import GitClient + +__all__: list[str] = ["GitClient"] diff --git a/xml_tools/utils/git.py b/xml_tools/utils/git.py index 14a670a09..5cefe1be9 100644 --- a/xml_tools/utils/git.py +++ b/xml_tools/utils/git.py @@ -1,64 +1,106 @@ -import subprocess -from pathlib import Path -from typing import Tuple +"""Git commands.""" + import logging +from pathlib import Path + +import git logger = logging.getLogger("xml_tools") class GitClient: - """ - Handler for Git operations on a repository. + """Handler for Git operations on a repository using GitPython.""" - This class provides methods to perform Git operations on a specified repository path. + def __init__(self, repo_path: Path) -> None: + """Initialize GitClient with repository path. - Attributes: - repo_path (Path): Path to the Git repository - """ + Args: + repo_path: Path to the Git repository. + + Raises: + ValueError: If the provided path is not a valid Git repository. - def __init__(self, repo_path: Path) -> None: """ - Initialize GitClient with repository path. + self.repo_path = repo_path + try: + self.repo = git.Repo(repo_path, search_parent_directories=True) + except git.InvalidGitRepositoryError as e: + msg = f"Invalid Git repository at path: {repo_path}" + raise ValueError(msg) from e + + def _handle_git_error(self, operation: str, exception: Exception) -> tuple[int, str, str]: + """Handle GitPython exceptions. Args: - repo_path (Path): Path to the Git repository + operation: The name of the Git operation that failed. + exception: The exception that was raised by GitPython. Returns: - None - """ - self.repo_path = repo_path + A tuple containing: + - an error code (1), + - an empty output string, + - the exception message as error string. - def run_command(self, command: list) -> Tuple[int, str, str]: """ - Execute a Git command and return its result. + logger.error("Git %s failed: %s", operation, exception) + return 1, "", str(exception) + + def switch_branch(self, branch_name: str) -> tuple[int, str, str]: + """Switches to the specified branch. Args: - command (list): List of command components (e.g., ["git", "pull"]) + branch_name: The name of the branch to switch to. Returns: - Tuple[int, str, str]: A tuple containing: - - Return code (0 for success) - - Command output (stdout) - - Error output (stderr) + A tuple containing: + - Return code (0 for success, 1 for failure) + - Command output (success message or empty) + - Error output (empty string on success, error message on failure) - Note: - Commands are executed in the repository directory specified during initialization. """ try: - result = subprocess.run( - command, - cwd=self.repo_path, - capture_output=True, - text=True - ) - return result.returncode, result.stdout, result.stderr - except subprocess.SubprocessError as e: - logger.error(f"Git command failed: {e}") - return 1, "", str(e) + self.repo.git.checkout(branch_name) + except git.GitCommandError as e: + return self._handle_git_error(f"checkout {branch_name}", e) + else: + return 0, f"Switched to branch {branch_name}", "" + + def fetch(self) -> tuple[int, str, str]: + """Fetche updates from remote. + + Returns: + A tuple containing: + - Return code (0 for success, 1 for failure) + - Command output (success message or empty) + - Error output (empty string on success, error message on failure) + + """ # noqa: D401 + try: + self.repo.remotes.origin.fetch() + except git.GitCommandError as e: + return self._handle_git_error("fetch", e) + else: + return 0, "Fetch successful", "" + + def pull(self) -> tuple[int, str, str]: + """Pull changes from remote. + + Returns: + A tuple containing: + - Return code (0 for success, 1 for failure) + - Command output (success message or empty) + - Error output (empty string on success, error message on failure) - def sync_repository(self) -> bool: """ - Synchronize the repository with its remote. + try: + self.repo.remotes.origin.pull() + except git.GitCommandError as e: + return self._handle_git_error("pull", e) + else: + return 0, "Pull successful", "" + + def sync_repository(self) -> bool: + """Synchronize the repository with its remote. This method performs three operations in sequence: 1. Switches to the 'dev' branch @@ -66,22 +108,18 @@ def sync_repository(self) -> bool: 3. Pulls changes Returns: - bool: True if all operations succeeded, False otherwise + True if all operations succeeded, False otherwise. - Note: - Logs success/failure of each operation through the logger. """ operations = [ - (["git", "switch", "dev"], "checkout"), - (["git", "fetch"], "fetch"), - (["git", "pull"], "pull") + (self.switch_branch, "dev"), + (self.fetch,), + (self.pull,), ] - for command, operation in operations: - code, out, err = self.run_command(command) + for operation, *args in operations: + code, _, _ = operation(*args) if code != 0: - logger.error(f"Git {operation} failed: {err}") return False - logger.info(f"Git {operation} successful") - + logger.info("Git %s successful", operation.__name__) return True diff --git a/xml_tools/utils/xml.py b/xml_tools/utils/xml.py index 4d473fc8c..e65450df1 100644 --- a/xml_tools/utils/xml.py +++ b/xml_tools/utils/xml.py @@ -1,51 +1,52 @@ -from lxml import etree as ET -from typing import Dict, Tuple -from pathlib import Path +"""XML Processor.""" + import logging -from core.exceptions import XMLProcessingError +from pathlib import Path +from xml.etree import ElementTree as ET + +from defusedxml import ElementTree logger = logging.getLogger("xml_tools") +BYTES: int = 2 class XMLProcessor: - """ - Utilities for processing XML files. + """Utilities for processing XML files. This class provides static methods for parsing and writing XML files, with special handling for elements containing 'name' attributes. + Uses defusedxml for secure XML processing. """ @staticmethod - def parse_file(path: Path) -> Tuple[ET.ElementTree, ET.Element, Dict[str, Dict[str, str]]]: - """ - Parse an XML file and extract data from elements with 'name' attributes. + def parse_file(path: Path) -> tuple[ET.ElementTree, ET.Element, dict[str, dict[str, str]]]: + """Parse an XML file and extract data from elements with 'name' attributes. Args: path (Path): Path to the XML file to parse Returns: - Tuple[ET.ElementTree, ET.Element, Dict[str, Dict[str, str]]]: A tuple containing: + tuple[ET.ElementTree, ET.Element, dict[str, dict[str, str]]]: A tuple containing: - The parsed XML tree - Root element - Dictionary mapping element names to their properties: - { + { "element_name": { - "text": "element text content", - "attributes": {"attr1": "value1", ...} + "text": "element text content", + "attributes": {"attr1": "value1", ...} } - } - - Raises: - XMLProcessingError: If the file cannot be parsed or read + } Note: Only elements with 'name' attributes are included in the returned dictionary. + """ - if not path.exists() or path.stat().st_size < 2: + if not path.exists() or path.stat().st_size < BYTES: return None, None, {} try: - tree = ET.parse(path) + # Parse XML using defusedxml for security + tree = ElementTree.parse(str(path)) # defusedxml requires string path root = tree.getroot() # Capture all elements with a 'name' attribute @@ -53,44 +54,32 @@ def parse_file(path: Path) -> Tuple[ET.ElementTree, ET.Element, Dict[str, Dict[s for elem in root.findall(".//*[@name]"): name = elem.get("name") if name: - strings[name] = { - "text": elem.text or "", - "attributes": dict(elem.attrib) - } + strings[name] = {"text": elem.text or "", "attributes": dict(elem.attrib)} + except (OSError, ET.ParseError): + logger.exception("Failed to parse %s: ", path) + else: return tree, root, strings - except (ET.ParseError, IOError) as e: - logger.error(f"Failed to parse {path}: {e}") - raise XMLProcessingError(f"Failed to parse {path}: {e}") @staticmethod - def write_file(path: Path, root: ET.Element, pretty_print: bool = True) -> None: - """ - Write an XML element tree to a file. + def write_file(path: Path, root: ET.Element) -> None: + """Write an XML element tree to a file. Args: path (Path): Output file path root (ET.Element): Root element to write pretty_print (bool): Whether to format the output with proper indentation - Raises: - XMLProcessingError: If the file cannot be written - Note: - Creates parent directories if they don't exist - Uses 4-space indentation when pretty_print is True - Writes in UTF-8 encoding with XML declaration + """ try: path.parent.mkdir(parents=True, exist_ok=True) tree = ET.ElementTree(root) ET.indent(tree, space=" ") # Set indentation to 4 spaces - tree.write( - path, - encoding="utf-8", - xml_declaration=True, - pretty_print=pretty_print - ) - except IOError as e: - logger.error(f"Failed to write {path}: {e}") - raise XMLProcessingError(f"Failed to write {path}: {e}") + tree.write(path, encoding="utf-8", xml_declaration=True) + except OSError: + logger.exception("Failed to write %s: ", path)