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
Loading
Please register or sign in to comment