[FIX] transifex: adapt the URL scheme

The search patterns have changed on Transifex
While the URL is still backward compatible, it may change in the future
This commit is contained in:
Martin Trigaux
2018-04-18 13:59:56 +02:00
parent e155244007
commit 41e7df7880
+5 -2
View File
@@ -78,11 +78,14 @@ class IrTranslation(models.Model):
translation.transifex_url = False
continue
# e.g. 'https://www.transifex.com/odoo/odoo-10/translate/#fr/sale/42?q=Sale+Order'
# e.g. https://www.transifex.com/odoo/odoo-10/translate/#fr/sale/42?q=text'Sale+Order'
translation.transifex_url = "%(url)s/%(project)s/translate/#%(lang)s/%(module)s/42?q=%(src)s" % {
'url': base_url,
'project': project,
'lang': lang_code,
'module': translation.module,
'src': werkzeug.url_quote_plus(translation.source[:50]),
'src': werkzeug.url_quote_plus(
"text:'" +
translation.source[:50].replace("'", "\'") +
"'"),
}