Open seanlip opened 1 year ago
https://github.com/oppia/oppia-android/assets/99060332/f930ef9c-95d9-4142-9680-44486ecdf254
I would like to work on this issue. May I get assigned to it?
I would like to work on this issue. May I get assigned to it?
What's your proposal for fixing this?
https://github.com/oppia/oppia-android/assets/99060332/3fe3f8dc-9417-4edf-956b-9db8c802bd35
I would like to work on this issue. May I get assigned to it?
What's your proposal for fixing this?
These changes are made in the PoliciesFragmentPresenter.kt class and work perfectly but this is not the correct approach I think. DisplayLocaleImpl.kt class was final in nature but I had to make the DisplayLocaleImpl class open in nature to change the PoliciesFragmentPresenter class.
ltr.mp4
I would like to work on this issue. May I get assigned to it?
What's your proposal for fixing this?
These changes are made in the PoliciesFragmentPresenter.kt class and work perfectly but this is not the correct approach I think. DisplayLocaleImpl.kt class was final in nature but I had to make the DisplayLocaleImpl class open in nature to change the PoliciesFragmentPresenter class.
I get the sense that you are trying to force the layout direction to be LTR. You don't need to modify DisplayLocaleImpl or override it's methods to retrieve Layout Direction. AppLanguageResourceHandler has a public api for that, getLayoutDirection()
. See StateAssemblerMarginBindingAdapters or SurveyOnboardingBackgroundView for usage examples.
Under the ListItemLeadingMarginSpan class we have the ulSpan class and the olSpan class which takes displayLocal as an input and then retrieves the direction of the layout using the getLayoutDirection() method to get the bullet drawing position. That's why I created an object of the DisplayLocaleImp class and overridden the getLayoutDirection() method to pretend it's LTR. OR We can make another class just for PoliciesTextview which implements Oppia.DisplayLocale class. Everything remains the same as in the DisplayLocaleImp class, we only need to change the getLayoutDirection() method to assert the LTR over the RTL.
@adhiamboperes any suggestion?
Under the ListItemLeadingMarginSpan class we have the ulSpan class and the olSpan class which takes displayLocal as an input and then retrieves the direction of the layout using the getLayoutDirection() method to get the bullet drawing position. That's why I created an object of the DisplayLocaleImp class and overridden the getLayoutDirection() method to pretend it's LTR. OR We can make another class just for PoliciesTextview which implements Oppia.DisplayLocale class. Everything remains the same as in the DisplayLocaleImp class, we only need to change the getLayoutDirection() method to assert the LTR over the RTL.
@adhiamboperes any suggestion?
The layout direction retrieved will be the same regardless of the function you call to retrieve it, which is why you should use the public function from AppLanguageResourceHandler and don't reimplement DisplayLocale.
is this issue fixed? @ShubhadeepKarmakar @BenHenning
@neeldoshii, feel free to suggest a fix for this. Please also refer to https://github.com/oppia/oppia-android/pull/5181#issuecomment-1776935108 for a potential solution.
Sure @adhiamboperes, I will release a fix in my PR based on the comment. Also, is there any communication channel which is used to communicate with other contributors?
Sure @adhiamboperes, I will release a fix in my PR based on the comment. Also, is there any communication channel which is used to communicate with other contributors?
At the moment, Our discussions page is the best place to communicate.
@Vishwajith-Shettigar I am still working on this. If you don't mind can I work on it?
Hi @adhiamboperes, currently on the debug release we are not able to change the app language?
Is it some kind of issue?
Hi @neeldoshii if you are working on any issue you should be assigned first, please take care of it, I'm closing my PR and assigning you.
Hi @adhiamboperes, currently on the debug release we are not able to change the app language?
Is it some kind of issue?
You are using gradle to build i guess, if you want change app language you have to build app on bazel and for this issue you can change your system language to arabic or something like that.
Hi @adhiamboperes, currently on the debug release we are not able to change the app language? Is it some kind of issue?
You are using gradle to build i guess, if you want change app language you have to build app on bazel and for this issue you can change your system language to arabic or something like that.
@neeldoshii, as @Vishwajith-Shettigar said, you can instead change your system language to RTL like Arabic which will also change the app language, if you're unable to build bazel.
I have worked and able to make the text to have in LTR.
I get the sense that you are trying to force the layout direction to be LTR. You don't need to modify DisplayLocaleImpl or override it's methods to retrieve Layout Direction. AppLanguageResourceHandler has a public api for that, getLayoutDirection(). See StateAssemblerMarginBindingAdapters or SurveyOnboardingBackgroundView for usage examples.
I have followed the instructions based on the mentioned.
I am little confused. If you look closely html <li>
tags are having issues. The bullet point are always forcefully there in RTL.
If I perform any change in LiTagHandler class and make them forcefully be in left side then it will get broked on some other screen if we use li tags.
Any idea how to solve this?
@adhiamboperes @Vishwajith-Shettigar Thank You
@neeldoshii I doubt that texts are still in proper LTR mode according to the screenshot ( look at last sentence of all paragraphs). Better you create a draft PR.
For li
tag, you can overload the method related to li
tag for privacy page or your can create a new object of displaylocaleimp and override getLayoutDirection to return LTR.
Refer both closed PR.
Describe the bug
In RTL languages, we are currently keeping our Terms of Service and Privacy policy content in English (so that we can have a canonical version). However, the English text should be left-aligned.
(Thanks to @KolliAnitha for the repro and images, which I took from https://github.com/oppia/oppia-android/issues/5028.)
To Reproduce Steps to reproduce the behavior:
Expected behavior The English content should be left-aligned (but not the note at the bottom of the page linking to the up-to-date policy).
Demonstration
Environment Device/emulator being used: Infinix SMART 5 Android or SDK version (e.g. Android 5 or SDK 21): Android 11 App version (you can get this through system app settings or via the admin controls menu in-app): 0.11-beta-8c81c98d8b