GameSentenceMiner 2.12.0.dev3__py3-none-any.whl → 2.12.0.dev4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,10 +33,10 @@ TRANSLATION_PROMPT = f"""
33
33
  **Professional Game Localization Task**
34
34
 
35
35
  **Task Directive:**
36
- Translate ONLY the single line of game dialogue specified below into natural-sounding, context-aware English. The translation must preserve the original tone and intent of the character.
36
+ Translate ONLY the single line of game dialogue specified below into natural-sounding, context-aware {get_config().general.get_native_language_name()}. The translation must preserve the original tone and intent of the character.
37
37
 
38
38
  **Output Requirements:**
39
- - Provide only the single, best English translation.
39
+ - Provide only the single, best {get_config().general.get_native_language_name()} translation.
40
40
  - Use expletives if they are natural for the context and enhance the translation's impact, but do not over-exaggerate.
41
41
  - Preserve or add HTML tags (e.g., `<i>`, `<b>`) if appropriate for emphasis.
42
42
  - Do not include notes, alternatives, explanations, or any other surrounding text. Absolutely nothing but the translated line.
@@ -47,7 +47,7 @@ Translate ONLY the single line of game dialogue specified below into natural-sou
47
47
  CONTEXT_PROMPT = textwrap.dedent(f"""
48
48
 
49
49
  **Task Directive:**
50
- Provide a very brief summary of the scene in English based on the provided Japanese dialogue and context. Focus on the characters' actions and the immediate situation being described.
50
+ Provide a very brief summary of the scene in {get_config().general.get_native_language_name()} based on the provided Japanese dialogue and context. Focus on the characters' actions and the immediate situation being described.
51
51
 
52
52
  Current Sentence:
53
53
  """)
@@ -297,6 +297,14 @@ class CommonLanguages(str, Enum):
297
297
  if lang.value == code:
298
298
  return lang
299
299
  raise ValueError(f"Language code '{code}' not found in CommonLanguages")
300
+
301
+ @classmethod
302
+ def name_from_code(cls, code: str) -> str:
303
+ """
304
+ Returns the name of the language given its code (e.g., 'en' -> 'ENGLISH').
305
+ Raises ValueError if not found.
306
+ """
307
+ return cls.from_code(code).name
300
308
 
301
309
  @dataclass_json
302
310
  @dataclass
@@ -311,6 +319,12 @@ class General:
311
319
  texthooker_port: int = 55000
312
320
  native_language: str = CommonLanguages.ENGLISH.value
313
321
 
322
+ def get_native_language_name(self) -> str:
323
+ try:
324
+ return CommonLanguages.name_from_code(self.native_language)
325
+ except ValueError:
326
+ return "Unknown"
327
+
314
328
 
315
329
  @dataclass_json
316
330
  @dataclass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GameSentenceMiner
3
- Version: 2.12.0.dev3
3
+ Version: 2.12.0.dev4
4
4
  Summary: A tool for mining sentences from games. Update: Overlay?
5
5
  Author-email: Beangate <bpwhelan95@gmail.com>
6
6
  License: MIT License
@@ -6,7 +6,7 @@ GameSentenceMiner/gsm.py,sha256=qVHxnvly-yJ85v9RAxsGN2MqZxU-C1JA5wSRxVxMPMg,2495
6
6
  GameSentenceMiner/obs.py,sha256=-5j4k1_sYYR1Lnbn9C-_yN9prqgGLICgx5l3uguv4xk,15917
7
7
  GameSentenceMiner/vad.py,sha256=zo9JpuEOCXczPXM-dq8lbr-zM-MPpfJ8aajggR3mKk4,18710
8
8
  GameSentenceMiner/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- GameSentenceMiner/ai/ai_prompting.py,sha256=ojp7i_xg2YB1zALgFbivwtXPMVkThnSbPoUiAs-nz_g,25892
9
+ GameSentenceMiner/ai/ai_prompting.py,sha256=vRYSmEKD_OB3znEwRy8S1Amw_BTaylYBmVqVK9hxT54,26018
10
10
  GameSentenceMiner/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  GameSentenceMiner/assets/icon.png,sha256=9GRL8uXUAgkUSlvbm9Pv9o2poFVRGdW6s2ub_DeUD9M,937624
12
12
  GameSentenceMiner/assets/icon128.png,sha256=l90j7biwdz5ahwOd5wZ-406ryEV9Pan93dquJQ3e1CI,18395
@@ -30,7 +30,7 @@ GameSentenceMiner/owocr/owocr/run.py,sha256=p7DBHTbhey1DeW1SRqNQ5-y3H4Cq2zoMPCME
30
30
  GameSentenceMiner/owocr/owocr/screen_coordinate_picker.py,sha256=Na6XStbQBtpQUSdbN3QhEswtKuU1JjReFk_K8t5ezQE,3395
31
31
  GameSentenceMiner/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
32
  GameSentenceMiner/util/audio_offset_selector.py,sha256=8Stk3BP-XVIuzRv9nl9Eqd2D-1yD3JrgU-CamBywJmY,8542
33
- GameSentenceMiner/util/configuration.py,sha256=r5zWr9dQxzRp2QRZeOdIa7E-21gCzXMCd3fiPpmtrNQ,35045
33
+ GameSentenceMiner/util/configuration.py,sha256=fR0n8bjPN8fP8IEdW-YSvjrGLXSLZ7cf9LgJyGj0PF0,35490
34
34
  GameSentenceMiner/util/electron_config.py,sha256=8LZwl-T_uF5z_ig-IZcm9QI-VKaD7zaHX9u6MaLYuo4,8648
35
35
  GameSentenceMiner/util/ffmpeg.py,sha256=t0tflxq170n8PZKkdw8fTZIUQfXD0p_qARa9JTdhBTc,21530
36
36
  GameSentenceMiner/util/gsm_utils.py,sha256=iRyLVcodMptRhkCzLf3hyqc6_RCktXnwApi6mLju6oQ,11565
@@ -64,9 +64,9 @@ GameSentenceMiner/web/templates/index.html,sha256=Gv3CJvNnhAzIVV_QxhNq4OD-pXDt1v
64
64
  GameSentenceMiner/web/templates/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
65
65
  GameSentenceMiner/web/templates/utility.html,sha256=3flZinKNqUJ7pvrZk6xu__v67z44rXnaK7UTZ303R-8,16946
66
66
  GameSentenceMiner/wip/get_overlay_coords.py,sha256=yE8LzXlR-Sw3rz3N-judgQa5z4egJptfJ97KEvdmEH4,3189
67
- gamesentenceminer-2.12.0.dev3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
68
- gamesentenceminer-2.12.0.dev3.dist-info/METADATA,sha256=RsMrLlOr1lSzBxen38wGLgT4YxnIMel83EE1vJX7t7A,7004
69
- gamesentenceminer-2.12.0.dev3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
70
- gamesentenceminer-2.12.0.dev3.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
71
- gamesentenceminer-2.12.0.dev3.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
72
- gamesentenceminer-2.12.0.dev3.dist-info/RECORD,,
67
+ gamesentenceminer-2.12.0.dev4.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
68
+ gamesentenceminer-2.12.0.dev4.dist-info/METADATA,sha256=4k5cWg9n_fQjceSlT2te0bKlHe62A_WFn06ah_4KT44,7004
69
+ gamesentenceminer-2.12.0.dev4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
70
+ gamesentenceminer-2.12.0.dev4.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
71
+ gamesentenceminer-2.12.0.dev4.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
72
+ gamesentenceminer-2.12.0.dev4.dist-info/RECORD,,