Provide a comment to NSLocalizedString()

RESOLVED FIXED

Status

()

RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: st3fan, Assigned: st3fan)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
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"
(Assignee)

Updated

4 years ago
Summary: Provide a useful comment to NSLocalizedString() → Provide a comment to NSLocalizedString()
OS: Mac OS X → iOS 8
Hardware: x86 → All

Comment 1

4 years ago
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)

Updated

3 years ago
Assignee: nobody → sarentz
(Assignee)

Comment 3

3 years ago
Created attachment 8580743 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/246



Made sure all NSLocalizedString occurrences have a comment.
Attachment #8580743 - Flags: review?(bnicholson)
(Assignee)

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED

Updated

3 years ago
Depends on: 1153310

Updated

3 years ago
Depends on: 1153333
You need to log in before you can comment on or make changes to this bug.