Lucas_Werkmeister_WMDE added a comment.
Our UI uses the parse API for strings (since T261071#6493792 <https://phabricator.wikimedia.org/T261071#6493792>), but if I understand correctly, @Dominicbm is using the API directly, not editing via the UI. We could decide to do more of these “cleanups” as normalizations, like the Unicode normalization (which means they would also apply when not using the parse API); I’m not sure how I feel about that myself. Another thing we could do, which would be a more “harmless” change, would be to improve the error message you get from the API for bad strings. Currently, it’s a generic “malformed value” message, but it should be possible to provide a custom message without too much trouble (`ValidatorBuilders::getCommonStringValidators()` uses a `RegexValidator` to check whitespace, which already supports a custom `$errorCode` as an optional constructor argument) – might even qualify as a #good_first_task <https://phabricator.wikimedia.org/tag/good_first_task/>. (Also, IMHO, the meaning of this task is by now so broad that it’s almost pointless. Initially it was about trailing whitespace actually being saved <https://www.wikidata.org/w/index.php?title=Q6486700&diff=10051134&oldid=10051107>, which I assume hasn’t been an issue for years; at some point in between, it was about unicode normalization, which we now also do; now it feels like a generic catch-all for whitespace-related problems?) TASK DETAIL https://phabricator.wikimedia.org/T47925 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Dominicbm, Manuel, Lucas_Werkmeister_WMDE, Addshore, Herzi.Pinki, MichaelSchoenitzer, Billinghurst, Esc3300, ChristianKl, thiemowmde, Ricordisamoa, Aklapper, adrianheine, Snaterlicious, Mushroom, Lydia_Pintscher, daniel, Raymond, Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja, Akuckartz, Dinadineke, DannyS712, Nandana, lucamauri, tabish.shaikh91, Lahi, Gq86, GoranSMilovanovic, Jayprakash12345, JakeTheDeveloper, QZanden, merbst, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, TheDJ, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
