-
-
Notifications
You must be signed in to change notification settings - Fork 4
Only show relevant fields as audio dialog context #1986
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
base: develop
Are you sure you want to change the base?
Conversation
…prop on primitive editors.
…ense` or `Example` and choses the related editor
…itors can get the current object being edited
…to be used inline and not via dialogs-service.ts
…n the audio dialog
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
[InlineData("en-Zxxx-x-audio", "en")] | ||
[InlineData("seh-Zxxx-x-audio-var", "seh-x-var")] | ||
[InlineData("lwl-Zxxx-x-majority-audio", "lwl-x-majority")] | ||
[InlineData("lwl-Latn-x-majority", "lwl-x-majority")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script is only relevant to text WS's. So, if there are multiple WSs where only the script differs we show all of them.
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
73db81f
to
8610d28
Compare
IsAudio = script?.Equals(WellKnownSubtags.AudioScript, StringComparison.OrdinalIgnoreCase) == true && | ||
variants?.Split('-').Any(v => v == WellKnownSubtags.AudioPrivateUse) == true; | ||
|
||
if ((script is not null || IsAudio) && IetfLanguageTag.TryGetSubtags(code, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TryGetSubtags appears to be expensive in some cases perhaps that's, because in some cases it requires the SLDR to be initialized. I'm not sure when that's the case, but it's not the case for any of the test cases I wrote. So, perhaps it's never the case for codes that have a script 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one concerns I have with this approach is that it assumes there will be a matching non audio writing system, and that the field will have data.
Before:

After: (It would be easy to also show the current audio field if that seemed advantageous.)
