Opened 7 years ago

Closed 7 years ago

Last modified 7 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: UI/UX:

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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

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

comment:2 Changed 7 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 7 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 7 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