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

Apply languageIdentifier attribute to user-generated content where possible #881

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

j-f1
Copy link
Contributor

@j-f1 j-f1 commented Jan 12, 2023

[builds on #880, feel free to merge just this one to get the changes from both]

This allows VoiceOver to dynamically switch voices based on the language a post was written in, without affecting the pronunciation of UI elements. For example, if reading a German post while the device is set to English, the English voice would read the username, date, “# media,” and “Actions available”, while the German voice would read the actual post content. This also applies to alt text (which inherits the language of the post).

It would be nice to also read people’s names and bios in the appropriate language, but that’s blocked on mastodon/mastodon#23067 which I’ve just opened.

@j-f1
Copy link
Contributor Author

j-f1 commented Jan 12, 2023

This needs work — when the post is translated it should switch to the current UI language.

@j-f1 j-f1 marked this pull request as draft January 12, 2023 21:51
@j-f1 j-f1 marked this pull request as ready for review January 13, 2023 03:10
@j-f1 j-f1 force-pushed the a11y-attributes branch from 4ffd1b9 to d5df18d Compare March 13, 2023 12:54
@j-f1 j-f1 force-pushed the a11y-attributes branch from 55b3613 to 14fd773 Compare March 28, 2023 23:46
@j-f1 j-f1 force-pushed the a11y-attributes branch from 14fd773 to 75274dd Compare May 19, 2023 15:57
@@ -31,6 +31,9 @@ public final class StatusEdit: NSManagedObject {
// sourcery: autoUpdatableObject, autoGenerateProperty
@NSManaged public var spoilerText: String?

// sourcery: autoUpdatableObject, autoGenerateProperty
@NSManaged public var status: Status?
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ Does the CoreData model already reflect this relationship? I haven't seen any changes to our Model in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes:

<relationship name="status" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Status" inverseName="editHistory" inverseEntity="Status"/>

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.

2 participants