Re: [i18n-activity] RTL named group support in URLPattern (#1358)

_The following summarises the request to i18n WG, from wanderview on 21 Mar 2021._

No spec yet, this is being discussed in issues on the WICG proposal repo.
https://github.com/WICG/urlpattern/issues/43

In https://github.com/WICG/urlpattern we are incubating a new proposal for a URL pattern matching web API.  Due to popularity among existing web developers we have chosen to base this on https://github.com/pillarjs/path-to-regexp.  The path-to-regexp pattern syntax has support for named match groups like `:foo`.  This follows existing URL matching conventions in other systems like ruby-on-rails.

In https://github.com/WICG/urlpattern/issues/43 it was raised that the `:foo` syntax is not RTL friendly because it presumes the beginning of the word is on the left.  We have not been able to get any additional feedback from this person about example RTL URLs where this would be significant or what might be an acceptable solution.

Also, there is an additional potentially RTL problem.  Since the group names are reflected in javascript properties we have chosen to make group names follow javascript identifier rules for allowed characters.  This logic assumes that the first character is on the left of the string.  From talking with javascript language experts it appears that the language is predominantly LTR and does not really have RTL support.

In https://github.com/WICG/urlpattern/issues/43#issuecomment-797783154 I am proposing that we maintain the status quo with `:foo` for now.  I'm looking for additional i18n review to determine if the RTL concern is particularly concerning and if this outcome is reasonable.  Thank you.

-- 
GitHub Notification of comment by r12a
Please view or discuss this issue at https://github.com/w3c/i18n-activity/issues/1358#issuecomment-1041837426 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 16 February 2022 16:18:18 UTC