Reputation: 1942
I want to add comments in my storyboard.strings files, so that translators have some idea what they're translating.
When I use NSLocalizedString
in code, I can use the second argument like so:
NSLocalizedString(@"OK", @"the button you click when things are OK");
to get a comment that looks like
/* the button you click when things are OK */
"OK" = "OK";
That really helps people translate things. It's much harder to know the context when the string looks like:
/* Class = "IBUIButton"; normalTitle = "Sign in"; ObjectID = "3R1-1d-v0R"; */
"3R1-1d-v0R.normalTitle" = "OK";
What should I do? Ideally, I'd like to have some sort of comment in the storyboard that gets output to the strings file. Is there some way to do that?
Upvotes: 2
Views: 154
Reputation: 10505
Under the identity inspector for any object inside storyboard, you can set the accessibility for Label and Hint. You can type in your comments there. After you internationalise the storyboard, the comment will be there for your translator.
Upvotes: 1