Releases: phrase/phrase-android
3.13.0
New
Pre-fetch translations for a locale
Call Phrase.prefetchLocale(localeCode) to download and cache a locale's translations ahead of time without switching the user's active locale. Useful for preparing offline use or speeding up locale switches.
Improvements
Smaller dependency footprint
The Material library is no longer pulled in transitively by the SDK. If your app uses Material it continues to work; if it doesn't, you save the dependency.
No more StrictMode violations on startup
Phrase.setup() no longer triggers main-thread disk reads, so apps running with StrictMode enabled won't see violations from the SDK during initialization.
Network layer now uses OkHttp
Translation downloads run on OkHttp instead of HttpURLConnection, so SDK traffic now shows up in OkHttp interceptors, network profilers, and per-app traffic stats.
3.12.0
3.11.0
Added
- Add optional formatArgs parameter to
Translations.getString()andTranslations.getQuantityString()for automatic translation placeholder replacement. - Add
getPhraseString(),getPhraseText(),getPhraseStringArray(),getPhraseTextArray(),getPhraseQuantityString()andgetPhraseQuantityText()extension functions to Context and Resources - Add optional
wrapContextparameter toPhrase.getDelegate()to disable Activity Context wrapping.
Compose
- Deprecate
Phrase {}wrapper composable. Context Wrapping is not necessary any more to use Phrase translations in Compose. - Add
phraseText(),phraseStringArray(),phraseTextArray(),phraseQuantityString()andphraseQuantityText()composables to complete the Phrase Translation support in Compose.
3.10.5
Improvements
- Improve parsing performance of translations with HTML
- New method to set datacenter
Phrase.setDatacenter(PhraseDataCenter.EU)(set by default)- Or
Phrase.setDatacenter(PhraseDataCenter.US)
- Reduce references to context that could cause activity leaks
- Switch to API host eu.ota.phrase.com for EU datacenter
Deprecations
Phrase.setHost()being deprecated and replaced withPhrase.setDatacenter()
3.10.4
Improvements
- Fixed an issue where newline characters
\nwere incorrectly converted to<br>tags when retrieving translations usingPhrase.getTranslations().getString()
Deprecations
Phrase.setLocaleCodeis being deprecated. Instead the per-app language feature should be used
3.10.3
3.10.3-beta
- Improve performance when accessing translatons
3.10.2
Bugfixes:
- Reverts changes introduced in release 3.10.1 which can potentially lead to app crashing.
3.10.1
Release 3.10.1
Bugfixes:
- Fixes issue regarding crashing of Webview (for Xiaomi devices)
3.10.0
Release 3.10.0
New
- Large speed-up for loading translation on application start. Existing cached releases will be migrated during first launch which should not be noticeable to any user
- New minimum supported Android version. The minimum supported Android SDK is bumped from 15 to 21
Bugfixes:
- Fixes issue regarding missing HTML markup attributes
- Fixes issue regarding changing of theme when custom locale is set
- Fixes issue regarding crashing of Webview