From dff40b80d56eb3a2eae61a154f44f3fca4417e28 Mon Sep 17 00:00:00 2001 From: chandralekha Date: Wed, 15 May 2024 19:05:14 +0530 Subject: [PATCH 1/9] First commit for localization --- .../Localization/CommonlyMisusedWords/.vale.ini | 5 +++++ .../CommonlyMisusedWords/testinvalid.adoc | 3 +++ .../CommonlyMisusedWords/testvalid.adoc | 6 ++++++ .vale/fixtures/Localization/Modals/.vale.ini | 5 +++++ .../fixtures/Localization/Modals/testinvalid.adoc | 13 +++++++++++++ .vale/fixtures/Localization/Modals/testvalid.adoc | 5 +++++ .../WordswithMultipleMeanings/.vale.ini | 5 +++++ .../WordswithMultipleMeanings/testinvalid.adoc | 5 +++++ .../WordswithMultipleMeanings/testvalid.adoc | 7 +++++++ .../styles/Localization/CommonlyMisusedWords.yml | 10 ++++++++++ .vale/styles/Localization/Modals.yml | 15 +++++++++++++++ .../Localization/WordswithMultipleMeanings.yml | 14 ++++++++++++++ 12 files changed, 93 insertions(+) create mode 100644 .vale/fixtures/Localization/CommonlyMisusedWords/.vale.ini create mode 100644 .vale/fixtures/Localization/CommonlyMisusedWords/testinvalid.adoc create mode 100644 .vale/fixtures/Localization/CommonlyMisusedWords/testvalid.adoc create mode 100644 .vale/fixtures/Localization/Modals/.vale.ini create mode 100644 .vale/fixtures/Localization/Modals/testinvalid.adoc create mode 100644 .vale/fixtures/Localization/Modals/testvalid.adoc create mode 100644 .vale/fixtures/Localization/WordswithMultipleMeanings/.vale.ini create mode 100644 .vale/fixtures/Localization/WordswithMultipleMeanings/testinvalid.adoc create mode 100644 .vale/fixtures/Localization/WordswithMultipleMeanings/testvalid.adoc create mode 100644 .vale/styles/Localization/CommonlyMisusedWords.yml create mode 100644 .vale/styles/Localization/Modals.yml create mode 100644 .vale/styles/Localization/WordswithMultipleMeanings.yml diff --git a/.vale/fixtures/Localization/CommonlyMisusedWords/.vale.ini b/.vale/fixtures/Localization/CommonlyMisusedWords/.vale.ini new file mode 100644 index 000000000..daa49591f --- /dev/null +++ b/.vale/fixtures/Localization/CommonlyMisusedWords/.vale.ini @@ -0,0 +1,5 @@ +; Vale configuration file to test the `CommonlyMisusedWords` rule +StylesPath = ../../../styles +MinAlertLevel = warning +[*.adoc] +Localization.TermsWarnings = YES diff --git a/.vale/fixtures/Localization/CommonlyMisusedWords/testinvalid.adoc b/.vale/fixtures/Localization/CommonlyMisusedWords/testinvalid.adoc new file mode 100644 index 000000000..cee4bfcf1 --- /dev/null +++ b/.vale/fixtures/Localization/CommonlyMisusedWords/testinvalid.adoc @@ -0,0 +1,3 @@ +allow +acronym + diff --git a/.vale/fixtures/Localization/CommonlyMisusedWords/testvalid.adoc b/.vale/fixtures/Localization/CommonlyMisusedWords/testvalid.adoc new file mode 100644 index 000000000..99dc37128 --- /dev/null +++ b/.vale/fixtures/Localization/CommonlyMisusedWords/testvalid.adoc @@ -0,0 +1,6 @@ +might +enable +abbreviation +can +cannot + diff --git a/.vale/fixtures/Localization/Modals/.vale.ini b/.vale/fixtures/Localization/Modals/.vale.ini new file mode 100644 index 000000000..ea5f042a9 --- /dev/null +++ b/.vale/fixtures/Localization/Modals/.vale.ini @@ -0,0 +1,5 @@ +; Vale configuration file to test the `Modals` rule +StylesPath = ../../../styles +MinAlertLevel = warning +[*.adoc] +Localization.TermsWarnings = YES diff --git a/.vale/fixtures/Localization/Modals/testinvalid.adoc b/.vale/fixtures/Localization/Modals/testinvalid.adoc new file mode 100644 index 000000000..cacca86e0 --- /dev/null +++ b/.vale/fixtures/Localization/Modals/testinvalid.adoc @@ -0,0 +1,13 @@ +should +could +would +will +supposed to +ought to be +as +at once +once +while +since +allow +may diff --git a/.vale/fixtures/Localization/Modals/testvalid.adoc b/.vale/fixtures/Localization/Modals/testvalid.adoc new file mode 100644 index 000000000..7aab855bf --- /dev/null +++ b/.vale/fixtures/Localization/Modals/testvalid.adoc @@ -0,0 +1,5 @@ +might +enable +can +cannot + diff --git a/.vale/fixtures/Localization/WordswithMultipleMeanings/.vale.ini b/.vale/fixtures/Localization/WordswithMultipleMeanings/.vale.ini new file mode 100644 index 000000000..070abe10b --- /dev/null +++ b/.vale/fixtures/Localization/WordswithMultipleMeanings/.vale.ini @@ -0,0 +1,5 @@ +; Vale configuration file to test the `WordswithMultipleMeanings` rule +StylesPath = ../../../styles +MinAlertLevel = warning +[*.adoc] +Localization.TermsWarnings = YES diff --git a/.vale/fixtures/Localization/WordswithMultipleMeanings/testinvalid.adoc b/.vale/fixtures/Localization/WordswithMultipleMeanings/testinvalid.adoc new file mode 100644 index 000000000..b869bc476 --- /dev/null +++ b/.vale/fixtures/Localization/WordswithMultipleMeanings/testinvalid.adoc @@ -0,0 +1,5 @@ +as +at once +once +while +since \ No newline at end of file diff --git a/.vale/fixtures/Localization/WordswithMultipleMeanings/testvalid.adoc b/.vale/fixtures/Localization/WordswithMultipleMeanings/testvalid.adoc new file mode 100644 index 000000000..67c712876 --- /dev/null +++ b/.vale/fixtures/Localization/WordswithMultipleMeanings/testvalid.adoc @@ -0,0 +1,7 @@ +after +one time +because +during +at the same time + + diff --git a/.vale/styles/Localization/CommonlyMisusedWords.yml b/.vale/styles/Localization/CommonlyMisusedWords.yml new file mode 100644 index 000000000..8f72c305e --- /dev/null +++ b/.vale/styles/Localization/CommonlyMisusedWords.yml @@ -0,0 +1,10 @@ +--- +extends: existence +ignorecase: true +level: warning +link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/termswarnings/ +message: "Avoid terms that are ambiguous and problematic in a localization context" +# source: https://github.com/redhat-documentation/vale-at-red-hat/issues/515 +tokens: + - allow + - acronym diff --git a/.vale/styles/Localization/Modals.yml b/.vale/styles/Localization/Modals.yml new file mode 100644 index 000000000..1fbf94c30 --- /dev/null +++ b/.vale/styles/Localization/Modals.yml @@ -0,0 +1,15 @@ +--- +extends: existence +ignorecase: true +level: warning +link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/termswarnings/ +message: "Avoid terms that are ambiguous and problematic in a localization context" +# source: https://github.com/redhat-documentation/vale-at-red-hat/issues/515 +tokens: + - should + - could + - would + - will + - supposed to be + - ought to be + diff --git a/.vale/styles/Localization/WordswithMultipleMeanings.yml b/.vale/styles/Localization/WordswithMultipleMeanings.yml new file mode 100644 index 000000000..41d95e91a --- /dev/null +++ b/.vale/styles/Localization/WordswithMultipleMeanings.yml @@ -0,0 +1,14 @@ +--- +extends: existence +ignorecase: true +level: warning +link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/termswarnings/ +message: "Avoid terms that are ambiguous and problematic in a localization context" +# source: https://github.com/redhat-documentation/vale-at-red-hat/issues/515 +tokens: + - as + - at once + - once + - while + - since + From 92854810f8c6edbedec012ca14cc6b2758639a3a Mon Sep 17 00:00:00 2001 From: chandralekha Date: Tue, 21 May 2024 11:43:27 +0530 Subject: [PATCH 2/9] Updated review comments. --- .vale/fixtures/Localization/Modals/testinvalid.adoc | 7 +------ .vale/fixtures/Localization/Modals/testvalid.adoc | 2 +- .vale/styles/Localization/CommonlyMisusedWords.yml | 2 +- .vale/styles/Localization/Modals.yml | 2 +- .vale/styles/Localization/WordswithMultipleMeanings.yml | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.vale/fixtures/Localization/Modals/testinvalid.adoc b/.vale/fixtures/Localization/Modals/testinvalid.adoc index cacca86e0..a5f9ab836 100644 --- a/.vale/fixtures/Localization/Modals/testinvalid.adoc +++ b/.vale/fixtures/Localization/Modals/testinvalid.adoc @@ -4,10 +4,5 @@ would will supposed to ought to be -as -at once -once -while -since -allow may +shall diff --git a/.vale/fixtures/Localization/Modals/testvalid.adoc b/.vale/fixtures/Localization/Modals/testvalid.adoc index 7aab855bf..276ba6281 100644 --- a/.vale/fixtures/Localization/Modals/testvalid.adoc +++ b/.vale/fixtures/Localization/Modals/testvalid.adoc @@ -1,5 +1,5 @@ might -enable can cannot +must diff --git a/.vale/styles/Localization/CommonlyMisusedWords.yml b/.vale/styles/Localization/CommonlyMisusedWords.yml index 8f72c305e..2f7c1ce91 100644 --- a/.vale/styles/Localization/CommonlyMisusedWords.yml +++ b/.vale/styles/Localization/CommonlyMisusedWords.yml @@ -3,7 +3,7 @@ extends: existence ignorecase: true level: warning link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/termswarnings/ -message: "Avoid terms that are ambiguous and problematic in a localization context" +message: "Suggest to use proper terms to reduce misconceptions. For example- Do not use allow with the meaning of enable. (allow = permission, enable = ability) " # source: https://github.com/redhat-documentation/vale-at-red-hat/issues/515 tokens: - allow diff --git a/.vale/styles/Localization/Modals.yml b/.vale/styles/Localization/Modals.yml index 1fbf94c30..50527913f 100644 --- a/.vale/styles/Localization/Modals.yml +++ b/.vale/styles/Localization/Modals.yml @@ -3,7 +3,7 @@ extends: existence ignorecase: true level: warning link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/termswarnings/ -message: "Avoid terms that are ambiguous and problematic in a localization context" +message: "Avoid using modals because they can introduce uncertainty" # source: https://github.com/redhat-documentation/vale-at-red-hat/issues/515 tokens: - should diff --git a/.vale/styles/Localization/WordswithMultipleMeanings.yml b/.vale/styles/Localization/WordswithMultipleMeanings.yml index 41d95e91a..413c782ce 100644 --- a/.vale/styles/Localization/WordswithMultipleMeanings.yml +++ b/.vale/styles/Localization/WordswithMultipleMeanings.yml @@ -3,7 +3,7 @@ extends: existence ignorecase: true level: warning link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/termswarnings/ -message: "Avoid terms that are ambiguous and problematic in a localization context" +message: "Avoid words that have multiple meanings. For example, instead of words like "as" or "since" which have multiple meanings, use "because"" # source: https://github.com/redhat-documentation/vale-at-red-hat/issues/515 tokens: - as From 1d89638e1de99eeaa328e4730f046594676be92d Mon Sep 17 00:00:00 2001 From: chandralekha Date: Wed, 12 Jun 2024 20:01:20 +0530 Subject: [PATCH 3/9] Updated Chloe's inputs. --- .../Localization/PhrasalVerbs/.vale.ini | 5 +++++ .../Localization/PhrasalVerbs/testinvalid.adoc | 10 ++++++++++ .../Localization/PhrasalVerbs/testvalid.adoc | 8 ++++++++ .../WordswithMultipleMeanings/testinvalid.adoc | 5 ++++- .../RedHat/PassiveVoice/testinvalid.adoc | 4 ++++ .../SelfReferentialText/testinvalid.adoc | 9 +++++++++ .../Localization/CommonlyMisusedWords.yml | 14 ++++++++------ .vale/styles/Localization/Modals.yml | 2 +- .vale/styles/Localization/PhrasalVerbs.yml | 18 ++++++++++++++++++ .../Localization/WordswithMultipleMeanings.yml | 5 ++++- .vale/styles/RedHat/PassiveVoice.yml | 4 ++++ .vale/styles/RedHat/SelfReferentialText.yml | 8 ++++++++ 12 files changed, 83 insertions(+), 9 deletions(-) create mode 100644 .vale/fixtures/Localization/PhrasalVerbs/.vale.ini create mode 100644 .vale/fixtures/Localization/PhrasalVerbs/testinvalid.adoc create mode 100644 .vale/fixtures/Localization/PhrasalVerbs/testvalid.adoc create mode 100644 .vale/styles/Localization/PhrasalVerbs.yml diff --git a/.vale/fixtures/Localization/PhrasalVerbs/.vale.ini b/.vale/fixtures/Localization/PhrasalVerbs/.vale.ini new file mode 100644 index 000000000..daa49591f --- /dev/null +++ b/.vale/fixtures/Localization/PhrasalVerbs/.vale.ini @@ -0,0 +1,5 @@ +; Vale configuration file to test the `CommonlyMisusedWords` rule +StylesPath = ../../../styles +MinAlertLevel = warning +[*.adoc] +Localization.TermsWarnings = YES diff --git a/.vale/fixtures/Localization/PhrasalVerbs/testinvalid.adoc b/.vale/fixtures/Localization/PhrasalVerbs/testinvalid.adoc new file mode 100644 index 000000000..b37670797 --- /dev/null +++ b/.vale/fixtures/Localization/PhrasalVerbs/testinvalid.adoc @@ -0,0 +1,10 @@ +carry out +allow for +carry on +count on +end up +get at +click on + + + diff --git a/.vale/fixtures/Localization/PhrasalVerbs/testvalid.adoc b/.vale/fixtures/Localization/PhrasalVerbs/testvalid.adoc new file mode 100644 index 000000000..549112a10 --- /dev/null +++ b/.vale/fixtures/Localization/PhrasalVerbs/testvalid.adoc @@ -0,0 +1,8 @@ +do +allow +enable +continue +depend +result +imply +click diff --git a/.vale/fixtures/Localization/WordswithMultipleMeanings/testinvalid.adoc b/.vale/fixtures/Localization/WordswithMultipleMeanings/testinvalid.adoc index b869bc476..d4fd33398 100644 --- a/.vale/fixtures/Localization/WordswithMultipleMeanings/testinvalid.adoc +++ b/.vale/fixtures/Localization/WordswithMultipleMeanings/testinvalid.adoc @@ -2,4 +2,7 @@ as at once once while -since \ No newline at end of file +since +as soon as +as much as +as long as \ No newline at end of file diff --git a/.vale/fixtures/RedHat/PassiveVoice/testinvalid.adoc b/.vale/fixtures/RedHat/PassiveVoice/testinvalid.adoc index bc545d3d9..2919f07f9 100644 --- a/.vale/fixtures/RedHat/PassiveVoice/testinvalid.adoc +++ b/.vale/fixtures/RedHat/PassiveVoice/testinvalid.adoc @@ -54,6 +54,8 @@ It was forsaken It was fought It was found It was frozen +I may get late +It gets late It was given It was gone It was gotten @@ -174,3 +176,5 @@ It was wound It was woven It was written It was wrung +I have +It has diff --git a/.vale/fixtures/RedHat/SelfReferentialText/testinvalid.adoc b/.vale/fixtures/RedHat/SelfReferentialText/testinvalid.adoc index 35ee939f7..130cbefbf 100644 --- a/.vale/fixtures/RedHat/SelfReferentialText/testinvalid.adoc +++ b/.vale/fixtures/RedHat/SelfReferentialText/testinvalid.adoc @@ -9,3 +9,12 @@ This section describes something. Follow the steps in this section to configure something. This subsection describes something. Follow the steps in this subsection to configure something. +The following module describes something. +The previous module describes something. + This is a module. + These are modules. + Those are modules. + Theirs module. + Hers module. + His module. + diff --git a/.vale/styles/Localization/CommonlyMisusedWords.yml b/.vale/styles/Localization/CommonlyMisusedWords.yml index 2f7c1ce91..13c2e2779 100644 --- a/.vale/styles/Localization/CommonlyMisusedWords.yml +++ b/.vale/styles/Localization/CommonlyMisusedWords.yml @@ -1,10 +1,12 @@ --- -extends: existence +extends: substitution ignorecase: true level: warning link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/termswarnings/ -message: "Suggest to use proper terms to reduce misconceptions. For example- Do not use allow with the meaning of enable. (allow = permission, enable = ability) " -# source: https://github.com/redhat-documentation/vale-at-red-hat/issues/515 -tokens: - - allow - - acronym +message: "%s" +swap: + # Start each error message with "Do not use ..." + # Error messages must be single quoted. +allow: 'Only use allow if you are talking about permission. For ability, use enable.' +acronym: 'Acronyms are only for abbreviations that are pronounced as a word, like RHEL. Use initialism for abbreviations that are spelled out. Alternatively, use abbreviation for either situation.' + diff --git a/.vale/styles/Localization/Modals.yml b/.vale/styles/Localization/Modals.yml index 50527913f..dbc417c39 100644 --- a/.vale/styles/Localization/Modals.yml +++ b/.vale/styles/Localization/Modals.yml @@ -3,7 +3,7 @@ extends: existence ignorecase: true level: warning link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/termswarnings/ -message: "Avoid using modals because they can introduce uncertainty" +message: "Avoid using modals like 'should', 'may', or 'will' because they can introduce uncertainty." # source: https://github.com/redhat-documentation/vale-at-red-hat/issues/515 tokens: - should diff --git a/.vale/styles/Localization/PhrasalVerbs.yml b/.vale/styles/Localization/PhrasalVerbs.yml new file mode 100644 index 000000000..a0b553a01 --- /dev/null +++ b/.vale/styles/Localization/PhrasalVerbs.yml @@ -0,0 +1,18 @@ +--- +extends: substitution +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'." +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 diff --git a/.vale/styles/Localization/WordswithMultipleMeanings.yml b/.vale/styles/Localization/WordswithMultipleMeanings.yml index 413c782ce..6678806c5 100644 --- a/.vale/styles/Localization/WordswithMultipleMeanings.yml +++ b/.vale/styles/Localization/WordswithMultipleMeanings.yml @@ -3,10 +3,13 @@ extends: existence ignorecase: true level: warning link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/termswarnings/ -message: "Avoid words that have multiple meanings. For example, instead of words like "as" or "since" which have multiple meanings, use "because"" +message: "Avoid words that have multiple meanings. For example, instead of words like "as" or "since" which have multiple meanings, use "because"." # source: https://github.com/redhat-documentation/vale-at-red-hat/issues/515 tokens: - as + - as soon as + - as much as + - as long as - at once - once - while diff --git a/.vale/styles/RedHat/PassiveVoice.yml b/.vale/styles/RedHat/PassiveVoice.yml index a75a1cf2e..20fe812a6 100644 --- a/.vale/styles/RedHat/PassiveVoice.yml +++ b/.vale/styles/RedHat/PassiveVoice.yml @@ -64,11 +64,15 @@ tokens: - fought - found - frozen + - get + - gets - given - gone - gotten - ground - grown + - have + - has - heard - held - hidden diff --git a/.vale/styles/RedHat/SelfReferentialText.yml b/.vale/styles/RedHat/SelfReferentialText.yml index 36adbf41f..b4060f411 100644 --- a/.vale/styles/RedHat/SelfReferentialText.yml +++ b/.vale/styles/RedHat/SelfReferentialText.yml @@ -12,3 +12,11 @@ tokens: - this chapter - this section - this subsection + - The following + - The previous + - This is + - These are + - Those are + - Theirs + - Hers + - His From 0df7fc78301bbc4573127e4f966f9c787eedca72 Mon Sep 17 00:00:00 2001 From: chandralekha Date: Tue, 18 Jun 2024 17:28:39 +0530 Subject: [PATCH 4/9] Updated Chloe's review comments. --- .../Localization/WordswithMultipleMeanings/testinvalid.adoc | 3 --- .../Localization/WordswithMultipleMeanings/testvalid.adoc | 4 +++- .vale/fixtures/RedHat/PassiveVoice/testinvalid.adoc | 4 ---- .vale/styles/Localization/WordswithMultipleMeanings.yml | 3 --- .vale/styles/RedHat/PassiveVoice.yml | 6 +----- 5 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.vale/fixtures/Localization/WordswithMultipleMeanings/testinvalid.adoc b/.vale/fixtures/Localization/WordswithMultipleMeanings/testinvalid.adoc index d4fd33398..e5ba83fb0 100644 --- a/.vale/fixtures/Localization/WordswithMultipleMeanings/testinvalid.adoc +++ b/.vale/fixtures/Localization/WordswithMultipleMeanings/testinvalid.adoc @@ -3,6 +3,3 @@ at once once while since -as soon as -as much as -as long as \ No newline at end of file diff --git a/.vale/fixtures/Localization/WordswithMultipleMeanings/testvalid.adoc b/.vale/fixtures/Localization/WordswithMultipleMeanings/testvalid.adoc index 67c712876..a46092314 100644 --- a/.vale/fixtures/Localization/WordswithMultipleMeanings/testvalid.adoc +++ b/.vale/fixtures/Localization/WordswithMultipleMeanings/testvalid.adoc @@ -3,5 +3,7 @@ one time because during at the same time - +as soon as +as much as +as long as diff --git a/.vale/fixtures/RedHat/PassiveVoice/testinvalid.adoc b/.vale/fixtures/RedHat/PassiveVoice/testinvalid.adoc index 2919f07f9..bc545d3d9 100644 --- a/.vale/fixtures/RedHat/PassiveVoice/testinvalid.adoc +++ b/.vale/fixtures/RedHat/PassiveVoice/testinvalid.adoc @@ -54,8 +54,6 @@ It was forsaken It was fought It was found It was frozen -I may get late -It gets late It was given It was gone It was gotten @@ -176,5 +174,3 @@ It was wound It was woven It was written It was wrung -I have -It has diff --git a/.vale/styles/Localization/WordswithMultipleMeanings.yml b/.vale/styles/Localization/WordswithMultipleMeanings.yml index 6678806c5..9abb06aca 100644 --- a/.vale/styles/Localization/WordswithMultipleMeanings.yml +++ b/.vale/styles/Localization/WordswithMultipleMeanings.yml @@ -7,9 +7,6 @@ message: "Avoid words that have multiple meanings. For example, instead of words # source: https://github.com/redhat-documentation/vale-at-red-hat/issues/515 tokens: - as - - as soon as - - as much as - - as long as - at once - once - while diff --git a/.vale/styles/RedHat/PassiveVoice.yml b/.vale/styles/RedHat/PassiveVoice.yml index 20fe812a6..ec01909b6 100644 --- a/.vale/styles/RedHat/PassiveVoice.yml +++ b/.vale/styles/RedHat/PassiveVoice.yml @@ -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)\b\s* + - \b(am|are|were|being|is|been|was|be|get|gets|have|has)\b\s* tokens: - '[\w]+ed' - awoken @@ -64,15 +64,11 @@ tokens: - fought - found - frozen - - get - - gets - given - gone - gotten - ground - grown - - have - - has - heard - held - hidden From 20dd43a6f76d03cf0317bd794a5ab8569739d84f Mon Sep 17 00:00:00 2001 From: chandralekha Date: Fri, 28 Jun 2024 20:16:29 +0530 Subject: [PATCH 5/9] Updated Aidan's review comments. --- .../CommonlyMisusedWords/testinvalid.adoc | 11 +++++++++-- .../Localization/CommonlyMisusedWords/testvalid.adoc | 2 ++ .../Localization/PhrasalVerbs/testinvalid.adoc | 11 +++++++++++ .vale/styles/Localization/CommonlyMisusedWords.yml | 1 - .vale/styles/Localization/PhrasalVerbs.yml | 6 ++++++ 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.vale/fixtures/Localization/CommonlyMisusedWords/testinvalid.adoc b/.vale/fixtures/Localization/CommonlyMisusedWords/testinvalid.adoc index cee4bfcf1..9c8596802 100644 --- a/.vale/fixtures/Localization/CommonlyMisusedWords/testinvalid.adoc +++ b/.vale/fixtures/Localization/CommonlyMisusedWords/testinvalid.adoc @@ -1,3 +1,10 @@ -allow -acronym +The product allows you to +This product allows you to +The product allows +This product allows +The interface allows +The UI allows +The application allows +This feature allows you to + diff --git a/.vale/fixtures/Localization/CommonlyMisusedWords/testvalid.adoc b/.vale/fixtures/Localization/CommonlyMisusedWords/testvalid.adoc index 99dc37128..5a0c09c8d 100644 --- a/.vale/fixtures/Localization/CommonlyMisusedWords/testvalid.adoc +++ b/.vale/fixtures/Localization/CommonlyMisusedWords/testvalid.adoc @@ -3,4 +3,6 @@ enable abbreviation can cannot +Red Hat allows you to +Red Hat allows diff --git a/.vale/fixtures/Localization/PhrasalVerbs/testinvalid.adoc b/.vale/fixtures/Localization/PhrasalVerbs/testinvalid.adoc index b37670797..5ffd5d9da 100644 --- a/.vale/fixtures/Localization/PhrasalVerbs/testinvalid.adoc +++ b/.vale/fixtures/Localization/PhrasalVerbs/testinvalid.adoc @@ -5,6 +5,17 @@ count on end up get at click on +call up +find out +print out +start up +switch on +tap on +fill in +fill out +picks up +gives up + diff --git a/.vale/styles/Localization/CommonlyMisusedWords.yml b/.vale/styles/Localization/CommonlyMisusedWords.yml index 13c2e2779..4b4c79d6c 100644 --- a/.vale/styles/Localization/CommonlyMisusedWords.yml +++ b/.vale/styles/Localization/CommonlyMisusedWords.yml @@ -8,5 +8,4 @@ swap: # Start each error message with "Do not use ..." # Error messages must be single quoted. allow: 'Only use allow if you are talking about permission. For ability, use enable.' -acronym: 'Acronyms are only for abbreviations that are pronounced as a word, like RHEL. Use initialism for abbreviations that are spelled out. Alternatively, use abbreviation for either situation.' diff --git a/.vale/styles/Localization/PhrasalVerbs.yml b/.vale/styles/Localization/PhrasalVerbs.yml index a0b553a01..033411291 100644 --- a/.vale/styles/Localization/PhrasalVerbs.yml +++ b/.vale/styles/Localization/PhrasalVerbs.yml @@ -16,3 +16,9 @@ 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 \ No newline at end of file From 847522cb36a035201108426d01ab628c35847539 Mon Sep 17 00:00:00 2001 From: chandralekha Date: Mon, 1 Jul 2024 20:37:28 +0530 Subject: [PATCH 6/9] Updated review comments on "allow". --- .../styles/Localization/CommonlyMisusedWords.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.vale/styles/Localization/CommonlyMisusedWords.yml b/.vale/styles/Localization/CommonlyMisusedWords.yml index 4b4c79d6c..b65919d2c 100644 --- a/.vale/styles/Localization/CommonlyMisusedWords.yml +++ b/.vale/styles/Localization/CommonlyMisusedWords.yml @@ -3,9 +3,15 @@ extends: substitution ignorecase: true level: warning link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/termswarnings/ -message: "%s" -swap: - # Start each error message with "Do not use ..." - # Error messages must be single quoted. -allow: 'Only use allow if you are talking about permission. For ability, use enable.' +message: 'Only use allow if you are talking about permission. For ability, use enable.' +# source: https://github.com/redhat-documentation/vale-at-red-hat/issues/515 +tokens: + - The product allows you to + - This product allows you to + - The product allows + - This product allows + - The interface allows + - The UI allows + - The application allows + - This feature allows you to From 2e89ff3e9a77250231e1773cfe385118bbe585af Mon Sep 17 00:00:00 2001 From: chandralekha Date: Tue, 2 Jul 2024 10:41:50 +0530 Subject: [PATCH 7/9] Fixing build error. --- .../RedHat/SelfReferentialText/testinvalid.adoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.vale/fixtures/RedHat/SelfReferentialText/testinvalid.adoc b/.vale/fixtures/RedHat/SelfReferentialText/testinvalid.adoc index 130cbefbf..d86cfd489 100644 --- a/.vale/fixtures/RedHat/SelfReferentialText/testinvalid.adoc +++ b/.vale/fixtures/RedHat/SelfReferentialText/testinvalid.adoc @@ -11,10 +11,10 @@ This subsection describes something. Follow the steps in this subsection to configure something. The following module describes something. The previous module describes something. - This is a module. - These are modules. - Those are modules. - Theirs module. - Hers module. - His module. +This is a module. +These are modules. +Those are modules. +Theirs module. +Hers module. +His module. From 75c8180d5ff9d46e33c64de53c2fa8b5c1e33c2b Mon Sep 17 00:00:00 2001 From: chandralekha Date: Mon, 26 Aug 2024 20:33:30 +0530 Subject: [PATCH 8/9] Create new rule for "Adjectives with Nouns." --- .../AdjectivesWithNouns/.vale.ini | 5 ++++ .../AdjectivesWithNouns/testinvalid.adoc | 2 ++ .../AdjectivesWithNouns/testvalid.adoc | 14 ++++++++++ .../PhrasalVerbs/testinvalid.adoc | 6 +---- .../Localization/AdjectivesWithNouns.yml | 11 ++++++++ .vale/styles/Localization/PhrasalVerbs.yml | 27 ++++++++++--------- .vale/styles/RedHat/PassiveVoice.yml | 2 +- .vale/styles/RedHat/SelfReferentialText.yml | 8 ------ 8 files changed, 48 insertions(+), 27 deletions(-) create mode 100644 .vale/fixtures/Localization/AdjectivesWithNouns/.vale.ini create mode 100644 .vale/fixtures/Localization/AdjectivesWithNouns/testinvalid.adoc create mode 100644 .vale/fixtures/Localization/AdjectivesWithNouns/testvalid.adoc create mode 100644 .vale/styles/Localization/AdjectivesWithNouns.yml diff --git a/.vale/fixtures/Localization/AdjectivesWithNouns/.vale.ini b/.vale/fixtures/Localization/AdjectivesWithNouns/.vale.ini new file mode 100644 index 000000000..daa49591f --- /dev/null +++ b/.vale/fixtures/Localization/AdjectivesWithNouns/.vale.ini @@ -0,0 +1,5 @@ +; Vale configuration file to test the `CommonlyMisusedWords` rule +StylesPath = ../../../styles +MinAlertLevel = warning +[*.adoc] +Localization.TermsWarnings = YES diff --git a/.vale/fixtures/Localization/AdjectivesWithNouns/testinvalid.adoc b/.vale/fixtures/Localization/AdjectivesWithNouns/testinvalid.adoc new file mode 100644 index 000000000..23d8fd52d --- /dev/null +++ b/.vale/fixtures/Localization/AdjectivesWithNouns/testinvalid.adoc @@ -0,0 +1,2 @@ +the following +the previous \ No newline at end of file diff --git a/.vale/fixtures/Localization/AdjectivesWithNouns/testvalid.adoc b/.vale/fixtures/Localization/AdjectivesWithNouns/testvalid.adoc new file mode 100644 index 000000000..0c0479ad4 --- /dev/null +++ b/.vale/fixtures/Localization/AdjectivesWithNouns/testvalid.adoc @@ -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 \ No newline at end of file diff --git a/.vale/fixtures/Localization/PhrasalVerbs/testinvalid.adoc b/.vale/fixtures/Localization/PhrasalVerbs/testinvalid.adoc index 5ffd5d9da..ec465e40b 100644 --- a/.vale/fixtures/Localization/PhrasalVerbs/testinvalid.adoc +++ b/.vale/fixtures/Localization/PhrasalVerbs/testinvalid.adoc @@ -14,8 +14,4 @@ tap on fill in fill out picks up -gives up - - - - +gives up \ No newline at end of file diff --git a/.vale/styles/Localization/AdjectivesWithNouns.yml b/.vale/styles/Localization/AdjectivesWithNouns.yml new file mode 100644 index 000000000..bdf5c9577 --- /dev/null +++ b/.vale/styles/Localization/AdjectivesWithNouns.yml @@ -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'." +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 + diff --git a/.vale/styles/Localization/PhrasalVerbs.yml b/.vale/styles/Localization/PhrasalVerbs.yml index 033411291..211e9a7e4 100644 --- a/.vale/styles/Localization/PhrasalVerbs.yml +++ b/.vale/styles/Localization/PhrasalVerbs.yml @@ -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 \ No newline at end of file +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 \ No newline at end of file diff --git a/.vale/styles/RedHat/PassiveVoice.yml b/.vale/styles/RedHat/PassiveVoice.yml index ec01909b6..a75a1cf2e 100644 --- a/.vale/styles/RedHat/PassiveVoice.yml +++ b/.vale/styles/RedHat/PassiveVoice.yml @@ -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 diff --git a/.vale/styles/RedHat/SelfReferentialText.yml b/.vale/styles/RedHat/SelfReferentialText.yml index b4060f411..36adbf41f 100644 --- a/.vale/styles/RedHat/SelfReferentialText.yml +++ b/.vale/styles/RedHat/SelfReferentialText.yml @@ -12,11 +12,3 @@ tokens: - this chapter - this section - this subsection - - The following - - The previous - - This is - - These are - - Those are - - Theirs - - Hers - - His From f3ac5ff25a37e84d77e84a6a7720fa20f75205f5 Mon Sep 17 00:00:00 2001 From: chandralekha Date: Tue, 17 Sep 2024 20:18:14 +0530 Subject: [PATCH 9/9] Updated Chloe's and Christophe's comments. --- .vale/fixtures/Localization/AdjectivesWithNouns/.vale.ini | 2 +- .../fixtures/Localization/AdjectivesWithNouns/testvalid.adoc | 4 +++- .vale/fixtures/Localization/PhrasalVerbs/.vale.ini | 2 +- .vale/styles/Localization/AdjectivesWithNouns.yml | 2 +- .vale/styles/Localization/CommonlyMisusedWords.yml | 4 ++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.vale/fixtures/Localization/AdjectivesWithNouns/.vale.ini b/.vale/fixtures/Localization/AdjectivesWithNouns/.vale.ini index daa49591f..53abfadb3 100644 --- a/.vale/fixtures/Localization/AdjectivesWithNouns/.vale.ini +++ b/.vale/fixtures/Localization/AdjectivesWithNouns/.vale.ini @@ -1,4 +1,4 @@ -; Vale configuration file to test the `CommonlyMisusedWords` rule +; Vale configuration file to test the `AdjectivesWithNouns` rule StylesPath = ../../../styles MinAlertLevel = warning [*.adoc] diff --git a/.vale/fixtures/Localization/AdjectivesWithNouns/testvalid.adoc b/.vale/fixtures/Localization/AdjectivesWithNouns/testvalid.adoc index 0c0479ad4..bce5fb834 100644 --- a/.vale/fixtures/Localization/AdjectivesWithNouns/testvalid.adoc +++ b/.vale/fixtures/Localization/AdjectivesWithNouns/testvalid.adoc @@ -11,4 +11,6 @@ the previous procedure the previous chapter the previous table the previous image -the previous section \ No newline at end of file +the previous section +this function is +those instructions are \ No newline at end of file diff --git a/.vale/fixtures/Localization/PhrasalVerbs/.vale.ini b/.vale/fixtures/Localization/PhrasalVerbs/.vale.ini index daa49591f..b8567c2e5 100644 --- a/.vale/fixtures/Localization/PhrasalVerbs/.vale.ini +++ b/.vale/fixtures/Localization/PhrasalVerbs/.vale.ini @@ -1,4 +1,4 @@ -; Vale configuration file to test the `CommonlyMisusedWords` rule +; Vale configuration file to test the `PhrasalVerbs` rule StylesPath = ../../../styles MinAlertLevel = warning [*.adoc] diff --git a/.vale/styles/Localization/AdjectivesWithNouns.yml b/.vale/styles/Localization/AdjectivesWithNouns.yml index bdf5c9577..ffd7997d1 100644 --- a/.vale/styles/Localization/AdjectivesWithNouns.yml +++ b/.vale/styles/Localization/AdjectivesWithNouns.yml @@ -1,6 +1,6 @@ --- 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'." +message: "Do not use adjectives without a noun following them. For example, use 'Complete the following steps' instead of 'Complete the following'." link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/using/ level: warning action: diff --git a/.vale/styles/Localization/CommonlyMisusedWords.yml b/.vale/styles/Localization/CommonlyMisusedWords.yml index b65919d2c..2bf73b82e 100644 --- a/.vale/styles/Localization/CommonlyMisusedWords.yml +++ b/.vale/styles/Localization/CommonlyMisusedWords.yml @@ -1,7 +1,7 @@ --- -extends: substitution +extends: existence ignorecase: true -level: warning +level: suggestion link: https://redhat-documentation.github.io/vale-at-red-hat/docs/main/reference-guide/termswarnings/ message: 'Only use allow if you are talking about permission. For ability, use enable.' # source: https://github.com/redhat-documentation/vale-at-red-hat/issues/515