[feat] more permissive post language selection #462
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#462
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The idea
Thank you for all your time and hard work to bring about the update! I'm happy to see the nice little post language selector on my instance.
I know that the current state is just the first step of the whole picture, and I don't know about the future roadmap, but anyway here are my couple of suggestions to make it better.
en-GB
(British English) anden-US
(American English) may not be terribly different, butes-ES
(Spanish Spanish),es-MX
(Mexican Spanish), ores-AR
(Argentine Spanish) are so diverged that a very common word in any of them could be an obscene word in others.zxx
) or undetermined (und
).The reasoning
No response
Have you searched for this feature request?
whilst an empty value might be desired, valid input will not be expanded beyond ISO639
this is due to the API being compatible with the mastodon equivalent
see https://docs.joinmastodon.org/methods/statuses/#create for more information
as such, the activitypub spec does not factor into this
So, am I correct that ActivityPub does not cover how server communicates with client, and for that part Akkoma follows Mastodon API? Then I'd like to look into why they chose ISO 639 as value range (I don't think it a very mainstream choice).
By the way, since ISO 639 itself already contains thousands of codes and being updated irregularly, I still think free input is a better solution lest you need to add options every time people want any, but I'm not sure.
yes, activitypub only dictates server-to-server communication in practice
client-to-server de-facto uses mastodon API
given that we want to maintain compatibiltiy with the masto API, posting languages will remain ISO639
So, as I checked Mastodon's code base, they are actually made to handle BCP 47 strings. They just discard non-language parts for their internal use, and not likely to break their and those derivative software.
Also, you can see the Mastodon API document contradicts with its implementation. The
Status
object returned byPOST /api/v1/statuses
API which you mentioned before, is supposed to havelanguage
attribute which is "String (ISO 639 Part 1 two-letter language code)", but they do return some ISO 639-3 codes which you see in the previous source file.Moreover, this issue suggests that Friendica sends out language in BCP 47 format, and Mastodon API just passes through it. You can try:
So, their restriction to ISO 639 in their API has no technical ground. Instead, it seems to owe to Eugen's pretty opinionated view on how language code works ("opinionated" is a euphemism). After all it looks like a Mastodon-specific design decision on this matter.
In this case, is it possible for us to just extend the spec on our side? If it has to stick strictly to Mastodon API, I am thinking of raising PR to modify their documentation.
ping @floatingghost