git: fbc71f58e8 - main - .vale/styles: Removing Foreign Language references from English contents
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 01 Aug 2023 13:27:45 UTC
The branch main has been updated by bofh:
URL: https://cgit.FreeBSD.org/doc/commit/?id=fbc71f58e894fcfd6130869e8c8d7ab5e3360314
commit fbc71f58e894fcfd6130869e8c8d7ab5e3360314
Author: Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-08-01 13:26:43 +0000
Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-08-01 13:27:37 +0000
.vale/styles: Removing Foreign Language references from English contents
e.g/eg or ie/i.e actually hails from Latin root and do not have any
specific general acceptance in any English standards or at least should
not be written in technical documentation. But we have a lot of these in
our documentation. Throw errors for such occurrences and replace those
with for example or that is.
Approved by: carlavilla
---
.vale.ini | 1 +
.vale/styles/FreeBSD/ForeignLanguage.yml | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/.vale.ini b/.vale.ini
index e7657b17a3..415518a3cb 100644
--- a/.vale.ini
+++ b/.vale.ini
@@ -18,6 +18,7 @@ BasedOnStyles = FreeBSD, Vale
FreeBSD.BrandTerms = NO
FreeBSD.ConsciousLanguage = NO
FreeBSD.Contractions = NO
+FreeBSD.ForeignLanguage= NO
FreeBSD.Hang = NO
FreeBSD.Hyphens = NO
FreeBSD.Pronouns = NO
diff --git a/.vale/styles/FreeBSD/ForeignLanguage.yml b/.vale/styles/FreeBSD/ForeignLanguage.yml
new file mode 100644
index 0000000000..c2e5985fb5
--- /dev/null
+++ b/.vale/styles/FreeBSD/ForeignLanguage.yml
@@ -0,0 +1,11 @@
+---
+extends: substitution
+message: "Use '%s' instead of '%s'."
+ignorecase: true
+level: error
+nonword: true
+action:
+ name: replace
+ swap:
+ '\b(?:eg|e g|e\.g\.|e\. g\.)[\s,]': for example
+ '\b(?:ie|i e|i\.e\.|i\. e\.)[\s,]': that is