portage.localization module¶
- portage.localization._(mystr)¶
Always returns unicode, regardless of the input type. This is helpful for avoiding UnicodeDecodeError from __str__() with Python 2, by ensuring that string format operations invoke __unicode__() instead of __str__().
- portage.localization.localization_example()¶
- portage.localization.localized_size(num_bytes)¶
Return pretty localized size string for num_bytes size (given in bytes). The output will be in kibibytes.