Code

Opened 7 years ago

Closed 6 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 6 years ago.
LATVIAN_MAP for urlify.js

Download all attachments as: .zip

Change History (13)

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

  • Component changed from Uncategorized to Admin interface
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from jacob to adrian
  • Patch needs improvement unset

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

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

comment:3 Changed 7 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 follow-up: Changed 7 years ago by webjunkie

  • Keywords sprintsept14 added
  • Triage Stage changed from Unreviewed to Design decision needed

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

comment:5 in reply to: ↑ 4 ; follow-up: Changed 7 years ago by 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.

comment:6 Changed 7 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 ; follow-up: Changed 7 years ago by webjunkie

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 7 years ago by 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 6 years ago by jacob

  • Summary changed from utf-8 characters in SlugField (prepopulate_from) to Update urlify.js with missing characters
  • Triage Stage changed from Design decision needed to Accepted

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

Changed 6 years ago by arien

LATVIAN_MAP for urlify.js

comment:10 Changed 6 years ago by arien

  • Has patch set
  • Triage Stage changed from Accepted to Ready 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 6 years ago by arien

That should be #2716 for handling characters with umlauts.

comment:12 Changed 6 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.