Re: [Django] #20811: Makemessages currently does not support alternative template languages

2015-01-17 Thread Django
#20811: Makemessages currently does not support alternative template languages
--+
 Reporter:  cordery@… |Owner:  nobody
 Type:  New feature   |   Status:  closed
Component:  Internationalization  |  Version:  master
 Severity:  Normal|   Resolution:  wontfix
 Keywords:  makemessages i18n | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by aaugustin):

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


Comment:

 Given the implementation of multiple template engines that landed in
 Django 1.8, Django template loaders aren't the right point to fix this
 problem anymore. For this reason I'm closing the ticket.

 Unfortunately internationalization didn't make it in Django 1.8. Further
 work is tracked in 24167#.

--
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/075.efa5f61779bb848b7682a90095155df9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #20811: Makemessages currently does not support alternative template languages

2014-06-24 Thread Django
#20811: Makemessages currently does not support alternative template languages
--+
 Reporter:  cordery@… |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  Internationalization  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  makemessages i18n | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  1
Easy pickings:  0 |UI/UX:  0
--+
Changes (by timo):

 * needs_better_patch:  0 => 1


-- 
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/075.14308f44334e1a1690448c04579df1c4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #20811: Makemessages currently does not support alternative template languages

2013-10-22 Thread Django
#20811: Makemessages currently does not support alternative template languages
--+
 Reporter:  cordery@… |Owner:  nobody
 Type:  New feature   |   Status:  new
Component:  Internationalization  |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:  makemessages i18n | Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by timo):

 * 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/075.7268efa1f6fe8eb724dd964bfe39679b%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #20811: Makemessages currently does not support alternative template languages

2013-08-22 Thread Django
#20811: Makemessages currently does not support alternative template languages
-+-
 Reporter:  cordery@…|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:   |  Version:  master
  Internationalization   |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  makemessages i18n|  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by cordery@…):

 Hamlpy gets around this by decorating
 django.utils.translation.trans_real.templatize as seen here:
 https://github.com/jessemiller/HamlPy/blob/master/hamlpy/templatize.py

 Although note that this code is parsing all files instead of only those
 with hamlpy extensions, so is actually broken when mutliple template
 formats are used.

 While this method is workable I feel that if Django wants to support other
 template languages (many of which, like haml, are quite popular these
 days), then a more consistent and intuitive approach would be to always
 use the template loaders to load template files before trying a direct
 open(), particularly in cases like makemessages where I assume performance
 is not typically an issue.

-- 
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/075.60957dccecc3181968d9d97124d0ed06%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #20811: Makemessages currently does not support alternative template languages

2013-08-19 Thread Django
#20811: Makemessages currently does not support alternative template languages
-+-
 Reporter:  cordery@…|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:   |  Version:  master
  Internationalization   |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  makemessages i18n|  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by ramiro):

 Some historical information for your review:

 Back in the times, we used to have a get_template_source() method on
 template loading backends.

 They were removed with the refactoring work associated with the
 introduction of template caching (#6262 / [44b9076bbe]).

 After that, there was at least one report asking for its reintroduction:
 #15102. Please don't take my commend on that ticket as a -1 to something
 like this. At the time I didn't grasp how having an abstraction to get the
 raw template source code could help in integrating other templating
 languages.

-- 
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/075.2b5728c09b5a051de52d9c0b944dbdbc%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #20811: Makemessages currently does not support alternative template languages

2013-08-19 Thread Django
#20811: Makemessages currently does not support alternative template languages
-+-
 Reporter:  cordery@…|Owner:  nobody
 Type:  New feature  |   Status:  new
Component:   |  Version:  master
  Internationalization   |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:  makemessages i18n|  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by timo):

 * component:  Translations => Internationalization


Comment:

 [https://github.com/django/django/pull/1402 PR is here].

-- 
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/075.bc1441cc3894ab3d3703d9d76bc33b26%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #20811: Makemessages currently does not support alternative template languages

2013-07-26 Thread Django
#20811: Makemessages currently does not support alternative template languages
---+--
 Reporter:  cordery@…  |Owner:  nobody
 Type:  New feature|   Status:  new
Component:  Translations   |  Version:  master
 Severity:  Normal |   Resolution:
 Keywords:  makemessages i18n  | Triage Stage:  Unreviewed
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by cordery@…):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 Patch here https://github.com/cordery/django/tree/ticket_20811

 Will submit a pull request.

-- 
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/075.bbb226fde160750a1fe173b68c08b051%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Django] #20811: Makemessages currently does not support alternative template languages

2013-07-26 Thread Django
#20811: Makemessages currently does not support alternative template languages
--+---
 Reporter:  cordery@… |  Owner:  nobody
 Type:  New feature   | Status:  new
Component:  Translations  |Version:  master
 Severity:  Normal|   Keywords:  makemessages i18n
 Triage Stage:  Unreviewed|  Has patch:  1
Easy pickings:  0 |  UI/UX:  0
--+---
 Makemessages currently does not support alternative template languages, as
 it uses open() directly and therefore does not give alternative template
 languages the chance to preprocess templates.  This seems an oversight as
 alternative template languages seems to be intended to be supported by
 Django, as discussed here
 https://docs.djangoproject.com/en/dev/ref/templates/api/#using-an-
 alternative-template-language

 When using alternative template languages like hamlpy
 (https://github.com/jessemiller/HamlPy), this prevents the templates from
 being parsed for trans and blocktrans tags.

 In hamlpy they tried to solve it by monkeypatching
 django.utils.translation.trans_real.templatize but I think a better
 solution would be add a function to the loader module,
 get_template_source(), which operates using the same machinery as
 get_template but returns source rather than the compiled template.
 Makemessages could then use this new function to try to read each
 discovered file using the template loaders, before resorting to open().

 This would enable makemessages to properly find trans and blocktrans tags
 in template files from other templating systems.  For example in hamlpy
 these tags might appear like this:


 {{{
 - trans "hello"
 - blocktrans
   This is a block trans'd string.
 }}}

 Which could not be read by makemessages.  get_template_source would use
 the hamlpy loader to load the template.haml file, and compile it to:

 {{{
 {% trans "hello"
 {% blocktrans %}
 This is a block trans'd string
 {% endblocktrans %}
 }}}

 Which can be read by makemessages.

 I will momentarily submit a pull request regarding this ticket.

-- 
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/060.43c9e512e26a6df941953131bf0aaa33%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.