Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a lot of typos and initial codespell action run #7752

Merged
merged 17 commits into from
Oct 5, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# GitHub Action to automate the identification of common misspellings in text files.
# https://github.com/codespell-project/actions-codespell
# https://github.com/codespell-project/codespell
name: codespell
on: [push, pull_request]
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: codespell-project/actions-codespell@master
with:
peternewman marked this conversation as resolved.
Show resolved Hide resolved
check_filenames: true
skip: ./.git,./data/territory_languages.json,./data/imagery.json,./data/languages.json,./data/locales.json,./data/address_formats.json,./dist/locales,./docs/img,./dist/img,./data/presets/categories.json,./data/presets/fields.json,./data/presets/presets.json,./data/presets.yaml,./data/taginfo.json
ignore_words_list: "nd,chancel"
4 changes: 2 additions & 2 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ iD is written in a modular style and bundled with [rollup.js](http://rollupjs.or
which makes hot code replacement tricky. (ES6 module exports are
[immutable live bindings](http://www.2ality.com/2015/07/es6-module-exports.html)).
Because of this, the parts of iD which are designed for customization are exported
as live bound objects that can be overriden at runtime _before initializing the iD context_.
as live bound objects that can be overridden at runtime _before initializing the iD context_.

### Services

Expand Down Expand Up @@ -219,7 +219,7 @@ iD.fileFetcher.cache().imagery = [{
```

Each imagery source should have the following properties:
* `id` - Unique identifier for this source (also used as a url paramater)
* `id` - Unique identifier for this source (also used as a url parameter)
* `name` - Display name for the source
* `type` - Source type, currently only `tms` is supported
* `template` - Url template, valid replacement tokens include:
Expand Down
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ A one-way line does not have a valid connection at its first or last node.

##### `incompatible_source`

The `source` tag of a feature references a data source known to have a license incompatiable with OpenStreetMap. This is very much not exhaustive and currently only flags sources containing "google".
The `source` tag of a feature references a data source known to have a license incompatible with OpenStreetMap. This is very much not exhaustive and currently only flags sources containing "google".

##### `invalid_format`

Expand Down
20 changes: 10 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ _Press <kbd>G</kbd> to toggle change highlighting._
* Fix error upon changing the Unsquare Building threshold ([#6690])
* Don't hide all multilingual names upon deleting one ([#6491])
* Correctly populate the Bike Lanes field with existing values ([#6141])
* Show the correct location for coordinates in the `N DD° MM.MMM' W DD° MM.MMM'` format without a commma separator ([#6582])
* Show the correct location for coordinates in the `N DD° MM.MMM' W DD° MM.MMM'` format without a comma separator ([#6582])
* Don't treat platforms with a `kerb` tag as primarily curbs ([#6742])
* Remove deleted features from the map immediately when undoing or redoing ([#6480])
* Properly resize Mapillary and Bing Streetside photos when resizing the viewer ([#6286])
Expand Down Expand Up @@ -1433,7 +1433,7 @@ _Map all the branded businesses in your town!_
[#5901]: https://github.com/openstreetmap/iD/issues/5901

#### :mortar_board: Walkthrough / Help
- Make the keyboard shorcuts viewable on narrow window sizes ([#6174])
- Make the keyboard shortcuts viewable on narrow window sizes ([#6174])

[#6174]: https://github.com/openstreetmap/iD/issues/6174

Expand Down Expand Up @@ -1607,7 +1607,7 @@ _Map all the branded businesses in your town!_
[#5979]: https://github.com/openstreetmap/iD/issues/5979

#### :rocket: Presets
* Add Bar field to Restuarant, Cafe, and Hotel ([#5947], [#5970], thanks [@alphagamer7])
* Add Bar field to Restaurant, Cafe, and Hotel ([#5947], [#5970], thanks [@alphagamer7])
* Rename Jeweler to Jewelry Store ([#5948])
* Add unsearchable generic Boundary preset ([#5975])
* Don't render roads with a "footway" tag too thin ([#5936])
Expand Down Expand Up @@ -1932,7 +1932,7 @@ _Click the new "zoom to" link on the sidebar under the preset icon, or press <kb
#### :sparkles: Usability

* Open the combobox when clicking anywhere in the text field ([#5596], [#5636], thanks [@maxgrossman])
* Add close buttom to the save sidebar ([#5614], [#5622], thanks [@maxgrossman])
* Add close button to the save sidebar ([#5614], [#5622], thanks [@maxgrossman])
* Render reservoirs and fountains with the water fill pattern ([#5606], thanks [@RudyTheDev])
* Render marine barriers with a blue stroke ([#5606], thanks [@RudyTheDev])
* Press enter to submit values in combo fields without deselecting the feature ([#5725])
Expand Down Expand Up @@ -3488,7 +3488,7 @@ _Check out the new help texts by opening the Help pane (shortcut <kbd>H</kbd>)._
* Add Retail Building to buildings, switch Commercial icon to suitcase ([#4590])
* Change tourist attraction icon from monument to star ([#4563], [#4584], thanks [@lucymk])
* Add preset for `man_made=monitoring_station` ([#4581], thanks [@abdeldjalil09])
* Deprectate (i.e. make non-searchable) `office=administrative` ([#4578])
* Deprecate (i.e. make non-searchable) `office=administrative` ([#4578])
* Update transit-related presets for Public Transport v2 schema ([#3041], [#3508], [#4566], [#4585])
* Changed Marketplace preset to not default to `building=yes` ([#4559], [#4568], thanks [@tastrax])
* Add preset for `railway=miniature` ([#4555], thanks [@tastrax])
Expand Down Expand Up @@ -5025,7 +5025,7 @@ _Map traffic signals, stop signs, benches, crossings, street lamps, fountains, t
##### 2016-Mar-18
* Avoid jumpiness when dragging node markers (#3003)
* Rename "Dock" -> "Wet Dock / Dry Dock" (#3030)
* Refresh lables when switching to a new GPX file (#3032)
* Refresh labels when switching to a new GPX file (#3032)
* Fix bug where adding a space to a name would undo a previous edit (#3035)
* Display GPX tracks immediately when loaded or toggled (#3027)
* Include "Local GPX" in imagery used list when GPX loaded via url parameter (#2804)
Expand Down Expand Up @@ -5077,13 +5077,13 @@ _Map traffic signals, stop signs, benches, crossings, street lamps, fountains, t
* Add 'building' combo field for ice rink and swim facility
* Building field should be combo not typeCombo (because `building=yes` is a valid tag)
* Link to wiki for guidance on good changeset comments (#2923, thanks @kepta)
* Make preset fields section collapsable (#2894)
* Make preset fields section collapsible (#2894)
* Make sure DrawLine mode is called with a clean pre-operation graph (#2303, thanks @tyrasd)
* Default to user's language when localizing names (#2882, thanks @kepta)
* Autocomplete changeset comments from previous changeset comments (#2002, thanks @jfirebaugh)
* Add universal multiline text field for description, fixme (#1518)
* Fix crash when selecting a category preset with enter button
* Remove overly agressive regexes for cleaning up websites and emails (#2892, thanks @kepta)
* Remove overly aggressive regexes for cleaning up websites and emails (#2892, thanks @kepta)
* Correct typo "Platic" -> "Plastic" (#2925, thanks @M1dgard)
* Rename "Unclassified Road" to "Minor Road" (#2916)

Expand Down Expand Up @@ -5433,7 +5433,7 @@ _Map traffic signals, stop signs, benches, crossings, street lamps, fountains, t
##### 2014-Mar-28
* Disable circularize and orthogonalize operations when way is <80% contained in the viewport
* Add place=neighbourhood preset
* Add denomination=* field for cemetary, graveyard, funeral home
* Add denomination=* field for cemetery, graveyard, funeral home
* Add preset for shop=funeral_directors
* Add icon for public_transport=stop_position
* Support quartile scheme for any imagery source (#2112)
Expand All @@ -5451,7 +5451,7 @@ _Map traffic signals, stop signs, benches, crossings, street lamps, fountains, t
* Add amenity=nightclub
* Add smoking field for many presets under amenity, building, office, tourism (#1990)
* barrier=fence shouldn't be an area (fixes #2158)
* Remove building_area from hospital, school, kindergarden
* Remove building_area from hospital, school, kindergarten
* Fix recycling field keys (#2140)


Expand Down
2 changes: 1 addition & 1 deletion css/50_misc.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/* narrow width miscellanous things */
/* narrow width miscellaneous things */
path.line.shadow.tag-aerialway,
path.line.shadow.tag-attraction-summer_toboggan,
path.line.shadow.tag-attraction-water_slide,
Expand Down
2 changes: 1 addition & 1 deletion css/80_app.css
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ button.add-note svg.icon {
justify-content: flex-end;
}

/* Hide/Toggle collapsable sections (aka Disclosure)
/* Hide/Toggle collapsible sections (aka Disclosure)
------------------------------------------------------- */
.hide-toggle .icon.pre-text {
vertical-align: text-top;
Expand Down
4 changes: 2 additions & 2 deletions data/presets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ A basic preset is of the form:
],
// The geometry types for which this preset is valid.
// options are point, area, line, and vertex.
// vertexes are points that are parts of lines, like the nodes in a road
// vertices are points that are parts of lines, like the nodes in a road
// lines are unclosed ways, and areas are closed ways
"geometry": [
"point", "area"
Expand Down Expand Up @@ -379,7 +379,7 @@ For combo fields, spaces are replaced with underscores in the tag value if `snak

##### `caseSensitive`

For combo fields, case-sensitve field values are allowed if `caseSensitive` is `true`. The default is `false`.
For combo fields, case-sensitive field values are allowed if `caseSensitive` is `true`. The default is `false`.

##### `min_value`

Expand Down
2 changes: 1 addition & 1 deletion data/presets/fields/healthcare/speciality.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"reference": {
"key": "healthcare"
},
"label": "Specialties"
"label": "Specialities"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume because it's a label this is a safe change?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Label changes are okay if needed, but Specialties is the common American spelling for this and is intentional.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, fixed in Codespell in codespell-project/codespell@ed89a55 .

Okay undone @quincylvania , although it's rather mixed messages being in a British English file with a US English Label, or is that covered by further translation?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So British English is the default for OSM's tags, while US English is the default for iD's interface. This causes lots of these types of mismatches in the preset files. Kerb/curb, groyne/groin, centre/center, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh dear, that's entertaining!

}
2 changes: 1 addition & 1 deletion data/presets/presets/amenity/kindergarten.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"point"
],
"terms": [
"kindergarden",
peternewman marked this conversation as resolved.
Show resolved Hide resolved
"kindergarten",
"pre-school"
],
"tags": {
Expand Down
2 changes: 1 addition & 1 deletion data/presets/presets/building/farm_auxiliary.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"terms": [
"agriculture",
"auxilary",
"auxiliary",
"chicken coop",
"farm auxiliary",
"pigsty",
Expand Down
2 changes: 1 addition & 1 deletion data/presets/presets/building/kindergarten.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"area"
],
"terms": [
"kindergarden",
"kindergarten",
"pre-school"
],
"tags": {
Expand Down
2 changes: 1 addition & 1 deletion data/presets/presets/shop/video.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"terms": [
"DVD",
"VHS",
"video casette"
"video cassette"
],
"tags": {
"shop": "video"
Expand Down
2 changes: 1 addition & 1 deletion data/presets/presets/tourism/artwork/graffiti.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"terms": [
"Street Artwork",
"Guerilla Artwork",
"Guerrilla Artwork",
"Graffiti Artwork"
],
"name": "Graffiti"
Expand Down
10 changes: 5 additions & 5 deletions modules/actions/circularize.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function actionCircularize(wayId, projection, maxAngle) {
var sign = d3_polygonArea(points) > 0 ? 1 : -1;
var ids, i, j, k;

// we need atleast two key nodes for the algorithm to work
// we need at least two key nodes for the algorithm to work
if (!keyNodes.length) {
keyNodes = [nodes[0]];
keyPoints = [points[0]];
Expand All @@ -55,8 +55,8 @@ export function actionCircularize(wayId, projection, maxAngle) {
}

// key points and nodes are those connected to the ways,
// they are projected onto the circle, inbetween nodes are moved
// to constant intervals between key nodes, extra inbetween nodes are
// they are projected onto the circle, in between nodes are moved
// to constant intervals between key nodes, extra in between nodes are
// added if necessary.
for (i = 0; i < keyPoints.length; i++) {
var nextKeyNodeIndex = (i + 1) % keyNodes.length;
Expand Down Expand Up @@ -119,7 +119,7 @@ export function actionCircularize(wayId, projection, maxAngle) {
graph = graph.replace(node);
}

// add new inbetween nodes if necessary
// add new in between nodes if necessary
for (j = 0; j < numberNewPoints; j++) {
angle = startAngle + (indexRange + j) * eachAngle;
loc = projection.invert([
Expand Down Expand Up @@ -147,7 +147,7 @@ export function actionCircularize(wayId, projection, maxAngle) {

// Check for other ways that share these keyNodes..
// If keyNodes are adjacent in both ways,
// we can add inBetween nodes to that shared way too..
// we can add inBetweenNodes to that shared way too..
if (indexRange === 1 && inBetweenNodes.length) {
var startIndex1 = way.nodes.lastIndexOf(startNode.id);
var endIndex1 = way.nodes.lastIndexOf(endNode.id);
Expand Down
2 changes: 1 addition & 1 deletion modules/actions/delete_multiple.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function actionDeleteMultiple(ids) {

var action = function(graph) {
ids.forEach(function(id) {
if (graph.hasEntity(id)) { // It may have been deleted aready.
if (graph.hasEntity(id)) { // It may have been deleted already.
graph = actions[graph.entity(id).type](id)(graph);
}
});
Expand Down
2 changes: 1 addition & 1 deletion modules/actions/disconnect.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { osmNode } from '../osm/node';


// Disconect the ways at the given node.
// Disconnect the ways at the given node.
//
// Optionally, disconnect only the given ways.
//
Expand Down
2 changes: 1 addition & 1 deletion modules/behavior/draw_way.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export function behaviorDrawWay(context, wayID, mode, startGraph) {
if (includeDrawNode) {
if (parentWay.isClosed()) {
// don't test the last segment for closed ways - #4655
// (still test the first segement)
// (still test the first segment)
nodes.pop();
}
} else { // discount the draw node
Expand Down
2 changes: 1 addition & 1 deletion modules/behavior/hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export function behaviorHash(context) {
var maxdist = 500;

// Don't allow the hash location to change too much while drawing
// This can happen if the user accidently hit the back button. #3996
// This can happen if the user accidentally hit the back button. #3996
if (mode && mode.id.match(/^draw/) !== null && dist > maxdist) {
context.enter(modeBrowse(context));
return;
Expand Down
8 changes: 4 additions & 4 deletions modules/core/localizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function coreLocalizer() {
if (_loadPromise) return _loadPromise;

return _loadPromise = Promise.all([
// load the list of langauges
// load the list of languages
fileFetcher.get('languages'),
// load the list of supported locales
fileFetcher.get('locales')
Expand Down Expand Up @@ -237,7 +237,7 @@ export function coreLocalizer() {

localizer.languageName = (code, options) => {

if (_languageNames[code]) { // name in locale langauge
if (_languageNames[code]) { // name in locale language
// e.g. "German"
return _languageNames[code];
}
Expand All @@ -252,9 +252,9 @@ export function coreLocalizer() {
return localizer.t('translate.language_and_code', { language: langInfo.nativeName, code: code });

} else if (langInfo.base && langInfo.script) {
const base = langInfo.base; // the code of the langauge this is based on
const base = langInfo.base; // the code of the language this is based on

if (_languageNames[base]) { // base language name in locale langauge
if (_languageNames[base]) { // base language name in locale language
const scriptCode = langInfo.script;
const script = _scriptNames[scriptCode] || scriptCode;
// e.g. "Serbian (Cyrillic)"
Expand Down
2 changes: 1 addition & 1 deletion modules/core/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function coreTree(head) {

function segmentBBox(segment) {
var extent = segment.extent(head);
// extent can be null if the node entites aren't in the graph for some reason
// extent can be null if the node entities aren't in the graph for some reason
if (!extent) return null;

var bbox = extent.bbox();
Expand Down
2 changes: 1 addition & 1 deletion modules/core/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ export function coreValidator(context) {
.on('redone.validator', validator.validate); // redo
// but not on 'change' (e.g. while drawing)

// When user chages editing modes:
// When user changes editing modes:
context
.on('exit.validator', validator.validate);

Expand Down
2 changes: 1 addition & 1 deletion modules/modes/drag_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ export function modeDragNode(context) {
for (k = 0; k < rings.length; k++) {
if (k === activeIndex) continue;

// make sure active ring doesnt cross passive rings
// make sure active ring doesn't cross passive rings
if (geoHasLineIntersections(rings[activeIndex].nodes, rings[k].nodes, entity.id)) {
return 'multipolygonRing';
}
Expand Down
2 changes: 1 addition & 1 deletion modules/modes/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function modeSelect(context, selectedIDs) {
for (var i = 0; i < selectedIDs.length; i++) {
var entity = context.hasEntity(selectedIDs[i]);
if (!entity || entity.geometry(graph) !== 'vertex') {
return []; // selection includes some not vertexes
return []; // selection includes some not vertices
}

var currParents = graph.parentWays(entity).map(function(w) { return w.id; });
Expand Down
2 changes: 1 addition & 1 deletion modules/osm/qa_item.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class QAItem {
}

update(props) {
// You can't override this inital information
// You can't override this initial information
const { loc, service, itemType, id } = this;

Object.keys(props).forEach(prop => this[prop] = props[prop]);
Expand Down
2 changes: 1 addition & 1 deletion modules/presets/preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) {
if (_this.suggestion) {
let path = presetID.split('/');
path.pop(); // remove brand name
// NOTE: insert an en-dash, not a hypen (to avoid conflict with fr - nl names in Brussels etc)
// NOTE: insert an en-dash, not a hyphen (to avoid conflict with fr - nl names in Brussels etc)
return _this.originalName + ' – ' + t('presets.presets.' + path.join('/') + '.name');
}
return _this.t('name', { 'default': _this.originalName });
Expand Down
2 changes: 1 addition & 1 deletion modules/renderer/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ export function rendererMap(context) {
);

// On Firefox Windows and Linux we always get +/- the scroll line amount (default 3)
// There doesn't seem to be any scroll accelleration.
// There doesn't seem to be any scroll acceleration.
// This multiplier increases the speed a little bit - #5512
if (detected.os !== 'mac') {
dY *= 5;
Expand Down
2 changes: 1 addition & 1 deletion modules/services/improveOSM.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function cardinalDirection(bearing) {
return t(`QA.improveOSM.directions.${compass[dir]}`);
}

// Errors shouldn't obscure eachother
// Errors shouldn't obscure each other
function preventCoincident(loc, bumpUp) {
let coincident = false;
do {
Expand Down
Loading