Fix CRLF on script and continue working on translations
This commit is contained in:
parent
77dbf8fb06
commit
4dcf113649
|
|
@ -0,0 +1 @@
|
|||
0.1.0-alpha.2
|
||||
9
app.py
9
app.py
|
|
@ -11,8 +11,6 @@ from starfall.log import Log
|
|||
from starfall.types import SnapshotQueue
|
||||
from starfall.web import WebUI
|
||||
|
||||
CURRENT_VERSION = "0.1.0-alpha.2"
|
||||
|
||||
|
||||
@final
|
||||
class Application:
|
||||
|
|
@ -30,7 +28,7 @@ class Application:
|
|||
"OS Type: %s\nWorking Directory: %s\nApplication version: %s",
|
||||
os.name,
|
||||
os.path.realpath(os.curdir),
|
||||
CURRENT_VERSION,
|
||||
self.version(),
|
||||
)
|
||||
|
||||
self.config = Config("config.toml", "config-sample.toml")
|
||||
|
|
@ -49,6 +47,11 @@ class Application:
|
|||
|
||||
self.app = WebUI()
|
||||
|
||||
def version(self):
|
||||
with open("VERSION.md", "r") as file:
|
||||
version = file.readline()
|
||||
return version
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
Starts all threads and monitors their active state.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
[jinja2: **/templates/**.jinja]
|
||||
extensions=webassets.ext.jinja2.AssetsExtension
|
||||
silent=false
|
||||
|
||||
[python: **.py]
|
||||
[python: **.py]
|
||||
silent=false
|
||||
25
babel.fish
25
babel.fish
|
|
@ -30,9 +30,9 @@ function compile_pot
|
|||
echo "Compiling POT file..."
|
||||
|
||||
set_color normal
|
||||
set -l version "$(cat VERSION.md)"
|
||||
set -l tl_version "$(cat VERSION.md)"
|
||||
command pybabel extract -F babel.cfg -k lazy_gettext -o messages.pot --add-location full \
|
||||
--project Starfall --version "$version" \
|
||||
--project Starfall --version "$tl_version" \
|
||||
--copyright-holder "Flare Starfall" --msgid-bugs-address "flare@theflare.at" .
|
||||
|
||||
if test -d translations
|
||||
|
|
@ -92,7 +92,26 @@ function compile_po
|
|||
echo
|
||||
end
|
||||
|
||||
source .venv/bin/activate.fish
|
||||
if test -f .venv/bin7activate.fish
|
||||
source .venv/bin/activate.fish
|
||||
end
|
||||
|
||||
if test -f .venv/Scripts/activate.fish
|
||||
source .venv/Scripts/activate.fish
|
||||
end
|
||||
|
||||
set_color brgreen
|
||||
echo -n "pybabel version >>> "
|
||||
set_color normal
|
||||
command pybabel --version
|
||||
|
||||
if test $status -ne 0
|
||||
set_color brred
|
||||
echo "Could not read pybabel - Please check venv"
|
||||
set_color normal
|
||||
return 1
|
||||
end
|
||||
|
||||
while true
|
||||
display_help
|
||||
read -p "set_color green; echo -n \"Please enter operation >>> \"; set_color normal" -n 1 -l confirm
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class MainBlueprint(BaseBlueprint):
|
|||
def not_found(self, e: Any):
|
||||
self.error: Any = e
|
||||
return render_template(
|
||||
"404.jinja",
|
||||
"errors/not_found.jinja",
|
||||
bp=self,
|
||||
lang=get_locale(),
|
||||
), 404
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
{%extends 'base.jinja'%}
|
||||
|
||||
{%block title%}404{%endblock%}
|
||||
|
||||
{%block body%}
|
||||
<div class="container" id="content">
|
||||
<div class="card">
|
||||
<h1 class="card-header">404 <small>(Not Found)</small></h1>
|
||||
<div class="card-body">
|
||||
<p><strong>The location you navigated to doesn't exist.</strong></p>
|
||||
<p>Go back to the <a href="/">start</a> and try again?</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%endblock%}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{%extends 'base.jinja'%}
|
||||
|
||||
{%block title%}404{%endblock%}
|
||||
|
||||
{%block body%}
|
||||
<div class="container" id="content">
|
||||
<div class="card">
|
||||
<h1 class="card-header">{{_('error.404.title')}}</h1>
|
||||
<div class="card-body">
|
||||
<p>{{_('error.404.body')}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{%endblock%}
|
||||
Loading…
Reference in New Issue