https://bugzilla.wikimedia.org/show_bug.cgi?id=24998

           Summary: Handling of Type:Telephone number
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: Semantic MediaWiki
        AssignedTo: mar...@semantic-mediawiki.org
        ReportedBy: pe...@ifi.uio.no


The handling of Type:Telephone number is a bit broken, both with regard to
RFC3966, and with the display of the data tagged as such.

RFC3966 states that a tel:-uri in the global-number-form should start with a +,
followed by zero or more of '0' .. '9', '-', '.', '(', or ')', then a DIGIT,
and then zero or more of the same characters as berfore the required digit.

>From what i can see in SMW_DV_URI.php the parser translates space to '-' when
between digits, then removes all other spaces.  Then calls isValidTelURI which
doesnt recognize '(' or ')' as valid characters in the string.

A more correct way would be to translate ' ' to '-' everywhere and then fold
more than one '-' into a single one, and extend isValidTelURI to recognize '('
and ')' as it should.

With regard to the display of these values I think it would be much better if a
value tagges with a property of this type got shown as a link to the tel:-uri
with the original text as the text shown, both in the page where it is defined
and in semantic searches with #ask.

A bonus would of course be pretty-printing of the value tagged with regard to
national rules for correct digit-grouping and such.  Some of these rules are
quite easy to implement. In +47 we group numbers starting with 4, 8 and 9 as
3-2-3 and all other numbers as 2-2-2-2.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to