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

Creating a new localization rule set for vale #788

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
5 changes: 5 additions & 0 deletions .vale/fixtures/Localization/AdjectivesWithNouns/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
; Vale configuration file to test the `CommonlyMisusedWords` rule
Chandralekha-RedHat marked this conversation as resolved.
Show resolved Hide resolved
StylesPath = ../../../styles
MinAlertLevel = warning
[*.adoc]
Localization.TermsWarnings = YES
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
the following
the previous
14 changes: 14 additions & 0 deletions .vale/fixtures/Localization/AdjectivesWithNouns/testvalid.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
the following steps
the following functions
the following procedure
the following chapter
the following table
the following image
the following section
the previous steps
the previous functions
the previous procedure
the previous chapter
the previous table
the previous image
the previous section
6 changes: 1 addition & 5 deletions .vale/fixtures/Localization/PhrasalVerbs/testinvalid.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ tap on
fill in
fill out
picks up
gives up




gives up
11 changes: 11 additions & 0 deletions .vale/styles/Localization/AdjectivesWithNouns.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
extends: sequence
message: "Always use 'following' as an adjective before a noun for clarity and grammatical correctness. For example, use 'Complete the following steps' instead of 'Complete the following'."
Chandralekha-RedHat marked this conversation as resolved.
Show resolved Hide resolved
link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/using/
level: warning
action:
name: edit
tokens:
- the following
- the previous

27 changes: 14 additions & 13 deletions .vale/styles/Localization/PhrasalVerbs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ ignorecase: true
level: warning
link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/termswarnings/
message: "Avoid using phrasal verbs. Consider using '%s' rather than '%s'."
scope: sentence
action:
name: replace
swap:
# Start each error message with "Do not use ..."
# Error messages must be single quoted.
do: carry out
allow | enable: allow for
continue: carry on
depend: count on
result: end up
imply: get at
click: click on
find : find out
print : print out
start: start up | switch on
tap: tap on
takes: picks up
complete: fill in
carry out: do
allow for: allow|enable
carry on: continue
count on: depend
end up: result
get at: imply
click on: click
find out: find
print out: print
start up | switch on: start
tap on: tap
picks up: takes
fill in: complete
2 changes: 1 addition & 1 deletion .vale/styles/RedHat/PassiveVoice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference
message: "'%s' is passive voice. In general, use active voice. Consult the style guide for acceptable use of passive voice."
# source: "https://redhat-documentation.github.io/supplementary-style-guide/#prerequisites; IBM - Voice, p.35"
raw:
- \b(am|are|were|being|is|been|was|be|get|gets|have|has)\b\s*
- \b(am|are|were|being|is|been|was|be)\b\s*
tokens:
- '[\w]+ed'
- awoken
Expand Down
8 changes: 0 additions & 8 deletions .vale/styles/RedHat/SelfReferentialText.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,3 @@ tokens:
- this chapter
- this section
- this subsection
- The following
- The previous
- This is
Chandralekha-RedHat marked this conversation as resolved.
Show resolved Hide resolved
- These are
- Those are
- Theirs
- Hers
- His
Loading