Closed Bug 1140011 Opened 9 years ago Closed 9 years ago

Provide a comment to NSLocalizedString()

Categories

(Firefox for iOS :: General, defect)

All
iOS 8
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: st3fan, Assigned: st3fan)

References

Details

Attachments

(1 file)

Provide a useful comment to every NSLocalizedString() usage.

We need to be consistent and add a comment every time we use NSLocalizedString(). This comment ideally explains what the item is and where it is used.

It is probably a good idea to include three things:

* The type of element
* A short description
* The context

For example:

"Today" -> "Text label for table section header in the History Panel"
"Cancel" -> "Cancel button to dismiss the home panels screen"

Keep it short but make sure there is enough info for a localizer to understand what the item is about.

In case of accessibility labels, it is a good practice to use the following format:

"Accessibility label for ..."
"Accessibility label for the Add to Reading List button"
"Accessibility label for the Show History button"
Summary: Provide a useful comment to NSLocalizedString() → Provide a comment to NSLocalizedString()
OS: Mac OS X → iOS 8
Hardware: x86 → All
For space-constrained elements like buttons, it would be helpful to include maximum character available. Something like "MAX: 180 char" at the end of description.
Another comment about developer notes from a localizer:

"Forward" could use a note - I assume here it just means "go forward
to the next screen/menu" but if it's a verb/command (like "forward
this email") it would be different.

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1140855#c9
Assignee: nobody → sarentz
Made sure all NSLocalizedString occurrences have a comment.
Attachment #8580743 - Flags: review?(bnicholson)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Depends on: 1153310
Depends on: 1153333
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: