Skip to content

Commit 3527c37

Browse files
authored
Merge pull request #277 from ssweber/theme/langpack-cleaning
Theme/langpack cleaning
2 parents d6aae3a + 0b165e2 commit 3527c37

File tree

2 files changed

+23
-31
lines changed

2 files changed

+23
-31
lines changed

pysimplesql/pysimplesql.py

+16-13
Original file line numberDiff line numberDiff line change
@@ -3942,11 +3942,7 @@ def __init__(self, title: str, config: dict = None):
39423942
"green": {"value_start": 0, "value_range": 255, "period": 3, "offset": 120},
39433943
"blue": {"value_start": 0, "value_range": 255, "period": 4, "offset": 240},
39443944
# phrases to display and the number of seconds to elapse between phrases
3945-
# TODO: move to languagepack
3946-
"phrases": [
3947-
"Please wait...",
3948-
"Still working...",
3949-
],
3945+
"phrases": lang.animate_phrases,
39503946
"phrase_delay": 5,
39513947
}
39523948
if config is None:
@@ -4999,11 +4995,11 @@ def update_headings(
49994995
# Load in our marker characters. We will use them to both display the
50004996
# sort direction and to detect current direction
50014997
try:
5002-
asc = themepack.sort_asc_marker
4998+
asc = themepack.marker_sort_asc
50034999
except AttributeError:
50045000
asc = "\u25BC"
50055001
try:
5006-
desc = themepack.sort_desc_marker
5002+
desc = themepack.marker_sort_desc
50075003
except AttributeError:
50085004
desc = "\u25B2"
50095005

@@ -5131,8 +5127,8 @@ class ThemePack:
51315127
"marker_required_color": "red2",
51325128
# Sorting icons
51335129
# ----------------------------------------
5134-
"sort_asc_marker": "\u25BC",
5135-
"sort_desc_marker": "\u25B2",
5130+
"marker_sort_asc": "\u25BC",
5131+
"marker_sort_desc": "\u25B2",
51365132
# Info Popup defaults
51375133
# ----------------------------------------
51385134
"popup_info_auto_close_seconds": 1,
@@ -5191,8 +5187,8 @@ def __call__(self, tp_dict: Dict[str, str] = {}) -> None:
51915187
'marker_virtual' : string eg '', f'', unicode
51925188
'marker_required' : string eg '', f'', unicode
51935189
'marker_required_color': string eg 'red', Tuple eg (255,0,0)
5194-
'sort_asc_marker': string eg '', f'', unicode
5195-
'sort_desc_marker': string eg '', f'', unicode
5190+
'marker_sort_asc': string eg '', f'', unicode
5191+
'marker_sort_desc': string eg '', f'', unicode
51965192
}
51975193
For Base64, you can convert a whole folder using https://github.com/PySimpleGUI/PySimpleGUI-Base64-Encoder # fmt: skip
51985194
Remember to us b'' around the string.
@@ -5260,7 +5256,14 @@ class LanguagePack:
52605256
# ------------------------------------------------------------------------------
52615257
"sqldriver_init": "{name} connection",
52625258
"sqldriver_connecting": "Connecting to database",
5263-
"sqldriver_execute": "executing SQL commands",
5259+
"sqldriver_execute": "Executing SQL commands",
5260+
# ------------------------------------------------------------------------------
5261+
# Default ProgressAnimate Phrases
5262+
# ------------------------------------------------------------------------------
5263+
"animate_phrases": [
5264+
"Please wait...",
5265+
"Still working...",
5266+
],
52645267
# ------------------------------------------------------------------------------
52655268
# Info Popups - no buttons
52665269
# ------------------------------------------------------------------------------
@@ -6965,7 +6968,7 @@ def __init__(
69656968
self.database = database
69666969
self.con = self.connect()
69676970

6968-
self.win_pb.update("Executing SQL commands", 50)
6971+
self.win_pb.update(lang.sqldriver_execute, 50)
69696972
if sql_commands is not None:
69706973
# run SQL script if the database does not yet exist
69716974
logger.info("Executing sql commands passed in")

pysimplesql/theme_pack.py

+7-18
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,17 @@
33
# ======================================================================================================================
44
# Change the look and feel of your database application all in one place.
55
tp_text = {
6-
"ttk_theme": "default",
76
"edit_protect": "\U0001F512",
8-
"quick_edit": "\u270E",
9-
"save": "\U0001f4be",
10-
"first": "\u2770",
11-
"previous": "\u276C",
12-
"next": "\u276D",
13-
"last": "\u2771",
7+
"quick_edit": "\u270F",
8+
"save": "\u2714",
9+
"first": "|<",
10+
"previous": "<",
11+
"next": ">",
12+
"last": ">|",
1413
"insert": "\u271A",
1514
"delete": "\u274E",
1615
"duplicate": "\u274F",
17-
"search": "Search",
18-
"marker_virtual": "\u2731",
19-
"marker_required": "\u2731",
20-
"marker_required_color": "red2",
21-
"sort_asc_marker": "\u25BC",
22-
"sort_desc_marker": "\u25B2",
23-
"popup_info_auto_close_seconds": 1,
24-
"popup_info_alpha_channel": 0.85,
25-
"default_label_size": (15, 1),
26-
"default_element_size": (30, 1),
27-
"default_mline_size": (30, 7),
16+
"search": "\U0001f50d",
2817
}
2918
# fmt: off
3019
tp_large = {

0 commit comments

Comments
 (0)