Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
ptb-subtitle-service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Hartig
ptb-subtitle-service
Commits
e3868b24
Commit
e3868b24
authored
1 year ago
by
Jan Hartig
Browse files
Options
Downloads
Patches
Plain Diff
Check localisations before importing routes
parent
49ef71d5
Branches
Branches containing commit
No related tags found
1 merge request
!4
Merge new features and fixes
Pipeline
#25815
passed
1 year ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app.py
+5
-7
5 additions, 7 deletions
app.py
with
5 additions
and
7 deletions
app.py
+
5
−
7
View file @
e3868b24
...
...
@@ -18,18 +18,16 @@ def create_app():
with
open
(
"
localisations.toml
"
,
"
rb
"
)
as
file
:
localisations
=
tomllib
.
load
(
file
)
for
language
in
app
.
config
[
"
ENABLED_LOCALISATIONS
"
]:
check_localisation
(
app
.
logger
,
localisations
,
language
)
app
.
config
[
"
LOCALISATIONS
"
]
=
localisations
del
localisations
app
.
logger
.
info
(
"
Localisations loaded.
"
)
with
app
.
app_context
():
import
routes
for
language
in
app
.
config
[
"
ENABLED_LOCALISATIONS
"
]:
check_localisation
(
app
.
logger
,
app
.
config
[
"
LOCALISATIONS
"
],
language
)
del
language
app
.
logger
.
info
(
"
Localisations loaded.
"
)
return
app
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment