-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
943 additions
and
587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,8 +52,8 @@ coverage.xml | |
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
# *.mo | ||
# *.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import gettext | ||
import re | ||
from pathlib import Path | ||
|
||
from streamlit.web.server.websocket_headers import _get_websocket_headers | ||
|
||
|
||
def get_preferred_languages() -> list[str]: | ||
headers = _get_websocket_headers() | ||
return re.findall(r"([a-zA-Z-]{2,})", headers["Accept-Language"]) or [] | ||
|
||
|
||
locale_dir = Path(__file__).parent / "locale" | ||
|
||
languages = get_preferred_languages() | ||
|
||
lang = gettext.translation( | ||
"messages", | ||
localedir=str(locale_dir), | ||
languages=languages, | ||
fallback=True, | ||
) | ||
|
||
lang.install() | ||
_ = lang.gettext | ||
ngettext = lang.ngettext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
# SOME DESCRIPTIVE TITLE. | ||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | ||
# This file is distributed under the same license as the PACKAGE package. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-07-20 21:46+0300\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"Language: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=CHARSET\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" | ||
|
||
#: app.py:13 | ||
msgid "DF localization package builder" | ||
msgstr "" | ||
|
||
#: app.py:14 | ||
msgid "" | ||
"Build/download a package, unpack into the game's directory with file " | ||
"repalacement." | ||
msgstr "" | ||
|
||
#: app.py:22 | ||
msgid "DF version" | ||
msgstr "" | ||
|
||
#: app.py:24 | ||
msgid "Operating system/platform" | ||
msgstr "" | ||
|
||
#: app.py:38 | ||
msgid "DF variant" | ||
msgstr "" | ||
|
||
#: app.py:39 | ||
msgid "Language" | ||
msgstr "" | ||
|
||
#: app.py:46 | ||
msgid "Cannot create package with these parameters" | ||
msgstr "" | ||
|
||
#: app.py:52 | ||
msgid "Generate package" | ||
msgstr "" | ||
|
||
#: app.py:54 | ||
msgid "Downloading files..." | ||
msgstr "" | ||
|
||
#: app.py:56 | ||
msgid "Downloading complete!" | ||
msgstr "" | ||
|
||
#: app.py:58 | ||
msgid "Building package..." | ||
msgstr "" | ||
|
||
#: app.py:68 | ||
msgid "Package is ready!" | ||
msgstr "" | ||
|
||
#: app.py:72 | ||
msgid "Download package" | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/metadata.py:22 | ||
msgid "Getting hook metadata..." | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/metadata.py:28 | ||
msgid "Getting dict metadata..." | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/download_parts.py:29 | ||
msgid "Downloading library..." | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/download_parts.py:32 | ||
msgid "Downloading dfhooks library..." | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/download_parts.py:35 | ||
msgid "Downloading config..." | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/download_parts.py:38 | ||
msgid "Downloading offsets..." | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/download_parts.py:41 | ||
msgid "Downloading csv dictionary..." | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/download_parts.py:44 | ||
msgid "Downloading font file..." | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/download_parts.py:47 | ||
msgid "Downloading encoding config..." | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/file_list.py:11 | ||
msgid "Package files awailable to download" | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/file_list.py:14 | ||
msgid "No package files available." | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/file_list.py:18 | ||
msgid "Package name" | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/file_list.py:19 | ||
msgid "When created" | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/file_list.py:29 | ||
msgid "less than an hour ago" | ||
msgstr "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/file_list.py:31 | ||
#, python-format | ||
msgid "%(num)d hour ago" | ||
msgid_plural "%(num)d hours ago" | ||
msgstr[0] "" | ||
msgstr[1] "" | ||
|
||
#: /home/insolor/Projects/DwarfFortress/package-build/package_build/file_list.py:34 | ||
msgid "Download" | ||
msgstr "" |
Binary file not shown.
Oops, something went wrong.