From 2f60e22b10bda6d6049e2a6636d83a894c08e1ab Mon Sep 17 00:00:00 2001 From: Federico Capoano Date: Mon, 17 Aug 2020 21:21:55 -0500 Subject: [PATCH] [fix] Fixed translation initialization issue Seems expressions like f' {_("ms")}' force the evaluation of the translatable string, but the translation system is not ready at this stage of the app startup yet and django throws an error in production. --- openwisp_monitoring/monitoring/configuration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openwisp_monitoring/monitoring/configuration.py b/openwisp_monitoring/monitoring/configuration.py index bf74f2d2f..ad7278b5a 100644 --- a/openwisp_monitoring/monitoring/configuration.py +++ b/openwisp_monitoring/monitoring/configuration.py @@ -86,7 +86,7 @@ _('Average Max RTT'), _('Average Min RTT'), ], - 'unit': f' {_("ms")}', + 'unit': _(" ms"), 'order': 220, 'query': chart_query['rtt'], }, @@ -173,7 +173,7 @@ _('Total download traffic'), _('Total upload traffic'), ], - 'unit': f' {_("GB")}', + 'unit': _(" GB"), 'order': 240, 'query': chart_query['traffic'], },