Commit graph

308 commits

Author SHA1 Message Date
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
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
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
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
Marco Bonetti
d6fe378676 version bump 2017-09-23 08:19:21 +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
Marco Bonetti
80492e45c6 Template cleaunp, fixes #181 2017-03-10 11:19:20 +01:00
Marco Bonetti
67285f2174 use AdminSite.index_template instead of overriding the default AdminSite 2016-12-13 11:26:09 +01:00
Slava Kyrachevsky
cc74135ff2 updated docs 2016-12-13 11:04:49 +02:00
Slava Kyrachevsky
84acecc54d rename settings variable 2016-12-13 10:54:54 +02:00
Slava Kyrachevsky
69a305927e Rosetta at admin panel 2016-12-13 10:48:14 +02:00
Marco Bonetti
d89248e53f version bump 2016-12-11 12:51:25 +01: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
Marco Bonetti
b9427a0a74 updted changelog, preparing for 0.7.12 2016-05-21 15:44:58 +02:00
Marco Bonetti
4168a07bdc Merge pull request #169 from dnaranjo89/patch-1
Clean ROSETTA_CACHE_NAME initialization
2016-05-21 15:43:05 +02:00
Marco Bonetti
cd1dee08f4 Merge pull request #170 from dnaranjo89/patch-2
Fixup comment
2016-05-21 15:40:09 +02:00
Marco Bonetti
b254811faf Merge pull request #171 from nealtodd/int_percent_translated
Remove 2dp float formatting of integer percent translated
2016-05-21 15:38:46 +02:00
Neal Todd
bdaf06ef50 Remove 2dp float formatting of integer percent translated
pofile.percent_translated returns an int so the floatformat:2 filter
only ever renders as X.00, so tidier just to show X% rather than X.00%
2016-05-19 11:51:40 +01:00
dnaranjo89
4139a5dd1f Fixup comment 2016-05-19 12:40:09 +02:00
dnaranjo89
d28879d346 Clean ROSETTA_CACHE_NAME initialization
Just for readability
2016-05-19 12:38:51 +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
7264033178 Merge branch 'develop' of github.com:mbi/django-rosetta into develop 2016-05-14 23:10:01 +02:00
Marco Bonetti
c80f2db4a3 removed an import test that was used to support Django 1.4 2016-05-14 23:09:40 +02:00
Marco Bonetti
49f486a00b getting ready for 0.7.11 2016-03-30 21:25:55 +02: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
38eea0d8dd updates style for language selector 2016-03-22 09:26:05 +01:00
Marco Bonetti
2dce7f9a77 fixes tests 2016-03-22 09:15:08 +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
9cd3bc8113 Include the static directory in the dist packages. Fixes #162 2016-03-09 20:45:16 +01:00
Marco Bonetti
9402b5b62d 0.7.9 release 2016-03-08 10:14:15 +01:00
Marco Bonetti
a7edbf44ae renamed the search icon to avoid clashing with django's own 2016-03-08 09:57:07 +01:00
Marco Bonetti
d135a1ae1a Merge pull request #158 from facconi/develop
Fixes issues #157
2016-03-08 09:52:03 +01:00
Marco Bonetti
786b67e810 adds an explicit test to detect zh_Hans (for #161) 2016-03-08 09:50:22 +01:00
Francesco Facconi
d300c5dbbe Fixes issues #157 2016-02-15 12:56:19 +01:00
Marco Bonetti
6efeb337a3 Merge pull request #156 from AtaZh/develop
Update django.po
2016-02-15 10:40:11 +01:00
AtaZh
873053769d Update django.po 2016-02-15 11:22:54 +02:00
Marco Bonetti
e5d7cf04ba Merge pull request #153 from glasslion/develop
Fix issue #133: Support discovering locale directories like zh_Hans(xx_Xxxx)
2016-02-08 22:30:35 +01:00
Leo Zhou
5969b598d7 Fix issue #133: Support discovering locale directories like zh_Hans(xx_Xxxx) 2016-02-03 21:07:45 +08:00
Neal Todd
e3689afa76 Use language code without country specification for Yandex destination lang 2016-01-28 14:00:08 +00:00
Marco Bonetti
20de6bf039 0.7.8 release: missing includes in MANIFEST.in 2015-12-03 10:13:53 +01:00
Marco Bonetti
1ceea0d17b preparing for 0.7.7 release, and mock the google translate API call 2015-11-30 13:00:38 +01:00
Marco Bonetti
86cc5ecc7a Merge branch 'develop' into django-1.9 2015-11-30 12:41:19 +01:00
Paul J. Dorn
28e27367ec template markup fix: csrf moved to start of form
<input> should not be a child of <tr>, regardless if type="hidden" or not
2015-10-04 17:16:09 +02:00
Marco Bonetti
237c36f0d2 massive cleanup, only test against supported django versions 2015-09-24 11:20:09 +02:00
Marco Bonetti
c1b0c38968 WIP django 1.9, looks ok so far 2015-09-14 10:30:51 +02:00
Marco Bonetti
83b65717f2 Added support for composite locales 2015-09-14 10:19:45 +02:00
Adam J. Forster
155ed011a7 Update regular expressions to support PEP 3101 2015-08-13 11:37:23 +01:00
Marco Bonetti
9713471de1 updated django versions in toxfile, fixed a formatting issue 2015-08-10 09:00:59 +02:00
Marco Bonetti
85c2eca379 adds a test for Issue #135 and PR # 136 2015-08-04 16:12:00 +02:00
pgcd
8d7c529129 Output error messages to user 2015-07-16 16:35:46 +02:00
pgcd
62776d1256 Adds minimal feedback on error 2015-07-16 16:34:22 +02:00
Marco Bonetti
e117f1c135 Better handling for Custom User Models. Fixes Issue #131 2015-06-04 11:44:42 +02:00
Marco Bonetti
edfc1d40d3 adds a fuzzy toggle, fixes Issue #132 2015-06-04 11:04:20 +02:00
Marco Bonetti
cd7fa0795a 0.7.6 release 2015-04-02 10:13:57 +02:00
Marco Bonetti
67f5803687 removed quite a few warnings on Django 1.8 2015-02-26 14:12:57 +01:00
Marco Bonetti
6d474d74d4 Fix for issue 113 and issue 125. Discovery of catalogs in apps defined by their AppConfig 2015-02-25 15:43:52 +01:00
Marco Bonetti
6b59b42ba1 Added support for the Free Google Translate API (PR #117, thanks @cuchac) 2015-02-18 13:32:03 +01:00
Marco Bonetti
5b881382c2 Merge branch 'develop' into pr/117 2015-02-18 13:08:47 +01:00
Marco Bonetti
81c94d7f95 0.7.5 2015-02-10 09:58:29 +01:00
Marco Bonetti
4bf0c04988 Merge remote-tracking branch 'origin/pr/118' into develop 2015-02-10 09:23:52 +01:00
Raymond Penners
ebf9e5452f Typ-o (You are use the...) 2015-01-30 09:21:10 +01:00
Arrvi
2decd4de94 Updated polish translation
Completed translation and corrected some typos
2014-12-10 17:52:02 +01:00
cuchac
9cb28dddc8 Add support for Google translate 2014-12-10 01:07:56 +01:00
Marc Belmont
42c2492b85 Update rosetta.js
Yandex will convert < and > to html entities. Convert the entities back to normal characters.
2014-10-27 10:18:55 +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
Marco Bonetti
c988123af8 Use content_type instead of mimetype in HttpResponse. (Issue #115, thanks @vesteinn) 2014-10-17 20:13:44 +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
Marco Bonetti
bd00ce90b4 initial fixes for testing against django 1.7 final, fixes some translations 2014-09-17 10:40:41 +02:00
Marco Bonetti
46634bbe10 wip 2014-09-17 10:22:17 +02:00
Marco Bonetti
142570ae75 Merge pull request #110 from benebun/patch-2
Use formal form of address consistently in German
2014-08-12 21:03:03 +02:00
Benedikt Breinbauer
8a0f7ced03 Use formal form of address consistently in German 2014-08-12 20:21:29 +02:00
Benedikt Breinbauer
34c42991fe Capitalize German spelling of Sie consistently 2014-08-12 20:18:28 +02:00
Virgil Dupras
e4fd03f7d8 Re-introduced reflang test which was log in the previous merge
Also, fixed the reflang feature, because the tests didn't pass anymore.

references #60
2014-08-07 11:33:57 -04: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
artscoop
88136e21b3 Update poutil.py 2014-06-07 03:02:54 +02:00
artscoop
a08e017980 Initial Django 1.7 compatibility fix
When rosetta tries to load every INSTALLED_APP, it fetches app modules. However, in Django 1.7, importing some INSTALLED_APPS can fetch AppConfig instances instead of modules, and they have no `__file__` attribute. You then need to find the app module for the AppConfig instance.
This allows rosetta to properly seek locale folders.
2014-06-07 02:54:05 +02: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
Marco Bonetti
e963ca69f1 Added docs, tests and fine tuned ROSETTA_LANGUAGE_GROUPS setting 2014-05-02 12:04:41 +02:00
Marco Bonetti
dc5a2462fd Merge branch 'develop' into pr/103 2014-05-02 11:40:56 +02:00
Marco Bonetti
7b84c42016 Changelog, tests and docs for ROSETTA_EXCLUDE_PATHS 2014-05-02 11:37:39 +02:00
Morten Barklund
1efd2a8ba0 Added new config option to enable language-specific translator groups 2014-04-29 15:53:28 +02:00
elpaso
729286033d Added ROSETTA_EXCLUDED_PATHS 2014-04-29 15:33:22 +02:00
Marco Bonetti
68e02a3094 version bump 2014-04-06 10:01:27 +02:00
Marco Bonetti
c1ebedd95a fixes a microsofttranslator test that was too noisy 2014-04-06 09:33:40 +02:00
Marco Bonetti
2ad3f83e61 import the external js file with the correct URL scheme 2014-04-06 09:18:37 +02:00
tsouvarev
18ae20cbea Update base.html
jsapi from 'http://www.google.com/jsapi' is not working, but 'httpS://www.google.com/jsapi' loading just fine
2014-04-01 11:14:08 -04:00
Marco Bonetti
84991fa7c8 rebuilt Czech translation 2014-03-01 15:09:18 +01:00
Joe
b2879d46e9 Update czech plural forms 2014-02-28 14:53:32 +01:00
Marco Bonetti
78a6b4d325 No longer ship Polib but rely on the cheese shop instead. Also fixes a behavior with plural forms that was addressed upstram in polib 1.0.4 2014-02-28 14:12:21 +01:00
Marco Bonetti
b8654ab7b1 fixes standard compliance of all shipped translation catalogs 2014-02-28 14:11:19 +01:00
cuchac
acbe54ae4a Update czech translation 2014-02-28 10:57:48 +01:00
Marco Bonetti
78224d7f7c Merged PR #44, wrote a test 2014-01-15 17:22:38 +01:00
Marco Bonetti
043ace4ebb Merge branch 'develop' into pr/44
Conflicts:
	README.rst
	rosetta/conf/settings.py
	rosetta/poutil.py
2014-01-15 17:07:38 +01:00
Marco Bonetti
5125ebac7f Merge branch 'develop' of https://github.com/tback/django-rosetta into tback-develop
Conflicts:
	rosetta/__init__.py
2013-12-26 15:02:38 +01:00
Marco Bonetti
4d8afd8e5b wip 2013-12-26 14:59:23 +01:00
Marco Bonetti
5304595cd7 include the translator tests 2013-12-26 14:46:07 +01:00
Marco Bonetti
46c6ff05a3 included the Microsoft translator API client 2013-12-26 14:34:04 +01:00
Marco Bonetti
a5ea8cc35e Small refactoring of tests 2013-09-18 14:38:48 +02:00
Alexey Subbotin
7afdffb34a just single quotes 2013-09-18 13:37:16 +02:00
dotsbb
f3a38f5877 ORM Query refactoring access.py
One query instead of two queries to database.
2013-09-18 13:12:34 +02:00
Marco Bonetti
76e8387f8c Removed support for the signed_cookies SESSION_ENGINE + SessionRosettaStorage in Django 1.6 2013-09-09 10:57:28 +02:00
Marco Bonetti
6e8c30b843 Yandex Translate API support 2013-09-05 15:04:19 +02:00
Marco Bonetti
0c5bd77122 Merge branch 'develop' into pr/89 2013-09-05 14:49:51 +02:00
Marco Bonetti
860e69a686 clear the django apps cache key prior to testing 2013-09-05 14:49:37 +02:00
BlackWizard
f799e0ba4c Yandex Translate API support 2013-09-03 17:19:21 +04:00
Marco Bonetti
bf0b253dec Fixes issue 87, missing context variable in catalog list 2013-08-07 13:23:17 +02:00
Maikel Wever
efe71a39d2 Minor cleanup 2013-07-18 17:11:42 +02:00
Maikel Wever
edd215e706 Remove utils file which does nothing 2013-07-18 17:08:45 +02:00
Maikel Wever
05c91d44ef Fix error in merge 2013-07-18 16:48:54 +02:00
Maikel Wever
9c2a791c82 Merge bing to azure fix with current rosetta 2013-07-18 16:44:47 +02:00
Marco Bonetti
f891399d52 WIP tests against Django 1.6b1, some tests failing with Python3 2013-06-29 08:57:42 +02:00
Marco Bonetti
4ac54ff679 Fixes issue #81 - settings are poisoned during tests 2013-06-26 09:51:23 +02:00
btx
90cf37c912 Fixed reflang switching – keeping current reflang selected. 2013-06-18 15:15:32 +02:00
Olivier Cortès
eed2987659 Implement ROSETTA_CACHE_NAME, which defaults to 'rosetta' with a fallback to 'default' if unset. 2013-05-06 11:31:07 +02:00
Marco Bonetti
44b3314fd4 Accept languages as 'fr_FR.utf8' in lang_sel url. Fixes Issue #71 2013-04-30 14:57:16 +02:00
Virgil Dupras
0aa1b1917f Removed a comment that became obsolete with recent developments.
The local scope is no longer used to build the template context. It is now
explicitely built.
2013-04-19 09:17:54 -04:00
Virgil Dupras
2b2c5772c4 Added a testcase for the reflang feature. 2013-04-19 09:11:50 -04:00
Virgil Dupras
ba6aa9d37e Fixed a crash when reflang wouldn't be enabled.
This crash was introduced by the merge with mbi/develop.
2013-04-19 09:11:21 -04:00
Virgil Dupras
1ff1e04460 Merge remote-tracking branch 'mbi/develop' into reflang
Conflicts:
	README.rst
	rosetta/views.py
2013-04-19 09:09:21 -04:00
Mathieu Comandon
5ca9eb8234 Add test for pull request #71 2013-04-16 13:57:17 +02:00
Marco Bonetti
1d96772b04 Merge branch 'develop' of https://github.com/kanu/django-rosetta into pull-request-73 2013-04-16 13:17:44 +02:00
David Winterbottom
718f9430ad Allow access control function to be replaced
The current access control function `can_translate` is not always
sufficient.  For instance, some projects require access to translation
to be controlled using a permission rather than using groups.

This change introduces a new setting `ROSETTA_ACCESS_CONTROL_FUNCTION`
that allows an alternative predicate to be specified.  The default is to
use the current function so this change is backwards compatible.
2013-04-16 11:42:44 +01:00
kanu
6e5e6ef28e fixed lang_sel view picking the wrong file. 2013-04-12 12:36:57 +02:00
Mathieu Comandon
ffeefe014c Accept languages as 'fr_FR.utf8' in lang_sel url 2013-04-03 14:47:09 +02:00
AmirAli Akbari
2195d59ba8 Added translation for Farsi (fa). 2013-04-01 19:05:38 +04:30
minime
c1700d7233 fixed mess with app_id between pages 2013-03-06 18:22:53 +04:00
Virgil Dupras
bb005cade8 Adjusted the reflang branch to latest commits in develop.
Since render_to_response() in the home() view no longer passes the local scope
as context, we have to explicitly set ENABLE_REFLANG in the template context.
2013-03-05 11:49:01 -05:00
Virgil Dupras
a4a7ddb589 Merge branch 'develop' into reflang 2013-03-05 08:48:50 -05:00
Marco Bonetti
f1a332bf90 Fixes issue #67 - settings imports unicode_literals from __future__ 2013-03-04 18:24:36 +01:00
Marco Bonetti
0e1f21e88b release 0.7.1 -- missing value in context 2013-03-01 11:33:07 +01:00
Marco Bonetti
f0ac2216d1 Django 1.3 requires Python2.4+, so we can now drop the old style decorator syntax 2013-02-28 13:52:28 +01:00
Marco Bonetti
b42f729b73 list apps by alphabetical order 2013-02-28 13:47:11 +01:00
Marco Bonetti
d9b0355825 coverage and removed nasty locals() calls 2013-02-28 13:36:31 +01:00
Marco Bonetti
6ac75be721 wip cleanup 2013-02-28 12:18:08 +01:00
Marco Bonetti
16d1a49515 all tests pass 2013-02-27 21:01:00 +01:00
Marco Bonetti
08569f23ce wip python 3 support 2013-02-27 18:24:53 +01:00
Marco Bonetti
ba972b5b6a Possible fix for issues #63 and #64 2013-02-21 16:46:16 +01:00
Till Backhaus
f6fcf2d12b bump version number 2013-02-11 13:32:29 +01:00