puppetlabs / cppbestpractices

Collection of C++ Best Practices at Puppet Labs
Other
19 stars 6 forks source link

i18n Guidelines #10

Open MikaelSmith opened 8 years ago

MikaelSmith commented 8 years ago

Use Leatherman logging, locale, i18n support.

Use http://www.boost.org/doc/libs/1_56_0/libs/locale/doc/html/collation.html for sorting.

MikaelSmith commented 8 years ago

Document uses of Boost.Locale: sorting, multiple pluralization, masculine/feminine, casing, splitting strings (by words, separators, white-space).

Translate individual strings or smaller.

What do we use utfcpp for?

MikaelSmith commented 8 years ago

TODO: update Facter fact output sorting to use locale. Custom facts can introduce any character and need to be sorted correctly.

MikaelSmith commented 8 years ago

Blocked on https://github.com/puppetlabs/leatherman/pull/99.

kylog commented 8 years ago

@MikaelSmith or @ahenroid: today's lunch-and-learn reminded me. Are our i18n best practices for c++ ready to be captured here?

ahenroid commented 8 years ago

@kylog, yes, as far as I'm aware, C++ i18n best practices have been demonstrated by the cpp-project-template, but really not documented here or anywhere else internally. I'm happy to take a first pass at this, unless @MikaelSmith, you have this written down elsewhere and/or have lots of detail in your head that you want to get down first.

ahenroid commented 8 years ago

And I'm thinking specifically of string externalization. There is already some info around UTF-8.

MikaelSmith commented 8 years ago

I think I've pointed you at everything I previously wrote.