Closed Bug 1040271 Opened 10 years ago Closed 10 years ago

[L10n][SMS] Clean up mozL10n.get uses in SMS app

Categories

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

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: giovanni.charles, Assigned: giovanni.charles)

References

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → giovanni.charles
Blocks: 1020138
We don't use a lot of mozL10n.get in the SMS app; the rare places we use it, I think we can't do otherwise (eg: notification API, window.confirm, window.alert). But I'd be happy to be wrong :)
Let's see what Giovanni will find! :)
Julien is correct, there was not much that could be done. Much of the localisation is for dates - which I will not be focusing on - or alerts/confirmations. The main thing blocking progress for this bug is notifications, they are not localised - see Bug 967925. That is something I am looking into now.
Attachment #8458830 - Flags: review?(gandalf)
Comment on attachment 8458830 [details] Some chnages to use node.setAttribute over mozL10n.get That looks good from l10n standpoint. let's get julien's r.
Attachment #8458830 - Flags: review?(gandalf)
Attachment #8458830 - Flags: review?(felash)
Attachment #8458830 - Flags: review+
Comment on attachment 8458830 [details] Some chnages to use node.setAttribute over mozL10n.get I'm fine with the changes for action_menu.js, but in information.js we miss one important case. Added more comments on github. Thanks !
Attachment #8458830 - Flags: review?(felash) → review-
Attachment #8458830 - Flags: review- → review?(felash)
Gandalf, can you comment on the RTL discussion here? I'd rather want the simpler solution but I fail to see if this messes up RTL. I think it doesn't but Guivanni thinks it does :) You can find the discussion in the 3rd "outdated diff discussion". Thanks !
Flags: needinfo?(gandalf)
Flags: needinfo?(gandalf) → needinfo?(nefzaoui.ahmed)
Can we move forward without help from Ahmed? Flod?
Flags: needinfo?(francesco.lodolo)
Apologies for late reply I don't see anything suspicious with the current version of the patch. But just to note, AFAIK this: > sim-detail = «end of list» {{detail-string}} {{sim}} SIM «start of list» Doesn't happen at anyway because in RTL, Gecko will take care of reordering the context (and in the case of mixed RTL and LTR text this will be wrong too). So if we originally have > sim-detail = Sim {{sim}} {{detail-string}} All we usually do is replace the word Sim with it's equivalent in the desired RTL language and that's enough. This seems a little vague but that's what really happens, let's not forget that {{sim}} and {{detail-string}} will also be replaced by their correspondent text in the RTL locale so the final result is a complete RTL string, and because of that, changing the order of {{sim}} and {{detail-string}} will just wrongly reverse it. Hope this is helpful and not making it more confusing.. :)
Flags: needinfo?(nefzaoui.ahmed)
(clearing NI, also considering I'm just starting to get a grasp of RTL) Only request: please explain in localization comments what is going on with all those variables.
Flags: needinfo?(francesco.lodolo)
Thanks Ahmed, so this is what I thought too. Giovanni, then I think we can use the simpler code :)
Comment on attachment 8458830 [details] Some chnages to use node.setAttribute over mozL10n.get let's do the other approach then ! Thanks for your patience
Attachment #8458830 - Flags: review?(felash) → review-
Attachment #8458830 - Flags: review- → review?(felash)
Comment on attachment 8458830 [details] Some chnages to use node.setAttribute over mozL10n.get one issue and some nits (I actually couldn't try the SIM part on a device as I have no dual SIM device on central right now -- I'm doing one now so it should be ok tomorrow). Thanks !
Attachment #8458830 - Flags: review?(felash) → review-
Attachment #8458830 - Flags: review- → review?(felash)
Giovanni, please, squash your commits into one, and rebase on top of the current master. It should help with the tests :)
Comment on attachment 8458830 [details] Some chnages to use node.setAttribute over mozL10n.get Redirecting the review to Oleg, to check that the SIM information display correctly in the report panel on a dual SIM device (as I just broke my Flame...)
Attachment #8458830 - Flags: review?(felash) → review?(azasypkin)
Comment on attachment 8458830 [details] Some chnages to use node.setAttribute over mozL10n.get (In reply to Julien Wajsberg [:julienw] from comment #15) > Comment on attachment 8458830 [details] > Some chnages to use node.setAttribute over mozL10n.get > > Redirecting the review to Oleg, to check that the SIM information display > correctly in the report panel on a dual SIM device (as I just broke my > Flame...) SIM indicator in the report panel looks fine to me (basically as it was before + auto translation on language switch). So r+ for the report panel functional part.
Attachment #8458830 - Flags: review?(azasypkin) → review+
Comment on attachment 8458830 [details] Some chnages to use node.setAttribute over mozL10n.get Just put the r- to fix the remaining indentation issues. Also please squash and add "r=gandalf,azasypkin,julien" in your commit log
Attachment #8458830 - Flags: review-
Attachment #8458830 - Flags: review- → review?(felash)
Mentor: gandalf
Julien, I think we have everything ready for landing here. The try build is green except of one timed out test (I restarted the test).
Comment on attachment 8458830 [details] Some chnages to use node.setAttribute over mozL10n.get I'm sorry but there are still indentation issues :(
Attachment #8458830 - Flags: review?(felash) → review-
Attachment #8458830 - Flags: review- → review?(felash)
master: c7f8938522a18454809fb6ea0fd3eddef10a73ea
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment on attachment 8458830 [details] Some chnages to use node.setAttribute over mozL10n.get r=me thanks a lot for your patience !
Attachment #8458830 - Flags: review?(felash) → review+
Hi Julienw Please uplift these to v2.0 as well. Thanks!
Flags: needinfo?(felash)
(In reply to ankit93040 from comment #23) > Hi Julienw > Please uplift these to v2.0 as well. Please don't ;-) New string in this patch, and I think we don't move these patches to 2.0, since it has a different l10n.js
A couple more notes: * please add comments when adding non obvious variables (i.e. "detailString" in this case) * is this hard-coded separator wanted? https://github.com/giovannic/gaia/blob/ea9a3d91c564b2a0816106318477013edc721f17/apps/sms/js/information.js#L113
(In reply to Francesco Lodolo [:flod] from comment #25) > A couple more notes: > * please add comments when adding non obvious variables (i.e. "detailString" > in this case) right, sorry :( > * is this hard-coded separator wanted? > https://github.com/giovannic/gaia/blob/ > ea9a3d91c564b2a0816106318477013edc721f17/apps/sms/js/information.js#L113 Yeah, it's been discussed with Pike AFAIK.
Flags: needinfo?(felash)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: