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

Add a fallback for humanizer localization lookup failures #5530

Merged
merged 4 commits into from
Aug 28, 2019

Conversation

nyquillerium
Copy link
Contributor

@nyquillerium nyquillerium commented Jul 30, 2019

Fixes #5279

At the moment, there seems to be some internal failure on Xamarin/Mono/Humanizer's part to do two things:

In either case, it might be good to have a local fallback, so this PR introduces a helper function that catches exceptions thrown by humanizer that are a result of a failure to find a localization.

This was tested on an Android device and seems to be working fine.

@nyquillerium nyquillerium changed the title Add a fallback for humanizer localization failure Add a fallback for humanizer localization lookup failures Jul 30, 2019
@smoogipoo
Copy link
Contributor

There has to be a better way of doing this, because what you've done here is not going to handle all humanizer cases... E.g. you've missed .Pluralize.

@smoogipoo
Copy link
Contributor

Also please give links tracking the aforementioned issues, xamarin and/or humanizer.

@nyquillerium
Copy link
Contributor Author

nyquillerium commented Jul 30, 2019

We can also potentially initialize a list of loaded localizations for humanizer at startup and checking against those instead, which would allow us to implement our own TryGetCulture method or similar.

@smoogipoo
Copy link
Contributor

Have you tried including the package reference in the android project? Humanizr/Humanizer#380 (comment)

@nyquillerium
Copy link
Contributor Author

yes, thats the first thing I tried actually.

@peppy
Copy link
Member

peppy commented Aug 22, 2019

This needs some kind of resolution.

@peppy
Copy link
Member

peppy commented Aug 28, 2019

Going with this for now as a "don't have a better idea" temporary fix.

@peppy peppy merged commit 3c03d36 into ppy:master Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opening multiplayer lounge causes crash
3 participants