Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0761a4bf authored by Roozbeh Pournader's avatar Roozbeh Pournader
Browse files

Make strings for data usage easier to localize

The strings were complex to localize, especially since they used
formatting that needed to be carefully reconstructed for cases where
the amount of data appears in the middle of a string. Also, we
already had a localization for file sizes, which we should avoid
redoing, to minimize discrepancies.

Finally, we are now bidi wrapping the usage amount, as it may break
in the RTL locales otherwise, since the RTL locales may be using
Latin abbreviations for gigabyte etc that are LTR.

Since formatting needs to be applied to everything except the number
of units in the amount of data used, and markup should be avoided
since it will confuse bidi wrapping, the code carefully constructs
CharSequence templates that are then decorated with spans after
getting filled in.

Bug: 28747101
Change-Id: I18756b4de99eb551a51fe5e74d1c9cf505551f08
parent 1bd411f6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment