Skip to content

Commit e2545a0

Browse files
committed
1 parent fb6a569 commit e2545a0

7 files changed

Lines changed: 21 additions & 21 deletions

File tree

chatgpt/amazongpt/utils/translate-en-messages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'''
22
Script: translate-en-messages.py
3-
Version: 2026.1.18
3+
Version: 2026.1.26
44
Description: Translate msg's from en/messages.json to [[output_langs]/messages.json]
55
Author: Adam Lui
66
Homepage: https://github.com/adamlui/python-utils
@@ -24,7 +24,7 @@
2424
terminal_width = os.get_terminal_size()[0]
2525
def print_trunc(msg, end='\n'):
2626
truncated_lines = [
27-
line if len(line) < terminal_width else line[:terminal_width - 4] + '...' for line in msg.splitlines() ]
27+
line if len(line) < terminal_width else line[:terminal_width -4] + '...' for line in msg.splitlines() ]
2828
print('\n'.join(truncated_lines), end=end)
2929
def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:terminal_width])
3030

@@ -128,7 +128,7 @@ def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:termin
128128
formatted_msg = json.dumps(message_data, ensure_ascii=False) \
129129
.replace('{', '{ ').replace('}', ' }') # add spacing
130130
formatted_msgs += ( f' "{key}": {formatted_msg}'
131-
+ ( ',\n' if idx < len(translated_msgs) - 1 else '\n' )) # terminate line
131+
+ ( ',\n' if idx < len(translated_msgs) -1 else '\n' )) # terminate line
132132
formatted_msgs += '}'
133133
with open(msgs_path, 'w', encoding='utf-8') as output_file : output_file.write(formatted_msgs + '\n')
134134

chatgpt/autoclear-chatgpt-history/utils/translate-en-messages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'''
22
Script: translate-en-messages.py
3-
Version: 2026.1.18
3+
Version: 2026.1.26
44
Description: Translate msg's from en/messages.json to [[output_langs]/messages.json]
55
Author: Adam Lui
66
Homepage: https://github.com/adamlui/python-utils
@@ -24,7 +24,7 @@
2424
terminal_width = os.get_terminal_size()[0]
2525
def print_trunc(msg, end='\n'):
2626
truncated_lines = [
27-
line if len(line) < terminal_width else line[:terminal_width - 4] + '...' for line in msg.splitlines() ]
27+
line if len(line) < terminal_width else line[:terminal_width -4] + '...' for line in msg.splitlines() ]
2828
print('\n'.join(truncated_lines), end=end)
2929
def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:terminal_width])
3030

@@ -128,7 +128,7 @@ def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:termin
128128
formatted_msg = json.dumps(message_data, ensure_ascii=False) \
129129
.replace('{', '{ ').replace('}', ' }') # add spacing
130130
formatted_msgs += ( f' "{key}": {formatted_msg}'
131-
+ ( ',\n' if idx < len(translated_msgs) - 1 else '\n' )) # terminate line
131+
+ ( ',\n' if idx < len(translated_msgs) -1 else '\n' )) # terminate line
132132
formatted_msgs += '}'
133133
with open(msgs_path, 'w', encoding='utf-8') as output_file : output_file.write(formatted_msgs + '\n')
134134

chatgpt/bravegpt/utils/translate-en-messages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'''
22
Script: translate-en-messages.py
3-
Version: 2026.1.18
3+
Version: 2026.1.26
44
Description: Translate msg's from en/messages.json to [[output_langs]/messages.json]
55
Author: Adam Lui
66
Homepage: https://github.com/adamlui/python-utils
@@ -24,7 +24,7 @@
2424
terminal_width = os.get_terminal_size()[0]
2525
def print_trunc(msg, end='\n'):
2626
truncated_lines = [
27-
line if len(line) < terminal_width else line[:terminal_width - 4] + '...' for line in msg.splitlines() ]
27+
line if len(line) < terminal_width else line[:terminal_width -4] + '...' for line in msg.splitlines() ]
2828
print('\n'.join(truncated_lines), end=end)
2929
def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:terminal_width])
3030

@@ -128,7 +128,7 @@ def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:termin
128128
formatted_msg = json.dumps(message_data, ensure_ascii=False) \
129129
.replace('{', '{ ').replace('}', ' }') # add spacing
130130
formatted_msgs += ( f' "{key}": {formatted_msg}'
131-
+ ( ',\n' if idx < len(translated_msgs) - 1 else '\n' )) # terminate line
131+
+ ( ',\n' if idx < len(translated_msgs) -1 else '\n' )) # terminate line
132132
formatted_msgs += '}'
133133
with open(msgs_path, 'w', encoding='utf-8') as output_file : output_file.write(formatted_msgs + '\n')
134134

chatgpt/chatgpt-auto-refresh/utils/translate-en-messages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'''
22
Script: translate-en-messages.py
3-
Version: 2026.1.18
3+
Version: 2026.1.26
44
Description: Translate msg's from en/messages.json to [[output_langs]/messages.json]
55
Author: Adam Lui
66
Homepage: https://github.com/adamlui/python-utils
@@ -24,7 +24,7 @@
2424
terminal_width = os.get_terminal_size()[0]
2525
def print_trunc(msg, end='\n'):
2626
truncated_lines = [
27-
line if len(line) < terminal_width else line[:terminal_width - 4] + '...' for line in msg.splitlines() ]
27+
line if len(line) < terminal_width else line[:terminal_width -4] + '...' for line in msg.splitlines() ]
2828
print('\n'.join(truncated_lines), end=end)
2929
def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:terminal_width])
3030

