Opened 12 years ago
Closed 9 years ago
#1029 closed task (fixed)
[PATCH] Spell colour/color properly
Reported by: | Philip Taylor | Owned by: | ben |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 19 |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
Currently the code and data files use a random mixture of "colour" and "color". To minimise confusion, we should change everything to use one form of spelling consistently. (Which form?) (There may be some other words with similar spelling problems.) (I don't think spelling in comments is worth caring about; only class names, XML element/attribute names, etc.)
Attachments (1)
Change History (11)
follow-up: 2 comment:1 by , 12 years ago
comment:2 by , 12 years ago
Initialise/Initialize also comes to mind. A search in VS shows 1188 lines matching "color" and 390 matching "colour", maybe relevant if we choose to go with the most common usage. We also use both wxColor
and wxColour
, so we're not even consistent with library functions :)
comment:3 by , 11 years ago
Changes in this regard to user-visible strings have been applied as per #2185.
comment:4 by , 11 years ago
Since we already use "color" more often that would probably be the better choice. And, personally, I would prefer "Initialize".
We will need to watch out for causing global namespace conflicts, but otherwise, simple text replacement should work.
comment:5 by , 10 years ago
Description: | modified (diff) |
---|
Attached is a ridiculously large patch that changes all the variable names (with a few exceptions) from colour to color.
The remaining offenders are in strings and/or reference XML entries.
The main exception is that wxWidgets uses colour. So wxColour and wxColourDialog references must remain unchanged. I changed ColourDialog to ColorDialog but that causes some weird color.colour combinations when calling the parent class wxColourDialog and may need removed.
The string renaming need more attention to get right. I did not observe any namespace issues within the variables - the XML could be different (I simply don't know).
by , 10 years ago
Attachment: | VariableNames_Colour_to_Color_15728.diff added |
---|
First pass / learning chance of colour to color
comment:6 by , 10 years ago
Keywords: | review patch added |
---|---|
Summary: | Spell colour/color properly → [PATCH] Spell colour/color properly |
comment:7 by , 10 years ago
Milestone: | Backlog → Alpha 18 |
---|
comment:8 by , 9 years ago
Keywords: | review removed |
---|
Some issues (apart from the patch having some conflicts now):
- Missing renames in simulation components which leads to compilation failures.
- You change a comment in source/gui/GUIRenderer.cpp about allowed parts in the sprite attribute in the xml files, but you do not change the xml files.
- You do not touch the JS code at all.
- Having three patches (cpp, js, xml) or two that depend on each other would be fine, but just changing half of the codebase is a bit strange.
- wxWidgets actually has both color and colour available (wxColor is defined as wxColour), so are there any specific cases where it does not work? If yes I guess upstream would like to know about those.
comment:9 by , 9 years ago
Milestone: | Alpha 18 → Alpha 19 |
---|
(For consistency with
glColorPointer
,wxColor
, etc, maybe American spellings are better.)