From dbed7f9f908be446b59c456d30d2ba1f8cf22bea Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Sun, 24 Nov 2024 22:25:27 +0800 Subject: [PATCH] Fix an issue that may happen in Apatch and update translation guide --- module/common/get_extra.sh | 2 +- module/service.sh | 8 ++++---- module/webroot/locales/A-translate.md | 10 ++++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/module/common/get_extra.sh b/module/common/get_extra.sh index d02b5fe..caac364 100644 --- a/module/common/get_extra.sh +++ b/module/common/get_extra.sh @@ -21,7 +21,7 @@ if [ ! -s "$OUTPUT" ]; then fi # Find xposed package name -pm list packages -3 | awk -F: '{print $2}' | while read -r PACKAGE; do +pm list packages -3 &1 | cat | awk -F: '{print $2}' | while read -r PACKAGE; do if ! grep -Fq "$PACKAGE" "$SKIPLIST"; then pm path "$PACKAGE" | grep "base.apk" | awk -F: '{print $2}' | tr -d '\r' | while read -r APK_PATH; do aapt dump xmltree "$APK_PATH" AndroidManifest.xml 2>/dev/null | grep -qE "xposed.category|xposeddescription" && echo "$PACKAGE" >> "$OUTPUT" diff --git a/module/service.sh b/module/service.sh index 6377ff7..034eec0 100644 --- a/module/service.sh +++ b/module/service.sh @@ -41,15 +41,15 @@ else done echo "# This file is generated from service.sh to speed up load time" > "$OUTPUT_APP" echo "# This file is generated from service.sh to speed up load time" > "$OUTPUT_SKIP" - pm list packages -3 | awk -F: '{print $2}' | while read -r PACKAGE; do - APK_PATH=$(pm path "$PACKAGE" | grep "base.apk" | awk -F: '{print $2}' | tr -d '\r') + pm list packages -3 &1 | cat | awk -F: '{print $2}' | while read -r PACKAGE; do + APK_PATH=$(pm path "$PACKAGE" &1 | cat | grep "base.apk" | awk -F: '{print $2}' | tr -d '\r') if [ -n "$APK_PATH" ]; then - APP_NAME=$(aapt dump badging "$APK_PATH" 2>/dev/null | grep "application-label:" | sed "s/application-label://g; s/'//g") + APP_NAME=$(aapt dump badging "$APK_PATH" &1 | cat | grep "application-label:" | sed "s/application-label://g; s/'//g") echo "app-name: $APP_NAME, package-name: $PACKAGE" >> "$OUTPUT_APP" else echo "app-name: Unknown App package-name: $PACKAGE" >> "$OUTPUT_APP" fi - if ! aapt dump xmltree "$APK_PATH" AndroidManifest.xml 2>/dev/null | grep -qE "xposed.category|xposeddescription"; then + if ! aapt dump xmltree "$APK_PATH" AndroidManifest.xml &1 | cat | grep -qE "xposed.category|xposeddescription"; then echo "$PACKAGE" >> "$OUTPUT_SKIP" fi done diff --git a/module/webroot/locales/A-translate.md b/module/webroot/locales/A-translate.md index b7462e3..1efe07d 100644 --- a/module/webroot/locales/A-translate.md +++ b/module/webroot/locales/A-translate.md @@ -1,8 +1,9 @@ # Translation Guide ## Fix Translation Error -- Fork this repository. -- Edit the string value with translated incorrectly. -- Create a Pull Request. +1. Fork this repository. +2. Find your language string file in `/module/webroot/locales/`. +3. Edit the string value with translated incorrectly. +4. Create a Pull Request. --- ## Create a New Language @@ -29,4 +30,5 @@ Format: function detectUserLanguage() { const availableLanguages = ['en-US', 'ru-RU', 'tl-PH', 'zh-CN', 'zh-TW']; } -``` \ No newline at end of file +``` +6. Create a Pull Request \ No newline at end of file