Making WordPress.org

Opened 3 years ago

Last modified 3 years ago

#5672 new enhancement

Currently if author changes his http -> https if a translation contains a https but the translation does not have it, the translation will be fuzzed.

Reported by: psmits1567's profile psmits1567 Owned by:
Milestone: Priority: normal
Component: Translate Site & Plugins Keywords:
Cc:

Description

This behavior causes a lot of work for PTE/GTE
It would be great if this is fixed automatically instead of setting it to "fuzzy"
There are two situations when this happens:

  1. When the original and translation does start with http in the past, and changed to https, it is mostly the url of the author or plugin/theme
  2. It could also be in the middle of the sentence, as it is a link to a document or plugin/theme

It would be great to enhance the fuzzy bot to correct this if it is found.
It would save a lot of work to correct this afterwards, often it is not noticed and the line stays "fuzzy"

Change History (4)

This ticket was mentioned in Slack in #polyglots by psmits1567. View the logs.


3 years ago

#2 @tobifjellner
3 years ago

Any automatic editing of the target string should only happen if the same URL is present in the translation. If the translation leads to a different URL, then the string should be left as fuzzy, since a human will need to verify if any change will be needed.

#3 @dd32
3 years ago

I think the only time this should/would be applied are cases where the string is an exact match, as that's far easier than translated strings where the changed URL could potentially mean a context change? I'm not sure, writing that makes me think I'm off-base and that I agree that a URL that was kept the same in the original translation can probably safely just be updated.

For example, in psuedocode for item 1:

IF original is only a URL
  AND is now fuzzy
  AND Translation of old original was an exact match of original (ie. http://example.com is original and translation)
  OPTIONALLY AND the new original only varies by http => https
THEN
 - Update translation to be exact match of new original

That's the simplest one, but also applying to longer strings such as Example http://example.com Example which is example 2 above is possible but also feels like it could be more fragile, and is more complex:

IF original contains a URL
  AND is now fuzzy
  AND original varies only by a changed URL
THEN
 - Swap out changed URLs, leaving translated URLs alone
 - Create new translation with changed URLs

(Funny that, in psuedocode it seems easier!)

#4 @Nao
3 years ago

Both of the samples are what I expected to happen too when I mentioned this in Slack.
It'd be great if existing fuzzies that match the rule are automatically updated.

Here's an example of Fuzzy caused by the case of "item 1" change.
https://translate.wordpress.org/projects/wp-themes/blossom-shop/ja/default/?filters%5Btranslated%5D=yes&filters%5Bstatus%5D=fuzzy

Note: See TracTickets for help on using tickets.