Skip to content

Commit f23b0fc

Browse files
committed
v1.0.42
1 parent e51f393 commit f23b0fc

5 files changed

Lines changed: 38 additions & 36 deletions

File tree

TkEasyGUI/locale_easy.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import Union
66

77
# locale
8-
_locale: str = ""
8+
_LOCALE: str = ""
99

1010
# locale messages
1111
_locale_messages: dict[str, dict[str, str]] = {
@@ -95,20 +95,20 @@
9595

9696
def get_locale() -> str:
9797
"""Get locale"""
98-
global _locale # pylint: disable=global-statement
99-
if _locale == "":
98+
global _LOCALE # pylint: disable=global-statement
99+
if _LOCALE == "":
100100
def_locale = locale.getlocale() or (os.environ.get("LANG", "C"), "UTF-8")
101101
if len(def_locale) >= 1:
102-
_locale = def_locale[0] if def_locale[0] is not None else "en"
103-
if "_" in _locale:
104-
_locale = _locale.split("_")[0]
105-
return _locale
102+
_LOCALE = def_locale[0] if def_locale[0] is not None else "en"
103+
if "_" in _LOCALE:
104+
_LOCALE = _LOCALE.split("_")[0]
105+
return _LOCALE
106106

107107

108108
def set_locale(locale_name: str) -> None:
109109
"""Set locale"""
110-
global _locale # pylint: disable=global-statement
111-
_locale = locale_name
110+
global _LOCALE # pylint: disable=global-statement
111+
_LOCALE = locale_name
112112

113113

114114
def get_text(key: str, default_text: Union[str, None] = None) -> str:

TkEasyGUI/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pylint: disable=line-too-long
22
"""
3-
# TkEasyGUI version 1.0.41
3+
# TkEasyGUI version 1.0.42
44
55
audo generated from [pyproject.toml](https://github.com/kujirahand/tkeasygui-python/blob/main/pyproject.toml) by update_version.py
66
"""
7-
__version__ = "1.0.41"
7+
__version__ = "1.0.42"

docs/TkEasyGUI/dialogs-py.md

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Display a message in a popup window with OK and Cancel buttons. Return True or F
6161
def ask_ok_cancel(message: str, title: str = "Question") -> bool:
6262
```
6363

64-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1620)
64+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1622)
6565

6666
## ask_retry_cancel
6767

@@ -71,7 +71,7 @@ Display a message in a popup window with Retry and Cancel buttons. Return True o
7171
def ask_retry_cancel(message: str, title: str = "Question") -> bool:
7272
```
7373

74-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1625)
74+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1627)
7575

7676
## ask_yes_no
7777

@@ -81,7 +81,7 @@ Display a message in a popup window with Yes and No buttons. Return True or Fals
8181
def ask_yes_no(message: str, title: str = "Question") -> bool:
8282
```
8383

84-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1615)
84+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1617)
8585

8686
## cast
8787

@@ -106,7 +106,7 @@ Display a message in a popup window with Yes and No buttons. Return True or Fals
106106
def confirm(question: str, title: Optional[str] = None) -> bool:
107107
```
108108

109-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1699)
109+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1701)
110110

111111
## copy_to_clipboard
112112

@@ -146,7 +146,7 @@ def input(
146146
) -> Union[str, float, None]:
147147
```
148148

149-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1652)
149+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1654)
150150

151151
## input_number
152152

@@ -161,7 +161,7 @@ def input_number(
161161
) -> Union[float, None]:
162162
```
163163

164-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1684)
164+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1686)
165165

166166
## is_mac
167167

@@ -194,7 +194,7 @@ def msgbox(message: str, title: Optional[str] = None) -> None: # message
194194
messagebox.showinfo(title, message)
195195
```
196196

197-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1642)
197+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1644)
198198

199199
## popup
200200

@@ -308,7 +308,7 @@ def popup_color(
308308
) -> Union[str, tuple[int, int, int], None]:
309309
```
310310

311-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1448)
311+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1450)
312312

313313
## popup_error
314314

