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

Allow full BCP 47 in language inputs #2067

Merged
merged 4 commits into from
Aug 7, 2023

Conversation

VyrCossont
Copy link
Contributor

Description

Closes #2066

Checklist

Please put an x inside each checkbox to indicate that you've read and followed it: [ ] -> [x]

If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).

  • I/we have read the GoToSocial contribution guidelines.
  • I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
  • I/we have performed a self-review of added code.
  • I/we have written code that is legible and maintainable by others.
  • I/we have commented the added code, particularly in hard-to-understand areas.
  • I/we have made any necessary changes to documentation.
  • I/we have added tests that cover new code.
  • I/we have run tests and they pass locally with the changes.
  • I/we have run go fmt ./... and golangci-lint run.

@@ -55,7 +56,6 @@ func (p *Processor) Create(ctx context.Context, account *gtsmodel.Account, appli
ContentWarning: text.SanitizePlaintext(form.SpoilerText),
ActivityStreamsType: ap.ObjectNote,
Sensitive: &sensitive,
Language: form.Language,
Copy link
Member

Choose a reason for hiding this comment

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

Since this tripped me up during review because of the diff viewer in GitHub. We don't want to immediately assign Language here, as we go through processLanguage a bit further down and then assign.

internal/validate/normalize/language_test.go Outdated Show resolved Hide resolved
@VyrCossont
Copy link
Contributor Author

VyrCossont commented Aug 6, 2023

Okay, I think this is good to merge (or at least to review again). Thanks for your reviews and advice!

@tsmethurst tsmethurst merged commit 0f81274 into superseriousbusiness:main Aug 7, 2023
2 checks passed
@tsmethurst
Copy link
Contributor

Thank you! :)

@VyrCossont VyrCossont deleted the bcp-47-posts branch February 14, 2024 19: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.

[feature] Support any valid BCP 47 tag as a posting language
3 participants