summaryrefslogtreecommitdiff
path: root/ishtar_common/views_item.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/views_item.py')
-rw-r--r--ishtar_common/views_item.py23
1 files changed, 21 insertions, 2 deletions
diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py
index 89caaef77..7407eb37f 100644
--- a/ishtar_common/views_item.py
+++ b/ishtar_common/views_item.py
@@ -41,11 +41,12 @@ from django.shortcuts import render
from django.template import loader
from django.urls import reverse, NoReverseMatch
from django.utils.translation import (
- ugettext,
- ugettext_lazy as _,
activate,
deactivate,
+ get_language,
pgettext_lazy,
+ ugettext,
+ ugettext_lazy as _,
)
from guardian.models import UserObjectPermission
from tidylib import tidy_document as tidy
@@ -458,6 +459,20 @@ def filter_sheet(ishtar_user, item):
return new_item
+PUNCTUATION = {
+ "fr": {
+ "colon": " :",
+ "exclamation": " !",
+ "question": " ?",
+ },
+ "en": {
+ "colon": ":",
+ "exclamation": "!",
+ "question": "?",
+ },
+}
+
+
def show_item(model, name, extra_dct=None, model_for_perms=None, callback=None):
def func(request, pk, **dct):
check_model = model
@@ -497,6 +512,10 @@ def show_item(model, name, extra_dct=None, model_for_perms=None, callback=None):
dct["ENCODING"] = settings.ENCODING
dct["DOT_GENERATION"] = settings.DOT_BINARY and profile.relation_graph
dct["SHOW_GEO"] = profile.mapping
+ current_language = get_language()
+ if current_language not in PUNCTUATION:
+ current_language = "en"
+ dct["PUNCTUATION"] = PUNCTUATION[current_language]
dct["current_window_url"] = url_name
date = None
if "date" in dct: