Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6076 closed (wontfix)

deprecated code example in dodumentation

Reported by: dan Owned by: nobody
Component: Documentation Version: master
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


In the page

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 Changed 11 years ago by Malcolm Tredinnick

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 Changed 11 years ago by Jacob

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 Changed 11 years ago by dan

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 Changed 11 years ago by durdinator

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