Skip to content

Commit

Permalink
[spellcheck] generated command only replace whole words
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Dec 19, 2016
1 parent 6b56e4f commit 2a0f725
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/chkspelling_ag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ if [[ ! -z $OUTPUT ]]; then
echo "****"
# < ---------- get files + error ---------------------------------------------------------------------->
ag --smart-case --only-matching --nogroup --nonumbers --all-text --word-regexp -p $AGIGNORE "$RE" $FILES | \
# <-- generate sed command .... <------------------------------ get correction word -----------------> <------------------------------- match case -------------------------------------------> <-----replace : by / ------> ...finalize sed command>
sed -e 's/\(\S*\):\([[:alnum:]]*\)$/ echo "sed -i s\/"$( echo "\2:$(ag --nonumbers --ignore-case \2 scripts\/spelling.dat | cut -d: -f2)" | sed -r \x27s\/([A-Z]+):(.*)\/\\1:\\U\\2\/; s\/([A-Z][a-z]+):([a-z])\/\\1:\\U\\2\\L\/\x27 | sed -e \x27s\/:\/\\\/\/\x27)"\/ \1" /e' | \
# <-- generate sed command .... <------------------------------ get correction word -----------------------------> <------------------------------- match case -------------------------------------------> <-----replace : by / and add word boundary------> ...finalize sed command>
sed -e 's/\(\S*\):\([[:alnum:]]*\)$/ echo "sed -i \x27s\/"$( echo "\2:$(ag --nonumbers --ignore-case --word-regexp \2 scripts\/spelling.dat | cut -d: -f2)" | sed -r \x27s\/([A-Z]+):(.*)\/\\1:\\U\\2\/; s\/([A-Z][a-z]+):([a-z])\/\\1:\\U\\2\\L\/\x27 | sed -r \x27s\/(\\S\*):\/\\\\b\\1\\\\b\\\/\/\x27)"\/g\x27 \1" /e' | \
# remove duplicate line
sort -u
echo "****"
Expand Down
1 change: 1 addition & 0 deletions scripts/spelling.dat
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ asuming:assuming
atomatically:automatically
attemps:attempts
attemtps:attempts
attribut:attribute
attruibutes:attributes
authentification:authentication
automaticly:automatically
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgstipfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ QgsTipFactory::QgsTipFactory() : QObject()
// by yjacolin
myTip.setTitle( tr( "Copy, paste and cut in QGIS" ) );
myTip.setContent( tr( "Copy, paste, and cut work as in another applications in QGIS. Select a "
"feature (a geometry or an attribut row in the attribute table) and use "
"feature (a geometry or an attribute row in the attribute table) and use "
"one of these shortcuts: Ctrl+C to copy, Ctrl+X to cut, and Ctrl+V to paste."
) );
addGuiTip( myTip );
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/grass/scripts/v.class.mlpy.qgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
#%end
#%option G_OPT_V_MAP
#% key: input
#% description: Input vector map (attribut table required)
#% description: Input vector map (attribute table required)
#% required: yes
#% multiple: no
#%end
#%option G_OPT_V_MAP
#% key: training
#% description: Training vector map (attribut table required)
#% description: Training vector map (attribute table required)
#% required: yes
#% multiple: no
#%end
Expand Down

0 comments on commit 2a0f725

Please sign in to comment.