Skip to content

Commit

Permalink
Revert "Get document locale in a more sane way"
Browse files Browse the repository at this point in the history
This reverts commit 1635dc0.
  • Loading branch information
FestplattenSchnitzel committed Oct 6, 2023
1 parent 1635dc0 commit be45ba0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sipa/static/js/agdsn.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function get_language() {
return document.documentElement.lang;
return JSON.parse(document.getElementById('locale').innerHTML);
}

let statusMessages = {
Expand Down
4 changes: 4 additions & 0 deletions sipa/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
<link rel="stylesheet" type="text/css"
href="{{ url_for('static', filename='css/style.css') }}"/>
{% block custom_css %}{% endblock %}

<script type="application/json" id="locale">
{{ get_locale() | string | tojson }}
</script>
</head>

<body>
Expand Down

0 comments on commit be45ba0

Please sign in to comment.