feat(diary): enhance predefined activities management and socket event handling
- Added new API endpoints for managing predefined activities, including retrieval, creation, updating, merging, and deduplication. - Updated socket event handling to improve the mapping of socket events to domain events, ensuring better integration with the diary service. - Enhanced repository mappers to support detailed mapping of predefined activities and training statistics, including images and member participation data. - Introduced new UI strings for managing predefined activities, improving user experience in the diary section.
This commit is contained in:
22
android-app/scripts/check_no_hardcoded_ui_strings.sh
Normal file
22
android-app/scripts/check_no_hardcoded_ui_strings.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
|
||||
TARGETS=(
|
||||
"$ROOT_DIR/app/src/main/java/de/trainingstagebuch/app/ui/screens"
|
||||
"$ROOT_DIR/app/src/main/java/de/trainingstagebuch/app/ui/ErrorFeedback.kt"
|
||||
"$ROOT_DIR/app/src/main/java/de/trainingstagebuch/app/viewmodel"
|
||||
)
|
||||
|
||||
# Guard against introducing hardcoded user-facing UI strings in Compose/viewmodel state handling.
|
||||
PATTERN='Text\(\s*"[^"]*[[:alpha:]][^"]*"\s*\)|label\s*=\s*"[^"]*[[:alpha:]][^"]*"|title\s*=\s*"[^"]*[[:alpha:]][^"]*"'
|
||||
|
||||
if rg -n --pcre2 "$PATTERN" "${TARGETS[@]}"; then
|
||||
echo ""
|
||||
echo "Hardcoded UI strings gefunden. Bitte auf stringResource()/UiText umstellen."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "i18n guard ok: keine hardcoded UI strings gefunden."
|
||||
Reference in New Issue
Block a user