Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

added localization for strings + sample code for demonstration #1

Merged
merged 3 commits into from
Jul 23, 2019

Conversation

Atternatt
Copy link
Contributor

I've added generic localization in core and n android implementations (with sample code).

@Atternatt Atternatt added the enhancement New feature or request label Jul 23, 2019
@Atternatt Atternatt self-assigned this Jul 23, 2019
@franmontiel
Copy link
Contributor

franmontiel commented Jul 23, 2019

I propose to make the methods return String instead of String? In my opinion if the string is not found is an error and also is much better to handle a non-nullable value.

We can change it to throw an exception, maybe IllegalArgumentException("key do not belong to any string"), if the String is not found.

We already know that in Android we will always find it unless we pass a random integer and this deffinitely should throw and Exception.

@Atternatt
Copy link
Contributor Author

indeed, I'm agree @franmontiel I've just redone it propagating the same exception that the sdk is throwing when it doesn't find a string throw Resources.NotFoundException()

@Atternatt Atternatt merged commit 880f1ef into master Jul 23, 2019
@Atternatt Atternatt deleted the feature/add_localization branch July 23, 2019 10:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants