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

Language seems to default to en #129

Closed
emaxmax opened this issue Jun 27, 2019 · 2 comments
Closed

Language seems to default to en #129

emaxmax opened this issue Jun 27, 2019 · 2 comments

Comments

@emaxmax
Copy link

emaxmax commented Jun 27, 2019

Describe the bug

It seems that the language metadata is always "en", even if the text is not obviously.
I checked that with the API /api/posts/

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Create a post, not in english
  2. Check the language with the API
  3. Maybe check also the language in the ActivityPub message (don't have debug tools to do it myself)

Expected behavior

If no language is specified by the user, use the "und" value specified in ActivityStreams: https://www.w3.org/TR/activitystreams-core/#naturalLanguageValues
As a new feature: offer the UX to the user to specify the post language, on a post or blog basis.

Application configuration

  • Single mode or Multi-user mode? Multi
  • Open registration? yes
  • Federation enabled? yes

Version or last commit: 0.9.1-104-g541c3a9

@thebaer
Copy link
Member

thebaer commented Jun 27, 2019

Thanks for looking into this. But the language setting isn't derived from the text. When publishing via the web application, we detect the language from your browser settings and use that to set the language of the post: https://github.com/writeas/writefreely/blob/bb0be02b4f877b4573d91b5b55b2255dcf9dc403/templates/pad.tmpl#L150

Our other official clients do something similar, trying to determine the language from the user's system if possible, and simply passing it on to the API. Of course this isn't perfect, but it solves most cases. If the language isn't correct, a user can always change the post's language via the API, or in the web app:

  1. Publish a post
  2. Click "edit"
  3. Click the small "i" icon near the top right of the editor
  4. Select a different language

Let me know if I missed something. But I'll close this for now since it doesn't seem to be a bug.

@thebaer thebaer closed this as completed Jun 27, 2019
@emaxmax
Copy link
Author

emaxmax commented Jun 28, 2019

Thanks for the hint.
It's ok for me, but I still think that for average users, a UX during the writing would be better than one after.
But that's your design, I'm fine with the current solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants