Opened 10 years ago

Closed 4 years ago

#8561 closed New feature (fixed)

Patсh for Lithuanian support to Javascript slug creation

Reported by: petraszd Owned by: nobody
Component: contrib.admin Version: master
Severity: Normal Keywords: LITHUANIAN_MAP
Cc: mmitar@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no


Path for Lithuanian support to Javascript slug creation in django/contrib/admin/media/js/urlify.js

When slug is auto-generated some Lithuanian's letters are missing. So there is a patch for quick fix.
Actualy I am not very happy with current auto-generated slug creation, but for quick result it will do the trick.

Attachments (1)

urlify.diff (741 bytes) - added by petraszd 10 years ago.
Lithuanian letters for urlify.js

Download all attachments as: .zip

Change History (9)

Changed 10 years ago by petraszd

Attachment: urlify.diff added

Lithuanian letters for urlify.js

comment:1 Changed 10 years ago by edgarsj

milestone: 1.0
Triage Stage: UnreviewedAccepted

comment:2 Changed 10 years ago by Malcolm Tredinnick

milestone: 1.0post-1.0

This is a feature addition, not a blocker for 1.0. Removing the milestone.

comment:3 Changed 9 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

comment:4 Changed 7 years ago by Luke Plant

Severity: Normal
Type: New feature

comment:5 Changed 7 years ago by patchhammer

Easy pickings: unset
Patch needs improvement: set

urlify.diff fails to apply cleanly on to trunk

comment:6 Changed 7 years ago by Julien Phalip

UI/UX: unset

See related feature request in #11035.

comment:7 Changed 7 years ago by Mitar

Cc: mmitar@… added

I have added those translations to my improved JavaScript slug creation function which is using Unicode normalization too.

comment:8 Changed 4 years ago by Baptiste Mispelon <bmispelon@…>

Resolution: fixed
Status: newclosed

In 20948612c79b936424cb12cf9988713708232ced:

Fixed issues and added new scripts to urlify.js

Added the following scripts:

  • Lithuanian (thanks to petraszd for the patch)
  • Serbian (thanks to offy)
  • Azerbajani (thanks to Ali Ismayilov)

Fixed the following issues:

  • In Polish character map, some uppercase letters were converted to a lowercase ascii equivalent.
  • The letter Y with a diaeresis had a lowercase version but no uppercase.

The code was also simplified and cleaned up:

  • Use of var statements everywhere
  • Systematic use of semicolons
  • Proper looping over arrays and objects.

Thanks to @oinopion for his help in getting the javascript
into proper shape.

Fixes #8561, #11035.

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