git: fbc71f58e8 - main - .vale/styles: Removing Foreign Language references from English contents

Muhammad Moinur Rahman <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/doc/commit/?id=fbc71f58e894fcfd6130869e8c8d7ab5e3360314

commit fbc71f58e894fcfd6130869e8c8d7ab5e3360314
Author:     Muhammad Moinur Rahman <[email protected]>
AuthorDate: 2023-08-01 13:26:43 +0000
Commit:     Muhammad Moinur Rahman <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.