@@ -128,7 +128,7 @@ def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:termin
128128
formatted_msg = json.dumps(message_data, ensure_ascii=False) \
129129
.replace('{', '{ ').replace('}', ' }') # add spacing
130130
formatted_msgs += ( f' "{key}": {formatted_msg}'
131-
+ ( ',\n' if idx < len(translated_msgs) - 1 else '\n' )) # terminate line
131+
+ ( ',\n' if idx < len(translated_msgs) -1 else '\n' )) # terminate line
132132
formatted_msgs += '}'
133133
with open(msgs_path, 'w', encoding='utf-8') as output_file : output_file.write(formatted_msgs + '\n')
134134

chatgpt/chatgpt-auto-talk/utils/translate-en-messages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'''
22
Script: translate-en-messages.py
3-
Version: 2026.1.18
3+
Version: 2026.1.26
44
Description: Translate msg's from en/messages.json to [[output_langs]/messages.json]
55
Author: Adam Lui
66
Homepage: https://github.com/adamlui/python-utils
@@ -24,7 +24,7 @@
2424
terminal_width = os.get_terminal_size()[0]
2525
def print_trunc(msg, end='\n'):
2626
truncated_lines = [
27-
line if len(line) < terminal_width else line[:terminal_width - 4] + '...' for line in msg.splitlines() ]
27+
line if len(line) < terminal_width else line[:terminal_width -4] + '...' for line in msg.splitlines() ]
2828
print('\n'.join(truncated_lines), end=end)
2929
def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:terminal_width])
3030

@@ -128,7 +128,7 @@ def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:termin
128128
formatted_msg = json.dumps(message_data, ensure_ascii=False) \
129129
.replace('{', '{ ').replace('}', ' }') # add spacing
130130
formatted_msgs += ( f' "{key}": {formatted_msg}'
131-
+ ( ',\n' if idx < len(translated_msgs) - 1 else '\n' )) # terminate line
131+
+ ( ',\n' if idx < len(translated_msgs) -1 else '\n' )) # terminate line
132132
formatted_msgs += '}'
133133
with open(msgs_path, 'w', encoding='utf-8') as output_file : output_file.write(formatted_msgs + '\n')
134134

chatgpt/duckduckgpt/utils/translate-en-messages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'''
22
Script: translate-en-messages.py
3-
Version: 2026.1.18
3+
Version: 2026.1.26
44
Description: Translate msg's from en/messages.json to [[output_langs]/messages.json]
55
Author: Adam Lui
66
Homepage: https://github.com/adamlui/python-utils
@@ -24,7 +24,7 @@
2424
terminal_width = os.get_terminal_size()[0]
2525
def print_trunc(msg, end='\n'):
2626
truncated_lines = [
27-
line if len(line) < terminal_width else line[:terminal_width - 4] + '...' for line in msg.splitlines() ]
27+
line if len(line) < terminal_width else line[:terminal_width -4] + '...' for line in msg.splitlines() ]
2828
print('\n'.join(truncated_lines), end=end)
2929
def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:terminal_width])
3030

@@ -128,7 +128,7 @@ def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:termin
128128
formatted_msg = json.dumps(message_data, ensure_ascii=False) \
129129
.replace('{', '{ ').replace('}', ' }') # add spacing
130130
formatted_msgs += ( f' "{key}": {formatted_msg}'
131-
+ ( ',\n' if idx < len(translated_msgs) - 1 else '\n' )) # terminate line
131+
+ ( ',\n' if idx < len(translated_msgs) -1 else '\n' )) # terminate line
132132
formatted_msgs += '}'
133133
with open(msgs_path, 'w', encoding='utf-8') as output_file : output_file.write(formatted_msgs + '\n')
134134

chatgpt/googlegpt/utils/translate-en-messages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'''
22
Script: translate-en-messages.py
3-
Version: 2026.1.18
3+
Version: 2026.1.26
44
Description: Translate msg's from en/messages.json to [[output_langs]/messages.json]
55
Author: Adam Lui
66
Homepage: https://github.com/adamlui/python-utils
@@ -24,7 +24,7 @@
2424
terminal_width = os.get_terminal_size()[0]
2525
def print_trunc(msg, end='\n'):
2626
truncated_lines = [
27-
line if len(line) < terminal_width else line[:terminal_width - 4] + '...' for line in msg.splitlines() ]
27+
line if len(line) < terminal_width else line[:terminal_width -4] + '...' for line in msg.splitlines() ]
2828
print('\n'.join(truncated_lines), end=end)
2929
def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:terminal_width])
3030

@@ -128,7 +128,7 @@ def overwrite_print(msg) : stdout.write('\r' + msg.ljust(terminal_width)[:termin
128128
formatted_msg = json.dumps(message_data, ensure_ascii=False) \
129129
.replace('{', '{ ').replace('}', ' }') # add spacing
130130
formatted_msgs += ( f' "{key}": {formatted_msg}'
131-
+ ( ',\n' if idx < len(translated_msgs) - 1 else '\n' )) # terminate line
131+
+ ( ',\n' if idx < len(translated_msgs) -1 else '\n' )) # terminate line
132132
formatted_msgs += '}'
133133
with open(msgs_path, 'w', encoding='utf-8') as output_file : output_file.write(formatted_msgs + '\n')
134134

0 commit comments

Comments
 (0)