Closed Bug 987966 Opened 10 years ago Closed 10 years ago

[contacts] placeholder for date fields in add/edit mode is always in English: 'Date'

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.4+, b2g-v1.4 fixed, b2g-v2.0 fixed)

RESOLVED FIXED
2.0 S5 (4july)
blocking-b2g 1.4+
Tracking Status
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: aryx, Assigned: jmcf)

References

Details

(Whiteboard: l12y, LocRun1.4)

Attachments

(4 files)

Boot2Gecko 1.5.0.0-prerelease 20140325024149 on Keon

The placeholder for date fields in add and edit mode is always in English and reads as 'Date'.
Whiteboard: l12y
I might be wrong, but having chosen data.placeholder as entity name, it gets used to localize the "placeholder" attribute of the element with data-l10n-id="date", not the element with data-l10n-id="date.placeholder".
https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/contacts/elements/form.html#L77
I think this is also on 1.4 :-\

@Jose
Can you please take a look?

From what I understand "date" is actually unused, so it should be possible to just assign it to the other control and get rid of the .placeholder string
Depends on: 935045
Flags: needinfo?(jmcf)
Attached file 17632.html
simple patch that fixes the issue. After r+ I will ask for approval to uplift to 1.4
Attachment #8396980 - Flags: review?(francesco.lodolo)
Flags: needinfo?(jmcf)
Comment on attachment 8396980 [details]
17632.html

You should ask a proper a reviewer, but I have 2 notes:
* you can't have two elements with the same data-l10n-id ("date" is still used below)
* remove the data.placeholder string if it's unused
Attachment #8396980 - Flags: review?(francesco.lodolo) → feedback-
Attachment #8396980 - Flags: review?(francisco.jordano)
Attachment #8396980 - Flags: feedback?(francesco.lodolo)
Attachment #8396980 - Flags: feedback-
(In reply to Francesco Lodolo [:flod] from comment #4)
> Comment on attachment 8396980 [details]
> 17632.html
> 
> You should ask a proper a reviewer, but I have 2 notes:
> * you can't have two elements with the same data-l10n-id ("date" is still
> used below)

oh yes

> * remove the data.placeholder string if it's unused

I will keep it as it is used by the <input type=date>, although this element is never shown to the user. But for consistency I'm keeping it

thanks for the quick feedback
Comment on attachment 8396980 [details]
17632.html

My suggestion of using "date" for the first element, was to avoid a new string, especially since this has to land in 1.4

If we actually need the date.placeholder string in place, I guess this patch is correct.
Attachment #8396980 - Flags: feedback?(francesco.lodolo) → feedback+
Keywords: late-l10n
Comment on attachment 8396980 [details]
17632.html

Nice!

Thanks, merge once travis is green.
Attachment #8396980 - Flags: review?(francisco.jordano) → review+
https://github.com/mozilla-b2g/gaia/commit/783ebe5beeb824ebff5cffaaa66e2bb8c9587203
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: l12y → l12y, LocRun1.4
Hi Francesco,

we eagerly need merge this modification to the branch v1.4, please help land it.

Thanks a lot.
blocking-b2g: --- → 1.4?
Flags: needinfo?(francesco.lodolo)
Unfortunately you're talking with the wrong person, not a gaia developer here ;-)

I suggested a string-free approach for this bug, that would have let us land on 1.4.
At this point, introducing new strings in 1.4 is not an option.
Flags: needinfo?(francesco.lodolo)
Hi Jose,

As mentioned in comment3, could you please help land the patch to v1.4?

Thanks a lot.
Flags: needinfo?(jmcf)
We cannot land this to 1.4 until it is 1.4+ed. If not we would need to ask for an approval-1.4, but let's wait to 1.4+ .
Flags: needinfo?(jmcf)
Thank you.
Waiting...
blocking-b2g: 1.4? → 1.4+
Do we know if this one will become a cert blocker?
Flags: needinfo?(archaeopteryx)
Preeti, Sebastian (archaeopteryx) is the German localizer, definitely not the right person to answer about certification ;-)
Flags: needinfo?(archaeopteryx)
PS: if this turns out to be a cert blocker, I suggest to:

Clone this bug, and request a patch that picks up one of the existing "Date" strings, and make this bug non-block.

I'm pretty sure there has to be some way to hack around this, event listeners or whatnot.
Preeti, I'm not sure what help you're asking for. If we need a different patch for 1.4, then Francisco or Jose would be the right people to ask. With the blocking decision earlier today, I expect this patch will be uplifted soon unless it gets marked to avoid uplift.
Flags: needinfo?(doliver) → needinfo?(praghunath)
Assignee: nobody → jmcf
(In reply to Francesco Lodolo [:flod] from comment #18)
> Preeti, Sebastian (archaeopteryx) is the German localizer, definitely not
> the right person to answer about certification ;-)

Oops Sorry!! 
Maria,
Please help answer the cert blocker question?
Also would you be able to do the re-base?
Flags: needinfo?(praghunath)
Beatriz, could you confirm if this bug is a certification blocker?
Thanks a lot!
Flags: needinfo?(brg)
yes it is a cert blocker! Thanks for asking.
Flags: needinfo?(brg)
Can we discuss on how to create a patch that doesn't add new strings? As it is, a sheriff will pass by and commit the patch on 1.4

Adding a new string now means that the string is localizable, but it won't necessarily be localized, especially by smaller locales.

https://github.com/mozilla-b2g/gaia/blob/v1.4/apps/communications/contacts/elements/form.html#L77-L80

