D15829: make units and prefixes of formatValue translatable
Safa Alfulaij
noreply at phabricator.kde.org
Sat Sep 29 14:36:18 BST 2018
safaalfulaij added a comment.
Since the joining between number and format is translatable, that's great. I meant that if it is kept untranslatable, problems regarding RTL will happen.
INLINE COMMENTS
> kformatprivate.cpp:115
> const PrefixMapEntry map[] = {
> - { KFormat::UnitPrefix::Yocto, 1e-24, bpow(-80), u'y' },
> - { KFormat::UnitPrefix::Zepto, 1e-21, bpow(-70), u'z' },
> - { KFormat::UnitPrefix::Atto, 1e-18, bpow(-60), u'a' },
> - { KFormat::UnitPrefix::Femto, 1e-15, bpow(-50), u'f' },
> - { KFormat::UnitPrefix::Pico, 1e-12, bpow(-40), u'p' },
> - { KFormat::UnitPrefix::Nano, 1e-9, bpow(-30), u'n' },
> - // Thanks to broken MSVC, we can not use u'µ', but have to use the unicode codepoint
> - { KFormat::UnitPrefix::Micro, 1e-6, bpow(-20), QChar(0xB5) },
> - { KFormat::UnitPrefix::Milli, 1e-3, bpow(-10), u'm' },
> - { KFormat::UnitPrefix::Unity, 1.0, 1.0, u'\0' },
> - { KFormat::UnitPrefix::Kilo, 1e3, bpow(10), u'k' },
> - { KFormat::UnitPrefix::Mega, 1e6, bpow(20), u'M' },
> - { KFormat::UnitPrefix::Giga, 1e9, bpow(30), u'G' },
> - { KFormat::UnitPrefix::Tera, 1e12, bpow(40), u'T' },
> - { KFormat::UnitPrefix::Peta, 1e15, bpow(50), u'P' },
> - { KFormat::UnitPrefix::Exa, 1e18, bpow(60), u'E' },
> - { KFormat::UnitPrefix::Zetta, 1e21, bpow(70), u'Z' },
> - { KFormat::UnitPrefix::Yotta, 1e24, bpow(80), u'Y' },
> + { KFormat::UnitPrefix::Yocto, 1e-24, bpow(-80), tr("y", "Metric prefix for 10^⁻24") },
> + { KFormat::UnitPrefix::Zepto, 1e-21, bpow(-70), tr("z", "Metric prefix for 10^⁻21") },
Line 160:
} else {
value /= entry->binaryFactor;
prefixString = QString(entry->prefixChar).toUpper();
How this is “Metric”?
> kformatprivate.cpp:168
> if (dialect == KFormat::IECBinaryDialect) {
> prefixString += u'i';
> }
And what about this? //It should never be a puzzle string by the way.//
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D15829
To: astippich, bruns, safaalfulaij
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180929/993628bc/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list