Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Rules/Languages/en/definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dimension-product": "infix=by",
# "closed-interval": "other=closed-interval; from,to; end closed-interval",
"greatest-common-divisor": "function=gcd: the gcd: the greatest common divisor",
"imaginary-part": "function=imaginary part, the imaginary part, the imaginary part",
"imaginary-part": "function=imaginary part: the imaginary part: the imaginary part",
"least-common-multiple": "function=lcm: the lcm: the least common multiple",
# "large-op": "infix=over || other=from,to",
"limit": "prefix=limit as: the limit as: the limit as",
Expand Down Expand Up @@ -121,7 +121,7 @@
"H": "henry",
"Hz": "hertz",
"J": "joule",
"kat": "kattel",
"kat": "katal",
"lm": "lumen",
"lx": "lux",
"N": "newton",
Expand All @@ -142,7 +142,7 @@
"u": "atomic mass unit", # 'u' is correct: https://en.wikipedia.org/wiki/Dalton_(unit)
"eV": "electronvolt",
"rad": "radian", # should only take negative powers
"sr": "sterradion", # should only take negative powers
"sr": "steradian", # should only take negative powers

# others that take a prefix
"a": "annum", # should only take positive powers
Expand Down Expand Up @@ -232,7 +232,7 @@
"tbl": "tablespoon",

# liquid
"fl dr": "fluid drams",
"fl dr": "fluid dram",
"fl oz": "fluid ounce",
"gi": "gill",
"cp": "cup", "cup": "cup",
Expand Down Expand Up @@ -273,7 +273,9 @@
"board foot": "board feet",
"degree celsius": "degrees celsius",
"degree fahrenheit": "degrees fahrenheit",
"henry": "henries",
"hertz": "hertz",
"lux": "lux",
"siemens": "siemens",
"revolution per minute": "revolutions per minute",
"mile per hour": "miles per hour",
Expand Down
4 changes: 2 additions & 2 deletions Rules/Languages/en/unicode-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@
- "⁗": [t: "quadruple prime"] # 0x2057
- "⁠": [t: ""] # 0x2060
- "⁰": [t: "to the zeroth power"] # 0x2070
- "ⁱ": [t: "to the eihth power"] # 0x2071
- "ⁱ": [t: "to the i-th power"] # 0x2071
- "⁴": [t: "to the fourth power"] # 0x2074
- "⁵": [t: "to the fifth power"] # 0x2075
- "⁶": [t: "to the sixth power"] # 0x2076
Expand Down Expand Up @@ -1581,7 +1581,7 @@
- "★": [t: "black star"] # 0x2605
- "☆": [t: "white star"] # 0x2606
- "☉": [t: "sun"] # 0x2609
- "☌": [t: "conjuction"] # 0x260c
- "☌": [t: "conjunction"] # 0x260c
- "☒": [t: "ballot box with x"] # 0x2612
- "☽": [t: "waxing moon"] # 0x263d
- "☾": [t: "waning moon"] # 0x263e
Expand Down
7 changes: 7 additions & 0 deletions tests/Languages/en/alphabets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,13 @@ fn turned() -> Result<()> {

}

#[test]
fn unicode_typo_regressions() -> Result<()> {
test("en", "SimpleSpeak", "<math><mi>ⁱ</mi></math>", "to the i-th power")?;
test("en", "SimpleSpeak", "<math><mi>☌</mi></math>", "conjunction")?;
Ok(())
}

#[test]
fn enclosed_numbers() -> Result<()> {
let expr = "<math> <mi>①</mi><mo>,</mo><mi>⑨</mi></math>";
Expand Down
18 changes: 10 additions & 8 deletions tests/Languages/en/units.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ fn si_derived_1() -> Result<()> {
1 degree celsius, comma; 2 degrees celsius, comma, \
1 farad, comma, 2 farads, comma, \
1 gray, comma, 2 grays, comma, \
1 henry, comma, 2 henrys, comma, \
1 henry, comma, 2 henries, comma, \
1 hertz, comma, 2 hertz, comma, \
1 joule, comma, 2 joules, comma, \
1 kattel, comma, 2 kattels, comma, \
1 katal, comma, 2 katals, comma, \
1 lumen, comma, 2 lumens, comma, \
1 lux, comma, 2 luxs")?;
1 lux, comma, 2 lux")?;
return Ok(());

}
Expand All @@ -181,12 +181,12 @@ fn si_derived_1_with_prefixes() -> Result<()> {
1 yotta-coulomb, comma; 2 zetta-coulombs, comma; \
1 exa-farad, comma; 2 peta-farads, comma; \
1 tera-gray, comma; 2 giga-grays, comma; \
1 mega-henry, comma; 2 kilo-henrys, comma; \
1 mega-henry, comma; 2 kilo-henries, comma; \
1 deka-hertz, comma; 2 deci-hertz, comma; \
1 centi-joule, comma; 2 milli-joules, comma; \
1 micro-kattel, comma; 2 nano-kattels, comma; \
1 micro-katal, comma; 2 nano-katals, comma; \
1 pico-lumen, comma; 2 femto-lumens, comma; \
1 atto-lux, comma; 2 zepto-luxs, comma; \
1 atto-lux, comma; 2 zepto-lux, comma; \
1 milli-degree celsius; comma; 2 micro-degrees celsius; comma; \
1 pico-degree celsius; comma; 2 nano-degrees celsius")?;
return Ok(());
Expand Down Expand Up @@ -281,7 +281,7 @@ fn si_accepted() -> Result<()> {
1 atomic mass unit, comma; 2 atomic mass units, comma; \
1 electronvolt, comma; 2 electronvolts, comma, \
1 radian, comma, 2 radians, comma, \
1 sterradion, comma; 2 sterradions, comma, \
1 steradian, comma; 2 steradians, comma, \
1 annum, comma, 2 annums, comma, \
1 arcsecond, comma; 2 arcseconds, comma, \
1 bit, comma, 2 bits, comma, \
Expand Down Expand Up @@ -320,7 +320,7 @@ fn si_accepted_with_prefixes() -> Result<()> {
1 hecto-atomic mass unit; comma; 2 deka-atomic mass units; comma; \
1 milli-electronvolt, comma; 2 micro-electronvolts; comma; \
1 nano-radian, comma; 2 pico-radians, comma; \
1 femto-sterradion, comma; 2 atto-sterradions; comma; \
1 femto-steradian, comma; 2 atto-steradians; comma; \
1 giga-annum, comma; 2 mega-annums, comma; \
1 zepto-arcsecond, comma; 2 yocto-arcseconds; comma; \
1 kilo-bit, comma; 2 mega-bits, comma; \
Expand Down Expand Up @@ -427,6 +427,7 @@ fn without_prefix_other() -> Result<()> {
<mn>1</mn><mi intent=":unit">M</mi><mo>,</mo><mn>2</mn><mi intent=":unit">M</mi><mo>,</mo>
<mn>1</mn><mi intent=":unit">R</mi><mo>,</mo><mn>2</mn><mi intent=":unit">R</mi><mo>,</mo>
<mn>1</mn><mi intent=":unit">rpm</mi><mo>,</mo><mn>2</mn><mi intent=":unit">rpm</mi><mo>,</mo>
<mn>1</mn><mi intent=":unit">fl dr</mi><mo>,</mo><mn>2</mn><mi intent=":unit">fl dr</mi><mo>,</mo>
<mn>1</mn><mi intent=":unit">℧</mi><mo>,</mo><mn>2</mn><mi intent=":unit">℧</mi><mo>,</mo>
<mn>1</mn><mi intent=":unit">dyn</mi><mo>,</mo><mn>2</mn><mi intent=":unit">dyn</mi><mo>,</mo>
<mn>1</mn><mi intent=":unit">erg</mi><mo>,</mo><mn>2</mn><mi intent=":unit">erg</mi>
Expand All @@ -443,6 +444,7 @@ fn without_prefix_other() -> Result<()> {
1 molar, comma, 2 molars, comma, \
1 roentgen, comma; 2 roentgens, comma; \
1 revolution per minute, comma; 2 revolutions per minute, comma, \
1 fluid dram, comma; 2 fluid drams, comma, \
1 m-h-o, comma, 2 m-h-os, comma, \
1 dyne, comma, 2 dynes, comma, \
1 erg, comma, 2 ergs")?;
Expand Down
Loading