Changed 'Remove Letter Accents' to 'Remove Diacritics'

This commit is contained in:
n1474335 committed 2018-11-07 15:07:54 +00:00
1 parent b301d16cb2
commit cea30465d8
4 files changed
+12 -13

No files matched your search

+1 -1
View File
@@ -168,7 +168,7 @@
"ops": [ "ops": [
"Encode text", "Encode text",
"Decode text", "Decode text",
"Remove Letter Accents", "Remove Diacritics",
"Unescape Unicode Characters" "Unescape Unicode Characters"
] ]
}, },
@@ -7,24 +7,23 @@
import Operation from "../Operation"; import Operation from "../Operation";
/** /**
* Remove Letter Accents operation * Remove Diacritics operation
*/ */
class RemoveLetterAccents extends Operation { class RemoveDiacritics extends Operation {
/** /**
* RemoveLetterAccents constructor * RemoveDiacritics constructor
*/ */
constructor() { constructor() {
super(); super();
this.name = "Remove Letter Accents"; this.name = "Remove Diacritics";
this.module = "Default"; this.module = "Default";
this.description = "Replaces accented characters with their latin character equivalent."; this.description = "Replaces accented characters with their latin character equivalent.";
this.infoURL = ""; this.infoURL = "https://wikipedia.org/wiki/Diacritic";
this.inputType = "string"; this.inputType = "string";
this.outputType = "string"; this.outputType = "string";
this.args = [ this.args = [];
];
} }
/** /**
@@ -39,4 +38,4 @@ class RemoveLetterAccents extends Operation {
} }
export default RemoveLetterAccents; export default RemoveDiacritics;
+1 -1
View File
@@ -63,7 +63,7 @@ import "./tests/operations/ParseIPRange";
import "./tests/operations/PowerSet"; import "./tests/operations/PowerSet";
import "./tests/operations/Regex"; import "./tests/operations/Regex";
import "./tests/operations/Register"; import "./tests/operations/Register";
import "./tests/operations/RemoveLetterAccents"; import "./tests/operations/RemoveDiacritics";
import "./tests/operations/Rotate"; import "./tests/operations/Rotate";
import "./tests/operations/SeqUtils"; import "./tests/operations/SeqUtils";
import "./tests/operations/SetDifference"; import "./tests/operations/SetDifference";
@@ -1,6 +1,6 @@
/** /**
* Remove Letter Accents tests. * Remove Diacritics tests.
* *
* @author Klaxon [klaxon@veyr.com] * @author Klaxon [klaxon@veyr.com]
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
@@ -10,12 +10,12 @@ import TestRegister from "../../TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {
name: "Remove Letter Accents", name: "Remove Diacritics",
input: "\xe0, \xe8, \xec, \xf2, \xf9 \xc0, \xc8, \xcc, \xd2, \xd9\n\xe1, \xe9, \xed, \xf3, \xfa, \xfd \xc1, \xc9, \xcd, \xd3, \xda, \xdd\n\xe2, \xea, \xee, \xf4, \xfb \xc2, \xca, \xce, \xd4, \xdb\n\xe3, \xf1, \xf5 \xc3, \xd1, \xd5\n\xe4, \xeb, \xef, \xf6, \xfc, \xff \xc4, \xcb, \xcf, \xd6, \xdc, \u0178\n\xe5, \xc5", input: "\xe0, \xe8, \xec, \xf2, \xf9 \xc0, \xc8, \xcc, \xd2, \xd9\n\xe1, \xe9, \xed, \xf3, \xfa, \xfd \xc1, \xc9, \xcd, \xd3, \xda, \xdd\n\xe2, \xea, \xee, \xf4, \xfb \xc2, \xca, \xce, \xd4, \xdb\n\xe3, \xf1, \xf5 \xc3, \xd1, \xd5\n\xe4, \xeb, \xef, \xf6, \xfc, \xff \xc4, \xcb, \xcf, \xd6, \xdc, \u0178\n\xe5, \xc5",
expectedOutput: "a, e, i, o, u A, E, I, O, U\na, e, i, o, u, y A, E, I, O, U, Y\na, e, i, o, u A, E, I, O, U\na, n, o A, N, O\na, e, i, o, u, y A, E, I, O, U, Y\na, A", expectedOutput: "a, e, i, o, u A, E, I, O, U\na, e, i, o, u, y A, E, I, O, U, Y\na, e, i, o, u A, E, I, O, U\na, n, o A, N, O\na, e, i, o, u, y A, E, I, O, U, Y\na, A",
recipeConfig: [ recipeConfig: [
{ {
"op": "Remove Letter Accents", "op": "Remove Diacritics",
"args": [] "args": []
}, },
], ],