Removing the concept of "slugs" for some languages


(Sam Saffron) #1

Discourse is trying to shoehorn the concept of “pretty slugs” to non ascii char set based languages. It may be acceptable to do this transliteration in Norwegen or Turkish, but stuff gets really weird when you do it in Korean or Chinese or Arabic.

When you look at alexa top 100 for say Egypt or China or any non-latin alphabet you never see this concept of a “slug” which is attempting to convert your alphabet to English. It is offensive and comical.

Our default behavior, which is to “only keep English” is even more offensive. Even in India there is no such practice. (though there is this very creative practice in some places http://videos.jagran.com/news-pm-modi-defends-land-bill-says-it-is-aimed-at-welfare-of-farmers-in-mann-ki-baat-v8323.html )

I am willing to bet big bucks that this issue would never have been raised repeatadly if the URL was site.com/t/42, most non-ascii languages are used to this anyway 99% of the time.

Personally I think going forward we should allow site operators 3 options

  1. English slugs (default for latin based languages)
  2. Percent encoded slugs (for full unicode support)
  3. No slugs (default for non latin based languages)

I also think we should junk StringEx, I think it just does not fit in correctly with the philosophy of slugs and simply looks buggy, if people want to turn their language into an English farce, so be it, but do that in a plugin.

See also:

cc @fantasticfears @winterbox @amitfrid @eyalev


Slugs error for persian language
UTF-8 slugs for categories
Small changes on the "Not Found" page
How can I change slugs for Arabic?
(Erick Guan) #4

All sounds reasonable to me.

There is only a exception that category slug can be customized by admin anyway.

Beyond that, some serializer generates slug, user_action, notification. This is weird.


#5

when this feature will be available for use?


(Sam Saffron) #6

When implemented :slight_smile: I think we are fine on the above specification, if you feel like submitting a PR for it I can merge it in.


#7

I cant submit PR I think @zogstrip can be fix it
We need Persian Slugs
Please tell us a solution


(Mittineague) #8

He did

What problems are you having with GitHub?


#9

[quote=“Mittineague, post:8, topic:26643”]
What problems are you having with GitHub?
[/quote] how i can ? send pull request for slogs ?


(Mittineague) #10

Hopefully these will help

https://help.github.com/articles/creating-a-pull-request/

https://help.github.com/articles/using-pull-requests/


(cpradio) #11

Probably not, as I’d venture to guess he has zero to little programming knowledge. Discourse is getting a lot more CM (Community Manager) attraction now and a lot of those who are engaging here on Meta are no longer devs/programmers, but the CMs. To ask a CM to submit a PR is just unrealistic.

Just for clarification, there is a big difference between changing CSS/SCSS and actual programming changes. I have no idea what @Qasem_h’s experience is, but I definitely see more CMs participating in Meta than what were here several months ago.


#12

i don’t mean i cant send pull request i mean how i can send pull request for slugs


(Jeff Atwood) #13

I think we should add this for 1.4.


(Erick Guan) #14

I am working on it. Maybe I can submit the pr in next 24h.

It depends on your judgement about the release date. So it’s your call to consider whether merge it or not. I hope it can catch up 1.3 personally.

EDIT:

Here it is.
https://github.com/discourse/discourse/pull/3370


German umlauts are NOT handled correct for Badges
#15

@fantasticfears can you give some screen shot of your work ?


(Erick Guan) #16

Sure.

Settings:

For topics:

english

encoded

default

For categories:

encoded

default


Importing from vBulletin 4
How to add a new language
Importing mailing lists (mbox, Listserv, emails, ...)
Importing from phpBB3
(Kane York) #17

I don’t think that the “default” option is very useful - call it “none” instead.


(Gerhard Schlager) #18

Would it be possible to rename the English method to Latin, ASCII or something like that? English is somehow misleading…


(Jeff Atwood) #19

@fantasticfears this looks great but I agree with @gerhard, name it “ASCII” instead.


(Erick Guan) #20

Updated, just renamed english to ascii. Thanks @gerhard!


(Sam Saffron) #21

I think we are done with this, closing, thanks @fantasticfears


(Sam Saffron) #22