Closed Bug 1959127 Opened 1 year ago Closed 1 year ago

Translate "placeholder" attributes on <textarea> elements

Categories

(Firefox :: Translations, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
140 Branch
Tracking Status
firefox140 --- fixed

People

(Reporter: nordzilla, Assigned: isaacbriandt10)

References

Details

Attachments

(1 external file)

Background

In Bug 1944944 we audited our attribute translations, creating a more detailed list of attributes to translate according to specifications.

In the patch associated with Bug 1944944, all of the trivial additions and removals were handled, and any changes that were more involved are now being filed as follow-ups.


Description

We want to translate the "placeholder" attribute on <textarea> elements. However, in order to do this, we need to make an exception for <textarea> being excluded from translation.

We have a list of excluded tags that help inform our algorithm on which nodes to skip. TEXTAREA is included in here, which is good, because we don't want to translate the TEXTAREA's content.

However, its exclusion in this list is also causing our attribute translations to skip over these types of elements, even when they have placeholders that are translatable.

We should determine a way to allow attribute translations on a <textarea> placeholder, while still excluding it from regular translation.


Steps to Implement

  • Determine a strategy to translate the placeholder attribute. This could mean making two lists, one for attribute excluded nodes, and one for content excluded nodes. Or perhaps making the existing list more nuanced to be able to distinguish between the two purposes.
  • Add "placeholder" to the translatable attributes for <textarea> elements.

Tests to Implement

  • Create test cases to ensure <textarea> placeholders are translated, and that neither <textarea> content nor other attributes on the <textarea> are translated.

Isaac, just sending you an NI to make sure you saw this in my comment on D243241.

Flags: needinfo?(isaacbriandt10)

Oh... I think I missed the notification. Right, I have seen it now. I will work on it asap. Thank you Erik!

Flags: needinfo?(isaacbriandt10)
Attachment #9478432 - Attachment description: Bug 1959127 - [translations] Translate placeholder attributes on <textarea> elements r=nordzilla → Bug 1959127 - [translations] Translate placeholder attributes on <textarea> r=nordzilla
Pushed by enordin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/64268c7b881d [translations] Translate placeholder attributes on <textarea> r=nordzilla,translations-reviewers
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
QA Whiteboard: [qa-triage-done-c141/b140]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: