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

Feature app-defined language implementation #1334

Merged
merged 17 commits into from
May 25, 2021
Merged

Commits on May 25, 2021

  1. Added classes and interfaces for Language feat

    * Added Language Context Interface for getter and setter for Language Provider
    * Added classes Language Provider, LanguageProviderAppDefined and LanguageProviderDevice
    * The interface retrieves the default language set by device if a language override is not set
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    3606b78 View commit details
    Browse the repository at this point in the history
  2. Updated LanguageContext class

    * Fixed the null check in the LanguageContext class
    * Added getLanguage method to retrieve the language from strategy
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    91adc50 View commit details
    Browse the repository at this point in the history
  3. Added network call to setLanguage method of OneSignal class

    * added network call to setLanguage method in OneSignal class
    * Updated device info to retrieve language from LanguageContext class
    * Added SET_LANGUAGE to OSTaskController String Array to execute task delays
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    1499bac View commit details
    Browse the repository at this point in the history
  4. Added Unit test scripts for setLanguage method

    * Added a Unit test to test setLanguage method executing during the initialization of OneSignal library
    * Added a Unit test to test setLanguage method executing after the OneSignal library has been initialized
    * Added a Unit test to test setLanguage method executing after a an app has been restarted and new session has been initialized
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    9984b38 View commit details
    Browse the repository at this point in the history
  5. Moved getCorrectedLanguage from OSUtils to LanguageProviderDevice

    * Moved the implementation of OSUtils.getCorrectedLanguage to LanguageProviderDevice.getLanguage
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    cf72b34 View commit details
    Browse the repository at this point in the history
  6. Moved access of Language classes for OneSignalPrefs

    * Made OneSignal.preferences public for accessibility in Language classes
    * Moved callbacks for OneSignalPrefs from LanguageContext and LanguageProviderAppDefined classes to OneSignal.preferences
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    03c2cd7 View commit details
    Browse the repository at this point in the history
  7. Fix getLanguage OSInAppMessageController and NotificationChannelManager

    * Fix OSInAppMessageController variantIdForMessage retrieves languageIndentifier from OneSignal languageContext
    * Fix NotificationChannelManager CreateChannel retrieves deviceLanguage from OneSignal languageContext
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    211e795 View commit details
    Browse the repository at this point in the history
  8. Add Singleton LanguageContext and Dependency Injection to constructor

    * Add Singleton pattern to LanguageContext class
    * Add OSSharedPreference dependency to LanguageProviderAppDefined constructor
    * Add OSSharedPreference dependency to LanguageContext constructor
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    fa4a479 View commit details
    Browse the repository at this point in the history
  9. Add LanguageContext Dependency to OSInAppMessageController

    * Add LanguageContext dependency to OSInAppMessageController constructor
    * Add LanguageContext dependency to OSInAppMessageControllerFactory constructor
    * Add LanguageContext dependency to OSInAppMessageDummyController
    * Rename languageIdentifier to language in OSInAppMessageController variantIdentifier
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    34507f0 View commit details
    Browse the repository at this point in the history
  10. Update NotificationChannelManager with LanguageContext instance

    * Update NotificationChannelManager createChannel to use LanguageContext instance
    * Rename deviceLanguage variable to language for consistency
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    70e6cf7 View commit details
    Browse the repository at this point in the history
  11. Convert OneSignal preferences and languageContext to private

    * Convert OneSignal preferences and OneSignal languageContext from public to private since they are being called through dependency injection
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    9e391e9 View commit details
    Browse the repository at this point in the history
  12. Fix format Language classes

    * Fix format space LanguageContext class
    * Fix format space LanguageProviderAppDefined class
    * Fix format space LanguageProviderDevice class
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    9c5095f View commit details
    Browse the repository at this point in the history
  13. Remove null check and JSONException operation at OneSignal.setLanguage

    * Remove unnecessary null check at OneSignal.setLanguage
    * Remove error logging at JSONException catch at OneSignal.setLanguage
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    b88c48d View commit details
    Browse the repository at this point in the history
  14. Test Fix NotificationChannelManagerRunner.processChannelListWithMulti…

    …Language
    
    * Add OneSignal.initWithContext to NotificationChannelManagerRunner.processChannelListWithMultiLanguage to allow languageContext to initialize before using languageContext.getLanguage
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    9420512 View commit details
    Browse the repository at this point in the history
  15. Add NonNull annotation to getLanguage implementations

    * Add NonNull annotation to getLanguage implementations in LanguageProviderDevice, LanguageProviderAppDefined and LanguageContext classes
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    67b5a73 View commit details
    Browse the repository at this point in the history
  16. Move strings to constants

    * Move "en" string to constant in LanguageProviderAppDefined class
    * Move Corrected Language Strings to constant in LanguageProviderDevice class
    * Add OSTaskRemoteController.SET_LANGUAGE in place of setLanguage() string in OneSignal.setLanguage
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    4144afb View commit details
    Browse the repository at this point in the history
  17. Move preferences.getString to variable for clarity

    * Move preferences.getString to variable instead of if statement for clarity in LanguageContext constructor
    tanaynigam committed May 25, 2021
    Configuration menu
    Copy the full SHA
    5b4d1a8 View commit details
    Browse the repository at this point in the history