mirror of
https://github.com/Hopiu/django-rosetta.git
synced 2026-05-04 03:34:42 +00:00
Merge branch 'develop' of github.com:mbi/django-rosetta into pr/212
This commit is contained in:
commit
39c266d8c5
8 changed files with 19 additions and 7 deletions
|
|
@ -11,6 +11,8 @@ matrix:
|
|||
env: TOX_ENV=py36-django20
|
||||
- python: "3.6"
|
||||
env: TOX_ENV=py36-django21
|
||||
- python: "3.6"
|
||||
env: TOX_ENV=py36-django22
|
||||
|
||||
install:
|
||||
- pip install tox
|
||||
|
|
|
|||
4
CHANGES
4
CHANGES
|
|
@ -5,7 +5,9 @@ Version 0.9.1 (unreleased)
|
|||
--------------------------
|
||||
* Removed old compatibility code for Django < 1.11 (#205, thanks @claudep)
|
||||
* Allow overriding rosetta login url (#210, thanks @izimobil)
|
||||
|
||||
* Test against Django 2.2
|
||||
* Optional line number in the occurrences column (#215, thanks @pauloxnet)
|
||||
* Add search in msgctxt (#213, thanks @yakky)
|
||||
|
||||
Version 0.9.0
|
||||
-------------
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@
|
|||
</td>
|
||||
<td class="location">
|
||||
{% for fn,lineno in message.occurrences %}
|
||||
<code{% if forloop.counter|gt:"3" %} class="hide"{% endif %}>{{ fn }}:{{lineno}}</code>
|
||||
<code{% if forloop.counter|gt:"3" %} class="hide"{% endif %}>{{ fn }}{% if lineno %}:{{lineno}}{% endif %}</code>
|
||||
{% endfor %}
|
||||
{% if message.occurrences|length|gt:"3" %}
|
||||
<a href="#">… ({% blocktrans count message.occurrences|length|minus:"3" as more_count %}{{more_count}} more{% plural %}{{more_count}} more{% endblocktrans %})</a>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Rosetta\n"
|
||||
|
|
@ -166,5 +166,6 @@ msgstr ""
|
|||
|
||||
#. Translators: consectetur adipisicing
|
||||
#: templates/eiusmod/tempor.html:43
|
||||
msgctxt "purus pellentesque"
|
||||
msgid "Lorem ipsum"
|
||||
msgstr "dolor sit amet"
|
||||
|
|
|
|||
|
|
@ -943,6 +943,10 @@ class RosettaTestCase(TestCase):
|
|||
r = self.client.get(url % 'adipisicing')
|
||||
self.assertContains(r, 'Lorem')
|
||||
|
||||
# Search context
|
||||
r = self.client.get(url % 'pellentesque')
|
||||
self.assertContains(r, 'Lorem')
|
||||
|
||||
def test_45_issue186_plural_msg_search(self):
|
||||
"""Confirm that search of the .po file works for plurals.
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -601,6 +601,7 @@ class TranslationFormView(RosettaFileLevelMixin, TemplateView):
|
|||
def concat_entry(e):
|
||||
return (six.text_type(e.msgstr) +
|
||||
six.text_type(e.msgid) +
|
||||
six.text_type(e.msgctxt) +
|
||||
six.text_type(e.comment) +
|
||||
u''.join([o[0] for o in e.occurrences]) +
|
||||
six.text_type(e.msgid_plural) +
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ INSTALLED_APPS = [
|
|||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.sites',
|
||||
'django.contrib.messages',
|
||||
'rosetta',
|
||||
]
|
||||
|
||||
|
|
|
|||
9
tox.ini
9
tox.ini
|
|
@ -2,8 +2,8 @@
|
|||
envlist =
|
||||
flake8,
|
||||
{py27,py36}-django111,
|
||||
py36-django{20,21},
|
||||
py37-django{20,21},
|
||||
py36-django{20,21,22},
|
||||
py37-django{20,21,22},
|
||||
gettext,docs
|
||||
|
||||
skipsdist = True
|
||||
|
|
@ -21,10 +21,11 @@ deps =
|
|||
django111: Django==1.11.*
|
||||
django20: Django==2.0.*
|
||||
django21: Django>=2.1a1,<=2.1.99
|
||||
django22: Django>=2.2a1,<=2.2.99
|
||||
|
||||
py27-django{17,18,19,110,111}: python-memcached
|
||||
py36-django{17,18,19,110,111,20,21}: python3-memcached
|
||||
py37-django{20,21}: python3-memcached
|
||||
py36-django{17,18,19,110,111,20,21,22}: python3-memcached
|
||||
py37-django{20,21,22}: python3-memcached
|
||||
# py27-django18: pudb
|
||||
requests
|
||||
polib>=1.1.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue