Closed Bug 1021942 Opened 7 years ago Closed 7 years ago

Transition away from using entity.textContent in Calendar L10n

Categories

(Firefox OS Graveyard :: Gaia::Calendar, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zbraniecki, Assigned: zbraniecki)

References

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
mmedeiros
: review+
Details | Review
In bug 994290, we're switching entity attributes to be DOM attributes instead of properties.

One of the blockers is the use of entity.textContent in Calendar app: https://github.com/mozilla-b2g/gaia/blob/ff9bdaaa0dd52fc544243e6c3d1bae3e8300747d/apps/calendar/locales/calendar.en-US.properties#L91-L94

sync-frequency-manual.textContent=Manually
sync-frequency-15min.textContent=15 min
sync-frequency-30min.textContent=30 min
sync-frequency-hourly.textContent=Each hour

One of them seems not to be used anywhere, others seem to be used here: https://github.com/mozilla-b2g/gaia/blob/ff9bdaaa0dd52fc544243e6c3d1bae3e8300747d/apps/calendar/elements/advanced_settings.html#L45-L47

Since during localization we take entity's value and put it as textContent of the node is seems to me that we should be just able to remove the obsolete one and switch the others to values:


sync-frequency-15min=15 min
sync-frequency-30min=30 min
sync-frequency-manual=Manually
Assignee: nobody → gandalf
Blocks: 994290
Status: NEW → ASSIGNED
Attached file patch
James, you seem to be the original author of that code. Can you review my patch?
Attachment #8436068 - Flags: review?(jlal)
Comment on attachment 8436068 [details] [review]
patch

this looks fine to me but I am not very active in calendar right now... redirecting to Miller
Attachment #8436068 - Flags: review?(jlal) → review?(mmedeiros)
Comment on attachment 8436068 [details] [review]
patch

LGTM! simpler and still works as expected. thanks!
Attachment #8436068 - Flags: review?(mmedeiros) → review+
You need to log in before you can comment on or make changes to this bug.