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

Additional languages / new hook for additional language detection #13483

Merged
merged 2 commits into from Oct 1, 2023

Conversation

annando
Copy link
Collaborator

@annando annando commented Sep 30, 2023

This PR introduces a new hook to be able to use additional language detectors.

Also I went through the last million of posts and had a look at the used languages and added some more that are used.

doc/Addons.md Outdated
@@ -221,6 +221,13 @@ Please note: body contents are bbcode - not HTML
Called when receiving a post from another source. This may also be used to post local activity or system generated messages.
`$b` is the item array of information to be stored in the database and the item body is bbcode.

### get_language
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please rename the hook to detect_languages.

doc/Addons.md Outdated
`$data` is an array:

- **text**: The text that is analyzed.
- **detected**: The array with the original language detection. Can be overwritten via an addon.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- **detected**: The array with the original language detection. Can be overwritten via an addon.
- **detected**: (input/output) Array of language codes detected in the related text.

@MrPetovan MrPetovan merged commit 6503016 into friendica:develop Oct 1, 2023
@MrPetovan MrPetovan added this to the 2023.09 milestone Oct 1, 2023
@annando annando deleted the languages branch October 1, 2023 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants