Skip to content

Strings not translated to the preferred language #77

@katerinanikolovska-QM

Description

@katerinanikolovska-QM

SDK version: 3.10.2
Tested SDK versions: 3.10.2, 3.10.1 and 3.9.0

Some of the strings are not getting translated when switching System language, even though translations are provided.
One thing we noticed is that if we change language, clean app cache and storage, and open the app: the translations are correct.
Second time we open the app, some translations are incorrect.

    private fun configurePhraseOTA() {
        Phrase.setup(
            context = this,
            distribution = DISTRIBUTION_ID,
            environment = ENVIRONMENT_TOKEN
        )

        Phrase.setAppVersion(VersionInformation.versionNameWithDate)
        Phrase.updateTranslations(
            object : TranslationsSyncCallback {
                override fun onSuccess(translationsChanged: Boolean) {
                    L.i { "Update translations successfully. Translations changed: $translationsChanged" }
                }

                override fun onFailure() {
                    L.i { "Update translations did fail. Error is unknown." }
                }
            }
        )
    }

      override fun attachBaseContext(base: Context) =
        super.attachBaseContext(Phrase.wrapContext(base))
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions