Re: [Django] #21725: Javascript translations fail with non-BMP characters

2015-01-17 Thread Django
#21725: Javascript translations fail with non-BMP characters
-+-
 Reporter:  nedbatchelder|Owner:  MattBlack
 Type:  Bug  |   Status:  closed
Component:   |  Version:  1.6
  Internationalization   |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  nlsprint14   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Tim Graham ):

 In [changeset:"df3f3bbe2927b9bad80088c6adbf5e8c5ba778c9"]:
 {{{
 #!CommitTicketReference repository=""
 revision="df3f3bbe2927b9bad80088c6adbf5e8c5ba778c9"
 Removed utils.text.javascript_quote() per deprecation timeline; refs
 #21725.
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.ac4512129c2d2a9b1fd9903ae2620f59%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #21725: Javascript translations fail with non-BMP characters

2014-03-05 Thread Django
#21725: Javascript translations fail with non-BMP characters
-+-
 Reporter:  nedbatchelder|Owner:  MattBlack
 Type:  Bug  |   Status:  closed
Component:   |  Version:  1.6
  Internationalization   |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:  nlsprint14   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Claude Paroz ):

 In [changeset:"ac699cdc174a825e6b78c6f3c6e967bc961413c8"]:
 {{{
 #!CommitTicketReference repository=""
 revision="ac699cdc174a825e6b78c6f3c6e967bc961413c8"
 Really hidden warnings in javascript_quote tests

 Refs #21725.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.5d2d3c46a3e12473dfa1c6be3fdd6a27%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21725: Javascript translations fail with non-BMP characters

2014-02-22 Thread Django
#21725: Javascript translations fail with non-BMP characters
-+-
 Reporter:  nedbatchelder|Owner:  MattBlack
 Type:  Bug  |   Status:  closed
Component:   |  Version:  1.6
  Internationalization   |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:  nlsprint14   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by bmispelon):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 Thanks for the review.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.73c26c058ebe0071ad31efc637a3d645%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21725: Javascript translations fail with non-BMP characters

2014-02-22 Thread Django
#21725: Javascript translations fail with non-BMP characters
-+-
 Reporter:  nedbatchelder|Owner:  MattBlack
 Type:  Bug  |   Status:  new
Component:   |  Version:  1.6
  Internationalization   |   Resolution:
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:  nlsprint14   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Baptiste Mispelon ):

 In [changeset:"926e18d7d126fcf7f4b2d25ce4155423ac6e2f90"]:
 {{{
 #!CommitTicketReference repository=""
 revision="926e18d7d126fcf7f4b2d25ce4155423ac6e2f90"
 Deprecated django.utils.text.javascript_quote.

 Refs #21725.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.4f4091a6b0ca6be11dc2536943fddc6c%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21725: Javascript translations fail with non-BMP characters

2014-02-22 Thread Django
#21725: Javascript translations fail with non-BMP characters
-+-
 Reporter:  nedbatchelder|Owner:  MattBlack
 Type:  Bug  |   Status:  new
Component:   |  Version:  1.6
  Internationalization   |   Resolution:
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:  nlsprint14   |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by erikr):

 * cc: eromijn@… (added)
 * keywords:   => nlsprint14
 * stage:  Accepted => Ready for checkin


Comment:

 PR 2339 looks fine to me, and tests run (although I tested on a non-wide
 python).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.7a329a7fde498ba5ce8be511d85ad1f0%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21725: Javascript translations fail with non-BMP characters

2014-02-21 Thread Django
#21725: Javascript translations fail with non-BMP characters
-+-
 Reporter:  nedbatchelder|Owner:  MattBlack
 Type:  Bug  |   Status:  new
Component:   |  Version:  1.6
  Internationalization   |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by claudep):

 https://github.com/django/django/pull/2339 I guess :-)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.1f6e7219f9b9417735636e24f211338f%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21725: Javascript translations fail with non-BMP characters

2014-02-21 Thread Django
#21725: Javascript translations fail with non-BMP characters
-+-
 Reporter:  nedbatchelder|Owner:  MattBlack
 Type:  Bug  |   Status:  new
Component:   |  Version:  1.6
  Internationalization   |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by bmispelon):

 * has_patch:  0 => 1


Comment:

 Here's a pull request that adds a regression test to the
 `javascript_catalog` suite that makes sure that non-BMP characters in
 translation files are correctly handled.

 It also deprecates `javascript_quote` altogether (it was undocumented and
 not used anymore after a506b6981bc48caec30bca3de94d2ac3e6fc1660).

 Finally, it also skips the reported failing test on narrow python builds.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.eab6549cbf1218a123adc924bb203802%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21725: Javascript translations fail with non-BMP characters

2014-02-16 Thread Django
#21725: Javascript translations fail with non-BMP characters
-+-
 Reporter:  nedbatchelder|Owner:  MattBlack
 Type:  Bug  |   Status:  new
Component:   |  Version:  1.6
  Internationalization   |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by bmispelon):

 I did some digging and as it turns out, `javascript_quote` is not used
 anymore when doing javascript translation since
 a506b6981bc48caec30bca3de94d2ac3e6fc1660.

 In fact, this function is undocumented, barely tested, and was only used
 internally for the `javascript_catalogue` view.

 On top of that, it was also completely broken on Python2 if you ever
 passed it non-ascii input.

 I think we should just delete it altogether.

 As for the test failure, they pass on my machine both with Python 2 and 3
 and our CI server is also in the green. There's a chance it might be
 related to a wide/narrow build of Python.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.43a7ae4bd59050e07e37612291f3507b%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21725: Javascript translations fail with non-BMP characters

2014-02-16 Thread Django
#21725: Javascript translations fail with non-BMP characters
-+-
 Reporter:  nedbatchelder|Owner:  MattBlack
 Type:  Bug  |   Status:  new
Component:   |  Version:  1.6
  Internationalization   |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by Honza_Kral):

 * status:  closed => new
 * resolution:  fixed =>


Comment:

 I am getting consistent failures since this was merge in python 2 (not
 python 3) on mac:
 {{{
 ==
 FAIL: test_javascript_quote_unicode (utils_tests.test_text.TestUtilsText)
 --
 Traceback (most recent call last):
   File "/Users/honza/work/django/tests/utils_tests/test_text.py", line
 162, in test_javascript_quote_unicode
 self.assertEqual(text.javascript_quote(input), output)
 AssertionError: u"

Re: [Django] #21725: Javascript translations fail with non-BMP characters

2014-02-15 Thread Django
#21725: Javascript translations fail with non-BMP characters
-+-
 Reporter:  nedbatchelder|Owner:  MattBlack
 Type:  Bug  |   Status:  closed
Component:   |  Version:  1.6
  Internationalization   |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by nedbatchelder):

 Is this really a full fix?  Why does this function replace BMP characters
 with four-digit \u escapes, but allow non-BMP characters through
 unchanged?  I would have thought that Javascript would need surrogate
 pairs.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.7193596eb7109ca6073ab6c3066390c2%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21725: Javascript translations fail with non-BMP characters

2014-02-15 Thread Django
#21725: Javascript translations fail with non-BMP characters
-+-
 Reporter:  nedbatchelder|Owner:  MattBlack
 Type:  Bug  |   Status:  closed
Component:   |  Version:  1.6
  Internationalization   |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by Baptiste Mispelon ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"1c1dffca757b0b6acaf99d893d68847250ab4146"]:
 {{{
 #!CommitTicketReference repository=""
 revision="1c1dffca757b0b6acaf99d893d68847250ab4146"
 Fixed #21725 -- Fixed JavaScript quoting encoding.

 Thanks to nedbatchelder for the report.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.babf4123ee458f34481e9df85d073538%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21725: Javascript translations fail with non-BMP characters

2014-02-15 Thread Django
#21725: Javascript translations fail with non-BMP characters
-+-
 Reporter:  nedbatchelder|Owner:  MattBlack
 Type:  Bug  |   Status:  assigned
Component:   |  Version:  1.6
  Internationalization   |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by MattBlack):

 * status:  new => assigned
 * owner:  nobody => MattBlack


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.07dd494d86e75bde29bb18d019f7b8dd%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #21725: Javascript translations fail with non-BMP characters

2014-01-03 Thread Django
#21725: Javascript translations fail with non-BMP characters
--+
 Reporter:  nedbatchelder |Owner:  nobody
 Type:  Bug   |   Status:  new
Component:  Internationalization  |  Version:  1.6
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by claudep):

 * needs_better_patch:   => 0
 * needs_docs:   => 0
 * type:  Uncategorized => Bug
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.0c84687bb03cb7922536c347c7423645%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Django] #21725: Javascript translations fail with non-BMP characters

2014-01-02 Thread Django
#21725: Javascript translations fail with non-BMP characters
--+
 Reporter:  nedbatchelder |  Owner:  nobody
 Type:  Uncategorized | Status:  new
Component:  Internationalization  |Version:  1.6
 Severity:  Normal|   Keywords:
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+
 If a translated string includes a non-BMP character (above 0x), then
 javascript_catalog in views/i18n.py fails:

 {{{
 Traceback (most recent call last):
   File "/home/ned/.virtualenvs/edx-platform/local/lib/python2.7/site-
 packages/django/core/handlers/base.py", line 111, in get_response
 response = callback(request, *callback_args, **callback_kwargs)
   File "/home/ned/.virtualenvs/edx-platform/local/lib/python2.7/site-
 packages/django/views/i18n.py", line 264, in javascript_catalog
 csrc.append("catalog['%s'] = '%s';\n" % (javascript_quote(k),
 javascript_quote(v)))
   File "/home/ned/.virtualenvs/edx-platform/local/lib/python2.7/site-
 packages/django/utils/functional.py", line 176, in wrapper
 return func(*args, **kwargs)
   File "/home/ned/.virtualenvs/edx-platform/local/lib/python2.7/site-
 packages/django/utils/text.py", line 305, in javascript_quote
 return str(ustring_re.sub(fix, s))
 UnicodeEncodeError: 'ascii' codec can't encode character u'\U0001d543' in
 position 31: ordinal not in range(128)
 }}}

 (this is running 1.4.8, but the javascript_quote code hasn't changed since
 then.)

 It should be possible to fix javascript_quote to turn the character into a
 surrogate pair.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/056.f28b81c4dcfccd2093789631302b0b8c%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.