[Django] #22404: Make front-end getext catalog available as JSON

22 views
Skip to first unread message

Django

unread,
Apr 7, 2014, 8:51:40 PM4/7/14
to django-...@googlegroups.com
#22404: Make front-end getext catalog available as JSON
----------------------------------+--------------------
Reporter: ian.morrison.a@… | Owner: nobody
Type: New feature | Status: new
Component: Translations | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------
This is a question related to #22403.

It seems like it would be nice if the front-end gettext catalogs were
simply available as JSON (and not as a custom js function, injected into
the global namespace). This would allow the community to use (or build)
separate client libraries for handing these translation strings.

Does that seem like a feature that others would be interested in?

--
Ticket URL: <https://code.djangoproject.com/ticket/22404>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 8, 2014, 2:27:21 AM4/8/14
to django-...@googlegroups.com
#22404: Make front-end getext catalog available as JSON
----------------------------------+------------------------------------

Reporter: ian.morrison.a@… | Owner: nobody
Type: New feature | Status: new
Component: Translations | 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 aaugustin):

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0


Comment:

Yes, that should be possible somehow.

--
Ticket URL: <https://code.djangoproject.com/ticket/22404#comment:1>

Django

unread,
Jul 26, 2014, 1:07:27 PM7/26/14
to django-...@googlegroups.com
#22404: Make front-end getext catalog available as JSON
----------------------------------+-------------------------------------
Reporter: ian.morrison.a@… | Owner: manologab
Type: New feature | Status: assigned
Component: Translations | 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 manologab):

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


Comment:

Hi, I've been working with Django for the last few months and I will like
to contribute with this feature.

What I propose is a javascript view json_catalog that returns the language
settings as a json object like this:
{{{
{catalog:{
'translate this':'traduce esto',
'one plural sample': [
'un ejemplo de plural',
'muchos ejemplos de plural'
]
},
plural: null,
formats: {
"DATETIME_FORMAT": "N j, Y, P",
"DATE_FORMAT": "N j, Y",
"DECIMAL_SEPARATOR": ".",
...
}
}}}
Here is the code:
[https://github.com/manologab/django/tree/ticket_22404]

Please let me know if you agree with this approach before going any
further.

--
Ticket URL: <https://code.djangoproject.com/ticket/22404#comment:2>

Django

unread,
Dec 18, 2014, 2:54:25 PM12/18/14
to django-...@googlegroups.com
#22404: Make front-end getext catalog available as JSON
-------------------------------------+-------------------------------------

Reporter: ian.morrison.a@… | Owner: manologab
Type: New feature | Status: assigned
Component: | Version: master
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 timgraham):

* version: 1.6 => master
* component: Translations => Internationalization


--
Ticket URL: <https://code.djangoproject.com/ticket/22404#comment:3>

Django

unread,
Jun 5, 2015, 9:50:20 AM6/5/15
to django-...@googlegroups.com
#22404: Make front-end getext catalog available as JSON
-------------------------------------+-------------------------------------
Reporter: ian.morrison.a@… | Owner:
| sergeykolosov

Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
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 sergeykolosov):

* owner: manologab => sergeykolosov


Comment:

Working on that during DjangoCon Europe 2015 sprints.

--
Ticket URL: <https://code.djangoproject.com/ticket/22404#comment:4>

Django

unread,
Jun 5, 2015, 10:13:22 AM6/5/15
to django-...@googlegroups.com
#22404: Make front-end getext catalog available as JSON
-------------------------------------+-------------------------------------
Reporter: ian.morrison.a@… | Owner:
| sergeykolosov
Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
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
-------------------------------------+-------------------------------------

Comment (by sergeykolosov):

PR: https://github.com/django/django/pull/4808

--
Ticket URL: <https://code.djangoproject.com/ticket/22404#comment:5>

Django

unread,
Jun 10, 2015, 6:25:19 PM6/10/15
to django-...@googlegroups.com
#22404: Make front-end getext catalog available as JSON
-------------------------------------+-------------------------------------
Reporter: ian.morrison.a@… | Owner:
| sergeykolosov
Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by sergeykolosov):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/22404#comment:6>

Django

unread,
Jun 11, 2015, 5:46:44 AM6/11/15
to django-...@googlegroups.com
#22404: Make front-end getext catalog available as JSON
-------------------------------------+-------------------------------------
Reporter: ian.morrison.a@… | Owner:
| sergeykolosov
Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by MoritzS):

* stage: Accepted => Ready for checkin


Comment:

Looks good!

--
Ticket URL: <https://code.djangoproject.com/ticket/22404#comment:7>

Django

unread,
Jun 11, 2015, 12:46:20 PM6/11/15
to django-...@googlegroups.com
#22404: Make front-end getext catalog available as JSON
-------------------------------------+-------------------------------------
Reporter: ian.morrison.a@… | Owner:
| sergeykolosov
Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1
* stage: Ready for checkin => Accepted


Comment:

Reviewed the PR a bit more.

--
Ticket URL: <https://code.djangoproject.com/ticket/22404#comment:8>

Django

unread,
Aug 4, 2015, 6:59:48 PM8/4/15
to django-...@googlegroups.com
#22404: Make front-end getext catalog available as JSON
-------------------------------------+-------------------------------------
Reporter: ian.morrison.a@… | Owner:
| sergeykolosov
Type: New feature | Status: assigned
Component: | Version: master
Internationalization |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by sergeykolosov):

* needs_better_patch: 1 => 0


Comment:

PR updated https://github.com/django/django/pull/4808

--
Ticket URL: <https://code.djangoproject.com/ticket/22404#comment:9>

Django

unread,
Aug 5, 2015, 9:05:55 AM8/5/15
to django-...@googlegroups.com
#22404: Make front-end getext catalog available as JSON
-------------------------------------+-------------------------------------
Reporter: ian.morrison.a@… | Owner:
| sergeykolosov
Type: New feature | Status: closed
Component: | Version: master
Internationalization |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"244404227e8a1c5e241658ef0df789a28ed3bbc6" 24440422]:
{{{
#!CommitTicketReference repository=""
revision="244404227e8a1c5e241658ef0df789a28ed3bbc6"
Fixed #22404 -- Added a view that exposes i18n catalog as a JSON

Added django.views.i18n.json_catalog() view, which returns a JSON
response containing translations, formats, and a plural expression
for the specified language.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/22404#comment:10>

Reply all
Reply to author
Forward
0 new messages