WME Validator Localization for Illinois

This script localizes WME Validator for Illinois, USA. You also need main package (WME Validator) installed.

目前为 2015-11-02 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name WME Validator Localization for Illinois
  3. // @namespace https://gf.qytechs.cn/en/users/9555
  4. // @version 1.1.8
  5. // @author xanderb
  6. // @description This script localizes WME Validator for Illinois, USA. You also need main package (WME Validator) installed.
  7. // @match https://editor-beta.waze.com/*editor/*
  8. // @match https://www.waze.com/*editor/*
  9. // @grant none
  10. // @run-at document-start
  11. // ==/UserScript==
  12. //
  13. /*
  14. See Settings->About->Available checks for complete list of checks and their params.
  15. Examples:
  16. Enable #170 "Lowercase street name" but allow lowercase "exit" and "to":
  17. "170.enabled": true,
  18. "170.params": {
  19. "regexp": "/^((exit|to) )?[a-z]/",
  20. "},
  21. Enable #130 "Custom check" to find a dot in street names, but allow dots at Ramps:
  22. "130.enabled": true,
  23. "130.params": {
  24. "titleEN": "Street name with a dot",
  25. "problemEN": "There is a dot in the street name (excluding Ramps)",
  26. "solutionEN": "Expand the abbreviation or remove the dot",
  27. "template": "${type}:${street}",
  28. "regexp": "D/^[^4][0-9]?:.*\\./",
  29. },
  30. *Note: use D at the beginning of RegExp to enable debugging on JS console.
  31. *Note: do not forget to escape backslashes in strings, i.e. use "\\" instead of "\".
  32. */
  33.  
  34. window.WME_Validator_United_States = {
  35. ".country": "United States",
  36. ".codeISO": "US",
  37. ".author": "xanderb",
  38. ".updated": "2015-10-31",
  39. ".link": "TODO: ",
  40. "128.enabled": true,
  41. "128.params": {
  42. "titleEN": "Bad TTS Street name",
  43. "problemEN": "Streets that start with St and Dr result in TTS reading Street or Drive",
  44. "solutionEN": "Add a period after Jr, St, Dr, or Rev where required",
  45. "template": "${street}#${altStreet[#]}",
  46. "regexp": "/((^| )(St|Dr)(?! ([NEWS][EW]?\\b|\/|\\())|(Jr|Rev))/"
  47. },
  48. "128.solutionLink": "W:Abbreviations_and_acronyms#Standard_suffix_abbreviations/USA",
  49. "129.enabled": true,
  50. "129.params": {
  51. "titleEN": "Incorrect Highway Name",
  52. "problemEN": "Illinois uses SR-xx for state and US-xx for national highway names",
  53. "solutionEN": "Rename the Street or Alt Street",
  54. "template": "${state}:${street}#${altStreet[#]}",
  55. "regexp": "/Illinois:.*(Il Hwy |State Hwy |Il-|SH-|State Rd |SR=|State Rte|IL-|ILL-|U\.?[Ss]\.? [Hh](WY|wy|ighway))/"
  56. },
  57. "129.solutionLink": "W:Illinois",
  58. "130.enabled": true,
  59. "130.solutionLink": "W:Road_names/USA#Exit_ramps_and_entrance_ramps_.28on-ramps.29",
  60. "130.params": {
  61. "titleEN": "Improper Exit Naming",
  62. "problemEN": "This segment has an entrance / exit name which does not follow the USA standards for exit naming, or is a ramp with non entrance / exit name",
  63. "solutionEN": "For numbered exits use \"Exit(s) ##: Name / Other Name\". For entrances & unnumbered exits use \"to Name / Other Name\". Separate all shields and names with slashes (/) and spaces. Verify if this is supposed to be a ramp",
  64. "template": "${rank}#${street}",
  65. "regexp": "/4#(?!(Exit|to|$))|( |\\b)(To|[Ee](?!xits? [\\dA-Z-]+:)[Xx][Ii][Tt][Ss]?( [Tt][Oo])?:?|to:|TO|Exits? \\d+[\\w\\-]*( \\\/ | \\- | |:[ \\w]*:))( |\\b|$)/"
  66. },
  67. "131.enabled": true,
  68. "131.params": {
  69. "titleEN": "Not Illinois",
  70. "problem": "The segment is assigned to another state",
  71. "solutionEN": "Make sure you are editing in IL and change it",
  72. "template": "${state}",
  73. "regexp": "!/Illinois/"
  74. },
  75. "131.solutionLink": "W:Creating_and_editing_road_segments#Address_Properties",
  76. "132.enabled": true,
  77. "132.params": {
  78. "titleEN": "Wrong name for City or County street",
  79. "problemEN": "CS and Cs are not read correctly by TTS or County Hwy Name is wrong",
  80. "solutionEN": "Check sources and change the street's name",
  81. "template": "${state}:${street}#${altStreet[#]}",
  82. "regexp": "/Illinois:.*(Cs-|CS-|County Hwy|County Rd|Cr-|Co Rd|Ch-|CH-)/"
  83. },
  84. "132.solutionLink": "W:Highway_naming/USA",
  85. "133.enabled": true,
  86. "133.params": {
  87. "titleEN": "Alley not PLR",
  88. "problemEN": "Alleys should be set to the PLR Road Type",
  89. "solutionEN": "Change Road Type",
  90. "template": "${street}:${typeRank}",
  91. "regexp": "/.*(Alley| Aly):[^7]/"
  92. },
  93. "133.solutionLink": "W:Road_types/USA#Parking_Lot_Road",
  94. "134.enabled": true,
  95. "134.params": {
  96. "titleEN": "City Name on Freeway",
  97. "problemEN": "City names on Freeway segments can cause detours",
  98. "solutionEN": "Remove the City Name",
  99. "template": "${typeRank}:${city}",
  100. "regexp": "/15:.+$/"
  101. },
  102. //Freeway lock
  103. "150.enabled": true,
  104. "150.params": {
  105. // {number} minimum lock level
  106. "n": 5,
  107. },
  108. //Major Highway lock
  109. "151.enabled": true,
  110. "151.params": {
  111. // {number} minimum lock level
  112. "n": 3,
  113. },
  114. //Minor Highway lock
  115. "152.enabled": true,
  116. "152.params": {
  117. // {number} minimum lock level
  118. "n": 3,
  119. },
  120. //Ramp lock
  121. "153.enabled": true,
  122. "153.params": {
  123. // {number} minimum lock level
  124. "n": 2,
  125. },
  126. //Primary Street lock
  127. "154.enabled": true,
  128. "154.params": {
  129. // {number} minimum lock level
  130. "n": 2,
  131. },
  132. //Default US checks
  133. "24.enabled": !0,
  134. "25.enabled": !0,
  135. "27.enabled": !0,
  136. "34.enabled": !0,
  137. "35.enabled": !0,
  138. "38.enabled": !0,
  139. "39.enabled": !0,
  140. "43.enabled": !0,
  141. "48.enabled": !0,
  142. "78.enabled": !0,
  143. "87.enabled": !0,
  144. "90.enabled": !0,
  145. "106.enabled": !0,
  146. "107.enabled": !0,
  147. "108.enabled": !0,
  148. "109.enabled": !0,
  149. "112.enabled": !1,
  150. "118.enabled": !0,
  151. "116.enabled": !0,
  152. "119.enabled": !0,
  153. "120.enabled": !0,
  154. "121.enabled": !0,
  155. "172.enabled": !0,
  156. "173.enabled": !0,
  157. "190.enabled": !0,
  158. "192.enabled": !0,
  159. "170.enabled": !0,
  160. "170.params": {
  161. regexp: "/^(?!(to) [^a-z])((S|N|W|E) )?[a-z]/"
  162. },
  163. "171.enabled": true,
  164. "171.solutionLink": "W:Abbreviations_and_acronyms/USA#Standard_suffix_abbreviations",
  165. "171.params": {
  166. "regexp": "/((?!(\\bPhila|\\bPenna|.(\\bWash|\\bCmdr|\\bProf|\\bPres)|..(Adm|\\bSte|\\bCpl|\\bMaj|\\bSgt|\\bRe[vc]|\\bR\\.R|\\bGov|\\bGen|\\bHon|\\bCpl)|...(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|...(#| )[NEWSR])).{5}\\.|(?!(hila|enna|(\\bWash|\\bCmdr|\\bProf|\\bPres)|.(\\bAdm|\\bSte|\\bCpl|\\bMaj|\\bSgt|\\bRe[vc]|\\bR\\.R|\\bGov|\\bGen|\\bHon|\\bCpl)|..(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|..(#| )[NEWSR])).{4}\\.|(?!(ila|nna|(ash|mdr|rof|res)|(\\bAdm|\\bSte|\\bCpl|\\bMaj|\\bSgt|\\bRe[vc]|\\bR\\.R|\\bGov|\\bGen|\\bHon|\\bCpl)|.(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|.(#| )[NEWSR])).{3}\\.|(?!(la|na|(sh|dr|of|es)|(dm|te|pl|aj|gt|e[vc]|\\.R|ov|en|on|pl)|(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|(#| )[NEWSR])).{2}\\.|(#|^)[^NEWSR]?\\.)|(((?!\\b(D|O)).|#|^)\'(?![sl]\\b)|(?!\\bNat).{3}\'l|(#|^).{0,2}\'l)|(Dr|St)\\.(#|$)|,|;|\\\\|((?!\\.( |#|$|R))\\..|(?!\\.( .|#.|$|R\\.))\\..{2}|\\.R(#|$|\\.R))|[Ee]x(p|w)y|Tunl|Long Is\\b|Brg/",
  167. "problemEN": "The street name has incorrect abbreviation, or character",
  168. "solutionEN": "Check upper/lower case, a space before/after the abbreviation and the accordance with the abbreviation table. Remove any comma (,), backslash (\\), or semicolon (;)"
  169. },
  170. };

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址