WME Validator Localization for Ireland

This script localizes WME Validator for Ireland. You also need main package (WME Validator) installed.

当前为 2015-10-01 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name WME Validator Localization for Ireland
  3. // @version 1.1.8.6
  4. // @author lsin023
  5. // @description This script localizes WME Validator for Ireland. You also need main package (WME Validator) installed.
  6. // @match https://editor-beta.waze.com/*editor/*
  7. // @match https://www.waze.com/*editor/*
  8. // @grant none
  9. // @run-at document-start
  10. // @namespace https://greasyfork.org/users/15899
  11. // ==/UserScript==
  12. //
  13. /*
  14. See Settings->About->Available checks for complete list of checks and their params.
  15.  
  16. Examples:
  17.  
  18. Enable #170 "Lowercase street name" but allow lowercase "exit" and "to":
  19. "170.enabled": true,
  20. "170.params": {
  21. "regexp": "/^((exit|to) )?[a-z]/",
  22. "},
  23.  
  24. Enable #130 "Custom check" to find a dot in street names, but allow dots at Ramps:
  25. "130.enabled": true,
  26. "130.params": {
  27. "titleEN": "Street name with a dot",
  28. "problemEN": "There is a dot in the street name (excluding Ramps)",
  29. "solutionEN": "Expand the abbreviation or remove the dot",
  30. "template": "${type}:${street}",
  31. "regexp": "D/^[^4][0-9]?:.*\\./",
  32. },
  33. *Note: use D at the beginning of RegExp to enable debugging on JS console.
  34. *Note: do not forget to escape backslashes in strings, i.e. use "\\" instead of "\".
  35. */
  36.  
  37. window.WME_Validator_Ireland = {
  38. ".country": "Ireland",
  39. ".codeISO": "IE",
  40. ".author": "lsin023",
  41. ".updated": "2015-10-01",
  42. ".link": "TODO: ",
  43. "70.enabled": true,
  44. "70.problemLink": "W:How_to_label_and_name_roads_(Ireland)#Road_Types",
  45. "71.enabled": true,
  46. "71.problemLink": "W:How_to_label_and_name_roads_(Ireland)#Road_Types",
  47. "72.enabled": true,
  48. "72.problemLink": "W:How_to_label_and_name_roads_(Ireland)#Road_Types",
  49. "160.enabled": true,
  50. "160.params": {
  51. "solutionEN": "Rename the street to 'Mxx' or 'Mxx N/S/W/E' or change the road type",
  52. "regexp": "!/^M[0-9]+( [NSWE])?$/"
  53. },
  54. "160.problemLink": "W:How_to_label_and_name_roads_(Ireland)#Road_Types",
  55. "161.enabled": true,
  56. "161.params": {
  57. "solutionEN": "Rename the street to 'Nxx' or 'Nxx Local Name' or change the road type",
  58. "regexp": "!/^N[0-9]+( .*)?$/"
  59. },
  60. "161.problemLink": "W:How_to_label_and_name_roads_(Ireland)#Road_Types",
  61. "162.enabled": true,
  62. "162.params": {
  63. "solutionEN": "Rename the street to 'Rxxx' or 'Rxxx Local Name' or change the road type",
  64. "regexp": "!/^R[0-9]+( .*)?$/"
  65. },
  66. "162.problemLink": "W:How_to_label_and_name_roads_(Ireland)#Road_Types",
  67. "169.enabled": true,
  68. "169.params": {
  69. "solutionEN": "Rename the segment in accordance with the guidelines",
  70. "regexp": "!/^[a-záéíóúA-ZÁÉÍÓÚ0-9\\. '(/)-]+$/"
  71. },
  72. "169.problemLink": "W:How_to_label_and_name_roads_(Ireland)#Abbreviations",
  73. "170.enabled": true,
  74. "170.params": {
  75. "regexp": "/\\b(?!(?:to|s|of|na|an|penny)\\b)(?:[a-záéíóú]\\w*)\\b/"
  76. },
  77. "171.enabled": true,
  78. "171.params": {
  79. "regexp": "/\\b(?:Aly|Arc|Avenue|Bch|Bnd|Btm|Blvd|Brg?|Bdge?|Brks?|Bgs?|Byp|Cswy|Ctrs?|Cirs?|Clfs?|Close|Cors?|Court|Crk?|Cvs?|Crescent|Crs[et]|Dl|Drive|Ests?|Flds?|Gdns?|Gtwy|Gl?n|Gt|Gr[nv]?|Hvn|Hbrs?|Hls?|Hts|Hghts|Jctn|Lane|Lil|Ldg|Lower|Lr|Mnrs?|Mdws?|Mt|Orch|Ps?ge|Pde|Park|Pnes?|Place|Plns?|Plz|Please|Prts?|Private|Qy|Rename|Road|Spgs?|Squ?are|Saint|St(?!(?:\\.|$| (?:Lwr|Upr|[NSWE]|Great|Little|Middle|Arcade|Gardens|Cres)$))|St[an]|Str|Stree?t|Ter|Terr?ace|Tunl|Uppe?r?|Ur|Val|Vlys?|Vdct|Vw|Vlgs?|Wl?k|Wls?|North|East|South|West)\\b/i"
  80. },
  81. "171.problemLink": "W:How_to_label_and_name_roads_(Ireland)#Abbreviations"
  82. };