As I asked at the beginning of this bug, can't we just move the "date" data-l10n-id from input to span? Is the data-l10n-id on the input element actually used?
Tagging this to avoid uplift until things get straightened out here.
Whiteboard: l12y, LocRun1.4 → l12y, LocRun1.4, [NO_UPLIFT]
Target Milestone: --- → 1.4 S4 (28mar)
(In reply to Francesco Lodolo [:flod] from comment #24)
> Can we discuss on how to create a patch that doesn't add new strings? As it
> is, a sheriff will pass by and commit the patch on 1.4
> 
> Adding a new string now means that the string is localizable, but it won't
> necessarily be localized, especially by smaller locales.
> 
> https://github.com/mozilla-b2g/gaia/blob/v1.4/apps/communications/contacts/
> elements/form.html#L77-L80
> 
> As I asked at the beginning of this bug, can't we just move the "date"
> data-l10n-id from input to span? Is the data-l10n-id on the input element
> actually used?
Hi Francesco,
change data-l10n-id="date.placeholder" to data-l10n-id="dateplaceholder" 
and the string can be translated into the appropriate language.
This method can avoid add a new string, just remove the dote is OK
(In reply to yaoyao.wu from comment #27)
> Hi Francesco,
> change data-l10n-id="date.placeholder" to data-l10n-id="dateplaceholder" 
> and the string can be translated into the appropriate language.
> This method can avoid add a new string, just remove the dote is OK

I doubt that would work (we don't have a string ID called 'dateplaceholder' in .properties file).
Note that I'm the developer who fixed this bug too.
(In reply to Francesco Lodolo [:flod] from comment #28)
> (In reply to yaoyao.wu from comment #27)
> > Hi Francesco,
> > change data-l10n-id="date.placeholder" to data-l10n-id="dateplaceholder" 
> > and the string can be translated into the appropriate language.
> > This method can avoid add a new string, just remove the dote is OK
> 
> I doubt that would work (we don't have a string ID called 'dateplaceholder'
> in .properties file).
> Note that I'm the developer who fixed this bug too.
Hi Francesco,
yes , this method need to change both the index.html and corresponding .properties files .
This is just for your reference.
Thanks.
And then we're back to square one: we don't want to change the .properties file and introduce new strings months after string freeze. If that would be the case, we could just land the r+ patch in this bug.

This is the stringless approach I suggested a couple of times, if someone wants to test it or comment
https://github.com/flodolo/gaia/commit/a6df479be37be8a97adbb5daa337134a4648838d
(In reply to Dylan Oliver [:doliver] from comment #26)
> Tagging this to avoid uplift until things get straightened out here.

Reopening to provide a specific patch for 1.4 that could be applied without any new string.

Prefer to do this instead of backout the patch, since this is in 2.0 and 2.1 already.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached file Patch for branch 1.4
Just got the commit by Francesco and tried on branch 1.4

Working for me perfectly but want r? from Jose to see that we are not missing anything.

Thanks Francesco!
Attachment #8443516 - Flags: review?(jmcf)
Comment on attachment 8443516 [details]
Patch for branch 1.4

the proposed patch introduces a regression already fixed in master (bug 1027867)
Attachment #8443516 - Flags: review?(jmcf) → review-
Have you tested the patch on 1.4? Because I don't see anything like bug 1027867 while testing the patch, and we're two revisions apart.

When editing I see "Date" if the date is empty, the actual date if there's a value, and the actual date when viewing the contact.
Target Milestone: 1.4 S4 (28mar) → 1.4 S6 (25apr)
Attached image IMG_20140623_201855.jpg
This is a screenshot with the patch applied to branch 1.4.

I cannot see the effect of bug 1027867

Could you recheck?
Target Milestone: 1.4 S6 (25apr) → 2.0 S5 (4july)
Comment on attachment 8446498 [details] [review]
PR to branch 1.4

thanks Francisco, works perfectly
Attachment #8446498 - Flags: review?(jmcf) → review+
Dylan,

should I merge directly to 1.4 or a sheriff will take care of this?
Flags: needinfo?(doliver)
Francisco, you can either land it and resolve it, or mark it for landing by sheriff by removing the '[NO_UPLIFT]' whiteboard tag and adding the 'checkin-needed' keyword.

And then I'm assuming we can also remove the late-l10n keyword with this approach?
Flags: needinfo?(doliver)
(In reply to Dylan Oliver [:doliver] from comment #39)
> Francisco, you can either land it and resolve it, or mark it for landing by
> sheriff by removing the '[NO_UPLIFT]' whiteboard tag and adding the
> 'checkin-needed' keyword.
> 
> And then I'm assuming we can also remove the late-l10n keyword with this
> approach?

We have a specific patch for 2.0 that will still need the late-l10n, so will leave it.

Marking as resolved and asking for checkin-needed
Asking for checkin-needed for attachment:

https://bugzilla.mozilla.org/attachment.cgi?id=8446498

in branch 1.4
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: l12y, LocRun1.4, [NO_UPLIFT] → l12y, LocRun1.4
(In reply to Francisco Jordano [:arcturus] [:francisco] from comment #40)
> We have a specific patch for 2.0 that will still need the late-l10n, so will
> leave it.

2.0 has been fixed several months ago with a new string, I don't think it needs further fixing. Am I missing something?
Also note that 2.0 is closed for strings, so late-l10n at this point is not relevant.
Thanks Francesco for the clarification, now removing the flag.
Keywords: late-l10n
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: