Commit 19de243b authored by Pino Toscano's avatar Pino Toscano

Allow to configure the URLs for language bugs

Add a couple of configuration keys to configure which URLs to use to
report, and browse bugs for a language.
parent 7957c68c
Pipeline #78017 passed with stage
in 7 minutes and 27 seconds
......@@ -31,6 +31,8 @@ SERVER_EMAIL = 'gnomeweb@gnome.org'
# When in STRINGFREEZE, where to send notifications (gnome-i18n@gnome.org) on any POT changes
NOTIFICATIONS_TO = ['gnome-i18n@gnome.org']
ENTER_BUG_URL = 'https://gitlab.gnome.org/Infrastructure/damned-lies/issues'
ENTER_LANGUAGE_BUG_URL = 'https://gitlab.gnome.org/Teams/Translation/%(lang)s/issues/new'
BROWSE_LANGUAGE_BUG_URL = 'https://gitlab.gnome.org/Teams/Translation/%(lang)s/issues?state=opened'
# Local time zone for this installation. Choices can be found here:
# https://en.wikipedia.org/wiki/List_of_tz_zones_by_name
......
from django.conf import settings
from django.db import models
from django.db.models import Q
from django.utils.translation import ugettext as _
......@@ -58,10 +59,14 @@ class Language(models.Model):
return self.plurals or _("Unknown")
def bugs_url_enter(self):
return 'https://gitlab.gnome.org/Teams/Translation/%s/issues/new' % self.locale
return settings.ENTER_LANGUAGE_BUG_URL % {
'lang': self.locale,
}
def bugs_url_show(self):
return 'https://gitlab.gnome.org/Teams/Translation/%s/issues?state=opened' % self.locale
return settings.BROWSE_LANGUAGE_BUG_URL % {
'lang': self.locale,
}
def get_release_stats(self, archives=False):
# FIXME Here be dragons
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment