Commit graph

557 commits

Author SHA1 Message Date
Marco Bonetti
6d9b3202d4 changelog 2019-01-18 11:20:12 +01:00
Marco Bonetti
e7fe1ae552 Merge branch 'develop' of github.com:mbi/django-rosetta into pr/211 2019-01-18 11:12:19 +01:00
Marco Bonetti
ef36cae07f changelog 2019-01-18 11:11:23 +01:00
Marco Bonetti
39c266d8c5 Merge branch 'develop' of github.com:mbi/django-rosetta into pr/212 2019-01-18 11:10:31 +01:00
Marco Bonetti
b874c5c0ba changelog 2019-01-18 11:09:14 +01:00
Marco Bonetti
bfea1b170f Merge branch 'develop' of github.com:mbi/django-rosetta into pr/213 2019-01-18 11:08:00 +01:00
Marco Bonetti
e79070078d Optional line number in the occurrences column 2019-01-18 11:06:26 +01:00
Marco Bonetti
cf7c780313 Merge branch 'develop' of github.com:mbi/django-rosetta into pr/215 2019-01-18 11:05:15 +01:00
Marco Bonetti
a704f4f565 test against Django 2.2 2019-01-17 21:48:38 +01:00
Paolo Melchiorre
a8305f4d22 Optional line number in the occurrences column
Useful when the line number is omitted in the comment lines in language 
files using makemessages with --add-location=file.
https://docs.djangoproject.com/en/stable/ref/django-admin/#cmdoption-makemessages-add-location
2018-12-19 16:16:50 +01:00
Iacopo Spalletti
a73e7edc8e Add search in msgctxt 2018-11-20 10:21:15 +01:00
David Jean Louis
12490bae56 Strip code tag from Yandex reponse.
When getting a translation suggestion for a string that contains string
replacements (like %(foo)s), Yandex wraps string replacements in
annoying <code> tags, this commit strips those tags automatically.
2018-11-15 18:03:01 +01:00
David Jean Louis
413625b03b Merge remote-tracking branch 'upstream/develop' into test_friendly_settings 2018-11-15 17:47:11 +01:00
Marco Bonetti
710da65f04 Changelog for #210, and test with Python3.7 2018-11-15 17:39:51 +01:00
David Jean Louis
9cecf2d49b DRY 2018-11-15 09:19:38 +01:00
David Jean Louis
0c8352ec8e Cleanup of tests
Now we don't mess up with settings or rosetta_settings directly,
we just use the django tools to change settings in a given context (like the
``override_settings`` decorator).
2018-11-14 18:26:32 +01:00
David Jean Louis
44821f4c88 Guess SETTINGS_MODULE is is set to None (in tests)
When testing and using override_settings(), SETTINGS_MODULE is reset, so in case it is set to None, we try to guess it via the DJANGO_SETTINGS_MODULE env var.
2018-11-14 18:25:01 +01:00
David Jean Louis
7d882990fc Make LOGIN_URL a promise to be test friendly 2018-11-14 18:22:33 +01:00
David Jean Louis
0db5ccb406 Rosetta settings are now "test friendly"
* Added a RosettaSettings class that keep rosetta settings
* Settings are reloaded via the ``setting_changed`` django signal is sent
* this should be completely backwards compatible, unless for hacks like reading the settings file from disk (nobody does this right ?)
2018-11-14 18:17:56 +01:00
David Jean Louis
4c17dd805f Allow overriding rosetta login url.
* Added a settings variable ``ROSETTA_LOGIN_URL`` that allows to
  override the login URL for rosetta.
* No test is included because it is not possible to override this
  particular setting variable due to how tests are organized (top level
  import of rosetta_settings).
2018-11-14 12:45:56 +01:00
Matthias Kestenholz
401fab90d8
Fix the icon-alert.svg file name
Fixes a rosetta crash when using ManifestStaticFilesStorage.
2018-09-24 10:53:15 +02:00
Marco Bonetti
caa4806e42 PEP8 fix and version pre-bump 2018-08-24 14:21:47 +02:00
Claude Paroz
c7bbf68cf3 Removed old compatibility code for Django < 1.11 2018-08-24 10:11:14 +02:00
Marco Bonetti
9cd7fd9b27 0.9.0 release 2018-08-24 09:11:26 +02:00
Marco Bonetti
daef242974 Fix pep8, dropped Django 1.8, 1.9, 1.10 from the test config 2018-08-24 08:54:52 +02:00
Claude Paroz
a616412ef1 Removed access to old ADMIN_* variables
This commit will break the alert image for Django 1.8, but with the current code,
all versions after Django 1.8 are broken (.gif admin images were converted to .svg
during the 1.9 release).
2018-08-23 21:14:46 +02:00
Claude Paroz
f6ed983013 Removed old compatibility code for Django < 1.8 2018-08-23 20:25:09 +02:00
Marco Bonetti
00f7e5a432 Why we can't use override_settings… 2018-08-17 16:21:44 +02:00
Marco Bonetti
dd4d653a84 Fixes #203: ROSETTA_REQUIRES_AUTH not being respected 2018-08-17 16:05:03 +02:00
Marco Bonetti
7a782d03a7 MANIFEST.in is a mistery 2018-08-07 08:40:55 +02:00
Marco Bonetti
0e77a93552 Adds a test for Azure translation 2018-08-07 08:28:21 +02:00
Marco Bonetti
e3dd1f9b91 Replace the (no longer working) Microsoft translation API with the new Azure Translator API (Fixes #200 and #201, thank you @svdvonde) 2018-08-07 08:05:03 +02:00
Marco Bonetti
3b3d63eecd Removed a few references to microsofttranslator and fixed the translation path 2018-08-06 22:47:27 +02:00
Sam Van den Vonder
8c7efe32df change unicode characters in comment text that error'd python 2.7 tests 2018-08-06 22:14:24 +02:00
Sam Van den Vonder
69f2b62adf Change discontinued Microsoft Translator API to the new Azure API 2018-08-06 21:47:24 +02:00
Marco Bonetti
0102739091 Release 0.8.2: test against Django 2.1 final 2018-08-06 15:16:50 +02:00
Marco Bonetti
d2dd3831ca project descrition 2018-05-18 10:57:13 +02:00
Marco Bonetti
acfac22a6a Test against Django 2.1a 2018-05-18 09:40:19 +02:00
Marco Bonetti
03ee5142b0 Load static instead of admin_static (deprecated in Django 2.1) 2018-05-18 09:39:48 +02:00
Marco Bonetti
0a6dfaeb32 changelog, preparing for 0.8.2 2018-03-01 14:03:13 +01:00
Yavor Atov
6375cb4109 Avoid UnicodeEncodeError when quering strings
In Python 2 if you query for text with unicode symbols,
an UnicodeEncodeError is raised.
It's because urlencode is called on unicode string.
urlencode should be called on encode strings in Python 2.
The fix is to use Django's force_bytes unility function
to pass encoded string (bytestring in Python 3) to urlencode.
2018-03-01 14:12:50 +02:00
Marco Bonetti
e5ef0029c8
Merge pull request #196 from sobolevn/patch-1
Updates README.rst with svg badge
2018-02-09 14:15:55 +01:00
Nikita Sobolev
2ebd173034
Updates README.rst 2018-02-09 16:01:52 +03:00
Marco Bonetti
ba91431587 version bump to 0.8.1 2018-01-10 21:23:49 +01:00
Jon Baldivieso
a701097073 Allow searching of plural strings (source & translation). Closes #186. 2018-01-10 12:03:01 -08:00
Jon Baldivieso
20c7ff4a07 If there's no search query, don't show "None" in search box! 2018-01-10 12:02:17 -08:00
Jon Baldivieso
372d665386 HTML encode ampersands in query string urls in template 2018-01-10 12:01:37 -08:00
Marco Bonetti
e4e7e3dc45 include .pep8 2018-01-10 16:09:18 +01:00
Marco Bonetti
a43d369387 Check PEP8 while running tests
Use polib >= 1.1.0
Rosetta version bump and changelog
2018-01-10 12:44:24 +01:00
Jon Baldivieso
d797b76a10 Rewrite urls to be RESTful & views to be class-based & less cache-heavy
Previously, state was extensively persisted in the cache. This
large-scale rewrite uses the cache only to persist changes to the
catalog file when it is read-only. State is now conveyed through the url
structure and through query string arguments.

The primary downside to this new approach is that there's no explicit
way of purging a cached catalog from memory, or refreshing it from
what's on disk. The user is forced (untransparently!) to wait until
the cached file falls out of the cache (untransparently!), which
is currently 24 hours after the last save (or after if the session
ends). Addressing this would require some design considerations,
and probably some new text that would require its own translation.
2018-01-09 10:45:37 -08:00