[wp-meta] [Making WordPress.org] #5154: Automatically fix some translation errors
Making WordPress.org
noreply at wordpress.org
Fri May 7 05:40:56 UTC 2021
#5154: Automatically fix some translation errors
--------------------------------------+---------------------
Reporter: dd32 | Owner: (none)
Type: defect | Status: closed
Priority: normal | Milestone:
Component: Translate Site & Plugins | Resolution: fixed
Keywords: |
--------------------------------------+---------------------
Comment (by dd32):
Replying to [comment:19 dd32]:
> Original: `In March 2004, the <a href="%1$s">.... 80%% of our users?
....`
> Submitted: `In March 2004, the <a href="%1$s">.... 80% of our users?
....`
>
> The translation fixer kicked in and transformed it like so:
> Submitted: `In March 2004, the <a href="%1$s">.... 80% of our users?
....`
> Whitespace fix: `In March 2004, the <a href="%1$s">.... 80%of our users?
....`
> Percent fix: No change, doesn't apply as `%o` is a valid printf-style
placeholder (which we shouldn't touch)
> Result: Still has warnings because `%%` isn't present. Translation fix
failed, Translation accepted with warnings about improper placeholders.
Just to clarify even further, if after the fixer runs, there's any
warnings (either existing or new ones) it doesn't touch the string, it
bails, and whatever was submitted gets used. The only time the fixer makes
a change, is it making the change 100% resolves the warning and doesn't
produce new warnings.
So for example, If after it runs it now has a `%o` where it didn't
previously, that's a new warning so it'll abort and not change anything.
A better example is maybe the strings with leading/trailing whitespace
Original: `Blue⏎`
Submitted: `Blauw`
Fixer kicks in and updates it to: `Blauw⏎` suffixing the trailing
whitespace that the original string had, The trailing whitespace warning
is no longer present and it didn't generate any new warnings so it saves
it as `Blauw⏎`.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/5154#comment:20>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list