Closed Bug 1528178 Opened 8 months ago Closed 5 months ago

[Translate.Next] Format Fluent strings in string list and tools as simple strings

Categories

(Webtools :: Pontoon, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adrian, Assigned: adrian)

References

Details

(Whiteboard: tn-testing-2)

Attachments

(1 file)

Currently we display Fluent messages raw, with the ID. That is fine in the Editor, but for the Entities list, metadata and machinery, we should instead use a truncated version of the string, without the ID part (l10n-id =).

Blocks: 1486520

TBH, I don't think that ID stripping is what we need here. We rather need getSimplePreview ported from https://github.com/mozilla/pontoon/blob/ed912661961511b9ecf46cd7cc59238562547ef4/pontoon/base/static/js/fluent_interface.js#L901, which also does a bunch of attribute detection etc.

Lowering priority, since this is not needed for Stage 1 testing.

Changing summary to reflect Comment 1.

Priority: P1 → P2
Summary: [Translate.Next] Hide Fluent IDs from strings → [Translate.Next] Add simple Fluent string presentation

Keeping summary and Priority in line with bug 1528282.

Priority: P2 → P3
Summary: [Translate.Next] Add simple Fluent string presentation → [Translate.Next] Format Fluent strings in string list and tools as simple strings

I've updated my PR at https://github.com/projectfluent/fluent.js/pull/172 to get the APIs we have in python onto fluent.syntax in js land. I'm expecting them to be useful for this.

Alongside: How would we do the switch between Fluent and not? Based on resource path extension or is there something better?

Whiteboard: tn-testing-2
Assignee: nobody → adrian
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.