diff options
Diffstat (limited to 'third_party/chromium/base/strings/string_number_conversions.h')
-rw-r--r-- | third_party/chromium/base/strings/string_number_conversions.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/third_party/chromium/base/strings/string_number_conversions.h b/third_party/chromium/base/strings/string_number_conversions.h index af0faa6..49bb08b 100644 --- a/third_party/chromium/base/strings/string_number_conversions.h +++ b/third_party/chromium/base/strings/string_number_conversions.h @@ -24,6 +24,14 @@ // Please do not add "convenience" functions for converting strings to integers // that return the value and ignore success/failure. That encourages people to // write code that doesn't properly handle the error conditions. +// +// DO NOT use these functions in any UI unless it's NOT localized on purpose. +// Instead, use base::MessageFormatter for a complex message with numbers +// (integer, float, double) embedded or base::Format{Number,Double,Percent} to +// just format a single number/percent. Note that some languages use native +// digits instead of ASCII digits while others use a group separator or decimal +// point different from ',' and '.'. Using these functions in the UI would lead +// numbers to be formatted in a non-native way. // ---------------------------------------------------------------------------- namespace base { |