-
Notifications
You must be signed in to change notification settings - Fork 80
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
Implement PlatformLocale and StringDelegate for k/wasm (#561) #625
Conversation
* Workaround `isOnUiThread` (ui-test) for k/wasm browser target * Implement PlatformLocale and StringDelegate for k/wasm * Get rid of expect/actuals for jsWasmMain and use js(...) for a common implementation * use the list of preferred languages - `window.navigator.languages` * delete unused fun `currentLanguageTag`
} | ||
} | ||
|
||
internal actual fun PlatformLocale.isRtl(): Boolean = false // TODO | ||
|
||
private val rtlLanguagesSet = setOf("ar", "fa", "he", "iw", "ji", "ur", "yi") |
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.
What is the source of this? Can we add a link in a comment?
This list has more RTL languages
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.
As far as I remember it's from sources of function that we call on java target
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.
That's right. I added a comment.
It was taken from here https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/java/awt/ComponentOrientation.java#L156 to follow the desktop impl.
compose/ui/ui-text/src/jsWasmMain/kotlin/androidx/compose/ui/text/intl/JsPlatformLocale.js.kt
Outdated
Show resolved
Hide resolved
JetBrains#625) * Implement PlatformLocale and StringDelegate for k/wasm (JetBrains#561) * Workaround `isOnUiThread` (ui-test) for k/wasm browser target * Implement PlatformLocale and StringDelegate for k/wasm * Get rid of expect/actuals for jsWasmMain and use js(...) for a common implementation * use the list of preferred languages - `window.navigator.languages` * delete unused fun `currentLanguageTag` * Add a comment
* Implement PlatformLocale and StringDelegate for k/wasm (#561) * Workaround `isOnUiThread` (ui-test) for k/wasm browser target * Implement PlatformLocale and StringDelegate for k/wasm * Get rid of expect/actuals for jsWasmMain and use js(...) for a common implementation * use the list of preferred languages - `window.navigator.languages` * delete unused fun `currentLanguageTag` * Add a comment
Please see [b/204328129](https://issuetracker.google.com/issues/204328129) for more details on the issue. Basically this is something necessary to help prevent weird compilation errors that happen with the Buck/Redex build toolchains that Meta uses. Not something meaningful, but since the change is dead simple I guess it shall pass. Test: This has been something that was patched on Meta source and we've been testing it for multiple prod releases of Threads, we're only now porting the change to Google because it seems appropriate. Fixes: b/204328129 This is an imported pull request from androidx#625. Resolves #625 Github-Pr-Head-Sha: 0568741 GitOrigin-RevId: 023a53d Change-Id: I5b3fe39e54ffd4f97234c0ff23e54f9b790b2f0f
Please see [b/204328129](https://issuetracker.google.com/issues/204328129) for more details on the issue. Basically this is something necessary to help prevent weird compilation errors that happen with the Buck/Redex build toolchains that Meta uses. Not something meaningful, but since the change is dead simple I guess it shall pass. Test: This has been something that was patched on Meta source and we've been testing it for multiple prod releases of Threads, we're only now porting the change to Google because it seems appropriate. Fixes: b/204328129 This is an imported pull request from androidx#625. Resolves #625 Github-Pr-Head-Sha: 0568741 GitOrigin-RevId: 023a53d (cherry picked from https://android-review.googlesource.com/q/commit:ca6fa30821e365ed3976bbcd0202c38b9da2c842) Merged-In: I5b3fe39e54ffd4f97234c0ff23e54f9b790b2f0f Change-Id: I5b3fe39e54ffd4f97234c0ff23e54f9b790b2f0f
This PR "upstreams" #561 from wasm-main to jb-main