[Script] WME Validator 1.1.7 / 06.03.2015

Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Moderator: Unholy

Forum rules
Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

DO NOT START a new thread unless it is about a new idea. Keep discussion of existing tools within the main thread for that tool.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Re: [Script] WME Validator 1.1.0 / 29.08.2014

Postby berestovskyy » Sat Aug 30, 2014 6:19 am

Guys,
Please turn off the 'Two way by default' option in advanced settings. I'll fix it ASAP.

Edit: fixed in v1.1.1
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 918
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 233 times
Been thanked: 614 times

Re: [Script] WME Validator 1.1.1 / 30.08.2014

Postby berestovskyy » Sat Aug 30, 2014 7:21 am

30.08.2014 v1.1.1:
- Fixed 'Two-way segments by default' option
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 918
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 233 times
Been thanked: 614 times

Re: [Script] WME Validator 1.1.1 / 30.08.2014

Postby berestovskyy » Sat Aug 30, 2014 9:38 pm

alexschrod wrote:Any reason the Custom Templates are locked to having only two

If you have few useful custom checks, please share them with other users! To do so, please post them here or create your own localization package.

You can customize, enable, disable and add custom checks with the localization pack. Optionally, you can translate user interface and check descriptions, but it's not mandatory.


Regarding the color selection. If a segment has a blue note and a red error it will be highlighted in red, because in Validator errors are more important than notes. In a turn, custom checks are more important than errors. So I'm not sure if a color selection will make any sense having this predefined color "hierarchy" in Validator.

But if you're looking for a way to highlight specific issues on the map, you have 2 options:
1. Click "Search" tab and put the issue(s) you're looking for into the "Reported as" field. For example, you can put there *lock* to highlight just issues with the lock levels.

2. Or you can scan an area and then click "Show report" button. Every permalink you open in the specific part of the report will have exactly the same issue.
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 918
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 233 times
Been thanked: 614 times

Re: [Script] WME Validator 1.1.1 / 30.08.2014

Postby berestovskyy » Wed Sep 03, 2014 6:19 pm

manoeuvre wrote:Unable to get my custom localization script to work.

Very good start! Few notes:

1. You have to put checks inside the country block, i.e.:
Code: Select all
window.WME_Validator_Canada = {
  // checks should be here
}


2. You don't need to add a template to checks #171 and #174, since they are designed to match street names. We use templates in custom checks only (#130-#139). Please refer this forum post for the check params (or in Validator click Settings (gear)->About->Available checks.)

3. To use a backslash inside a string you need to escape it, i.e. to match an alphanumeric character use "\\w" and to match a dot use "\\."

Here is your script with the above changes:
Code: Select all
// ==UserScript==
// @name                WME Validator Localization for Canada
// @version             1.1.1
// @description         This script localizes WME Validator for Canada. You also need main package (WME Validator) installed.
// @match               https://editor-beta.waze.com/*editor/*
// @match               https://www.waze.com/*editor/*
// @grant               none
// @run-at              document-start
// ==/UserScript==
//

window.WME_Validator_Canada = {
  ".country": "Canada",
  ".codeISO": "CA",
  ".author": "manoeuvre",
  ".updated": "2014-09-03",
     
  "171.enabled": true,
  "171.params": {
    "regexp": "/ (Aly|Avenue|Bnd|Boulevard|By-pass|Centre|Center|Circle|Cl|Court|Cr|Ct|Crescent|Cul-de-sac|Drive|Extension|Fld|Gardens|Gln|Grn|Grounds|Grv|Harbour|Harbr|Heights|Highway|Hl|Holw|Landing|Landng|Ln|Mnr|Mdw|Mountain|Orchard|Park|Parkway|Passage|Pass|Ptwy|Place|Pt|Prt|Pvt|Promenade|Rg|Rdge|Road|Square|Subdiv|Street|Terrace|Ter|Trl|Tr|Thick|Tline|Turnabt|Village|Villge|North|East|South|West)$/i",
  },

  "174.enabled": true,
  "174.params": {
    "titleEN": "St. not St",
    "problemEN": "St. not St",
    "solutionEN": "Use St. instead of St",
    "regexp": "/^St \\w\\w/",
  },
}
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 918
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 233 times
Been thanked: 614 times

Re: [Script] WME Validator 1.1.1 / 30.08.2014

Postby berestovskyy » Wed Sep 03, 2014 8:52 pm

sketch wrote:Why do you need two backslashes?

You don't if you put your regexp into an edit field, i.e. when you use Validator interface for the custom checks you should use just \w, \d and \.

But you do need to double each backslash when you put the regexp into a JavaScript string, i.e.
Code: Select all
"regexp": "/this is a JS string, so we use \\w and \\. here/",

In JS, Java, C, C++ and many other programming languages we use a backslash as an escape character. Have a look at the Using special characters in strings at MDN.
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 918
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 233 times
Been thanked: 614 times

Re: [Script] WME Validator 1.1.1 / 30.08.2014

Postby berestovskyy » Sun Sep 28, 2014 5:15 pm

Guys,
Everything about connections is not working since the last WME update. Some checks I had to disable manually, but some checks (like those unneeded node A/B) just silently lost some of their functionality.

I'm sorry about that, but I'm busy at the moment and simply have no time to fix and test it. I'll be busy till the end of October or so :(

I'm also looking into some options to fix this sooner...

PS. For the unneeded node A/B you can change something insignificant in the segment's properties as a workaround. Try to change lock or alt name for instance...
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 918
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 233 times
Been thanked: 614 times

Re: [Script] WME Validator 1.1.2 / 01.10.2014

Postby berestovskyy » Tue Sep 30, 2014 10:40 pm

01.10.2014 v1.1.2:
- Disabled for IL #28 'Street name on two-way Ramp'
- Updated Polish abbreviations
- Fixed custom checks #135-139
- Updated Spanish translations thanks to robindlc
- Enabled for NL #150-154 'Lock levels'
- Updated segment properties UI
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 918
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 233 times
Been thanked: 614 times

Re: [Script] WME Validator 1.1.2 / 01.10.2014

Postby berestovskyy » Wed Oct 01, 2014 6:57 am

Nomenclator1677 wrote:But right now, validator is useless as the display is on the upper left corner of the window.

Sorry, I've tried World and NA servers, beta and prod WME, but I can't reproduce the issue.

Could you please include a screenshot?
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 918
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 233 times
Been thanked: 614 times

Re: [Script] WME Validator 1.1.2 / 01.10.2014

Postby berestovskyy » Wed Oct 01, 2014 7:20 am

Sorry, I'm not sure if it is a screenshot of Validator :?
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 918
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 233 times
Been thanked: 614 times

Re: [Script] WME Validator 1.1.3 / 07.10.2014

Postby berestovskyy » Tue Oct 07, 2014 10:10 pm

07.10.2014 v1.1.3:
- Updated Polish translations thanks to Zniwek
- Enabled for ES #130-133 'Custom lock levels'
- Updated #114 and #115 'Non-drivable connected to drivable': excluded Railroads
berestovskyy
Waze Global Champs
Waze Global Champs
 
Posts: 918
Joined: Fri Jul 15, 2011 1:50 pm
Has thanked: 233 times
Been thanked: 614 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: Bing [Bot], Crew_Rest