Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add LinkedIn profile name #8498

Closed
2 tasks done
Bushido1 opened this issue Dec 16, 2022 · 8 comments
Closed
2 tasks done

Cannot add LinkedIn profile name #8498

Bushido1 opened this issue Dec 16, 2022 · 8 comments
Assignees
Labels
bug Something is broken. good first issue Opportunity for newcoming contributors. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed.
Milestone

Comments

@Bushido1
Copy link

Describe the issue

Hi!

After filling "LinkedIn profile name" at https://translations.documentfoundation.org/accounts/profile/#profile with https://www.linkedin.com/in/olav-m%C3%A4gi-80208b5, I get an error "Enter a valid “slug” consisting of letters, numbers, underscores or hyphens.".

Is it because my profile name includes "ä" i.e. "%C3%A4"?

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  1. Go to https://translations.documentfoundation.org/accounts/profile/#profile
  2. Scroll down to LinkedIn profile name
  3. Fill it with https://www.linkedin.com/in/olav-m%C3%A4gi-80208b58
  4. Click on 'Save'
  5. See error "Enter a valid “slug” consisting of letters, numbers, underscores or hyphens."

Expected behavior

No such error

Screenshots

pilt

Exception traceback

No response

How do you run Weblate?

weblate.org service

Weblate versions

No response

Weblate deploy checks

No response

Additional context

No response

@nijel
Copy link
Member

nijel commented Dec 17, 2022

Yes, the assumption was that the service allows only ASCII characters there.

@nijel nijel added bug Something is broken. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed. good first issue Opportunity for newcoming contributors. labels Dec 17, 2022
@github-actions
Copy link

This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.

You can learn about how to get started in our contributors documentation.

@Kaushik-Iyer
Copy link
Contributor

Can someone explain what is to be changed where? I want to try to work on this

@nijel
Copy link
Member

nijel commented Jan 4, 2023

The type of the field probably needs to be changed to something more generic, but some validation will be still needed there:

linkedin = models.SlugField(
verbose_name=_("LinkedIn profile name"),
help_text=_("Your LinkedIn profile name from linkedin.com/in/profilename"),
blank=True,
db_index=False,
)

@Kaushik-Iyer
Copy link
Contributor

Kaushik-Iyer commented Jan 4, 2023

SlugField.allow_unicode

If True, the field accepts Unicode letters in addition to ASCII letters. Defaults to False.

Apologies for the bad copy pasting, but this was in the django docs, so do I just need to make this value to true, instead of changing the type of field?

Found from (https://docs.djangoproject.com/en/2.0/ref/models/fields/#django.db.models.TextField)

@nijel
Copy link
Member

nijel commented Jan 6, 2023

Yes, that could do the trick as well.

@nijel
Copy link
Member

nijel commented Jan 18, 2023

Fixed by #8619, thanks!

@nijel nijel closed this as completed Jan 18, 2023
@github-actions
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken. good first issue Opportunity for newcoming contributors. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed.
Projects
None yet
Development

No branches or pull requests

3 participants