mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	add initial localization support for the front end #215
This commit is contained in:
		| @@ -12,11 +12,11 @@ | ||||
| 	<meta name="full_name" content="{{full_name}}"> | ||||
| 	<meta name="cookie_prefix" content="{{cookie_prefix}}"> | ||||
|   <link rel="icon" type="image/x-icon" href="favicon.ico"> | ||||
| <link rel="stylesheet" href="{% static 'frontend/styles.css' %}"></head> | ||||
| <link rel="stylesheet" href="{% static styles_css %}"></head> | ||||
| <body> | ||||
|   <app-root>Loading...</app-root> | ||||
| 	<script src="{% static 'frontend/runtime.js' %}" defer></script> | ||||
| 	<script src="{% static 'frontend/polyfills.js' %}" defer></script> | ||||
| 	<script src="{% static 'frontend/main.js' %}" defer></script> | ||||
| 	<script src="{% static runtime_js %}" defer></script> | ||||
| 	<script src="{% static polyfills_js %}" defer></script> | ||||
| 	<script src="{% static main_js %}" defer></script> | ||||
| </body> | ||||
| </html> | ||||
|   | ||||
| @@ -7,6 +7,7 @@ from django.conf import settings | ||||
| from django.db.models import Count, Max, Case, When, IntegerField | ||||
| from django.db.models.functions import Lower | ||||
| from django.http import HttpResponse, HttpResponseBadRequest, Http404 | ||||
| from django.utils.translation import get_language | ||||
| from django.views.decorators.cache import cache_control | ||||
| from django.views.generic import TemplateView | ||||
| from django_filters.rest_framework import DjangoFilterBackend | ||||
| @@ -61,6 +62,10 @@ class IndexView(TemplateView): | ||||
|         context['cookie_prefix'] = settings.COOKIE_PREFIX | ||||
|         context['username'] = self.request.user.username | ||||
|         context['full_name'] = self.request.user.get_full_name() | ||||
|         context['styles_css'] = f"frontend/{get_language()}/styles.css" | ||||
|         context['runtime_js'] = f"frontend/{get_language()}/runtime.js" | ||||
|         context['polyfills_js'] = f"frontend/{get_language()}/polyfills.js" | ||||
|         context['main_js'] = f"frontend/{get_language()}/main.js" | ||||
|         return context | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler