Skip to content

Allow pages to be moved to slugs with Unicode characters in them#193

Draft
aryamanarora wants to merge 3 commits intonert-nlp:masterfrom
aryamanarora:master
Draft

Allow pages to be moved to slugs with Unicode characters in them#193
aryamanarora wants to merge 3 commits intonert-nlp:masterfrom
aryamanarora:master

Conversation

@aryamanarora
Copy link
Member

@aryamanarora aryamanarora commented Jun 18, 2020

So that I can move the Hindi pages to the Devanagari slugs. This fixes the regexes that govern moving pages.

(Has been tested locally but testing it again won't hurt)

"""

default_validators = [validators.validate_slug, validate_slug_numbers]
default_validators = [validate_slug_ss, validate_slug_numbers]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why distinguish validate_slug_ss and validate_unicode_slug_adp here? If this is for article titles in general it shouldn't refer to supersenses and adpositions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the distinction is Unicode vs. non-Unicode, will validators.validate_slug will continue to work on this line?

if self.allow_unicode:
self.default_validators = [
validators.validate_unicode_slug,
validate_unicode_slug_adp,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the validators.validate_unicode_slug regex look like? I think we just need to make it a tiny bit more permissive to allow modifier characters.

@nschneid nschneid marked this pull request as draft December 18, 2021 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants