Closed
Bug 1032813
Opened 11 years ago
Closed 10 years ago
[L10n][Contacts] Clean up mozL10n.get uses in Contacts app
Categories
(Firefox OS Graveyard :: Gaia::Contacts, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: mbudzynski, Assigned: ShellHacker, Mentored)
References
Details
(Whiteboard: [good first bug])
No description provided.
Reporter | ||
Updated•11 years ago
|
Mentor: mbudzynski, gandalf
Whiteboard: [good first bug]
Reporter | ||
Comment 1•11 years ago
|
||
This is a Contacts follow up for meta Bug 1020138. As described there:
It's all about grepping for "mozL10n.get" use cases and if it's simple:
var text = navigator.mozL10n.get(l10nId);
node.textContent = text;
replacing it with:
node.setAttribute('data-l10n-id', l10nId);
Updated•11 years ago
|
Assignee: nobody → aksht.kedia
Flags: needinfo?(mbudzynski)
Comment 2•11 years ago
|
||
Hey,
I will like to work on this bug. Can you tell me which file/folder I need to grep ?
Thanks.
Reporter | ||
Comment 3•11 years ago
|
||
Hi Akshat,
You can find contacts app in apps/communications/contacts. This bug is a little bit more than just grepping and replacing strings, it will need small changes in a logic as well (like every use of TAG_OPTIONS - this object is localized).
Flags: needinfo?(mbudzynski)
Assignee | ||
Comment 4•11 years ago
|
||
Can I be assigned to work on this ? Looks like Akshat's probably caught up.
Flags: needinfo?(aksht.kedia)
Assignee | ||
Comment 5•11 years ago
|
||
Can I be assigned to work on this ? Looks like Akshat's probably caught up.
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(mbudzynski)
Assignee | ||
Comment 7•11 years ago
|
||
Thanks Akshat :+1:
Taking this bug to work on.
Assignee: aksht.kedia → sudheesh1995
Assignee | ||
Comment 8•11 years ago
|
||
(In reply to Michał Budzyński (:michalbe) from comment #1)
> var text = navigator.mozL10n.get(l10nId);
> node.textContent = text;
>
> replacing it with:
>
> node.setAttribute('data-l10n-id', l10nId);
In case its an underscore instead of text, should and the usage is just mozL10n.get; should the replacement be
node.setAttribute('data-l10n-id',''); ?
Comment 9•11 years ago
|
||
I think we will need to use the |translate| method, but not so sure, Michal what do you think?
Reporter | ||
Comment 10•11 years ago
|
||
Underscore & mozL10N.get() is the same function, we don't want to use it in the code anymore, instead we just set correct attributes on DOM nodes.
Flags: needinfo?(mbudzynski)
Assignee | ||
Comment 11•11 years ago
|
||
I am not clear about this, since the get(<param>) is translated to node.setAttribute('data-l10n-id','<param>'); , having no parameter, makes the param part be a null string ? ('') ?
Comment 12•10 years ago
|
||
There should be no place where we do mozL10n.get(''); That's a clear error, since the function cannot receive an empty l10n identifier.
Assignee | ||
Comment 13•10 years ago
|
||
So how should the var _ = mozL10n.get; be converted to, this is the problem that I am facing.
Assignee | ||
Comment 14•10 years ago
|
||
NI'ing
Comment 15•10 years ago
|
||
Closing as wontfix since this cleanup already happened.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•