Skip to content

Changed `isLocalized` logic

Glenn C. requested to merge Glennmen/fdroidclient:fix/isLocalized into master

isLocalized will be true when App will contain 1 or more valid locales for this device

Current logic: isLocalized will return true even when the app doesn't contain a valid translation for the device. Example:

  • app meta data contains fr and es translations -> isLocalized=true if the device is set to nl
  • app meta data contains nl translations -> isLocalized=false if the device is set to nl
  • app meta data contains en translations -> isLocalized=false if the device is set to nl

New logic: isLocalized will only return true when the app contains a valid translation for the device or if it contains the fallback English translation. Example:

  • app meta data contains fr and es translations -> isLocalized=false if device is set to nl
  • app meta data contains fr and nl translations -> isLocalized=true if device is set to nl
  • app meta data contains en translation -> isLocalized=true if device is set to nl

I hope the examples explain the current and new logic.

Fixes #1992 (closed)

Edited by Hans-Christoph Steiner

Merge request reports