Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#6076 closed (wontfix)

deprecated code example in dodumentation

Reported by: dan Owned by: nobody
Component: Documentation Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In the page
http://www.djangoproject.com/documentation/i18n/

There is an example that use the deprecate/not working document.write function.

document.write(gettext('this is to be translated'));

please replace with the current dom standard

tnode = document.createTextNode(gettext('this is to be translated'));
[code to insert the tnode using dom...]

Change History (4)

comment:1 by Malcolm Tredinnick, 17 years ago

Resolution: wontfix
Status: newclosed

The docs aren't showing an example of JavaScript; they're describing the gettext function that Django's providing.

comment:2 by Jacob, 17 years ago

Whoops -- the above was actually me! Looks like Malcolm was using my browser and I forgot to log out. I assure you I'm not trying to steal his identity :)

comment:3 by dan, 17 years ago

Sorry but I don't understand.
Why you have to use a wrong javascript snippet for showing the correct way to use the gettext function?
Isn't better to show the correct javascript with the correct function?

comment:4 by durdinator, 17 years ago

Because the extra code you're suggesting distracts from the gettext() call, which is what the example is meant to be showing.

Note: See TracTickets for help on using tickets.
Back to Top