Skip to content

Add cyrillic for random string generation #350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added trdg/fonts/ru/Baumans-Regular.ttf
Binary file not shown.
7 changes: 7 additions & 0 deletions trdg/string_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ def create_strings_randomly(
[chr(i) for i in range(19968, 40908)]
) # unicode range for common and uncommon kanji
# https://stackoverflow.com/questions/19899554/unicode-range-for-japanese
elif lang == "ru":
pool += "".join(
[chr(i) for i in range(0x410, 0x450)]
)
pool += "".join(
[chr(0x401), chr(0x451)]
)
else:
pool += string.ascii_letters
if num:
Expand Down