Closed Bug 1590020 Opened 5 months ago Closed 5 months ago

Disable allCapitalsString parser

Categories

(Webtools :: Pontoon, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mathjazz, Assigned: kathiekim95, Mentored)

Details

(Whiteboard: outreachyround19)

Attachments

(2 files)

Translate.Next introduced the ability to mark placeables in translations with the same algorithm as in source strings.

Since the allCapitalsString parser detects CAPITALS as placeables if they only consist of ASCII-characters, it doesn't work too well in translations, which often contain other characters as well. See the attachment to see how only half of the word is marked as placeable.

There are other issues with the allCapitalsString parser, namely detecting false positives (all examples in the screenshot).

We should drop marking CAPITALS as placeables.

Alternatives: only mark CAPITALS when they are surrounded with whitespace/punctuation.

Looking at these examples, should capital words even be marked? As far as I understand them, placeables should be terms that do not need to be translated, and that is not the case for any of these. If that is the case, I'd advocate to simply remove that parser.

(In reply to Adrian Gaudebert [:adrian] from comment #1)

Looking at these examples, should capital words even be marked? As far as I understand them, placeables should be terms that do not need to be translated, and that is not the case for any of these. If that is the case, I'd advocate to simply remove that parser.

+1 on removing it. That might be useful in some edge cases, were you want to copy an acronym (e.g. URL), but in the majority of cases we end up with untranslated content because of the confusion created by this.

Mentor: adrian
Assignee: nobody → kathiekim95
Status: NEW → ASSIGNED

Hello @Adrian, concerning this bug fix, should I work on removing the parser or work on stop marking CAPITALS as placeables.

This bug is about removing the allCapitalsString parser entirely from the code base. You should search for all places where it appears, remove it, and then make sure capital words are not matched anymore in the UI and that all tests pass.

Thanks for clarity @Adrian

Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Whiteboard: outreachyround19
You need to log in before you can comment on or make changes to this bug.