Important lesson in using NSLocalizedString

In ReceiptWallet 2.0, I use an ellipses in a number of places for menu items, window titles, etc. I switched all my source files to UTF-8 and started using ellipses in the NSLocalizedString macros to make localization easier whenever I get to that point. Well, despite using UTF-8 for the file encoding, something went horribly wrong that I didn’t notice until today. The ellipses caused a bunch of my menu items to take on names of other things, like Scan Receipt became Combining Documents…. Huh, I thought. So after a bunch of research, I found the solution. 1) Replace … with \\U2026 and 2) In my script phase where I run genstrings to generate the Localizable.strings file, add a -u flag. While that seems like an easy fix, I almost went bonkers today as I’m nearing the ReceiptWallet 2.0 release and this would have been bad.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.