gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-backoffice] branch master updated: Cut deadcode off.


From: gnunet
Subject: [GNUnet-SVN] [taler-backoffice] branch master updated: Cut deadcode off.
Date: Tue, 31 Jul 2018 14:21:22 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository backoffice.

The following commit(s) were added to refs/heads/master by this push:
     new db3430a  Cut deadcode off.
db3430a is described below

commit db3430a82b730f6651817780b6079cd69be77913
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Jul 31 14:21:09 2018 +0200

    Cut deadcode off.
---
 talerbackoffice/backoffice/templates/i18nfix.py | 33 -------------------------
 1 file changed, 33 deletions(-)

diff --git a/talerbackoffice/backoffice/templates/i18nfix.py 
b/talerbackoffice/backoffice/templates/i18nfix.py
deleted file mode 100644
index 331706a..0000000
--- a/talerbackoffice/backoffice/templates/i18nfix.py
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env python3
-# This file is in the public domain.
-
-"""
-Extract translations from a Jinja2 template, stripping leading newlines.
-
address@hidden Florian Dold
-"""
-
-import jinja2.ext
-import re
-
-def normalize(message):
-    message = message.strip()
-    # collapse whitespaces (including newlines) into one space.
-    message = re.sub("\s+", " ", message)
-    return message
-
-
-def babel_extract(fileobj, keywords, comment_tags, options):
-    res = jinja2.ext.babel_extract(fileobj, keywords, comment_tags, options)
-    for lineno, funcname, message, comments in res:
-        message = normalize(message)
-        yield lineno, funcname, message, comments
-
-def wrap_gettext(f):
-    """
-    Call gettext with whitespace normalized.
-    """
-    def wrapper(message):
-        message = normalize(message)
-        return f(message)
-    return wrapper

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]