diff --git a/.env.example b/.env.example index ce4081d..faf43b7 100644 --- a/.env.example +++ b/.env.example @@ -34,16 +34,13 @@ timeout="120" #The number of files to translate at the same time, 1 recommended for free or self hosted API or gpt-4 fileThreads="1" -#The number of threads per file, 1 recommended for free or self hosted API or gpt-4 -threads="1" - #The wordwrap of dialogue text width="60" -#The wordwap of items and help text +#The wordwrap of items and help text listWidth="100" -#The wordwap of items and help text +#The wordwrap of items and help text noteWidth="75" # Custom input API cost - default value for gpt-3.5, replace with your actual input API cost - depends on the model, see https://openai.com/pricing diff --git a/modules/csv.py b/modules/csv.py index a87820d..cd4a9ca 100644 --- a/modules/csv.py +++ b/modules/csv.py @@ -22,7 +22,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() WIDTH = int(os.getenv("width")) LISTWIDTH = int(os.getenv("listWidth")) diff --git a/modules/images.py b/modules/images.py index cc502fa..bc35abf 100644 --- a/modules/images.py +++ b/modules/images.py @@ -20,7 +20,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() PBAR = None WIDTH = int(os.getenv("width")) diff --git a/modules/json.py b/modules/json.py index d5c51d4..1b6352d 100644 --- a/modules/json.py +++ b/modules/json.py @@ -21,7 +21,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() WIDTH = int(os.getenv("width")) LISTWIDTH = int(os.getenv("listWidth")) diff --git a/modules/kirikiri.py b/modules/kirikiri.py index bc3682e..2090aa5 100644 --- a/modules/kirikiri.py +++ b/modules/kirikiri.py @@ -21,7 +21,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() WIDTH = int(os.getenv("width")) LISTWIDTH = int(os.getenv("listWidth")) diff --git a/modules/lune.py b/modules/lune.py index b23d8b3..e422e14 100644 --- a/modules/lune.py +++ b/modules/lune.py @@ -21,7 +21,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() WIDTH = int(os.getenv("width")) LISTWIDTH = int(os.getenv("listWidth")) diff --git a/modules/nscript.py b/modules/nscript.py index 6fde949..b66802b 100644 --- a/modules/nscript.py +++ b/modules/nscript.py @@ -21,7 +21,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() WIDTH = int(os.getenv("width")) LISTWIDTH = int(os.getenv("listWidth")) diff --git a/modules/regex.py b/modules/regex.py index 8dfd475..105de20 100644 --- a/modules/regex.py +++ b/modules/regex.py @@ -21,7 +21,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() WIDTH = int(os.getenv("width")) LISTWIDTH = int(os.getenv("listWidth")) diff --git a/modules/renpy.py b/modules/renpy.py index 1041ed3..d861ef3 100644 --- a/modules/renpy.py +++ b/modules/renpy.py @@ -21,7 +21,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() WIDTH = int(os.getenv("width")) LISTWIDTH = int(os.getenv("listWidth")) diff --git a/modules/rpgmakerace.py b/modules/rpgmakerace.py index c9eaeb2..713ec93 100644 --- a/modules/rpgmakerace.py +++ b/modules/rpgmakerace.py @@ -23,7 +23,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() THREAD_CTX = threading.local() WIDTH = int(os.getenv("width")) diff --git a/modules/rpgmakermvmz.py b/modules/rpgmakermvmz.py index bfd3609..6a390d8 100644 --- a/modules/rpgmakermvmz.py +++ b/modules/rpgmakermvmz.py @@ -21,7 +21,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() THREAD_CTX = threading.local() WIDTH = int(os.getenv("width")) diff --git a/modules/rpgmakerplugin.py b/modules/rpgmakerplugin.py index 164f5af..a2ce10a 100644 --- a/modules/rpgmakerplugin.py +++ b/modules/rpgmakerplugin.py @@ -21,7 +21,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() WIDTH = int(os.getenv("width")) LISTWIDTH = int(os.getenv("listWidth")) diff --git a/modules/srpg.py b/modules/srpg.py index 075c8c1..af8b127 100644 --- a/modules/srpg.py +++ b/modules/srpg.py @@ -21,7 +21,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() VOCAB_LOCK = threading.Lock() # Dedicated lock for vocab.txt updates WIDTH = int(os.getenv("width")) diff --git a/modules/text.py b/modules/text.py index 60c1a8a..da8169a 100644 --- a/modules/text.py +++ b/modules/text.py @@ -21,7 +21,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() WIDTH = int(os.getenv("width")) LISTWIDTH = int(os.getenv("listWidth")) diff --git a/modules/tyrano.py b/modules/tyrano.py index cbd7b76..f0b18ea 100644 --- a/modules/tyrano.py +++ b/modules/tyrano.py @@ -23,7 +23,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() WIDTH = int(os.getenv("width")) LISTWIDTH = int(os.getenv("listWidth")) diff --git a/modules/unity.py b/modules/unity.py index 62a2893..e5f0213 100644 --- a/modules/unity.py +++ b/modules/unity.py @@ -23,7 +23,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() WIDTH = int(os.getenv("width")) LISTWIDTH = int(os.getenv("listWidth")) diff --git a/modules/wolf.py b/modules/wolf.py index d10a9a5..8e1ed80 100644 --- a/modules/wolf.py +++ b/modules/wolf.py @@ -23,7 +23,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() WIDTH = int(os.getenv("width")) LISTWIDTH = int(os.getenv("listWidth")) diff --git a/modules/wolf2.py b/modules/wolf2.py index 1c2c99f..b0e0ee5 100644 --- a/modules/wolf2.py +++ b/modules/wolf2.py @@ -24,7 +24,6 @@ TIMEOUT = int(os.getenv("timeout")) LANGUAGE = os.getenv("language").capitalize() PROMPT = Path("prompt.txt").read_text(encoding="utf-8") VOCAB = Path("vocab.txt").read_text(encoding="utf-8") -THREADS = int(os.getenv("threads")) LOCK = threading.Lock() WIDTH = int(os.getenv("width")) LISTWIDTH = int(os.getenv("listWidth"))