@@ -348,15 +348,15 @@ def popup_get_date(
348348
) -> Union[datetime, None]:
349349
```
350350

351-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L937)
351+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L939)
352352

353353
## popup_get_file
354354

355355
Popup a file selection dialog. Return the file selected.
356356

357357
- if `save_as` is False, show open file dialog.
358358
- if `save_as` is True, show save as dialog.
359-
- if `multiple_files` is True, can select multiple files and return a string joined by `files_delimiter` (default is `FILES_DELIMITER`).
359+
- if `multiple_files` is True, can select multiple files and return a string joined by `files_delimiter`(default is FILES_DELIMITER).
360360
- `file_types` is a list of tuples (description, file extension) or a list of file extensions. For example: [("Text Files", "*.txt"), ("All Files", "*.*")] or ["*.txt", "*.py"].
361361

362362
```py
@@ -386,7 +386,9 @@ def popup_get_file(
386386
multiple_files: bool = False, # can select multiple files
387387
file_types: Optional[FileTypeList] = None,
388388
default_extension: Optional[str] = None,
389-
files_delimiter: Optional[str] = None, # default is FILES_DELIMITER for multiple files, used when multiple_files=True
389+
files_delimiter: Optional[
390+
str
391+
] = None, # default is FILES_DELIMITER for multiple files, used when multiple_files=True
390392
# pylint: disable=unused-argument
391393
no_window: Optional[bool] = None, # for compatibility
392394
**kw,
@@ -410,7 +412,7 @@ def popup_get_folder(
410412
) -> Union[str, None]:
411413
```
412414

413-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L814)
415+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L816)
414416

415417
## popup_get_form
416418

@@ -463,7 +465,7 @@ def popup_get_form(
463465
) -> Union[dict[str, Any], None]:
464466
```
465467

466-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1164)
468+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1166)
467469

468470
## popup_get_text
469471

@@ -505,7 +507,7 @@ def popup_image(
505507
) -> Union[str, None]:
506508
```
507509

508-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1544)
510+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1546)
509511

510512
## popup_info
511513

@@ -570,7 +572,7 @@ def popup_listbox(
570572
) -> Union[str, None]:
571573
```
572574

573-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1471)
575+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1473)
574576

575577
## popup_memo
576578

@@ -592,7 +594,7 @@ def popup_memo(
592594
) -> Union[str, None]:
593595
```
594596

595-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L830)
597+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L832)
596598

597599
## popup_no_buttons
598600

@@ -657,7 +659,7 @@ Popup a information
657659
def popup_notify(message: str, title: str = "") -> None:
658660
```
659661

660-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1339)
662+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1341)
661663

662664
## popup_ok
663665

@@ -726,7 +728,7 @@ def popup_scrolled(
726728
) -> Union[str, None]:
727729
```
728730

729-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L859)
731+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L861)
730732

731733
## popup_set_options
732734

@@ -835,7 +837,7 @@ Print message to popup window.(call default print function if no_window is True)
835837
def print(*args, **kw) -> None:
836838
```
837839

838-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1675)
840+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1677)
839841

840842
## send_notification_mac
841843

@@ -845,7 +847,7 @@ Send Notification on mac
845847
def send_notification_mac(message: str, title: str = "") -> bool:
846848
```
847849

848-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1350)
850+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1352)
849851

850852
## send_notification_win
851853

@@ -855,7 +857,7 @@ Send Notification on Windows using PowerShell without temp files
855857
def send_notification_win(message: str, title: str = "") -> bool:
856858
```
857859

858-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1370)
860+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1372)
859861

860862
## show_info
861863

@@ -865,7 +867,7 @@ Show message in a popup window
865867
def show_info(message: str, title: Optional[str] = None) -> None:
866868
```
867869

868-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1636)
870+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1638)
869871

870872
## show_message
871873

@@ -875,5 +877,5 @@ Show message in a popup window
875877
def show_message(message: str, title: Optional[str] = None) -> None:
876878
```
877879

878-
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1630)
880+
- [source](https://github.com/kujirahand/tkeasygui-python/blob/main/TkEasyGUI/dialogs.py#L1632)
879881

docs/TkEasyGUI/version-py.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Module TkEasyGUI.version
22

3-
# TkEasyGUI version 1.0.41
3+
# TkEasyGUI version 1.0.42
44

55
audo generated from [pyproject.toml](https://github.com/kujirahand/tkeasygui-python/blob/main/pyproject.toml) by update_version.py
66

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "TkEasyGUI"
7-
version = "1.0.41"
7+
version = "1.0.42"
88
dependencies = [
99
"Pillow>=11.3.0",
1010
"pyperclip>=1.11.0",

0 commit comments

Comments
 (0)