Closed Bug 1626064 Opened 5 years ago Closed 2 years ago

Use fluent to display certificate error page descriptions

Categories

(Firefox :: Security, enhancement, P3)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1484955

People

(Reporter: prathiksha, Unassigned, Mentored)

References

Details

Attachments

(1 file)

Priority: P5 → P3

I don't believe this is a good first-bug, because there is a lot to plan for first, and to fix.

Take this string for example:

<!ENTITY inadequateSecurityError.longDesc "<p><span class='hostname'></span> uses security technology that is outdated and vulnerable to attack. An attacker could easily reveal information which you thought to be safe. The website administrator will need to fix the server first before you can visit the site.</p><p>Error code: NS_ERROR_NET_INADEQUATE_SECURITY</p>">

DOM overlays don't support nested markup. I believe, if I remember previous conversations correctly, that we would migrate this as separate messages and lose most of the markup.

inadequate-security-error-desc = <span data-l10n-name='hostname'></span> uses security technology that is outdated and vulnerable to attack. An attacker could easily reveal information which you thought to be safe. The website administrator will need to fix the server first before you can visit the site.
security-error-code = Error code: { $errorCode }>

The same is true for lists

<!ENTITY sharedLongDesc "
<ul>
  <li>The site could be temporarily unavailable or too busy. Try again in a few
    moments.</li>
  <li>If you are unable to load any pages, check your computer’s network
    connection.</li>
  <li>If your computer or network is protected by a firewall or proxy, make sure
    that &brandShortName; is permitted to access the Web.</li>
</ul>
">

We should migrate each bullet item as a separate Fluent message.

@pike

  1. Does this match your expectation?
  2. Is there a way for us to migrate this content, and avoid losing all translations?
Flags: needinfo?(l10n)

Yes, I think we should take those strings apart.

Can we migrate them? Maybe maybe dirty dirty.

The challenge is to get xml-ish content segments, w/out a proper parse environment. It might help to replace &brandShortName; with { -brand-short-name } as literal text, and to then try to do XML parsing on it. And then to create FTL.TextElement instances of it.

Those don't escape {-brand-short-name} on serialization, so this might be OK. But it's also a bit fishy. Looking at stas here.

The whole thing would need a good check, and it might need some upstream fluent.migrate changes to survive python errors constructively. 'Cause I'd be very surprised if there wasn't a language that had parsing errors etc.

Flags: needinfo?(l10n)

@prathiksha
Sorry, I think we should put this on hold until we have a clear answer for migrating the existing translations.

I honestly don't feel comfortable in losing this amount of translations, especially for pages that have security implications for users.

@pike
Could you get a bug on file blocking this one and describing what needs to be done in fluent-migration in order to support this? I understand that giving a clear scope and a timeline is not a fair expectation, given our constant resourcing problems, but I'd like at least:

  • A description of what needs to be done, and where in the code.
  • Who could mentor and provide guidelines, in case someone wants to pick up the work.
Depends on: 1626976

I filed bug 1626976, but I'm not sure that that's blocking this bug. It might just be that we figure out here if that's needed, prove that it works here, and if it does, uplift the fix to fluent.migrate upstream, and figure out how to write tests for it.

(In reply to Axel Hecht [:Pike] from comment #5)

I filed bug 1626976, but I'm not sure that that's blocking this bug. It might just be that we figure out here if that's needed, prove that it works here, and if it does, uplift the fix to fluent.migrate upstream, and figure out how to write tests for it.

We also need something to parse the translated HTML and return a specific node, don't we? Or would that be part of the ad-hoc recipe?

I'd suggest to keep that in the recipe, at least for now.

Upstreaming that if it proves to be successful and generally applicable would be a separate task.

Depends on: 1628362

I filed a bug for the latter, and set the dependencies. In the current status, we're blocked from completing this migration.

Both bugs require time even for investigating the issue and prioritizing, and they're competing with a lot of other projects and requests. If this is needed, we need to have a conversation about which projects should be deprioritized to make space for this. In case, that's a conversation where Jeff (localization's manager) should be involved.

Assignee: jgabitto1792 → nobody
Status: ASSIGNED → NEW
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: