Commit graph

102 commits

Author SHA1 Message Date
Marco Bonetti
1de84a8e83 RTD settings 2023-12-04 20:38:35 +01:00
Marco Bonetti
020903d4cc proxy deeply through the backend. Fixes #271 2023-01-01 14:17:08 +01:00
Marco Bonetti
e095402daa Remove six as a dependency 2021-07-17 18:19:59 +02:00
Marco Bonetti
cc12a30761 Fixed unicode handling in gettext headers. Fixes #259 2021-07-17 18:14:27 +02:00
Halit Celik
0b9dfbce98 cleanup 2021-06-03 15:31:57 +02:00
Marco Bonetti
fd340eb054 Merge branch 'google-translation-api' of github.com:martinsvoboda/django-rosetta into martinsvoboda-google-translation-api 2021-03-04 13:58:34 +01:00
Marco Bonetti
efdc0a649d dropped support for python2 and django < 1.11 2020-06-07 16:43:21 +02:00
Marco Bonetti
de8ebfa10d Merge branch 'bugfix_typo_iterate' of github.com:timgates42/django-rosetta into develop 2020-04-14 09:41:29 +02:00
Marco Bonetti
ce027b28db Fixed DeprecationWarning: invalid escape sequence 2020-04-14 09:41:26 +02:00
Tim Gates
a4def51639
docs: Fix simple typo, interate -> iterate
There is a small typo in rosetta/views.py.

Should read `iterate` rather than `interate`.
2020-03-24 19:36:22 +11:00
Martin Svoboda
53c730df41 Added support for Google Translation API 2019-05-31 17:17:01 +02:00
Marco Bonetti
664b37e904 New ROSETTA_LANGUAGES setting allows for translating languages which are not yet in LANGUAGES 2019-04-07 12:50:18 +02:00
Marco Bonetti
cf0f49b45d version bump 2019-02-28 09:08:02 +01:00
Marco Bonetti
0c1d9b60dd Imports cleanup 2019-02-28 08:57:33 +01:00
Marco Bonetti
41b8a2e790 Merge branch 'develop' of github.com:mbi/django-rosetta into pr/189 2019-01-18 11:52:58 +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
Iacopo Spalletti
a73e7edc8e Add search in msgctxt 2018-11-20 10:21:15 +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
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
Claude Paroz
c7bbf68cf3 Removed old compatibility code for Django < 1.11 2018-08-24 10:11:14 +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
Marco Bonetti
dd4d653a84 Fixes #203: ROSETTA_REQUIRES_AUTH not being respected 2018-08-17 16:05:03 +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
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
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
Jon Baldivieso
a701097073 Allow searching of plural strings (source & translation). Closes #186. 2018-01-10 12:03:01 -08: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
Marco Bonetti
0bd2f6e3dc Tests passing on Django 2.0a1 2017-09-23 21:16:16 +02:00
Pedro Fernández Cuenca
b7657c1fca The reference language didn't work in widows
Inside the home view when the setting ENABLE_REFLANG is enabled and the reference language is different from the default rosseta didn't change it. This only happend in Windows due to the pattern '/locale/[a-z]{2}/' and the replacement string '/locale/%s/' % ref_lang. Windows file paths do not use '/' and therefore the re.sub never returned the path of the file we tried to generate.
Poposed solution: We create two new variables pattern and replacement that depend on the OS. These two new variables are used in re.sub.
2017-08-09 14:57:34 +02:00
Alexey Baranov
33d27e83e3 Update views.py
search in comment too
2016-11-22 17:07:40 +03:00
Marco Bonetti
ba44f3bf6b Test against Django 1.10b1 and dropped support for goslate and the Google translate API 2016-06-24 12:24:29 +02:00
Neal Todd
9fca19ebfe Fix IndexError in fix_nls when translation is just a carriage return
"string index out of range" occurs with a non-empty source string
where the user has (probably erroneously) entered a carriage return
in the translated string, e.g. fix_nls('x', '\r\n')
2016-05-18 16:53:00 +01:00
Marco Bonetti
8f3fafb73b Merge branch 'develop' into pr/60 2016-03-22 09:34:12 +01:00
Marco Bonetti
24c3bde593 dont barf on unicode language names 2016-03-22 09:34:06 +01:00
Marco Bonetti
d1cb2455c4 Merge branch 'develop' into pr/60 2016-03-22 09:09:55 +01:00
Marco Bonetti
89660325fc updates changelog 2016-03-22 08:45:08 +01:00
Neal Todd
1e3c832eec Make MO file compilation optional, issue #155 2016-03-21 23:16:52 +00:00
Neal Todd
c20f1706cb Fix an invalid page get parameter by falling back to page 1 2016-03-21 16:20:22 +00:00
Marco Bonetti
237c36f0d2 massive cleanup, only test against supported django versions 2015-09-24 11:20:09 +02:00
Marco Bonetti
9713471de1 updated django versions in toxfile, fixed a formatting issue 2015-08-10 09:00:59 +02:00
pgcd
62776d1256 Adds minimal feedback on error 2015-07-16 16:34:22 +02:00
Marco Bonetti
67f5803687 removed quite a few warnings on Django 1.8 2015-02-26 14:12:57 +01:00
cuchac
9cb28dddc8 Add support for Google translate 2014-12-10 01:07:56 +01:00
Marco Bonetti
19a2e7ed5a possible fix for issue #114, dont assume that request.user has settable properties 2014-10-17 20:42:24 +02:00
vesteinn
6ea3198417 Update views.py
Mimetype changed to content_type in django 1.7, fix in rosett views.
2014-10-17 10:40:02 +02:00
Virgil Dupras
90432b0eeb Merge remote-tracking branch 'mbi/develop' into reflang
Conflicts:
	rosetta/conf/settings.py
	rosetta/tests/__init__.py
	rosetta/urls.py
	rosetta/views.py
2014-08-07 11:01:34 -04:00
Marco Bonetti
6c638bcc3f Removed microsofttranslator as a shipped dependency, now that Python3 support has landed upstream 2014-06-02 09:32:29 +02:00
Morten Barklund
1efd2a8ba0 Added new config option to enable language-specific translator groups 2014-04-29 15:53:28 +02:00