-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_translate_dump.sh
More file actions
executable file
·47 lines (35 loc) · 1.08 KB
/
_translate_dump.sh
File metadata and controls
executable file
·47 lines (35 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
GAME_ID=${1:-"som"}
SERVICE=${2:-"amazon"}
source ./_common.sh
log_info "Starting process for Game ID: ${YELLOW}$GAME_ID${NC}"
case $GAME_ID in
"som")
DUMP_DIR="$RESOURCE_PATH/dump_text"
SOURCE_FILE="$DUMP_DIR/dump_texts_eng.txt"
DESTINATION_DIR="$RESOURCE_PATH/translation_text"
check_file "$SOURCE_FILE"
case $SERVICE in
"amazon")
DESTINATION_FILE="$DESTINATION_DIR/dump_texts_amazon_eng.txt"
log_step "Translating $SOURCE_FILE using $SERVICE"
python "$SCRIPT_DIR/manager.py" $SERVICE \
-s "$SOURCE_FILE" -d "$DESTINATION_FILE" -g $GAME_ID
;;
"deepl")
DESTINATION_FILE="$DESTINATION_DIR/dump_texts_deepl_eng.txt"
log_step "Translating $SOURCE_FILE using $SERVICE"
python "$SCRIPT_DIR/manager.py" $SERVICE \
-s "$SOURCE_FILE" -d "$DESTINATION_FILE"
;;
*)
log_error "Unknown SERVICE: $SERVICE"
exit 1
;;
esac
*)
log_error "Unknown GAME_ID: $GAME_ID"
exit 1
;;
esac
log_success "All tasks completed successfully!"