Opened 9 years ago

Closed 9 years ago

#5044 closed (fixed)

Update urlify.js with missing characters

Reported by: dall Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords: sprintsept14
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

my (latvian) language, characters like - āšžčļņī, needs to be converted to aszclni, not to disaper.

Attachments (1)

5044.diff (870 bytes) - added by arien 9 years ago.
LATVIAN_MAP for urlify.js

Download all attachments as: .zip

Change History (13)

comment:1 Changed 9 years ago by Collin Grady <cgrady@…>

Component: UncategorizedAdmin interface
Owner: changed from Jacob to Adrian Holovaty

comment:2 Changed 9 years ago by Dimitris Glezos <dimitris@…>

Currently (latest SVN copy) āšžčļņī is converted to "szc".

comment:3 Changed 9 years ago by Dimitris Glezos <dimitris@…>

This ticket requires someone familiar with the Latvian alphabet to write a patch similar to those on ticket #4365 for source:django/trunk/django/contrib/admin/media/js/urlify.js.

comment:4 Changed 9 years ago by Julian Bez

Keywords: sprintsept14 added
Triage Stage: UnreviewedDesign decision needed

Good question.. How do we handle foreign-language slugs in Django?

comment:5 in reply to:  4 ; Changed 9 years ago by James Bennett

Replying to webjunkie:

Good question.. How do we handle foreign-language slugs in Django?

Look at the JavaScript file linked in the comment above yours.

comment:6 Changed 9 years ago by anonymous

The slugify filter would also need to be updated, since the JS isn't the only method for populating slugs

comment:7 in reply to:  5 ; Changed 9 years ago by Julian Bez

Replying to ubernostrum:

Replying to webjunkie:

Good question.. How do we handle foreign-language slugs in Django?

Look at the JavaScript file linked in the comment above yours.

It was more of a rhetorical question if we really handle them correct in every case. For example, German is not handled right.

comment:8 in reply to:  7 Changed 9 years ago by Dimitris Glezos

Replying to webjunkie:

It was more of a rhetorical question if we really handle them correct in every case. For example, German is not handled right.

With test cases (at least for the slugify part) to make sure conversions are OK I guess.

comment:9 Changed 9 years ago by Jacob

Summary: utf-8 characters in SlugField (prepopulate_from)Update urlify.js with missing characters
Triage Stage: Design decision neededAccepted

As Dimitris said, someone needs to update urlify.js with the appropriate characters. I'm changing the title to reflect that.

Changed 9 years ago by arien

Attachment: 5044.diff added

LATVIAN_MAP for urlify.js

comment:10 Changed 9 years ago by arien

Has patch: set
Triage Stage: AcceptedReady for checkin

The patch adds characters from the Latvian alphabet. This should be good to go.

(There is a larger issue here, though: slugifying nicely is dependent on language. For example, 'ü' in German should be converted to 'ue', but in Dutch, French or Spanish it should be converted to 'u', as it is now. See #2176 for a request to change the way characters with umlauts are handled from a German perspective.)

comment:11 Changed 9 years ago by arien

That should be #2716 for handling characters with umlauts.

comment:12 Changed 9 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [6933]) Fixed #5044 -- Added Latvian character map for Javascript slug generation. Patch from arien.

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