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

fix(android): ShareDialog.setMode('native') throws in Turkish language #240

Merged

Conversation

OrkhanAlikhanov
Copy link
Contributor

Fixes #239

Test Plan:
I don't think it needs a test case, but I can provide one if necessary

@OrkhanAlikhanov OrkhanAlikhanov changed the title fix(android): ShareDialog.setMode throws in Turkish language when mod… fix(android): ShareDialog.setMode('native') throws in Turkish language Apr 30, 2022
Co-authored-by: Mike Hardy <github@mikehardy.net>
@mikehardy
Copy link
Collaborator

Oh no hahah - there are a lot of them!

src/main/java/com/facebook/reactnative/androidsdk/FBShareDialogModule.java:        mShareDialogMode = ShareDialog.Mode.valueOf(mode.toUpperCase());
src/main/java/com/facebook/reactnative/androidsdk/FBLoginButtonManager.java:            behavior = LoginBehavior.valueOf(loginBehavior.toUpperCase());
src/main/java/com/facebook/reactnative/androidsdk/FBLoginButtonManager.java:            audience = DefaultAudience.valueOf(defaultAudience.toUpperCase());
src/main/java/com/facebook/reactnative/androidsdk/Utility.java:                    GameRequestContent.ActionType.valueOf(actionType.toUpperCase()));
src/main/java/com/facebook/reactnative/androidsdk/Utility.java:                    GameRequestContent.Filters.valueOf(filters.toUpperCase()));
src/main/java/com/facebook/reactnative/androidsdk/FBLoginManagerModule.java:        LoginBehavior loginBehavior = LoginBehavior.valueOf(loginBehaviorString.toUpperCase());
src/main/java/com/facebook/reactnative/androidsdk/FBLoginManagerModule.java:        DefaultAudience defaultAudience = DefaultAudience.valueOf(defaultAudienceString.toUpperCase());
src/main/java/com/facebook/reactnative/androidsdk/FBAppEventsLoggerModule.java:        AppEventsLogger.setFlushBehavior(AppEventsLogger.FlushBehavior.valueOf(flushBehavior.toUpperCase(Locale.ROOT)));
src/main/java/com/facebook/reactnative/androidsdk/FBAppEventsLoggerModule.java:                AppEventsLogger.ProductAvailability.valueOf(availability.toUpperCase(Locale.ROOT)),
src/main/java/com/facebook/reactnative/androidsdk/FBAppEventsLoggerModule.java:                AppEventsLogger.ProductCondition.valueOf(condition.toUpperCase(Locale.ROOT)),

This only fixes 1 of the remaining 7, do you have this checked out locally in order to change the rest or were you just using the web UI? I can change the rest if you don't actually have it checked out etc

@mikehardy
Copy link
Collaborator

some toLowerCase also

src/main/java/com/facebook/reactnative/androidsdk/FBLoginManagerModule.java:        promise.resolve(LoginManager.getInstance().getLoginBehavior().name().toLowerCase());
src/main/java/com/facebook/reactnative/androidsdk/FBLoginManagerModule.java:        promise.resolve(LoginManager.getInstance().getDefaultAudience().name().toLowerCase());

@OrkhanAlikhanov
Copy link
Contributor Author

Haha I was also going to report those. Good job!

@OrkhanAlikhanov
Copy link
Contributor Author

This only fixes 1 of the remaining 7, do you have this checked out locally in order to change the rest or were you just using the web UI? I can change the rest if you don't actually have it checked out etc

I only used web UI. Would be great if you did those.

@mikehardy
Copy link
Collaborator

Okay - I'll pull your PR locally and patch up the rest then we can fix this :-). Thanks for noticing it! The fix is easy - noticing it is clearly the hard part.

@mikehardy mikehardy added the pending-merge Just waiting on clean CI test run. Any maintainer should feel free to merge if CI is passing. label Apr 30, 2022
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

got them all now!

@mikehardy mikehardy merged commit 30d9dd3 into thebergamo:master Apr 30, 2022
@mikehardy mikehardy removed the pending-merge Just waiting on clean CI test run. Any maintainer should feel free to merge if CI is passing. label Apr 30, 2022
github-actions bot pushed a commit that referenced this pull request Apr 30, 2022
### [8.0.1](v8.0.0...v8.0.1) (2022-04-30)

### Bug Fixes

* **android:** ShareDialog.setMode('native') throws in Turkish language ([#240](#240)) ([30d9dd3](30d9dd3))
@github-actions
Copy link

🎉 This PR is included in version 8.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No enum constant com.facebook.share.widget.ShareDialog.Mode.NATİVE
2 participants