diff --git a/Rules/Languages/hu/ClearSpeak_Rules.yaml b/Rules/Languages/hu/ClearSpeak_Rules.yaml index 73d8eaf5..43403469 100644 --- a/Rules/Languages/hu/ClearSpeak_Rules.yaml +++ b/Rules/Languages/hu/ClearSpeak_Rules.yaml @@ -568,27 +568,25 @@ - name: set tag: set - match: "." + # Empty set and braced/{set-builder} forms (typically 0–1 child). + # Multi-arg intent set($x,$y,...) and set($x) with @arg fall through to function-intent + # ("the set of …"). + match: "count(*)=0 or (count(*)=1 and not(*[1][@arg]))" replace: - test: - if: "count(*)=0" then: [T: "az üres halmaz"] # phrase('the empty set') - - else_if: "count(*)=2" - then: - - test: - if: "$Verbosity!='Terse'" - then: [T: "az"] # phrase('the' empty set) - - T: "üres halmaz" # phrase(the 'empty set') - else_if: "count(*[1]/*)=3 and *[1]/*[2][self::m:mo][.=':' or .='|' or .='∣']" then: - test: if: "$Verbosity!='Terse'" - then: [T: ""] # phrase('the' set of all integers) - - x: "*[1]/*[1]" - - T: "melyekre teljesül, hogy" # phrase(this is a 'set of' numbers) + then: [T: ""] # phrase('the' empty set) + - T: "" # phrase(the 'empty set') - test: if: "$ClearSpeak_Sets != 'woAll'" then: [T: "minden"] # phrase(the set of 'all' integers) + - x: "*[1]/*[1]" + - T: "melyekre teljesül, hogy" # phrase(the set S 'such that' x is less than y) - x: "*[1]/*[3]" else: - test: diff --git a/Rules/Languages/hu/SharedRules/default.yaml b/Rules/Languages/hu/SharedRules/default.yaml index b218667d..54bbffc6 100644 --- a/Rules/Languages/hu/SharedRules/default.yaml +++ b/Rules/Languages/hu/SharedRules/default.yaml @@ -62,7 +62,7 @@ - test: - if: "string-length(.) = 1 and text() != '_'" # need unicode.tdl to kick in for single letter tokens then: [x: "text()"] - - else_if: "@data-chem-element > 0 or @data-roman-numeral" # NavMode=Character needs this + - else_if: "@data-chem-element or @data-roman-numeral" # NavMode=Character needs this then: [SPELL: "text()", pause: "short"] else: [x: "translate(., '-_\u00A0', ' ')"] # from intent literals or from extra spaces added (which get deleted) @@ -237,26 +237,12 @@ - x: "*[2]" - T: "alatt" # phrase(x with z 'below' it) -# FIX: this only works for up to four dots (which is realistically all we need) -- name: dot-over - tag: modified-variable - match: "*[1][self::m:mi] and (*[2][translate(., '.', '')=''])" - replace: - - x: "*[1]" - - x: "IfThenElse(string-length(*[2])=1, 'pont', - IfThenElse(string-length(*[2])=2, 'pont pont', - IfThenElse(string-length(*[2])=3, 'pont pont pont', 'pont pont pont pont') - ))" - - pause: short - -# FIX: the 'translate' list is a little different from 'modified-variable', so we also include 'mover' (unify?) - name: diacriticals - tag: [mover, modified-variable] + tag: mover match: "*[1][self::m:mi] and *[2][translate(., '\u0306\u030c.\u00A8\u02D9\u20DB\u20DC`^ˇ~→¯_', '')='']" replace: - x: "*[1]" - x: "*[2]" - - pause: short - name: default tag: mover @@ -434,23 +420,22 @@ - T: "szkriptek vége" # phrase(At this point 'end scripts' occurs) - name: default - tag: [mtable, array] + tag: mtable variables: - IsColumnSilent: "false()" - - NumColumns: "CountTableColumns(.)" - - NumRows: "CountTableRows(.)" + - NumColumns: "count(*[1]/*) - IfThenElse(*/self::m:mlabeledtr, 1, 0)" match: "." replace: - T: "táblázat" # phrase(the 'table with' 3 rows) - - x: "$NumRows" + - x: count(*) - test: - if: "$NumRows=1" + if: count(*)=1 then: [T: "sorral"] # phrase(the table with 1 'row') else: [T: "sorral"] # phrase(the table with 3 'rows') - T: "és" # phrase(the table with 3 rows 'and' 4 columns) - x: "$NumColumns" - test: - if: "$NumColumns=1" + if: "NumColumns=1" then: [T: "oszloppal"] # phrase(the table with 3 rows and 1 'column') else: [T: "oszloppal"] # phrase(the table with 3 rows and 4 'columns') - pause: long @@ -491,6 +476,18 @@ - x: "count(preceding-sibling::*)+IfThenElse(parent::m:mlabeledtr, 0, 1)" - pause: medium - x: "*" + - test: + # short pause after each element; medium pause if last element in a row; long pause for last element in matrix + if: "HasVisibleColumnLine(../.., count(preceding-sibling::*) + 1)" + then: + - pause: short + - T: "elválasztó" + - test: + # Announce a row separator only after the row's final cell, so it is spoken once per horizontal boundary. + if: "count(following-sibling::*) = 0 and HasVisibleRowLine(../.., count(../preceding-sibling::*) + 1)" + then: + - pause: short + - T: "sorelválasztó" - test: # short pause after each element; medium pause if last element in a row; long pause for last element in matrix - if: count(following-sibling::*) > 0 @@ -500,6 +497,7 @@ else: [pause: long] + - name: empty-box # The ordering below is the order in which words come out when there is more than one value # Note: @notation can contain more than one value @@ -720,16 +718,27 @@ replace: - x: "SpeakIntentName(name(.), $Verbosity, 'function')" - test: - if: "$Verbosity != 'Terse' and not(contains(@data-intent-property, ':literal:')) and - not(count(*)=2 and (IsInDefinition(*[1], 'TrigFunctionNames') or IsInDefinition(name(.), 'TerseFunctionNames')) and IsNode(*[2], 'simple'))" - then: [T: "", pause: auto] # phrase(sine 'of' 5) - - insert: - nodes: "*" - replace: - - test: - if: "not(contains(@data-intent-property, ':literal:'))" - then: [x: "','"] + - if: "IntentFunctionUseArityPath(name(.), 'function', count(*))" + then: + - x: "IntentFunctionGlueBefore(name(.), 'function', 1, count(*))" - pause: auto + - insert: + nodes: "*" + replace: + - x: "IntentFunctionGlueBefore(name(.), 'function', $InsertIndex, count(*))" + - pause: auto + else: + - test: + if: "$Verbosity != 'Terse' and not(contains(@data-intent-property, ':literal:')) and + not(count(*)=2 and (IsInDefinition(*[1], 'TrigFunctionNames') or IsInDefinition(name(.), 'TerseFunctionNames')) and IsNode(*[2], 'simple'))" + then: [T: "", pause: auto] # phrase(sine 'of' 5) + - insert: + nodes: "*" + replace: + - test: + if: "not(contains(@data-intent-property, ':literal:'))" + then: [x: "IntentFunctionArgSeparator(name(.), 'function', count(*))"] + - pause: auto - test: # speak "end ..." if not bracketed or last child is not simple and not last node if: "$Impairment = 'Blindness' and not(*[last()][IsBracketed(., '', '') or IsNode(., 'simple')] )" diff --git a/Rules/Languages/hu/SharedRules/general.yaml b/Rules/Languages/hu/SharedRules/general.yaml index 0637bf6e..9013205e 100644 --- a/Rules/Languages/hu/SharedRules/general.yaml +++ b/Rules/Languages/hu/SharedRules/general.yaml @@ -70,14 +70,14 @@ - name: real-part tag: real-part - match: "." + match: "count(*)=0" replace: - bookmark: "@id" - T: "valós rész" # phrase('the real part' of a complex number does not include the imaginary part) - name: imaginary-part tag: imaginary-part - match: "." + match: "count(*)=0" replace: - bookmark: "@id" - T: "képzetes rész" # phrase('the imaginary part' is part of a complex number) diff --git a/Rules/Languages/hu/SharedRules/geometry.yaml b/Rules/Languages/hu/SharedRules/geometry.yaml index c23f2252..c5a0ac60 100644 --- a/Rules/Languages/hu/SharedRules/geometry.yaml +++ b/Rules/Languages/hu/SharedRules/geometry.yaml @@ -60,7 +60,8 @@ - name: coordinate tag: coordinate - match: "." +# Intent forms coordinate($x,...) use @arg and fall through to function-intent / IntentMappings + match: "not(*[@arg])" replace: - test: if: "$Verbosity='Verbose'" diff --git a/Rules/Languages/hu/definitions.yaml b/Rules/Languages/hu/definitions.yaml index bdc64942..d66738ec 100644 --- a/Rules/Languages/hu/definitions.yaml +++ b/Rules/Languages/hu/definitions.yaml @@ -1,14 +1,71 @@ --- - include: "../../definitions.yaml" -# If an "intent" is used, the 'terse:medium:verbose' speech for the intent name is given here for a prefix||infix||postfix||function fixity -# If only one ":" is used, the first part is used for 'terse' and the second part is used for 'medium' and 'verbose' -# If no ":"s are used, the same speech is used for all forms -# If bracketing words make sense, they are separated with ";"s -# Intent mappings must specify whether they are "prefix", "infix", "postfix", or "function" with an "=" sign -# If there are multiple fixities (e.g., see transpose), they are separated with "||" -# for readability, spaces can be used around any of the delimiter characters -# Note: if there are multiple fixities, the first one is used if the fixity is not given in the intent +# IntentMappings Syntax: +# +# This section defines how each "intent" is spoken for various grammatical forms (fixities such as "prefix", "infix", "postfix", and "function"), +# along with supporting different verbosity levels. +# The syntax is a little bit complicated, but allows a declarative syntax so you don't have to write as many rules. +# +# For each intent, you specify spoken forms for one or more fixities using the syntax below. +# +# - Each mapping has the form: +# "": "= || = || ...", +# or just +# "": "", +# where is used for all forms if fixity and '=' are omitted. +# +# - If an intent has multiple fixities, separate them with "||". Spaces are allowed around delimiters for readability. +# - If only one ":" is present in **, it provides the 'terse' form, and the following string is used for both 'medium' and 'verbose'. +# - If more than one ":" is present, the string is split into 'terse', 'medium', and 'verbose' forms, in that order (each separated by ":"). +# - If no ":" is present, the same spoken form is used for all styles. +# +# - Use semicolons ";" to divide opening, main, and closing bracketing words within a speech string, where such words make sense. +# - If an intent has multiple fixities but a definition does not specify one, the first fixity listed is chosen by default. +# +# Functions and argument glue: +# - The "|" character delimits options describing how to glue arguments together when speaking function arguments. +# - Arity templates (multiple "|" options, or one option with ','-separated glue words): glue-word count +# implies arity; the final argument is preceded by "of". Example: "sum | over | from,to" +# - 1 arg: "sum of x" +# - 2 args: "sum over i of x" +# - 3 args: "sum from i to n of x" +# If no option matches the argument count, separators fall back to "comma". +# - Binary separator (exactly one "|" option, no commas in it): after "of", that word joins the two args. +# Example: "quotient": "function=integer part | divided by" → "integer part of x divided by y" +# If there are not exactly two args, separators fall back to "comma" (no real n-ary use of these words). +# +# BNF-like description: +# +# IntentMappingsEntry ::= ":" +# +# ::= ( "||" )* +# | +# +# ::= "=" +# +# ::= "prefix" | "infix" | "postfix" | "function" | "nofix" | "silent" +# +# ::= +# | "|" ( "|" )* +# +# ::= text +# # May use ":" to separate terse:medium:verbose forms. +# # May use ";" for bracketing (opening; main; closing). +# +# ::= text +# # One option, no commas: binary separator after "of" (e.g. "divided by"). +# # One option with "," or several "|" options: arity templates +# # (glue-word count = arg_count - 1; last arg preceded by "of"). +# # Unmatched arity (or binary glue with ≠2 args): fall back to "comma". +# +# ::= (applies to all fixities) +# +# Example: +# "absolute-value": "function= ; absolute value: the absolute value: the absolute value; end absolute value" +# "sum": "function=sum | over | from,to" +# "quotient": "function=integer part | divided by" +# - IntentMappings: { "indexed-by": "infix= alsó index kezdete; alsó index; alsó index vége: alsó index vége: alsó index vége", "say-super": "infix=felső index: felső index: felső index", # used with 'mo' for superscripts (e.g, "<") @@ -30,14 +87,14 @@ #"fraction":"function=fraction; over; end fraction", # NOTE: Fails "mixed-fraction":"infix=és", # NOTE: in website says function, but follow infix speech pattern. "greatest-common-divisor": "function=a legnagyobb közös osztó", - "quotient":"function=egész rész osztva", # NOTE: Logic somewhere here failing, becomes "divided by of x comma, y" instead of "integer part of x divided by y" + "quotient":"function=egész rész | osztva", # NOTE: Logic somewhere here failing, becomes "divided by of x comma, y" instead of "integer part of x divided by y" "evaluated-at":"infix=értékelve || postfix=értékként", - "remainder":"function=a maradék, osztva", + "remainder":"function=a maradék | osztva", "max":"function=max", "min":"function=min", "power":"infix=a hatványra", "root":"function=root", - "imaginary-part": "a képzeletbeli rész", + "imaginary-part": "function=a képzeletbeli rész: a képzeletbeli rész: a képzeletbeli rész", "least-common-multiple": "function=lcm: a legkisebb közös többszörös: a legkisebb közös többszörös", "complex-conjugate":"function=Komplex konjugált", "complex-arg":"function=argumentum", @@ -74,15 +131,15 @@ "tends-to-from-below":"infix=alulról indul", ### Sets "set": "function= ; halmaz: a halmaz", - "set-difference":"function=különbséghalmaz || infix=mínusz || postfix=különbséghalmaza", # NOTE: not tested + "set-difference":"function=különbséghalmaz | és || infix=mínusz", "complement":"function=komplemens", - "empty-set":"function=üres halmaz", + "empty-set":"nofix=üres halmaz", "cardinality":"function=számosság", # NOTE: does not have a defined speech template in website "list":"function=lista", "tuple": "function= ; tuple: a tuple", ### Sequence and Series - "sum":"function= ; összegzés : összeg ; ", #: sum over : sum from; to", - "product":"function=szorzat || function=szorzat vége || function=szorzat innen ide", + "sum": "function=összeg", + "product":"function=szorzat", ### Elementary classical functions "sine":"function=szinusz: szinusz", @@ -118,7 +175,7 @@ "variance":"function=variencia", "median":"function=medián", "mode":"function=mód", - "conditional-probability":"function=valószínűség; adott", # NOTE: Check test + "conditional-probability":"function=valószínűség", ### Linear Algebra @@ -133,7 +190,7 @@ "unit-vector":"prefix=egységvektor", "identity-matrix":"nofix=identitásmátrix", # NOTE: no function specified - "transpose":"function=transzponált || postfix=transzponált", # postfix needs testing + "transpose":"postfix=transzponált || function=transzponált", "dimensional-product":"infix=a(z)", # INFIX @@ -164,10 +221,11 @@ ### General Concepts "fenced-group":"function=bekerített csoport", # appears both under general concepts and grouping # NOTE: in site mentions "the pair x and y", due to being defined as function, needs the "of" keyword - "ordered-pair": "function= ; a pár; és", # Needs to be tested, test converts "and" to "comma," + "ordered-pair": "function=a pár | és", # Needs to be tested, test converts "and" to "comma," "highlight":"postfix=kiemelt", "least-common-denominator":"function=legkisebb közös nevező", "rate":"infix=per", + "translation":"function=fordítás", "constraint":"infix= ; feltétellel; ", "binomial-coefficient":"infix=választ", @@ -269,7 +327,7 @@ ## Default fixity nofix "diameter":"nofix=átmérő: átmérő", "distance":"nofix=távolság; távolság: távolság", - "probability":"nofix=P: valószínűség", + "probability":"nofix=P: valószínűség || function=valószínűség", "radius":"nofix=r: sugár", "volume":"nofix=hangerő: hangerő || function=hangerő", "exponential-e":"nofix=e", diff --git a/Rules/Languages/hu/navigate.yaml b/Rules/Languages/hu/navigate.yaml index ff4afb8b..475e1f62 100644 --- a/Rules/Languages/hu/navigate.yaml +++ b/Rules/Languages/hu/navigate.yaml @@ -60,38 +60,40 @@ - pause: "medium" else: - test: + # CommandOffset is 1 + length of the English NavCommand stem (Zoom/Move/Read/Describe), + # not the spoken Prefix length — so translations can use a different Prefix word. - if: "starts-with($NavCommand, 'Zoom')" - then: [set_variables: [Prefix: "'zoom'"]] # phrase('zoom' in to see more details) + then: [set_variables: [Prefix: "'zoom'", CommandOffset: "5"]] # phrase('zoom' in to see more details) - else_if: "starts-with($NavCommand, 'Move')" - then: [set_variables: [Prefix: "'move'"]] # phrase('move' to next entry in table) + then: [set_variables: [Prefix: "'move'", CommandOffset: "5"]] # phrase('move' to next entry in table) - else_if: "starts-with($NavCommand, 'Read')" - then: [set_variables: [Prefix: "'read'"]] # phrase('read' to next entry in table) + then: [set_variables: [Prefix: "'read'", CommandOffset: "5"]] # phrase('read' to next entry in table) - else_if: "starts-with($NavCommand, 'Describe')" - then: [set_variables: [Prefix: "'describe'"]] # phrase('describe' to next entry in table) + then: [set_variables: [Prefix: "'describe'", CommandOffset: "9"]] # phrase('describe' to next entry in table) - test: if: "$Prefix != ''" then: - x: "$Prefix" - test: - - if: "substring($NavCommand, string-length($Prefix)+1) = 'In'" + - if: "substring($NavCommand, $CommandOffset) = 'In'" then: [T: "ban"] # phrase(zoom 'in' to see more details) - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'InAll'" + - else_if: "substring($NavCommand, $CommandOffset) = 'InAll'" # HACK: '\uF8FE' is used internally for the concatenation char by 'ct' -- this gets "ed" concatenated to "zoom" - then: [T: "Teljesen betáplálva"] # phrase(zoom 'out all of the way' to see more details) - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Out'" + then: [T: "Teljesen kinagyítva"] # phrase(zoom 'out all of the way' to see more details) + - else_if: "substring($NavCommand, $CommandOffset) = 'Out'" then: [T: "ki"] # phrase(zoom 'out' to see more details) - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'OutAll'" + - else_if: "substring($NavCommand, $CommandOffset) = 'OutAll'" # HACK: '\uF8FE' is used internally for the concatenation char by 'ct' -- this gets "ed" concatenated to "zoom" - then: [T: "teljes táblázat megjelenítése\uF8FEe ki egészen"] # phrase(zoom 'out all of the way' to see more details) - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Next'" + then: [T: "teljes táblázat kinagyítása"] # phrase(zoom 'out all of the way' to see more details) + - else_if: "substring($NavCommand, $CommandOffset) = 'Next'" then: [T: "jobbra"] # phrase(move to the 'right') - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Previous'" + - else_if: "substring($NavCommand, $CommandOffset) = 'Previous'" then: [T: "balra"] # phrase(move to the 'left') - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'Current'" + - else_if: "substring($NavCommand, $CommandOffset) = 'Current'" then: [T: "jelenlegi"] # phrase(who is the 'current' president) - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'LineStart'" + - else_if: "substring($NavCommand, $CommandOffset) = 'LineStart'" then: [T: "a sor elejére"] # phrase(move 'to start of line') - - else_if: "substring($NavCommand, string-length($Prefix)+1) = 'LineEnd'" + - else_if: "substring($NavCommand, $CommandOffset) = 'LineEnd'" then: [T: "a sor végére"] # phrase(move 'to end of line') - pause: "medium" - set_variables: [MatchCounter: "$MatchCounter + 1"] @@ -103,6 +105,15 @@ (name(.)='mrow' or name(.) = 'mtr' or name(.) = 'mlabeledtr' or @data-from-mathml = 'mtable')" replace: [] +# Prefix/silent intents with no NavigationParts entry (e.g. unary minus, x-hat) +# should not announce "in"/"out of". +- name: into-or-out-of-prefix-or-silent-without-parts + tag: "*" + match: "$Move2D != '' and + (contains(@data-intent-property, ':prefix:') or contains(@data-intent-property, ':silent:')) and + GetNavigationPartName(name(.), count($Child2D/preceding-sibling::*)) = ''" + replace: [] + - name: into-or-out-of-mtr tag: [mtr, mlabeledtr] match: "$Move2D = 'in'" @@ -158,7 +169,21 @@ - else_if: "count(*) = 1" then_test: if: "$NavVerbosity = 'Verbose'" - then: [x: "translate(name(.), '-_', ' ')"] # e.g., "in absolute value" + then: # IntentMappings via SpeakIntentName; falls back to spaced intent name + - test: + - if: "contains(@data-intent-property, ':prefix:')" + then: [x: "SpeakIntentName(name(.), $Verbosity, 'prefix')"] + - else_if: "contains(@data-intent-property, ':postfix:')" + then: [x: "SpeakIntentName(name(.), $Verbosity, 'postfix')"] + - else_if: "contains(@data-intent-property, ':infix:')" + then: [x: "SpeakIntentName(name(.), $Verbosity, 'infix')"] + - else_if: "contains(@data-intent-property, ':function:')" + then: [x: "SpeakIntentName(name(.), $Verbosity, 'function')"] + - else_if: "contains(@data-intent-property, ':nofix:')" + then: [x: "SpeakIntentName(name(.), $Verbosity, 'nofix')"] + - else_if: "contains(@data-intent-property, ':silent:')" + then: [x: "SpeakIntentName(name(.), $Verbosity, 'silent')"] + - else: [x: "SpeakIntentName(name(.), $Verbosity, 'other')"] else: - T: "része" # phrase(the 'part' of the expression) - x: "count($Child2D/preceding-sibling::*) + 1" diff --git a/Rules/Languages/hu/unicode-full.yaml b/Rules/Languages/hu/unicode-full.yaml index 4ab669c7..23381591 100644 --- a/Rules/Languages/hu/unicode-full.yaml +++ b/Rules/Languages/hu/unicode-full.yaml @@ -1279,17 +1279,10 @@ - T: "zárójeles" # (en: 'parenthesized', DeepL translation) - SPELL: "translate('.', '⒜⒝⒞⒟⒠⒡⒢⒣⒤⒥⒦⒧⒨⒩⒪⒫⒬⒭⒮⒯⒰⒱⒲⒳⒴⒵', 'abcdefghijklmnopqrstuvwxyz')" - - "Ⓐ-Ⓩ": # 0x24b6 - 0x24cf - - T: "bekarikázott" - - SPELL: "translate('.', 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')" - - "🅐-🅩": # 0x1f150 - 0x1f169 - T: "fekete körrel jelölt" # (en: 'black circled', DeepL translation) - SPELL: "translate('.', '🅐🅑🅒🅓🅔🅕🅖🅗🅘🅙🅚🅛🅜🅝🅞🅟🅠🅡🅢🅣🅤🅥🅦🅧🅨🅩', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')" - - "ⓐ-ⓩ": # 0x24d0 - 0x24e9 - - T: "bekarikázott" # (en: 'circled', DeepL translation) - - SPELL: "translate('.', 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ', 'abcdefghijklmnopqrstuvwxyz')" - "⓪": [T: "bekarikázott nulla"] # 0x24ea (en: 'circled zero', DeepL translation) - "⓫": [T: "fekete kör alakú tizenegyes"] # 0x24eb (en: 'black circled eleven', DeepL translation) - "⓬": [T: "fekete bekarikázott tizenkettő"] # 0x24ec (en: 'black circled twelve', DeepL translation) @@ -3619,3 +3612,203 @@ - "\uE42C": [SPELL: "'←'"] # 0xe42c defer to def of arrow - "\uE42D": [SPELL: "'→'"] # 0xe42d defer to def of arrow - "\uE42E": [SPELL: "'⇄'"] # 0xe42e defer to def of arrow +# Following symbols hungarian translations are restored, because english unicode-full.yaml file again contains this symbols. +# Note: this restoration purpose only to audit translation tool doesn't show this difference with english unicode-full.yaml and hungarian unicode-full.yaml file. +# This symbols are defined too the hungarian unicode.yaml file. + - "¬": [T: "logikai nem"] # 0xac (en: 'not', DeepL translation) + - "´": [T: "éles ékezet"] # 0xb4 (en: 'acute', DeepL translation) + - "·": # 0xB7 + - test: + if: "$SpeechStyle != 'ClearSpeak' or $ClearSpeak_MultSymbolDot = 'Auto'" + then: [T: "szorozva"] # (en: 'dot', DeepL translation) + else: [T: "pont"] # (DeepL translation) + - "×": # 0xd7 + - test: + if: "$SpeechStyle != 'ClearSpeak' or $ClearSpeak_MultSymbolX = 'Auto'" + then: [T: "szorozva"] + else_test: + if: $ClearSpeak_MultSymbolX = 'By' + then: [T: "szorozva"] + else: [T: "kereszt"] # (en: 'cross', DeepL translation) + - "÷": [T: "osztva"] # 0xf7 (en: 'divided by', DeepL translation) + - "̀": [T: "súlyos ékezet díszítés"] # 0x300 (en: 'grave accent embellishment', DeepL translation) + - "́": [T: "akut ékezet díszítés"] # 0x301 (en: 'acute accent embellishment', DeepL translation) + - "̂": [T: "cirkumflex ékezet díszítés"] # 0x302 (en: 'circumflex accent embellishment', DeepL translation) + - "̃": [T: "tilde"] # 0x303 (en: 'tilde embellishment', DeepL translation) + - "̄": [T: "makron"] # 0x304 (en: 'macron embellishment', DeepL translation) + - "̅": [T: "túlszárnyaló díszítés"] # 0x305 (en: 'overbar embellishment', DeepL translation) + - "̆": [T: "rövid"] # 0x306 (DeepL translation) + - "̇": [T: "pont a díszítés felett"] # 0x307 (en: 'dot above embellishment', DeepL translation) + - "ϖ": [T: "pí"] # 0x3d6 (DeepL translation) + - "ϵ": [T: "holdkóros epszilon"] # 0x3f5 (DeepL translation) + - "϶": [T: "félhold alakú tükrözött görög epszilon"] # 0x3f6 (en: 'reversed epsilon', DeepL translation) + - "…": # 0x2026 + test: + if: + - "$SpeechStyle != 'ClearSpeak' or $ClearSpeak_Ellipses = 'Auto' or" + # must be ClearSpeak and $ClearSpeak_Ellipses = 'AndSoOn' + # speak '…' as 'and so on...' unless expr starts with '…' + - "../*[1][.='…']" + then: [T: "pont pont pont"] # (en: 'dot dot dot', DeepL translation) + else_test: # must have $ClearSpeak_Ellipses = 'AndSoOn' + if: "count(following-sibling::*) = 0" + then: [T: "és így tovább"] # (en: 'and so on', DeepL translation) + else: [T: "és így tovább egészen az alábbi értékig:"] # (en: 'and so on up to', DeepL translation) + - "ℓ": [T: "alsó index l"] # 0x2113 + - "ϕ": [T: "phi"] # 0x3d5 (DeepL translation) + - "⇒": [T: "dupla jobbranyíl"] # 0x21d2 (en: 'right double arrow', DeepL translation) + - "∂": # 0x2202 + - test: + if: "$Verbosity='Terse'" + then: [T: "részleges"] # (en: 'partial', DeepL translation) + else: [T: "parciális derivált"] # (en: 'partial derivative', DeepL translation) + - "∆": # 0x2206 + - test: + if: "following-sibling::*" + then_test: + if: "$Verbosity!='Terse'" + then: [T: "egy laplaciánus"] # "LahPlahsian" sounds better than "laplacian" in speech engines tested + else: [T: "laplaciánus"] + else: [T: "laplaciánus"] + + + - "∉": # 0x2209 + # rule is identical to 0x2208 + - test: + if: "$SpeechStyle != 'ClearSpeak'" + then: [T: "nem eleme ennek:"] + # Several options for speaking elements in ClearSpeak -- they split between being inside a set or not and then the option + else_test: + if: "../../self::m:set or ../../../self::m:set" # inside a set + then_test: + - if: $ClearSpeak_SetMemberSymbol = 'Auto' or $ClearSpeak_SetMemberSymbol = 'In' + then: [T: "nincs benne:"] + - else_if: $ClearSpeak_SetMemberSymbol = 'Member' + then: [T: "nem tagja ennek:"] + - else_if: $ClearSpeak_SetMemberSymbol = 'Element' + then: [T: "nem eleme ennek:"] + - else: [T: "nem tartozik hozzá:"] # $ClearSpeak_SetMemberSymbol = 'Belongs' + else_test: + - if: $ClearSpeak_SetMemberSymbol = 'Auto' or $ClearSpeak_SetMemberSymbol = 'Member' + then: [T: "nem tagja az alábbi halmaznak:"] + - else_if: $ClearSpeak_SetMemberSymbol = 'Element' + then: [T: "nem eleme ennek:"] + - else_if: $ClearSpeak_SetMemberSymbol = 'In' + then: [T: "nincs benne:"] + - else: [T: "nem tartozik hozzá:"] # $ClearSpeak_SetMemberSymbol = 'Belongs' + + - "∊": # 0x220a + - test: + if: "$SpeechStyle != 'ClearSpeak'" + then: + - test: + if: "$Verbosity!='Terse' and not(parent::m:set)" # "the set x is an element of ..." sounds bad + then: [T: "van"] # (en: 'is', DeepL translation) + - T: "egy eleme" # (en: 'an element of', DeepL translation) + # Several options for speaking elements in ClearSpeak -- they split between being inside a set or not and then the option + else_test: + if: "../../self::m:set or ../../../self::m:set" # inside a set + then_test: + - if: $ClearSpeak_SetMemberSymbol = 'Auto' or $ClearSpeak_SetMemberSymbol = 'In' + then: [T: ""] # (DeepL translation) + - else_if: $ClearSpeak_SetMemberSymbol = 'Member' + then: [T: "tagja ennek:"] # (en: 'member of', DeepL translation) + - else_if: $ClearSpeak_SetMemberSymbol = 'Element' + then: [T: "eleme ennek:"] # (en: 'element of', DeepL translation) + - else: [T: "hozzátartozó eleme ennek:"] # $ClearSpeak_SetMemberSymbol = 'Belongs' (en: 'belonging to', DeepL translation) + else_test: + - if: $ClearSpeak_SetMemberSymbol = 'Auto' or $ClearSpeak_SetMemberSymbol = 'Member' + then: [T: "tagja az alábbi halmaznak:"] # (en: 'is a member of', DeepL translation) + - else_if: $ClearSpeak_SetMemberSymbol = 'Element' + then: [T: "egy eleme ennek:"] # (en: 'is an element of', DeepL translation) + - else_if: $ClearSpeak_SetMemberSymbol = 'In' + then: [T: "benne van ebben:"] # (en: 'is in', DeepL translation) + - else: [T: "ebbe a halmazba tartozik:"] # $ClearSpeak_SetMemberSymbol = 'Belongs' (en: 'belongs to', DeepL translation) + - "∐": [T: "diszjunkt unió"] # 0x2210 (en: 'co-product', DeepL translation) + - "√": # 0x221a + - test: + if: "$Verbosity!='Terse'" + then: [T: "a"] # (en: 'the', DeepL translation) + - T: "négyzetgyöke" # (en: 'square root of', DeepL translation) + - "∝": # 0x221d + - test: + if: "$Verbosity!='Terse'" + then: [T: ""] # (en: 'is', DeepL translation) + - T: "arányos" # (en: 'proportional to', DeepL translation) + - "∶": # 0x2236 + - test: + if: "$Verbosity!='Terse'" + then: [T: "van"] # (en: 'is', DeepL translation) + - T: "hogy" # (DeepL translation) + - "∾": # 0x223e + - test: + if: "$Verbosity!='Terse'" + then: [T: "van"] # (en: 'is', DeepL translation) + - T: "legpozitívabb" # (en: 'most positive', DeepL translation) + - "≠": # 0x2260 + - test: + if: "$Verbosity!='Terse'" + then: [T: "van"] # (en: 'is', DeepL translation) + - T: "nem egyenlő" # (en: 'not equal to', DeepL translation) + - "≡": # 0x2261 + - test: + if: "$Verbosity!='Terse'" + then: [T: "van"] # (en: 'is', DeepL translation) + - T: "azonos" # (en: 'identical to', DeepL translation) + - "⊂": # 0x2282 + - test: + if: "$Verbosity!='Terse'" + then: [T: "egy"] # (DeepL translation) + - T: "részhalmaza" # (en: 'subset of', DeepL translation) + - "⊃": # 0x2283 + - test: + if: "$Verbosity!='Terse'" + then: [T: "egy"] # (DeepL translation) + - T: "szuperhalmaza ennek:" # (en: 'superset of', DeepL translation) + - "⊄": # 0x2284 + - test: + if: "$Verbosity!='Terse'" + then: [T: "egy"] # (en: 'is', DeepL translation) + - T: "nem részhalmaza ennek:" # (en: 'not a subset of', DeepL translation) + - "⊅": # 0x2285 + - test: + if: "$Verbosity!='Terse'" + then: [T: "egy"] # (en: 'is', DeepL translation) + - T: "nem szuperhalmaza ennek:" # (DeepL translation) + - "⊆": # 0x2286 + - test: + if: "$Verbosity!='Terse'" + then: [T: "egy"] # (DeepL translation) + - T: "részhalmaza vagy egyenlő" # (en: 'subset of or equal to', DeepL translation) + - "⊇": # 0x2287 + - test: + if: "$Verbosity!='Terse'" + then: [T: "egy"] # (DeepL translation) + - T: "szuperhalmaza vagy egyenlő" # (en: 'superset of or equal to', DeepL translation) + - "ⅆ": [T: "d"] # 0x2146 + - "": [T: "e"] # 0xed11 + - "ⅈ": [T: "i"] # 0x2148 + - "-": # 0xf52e - 0xf537 (old MathType) + - test: + if: "not($IgnoreBold)" + then: [T: "félkövér"] + - SPELL: "translate('.', '', '0123456789')" + - "ⅇ": [T: "e"] # 0x2147 + - "Ⓐ-ⓩ": # 0x24b6 - 0x24cf + - T: "bekarikázott" + - SPELL: "translate('.', 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')" + - "ⓐ-ⓩ": # 0x24d0 - 0x24e9 + - T: "bekarikázott" + - SPELL: "translate('.', 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ', 'abcdefghijklmnopqrstuvwxyz')" + + + + + + + + + + + + diff --git a/tests/Languages/hu/ClearSpeak/sets.rs b/tests/Languages/hu/ClearSpeak/sets.rs index c2b9d589..844e2a51 100644 --- a/tests/Languages/hu/ClearSpeak/sets.rs +++ b/tests/Languages/hu/ClearSpeak/sets.rs @@ -223,7 +223,7 @@ fn set_with_colon() -> Result<()> { let expr = " { x:x>2 } "; - test("hu", "ClearSpeak", expr, "x melyekre teljesül, hogy minden x nagyobb, mint 2")?; + test("hu", "ClearSpeak", expr, "minden x melyekre teljesül, hogy x nagyobb, mint 2")?; return Ok(()); } @@ -234,7 +234,7 @@ fn set_with_bar() -> Result<()> { let expr = " { x|x>2 } "; - test("hu", "ClearSpeak", expr, "x melyekre teljesül, hogy minden x nagyobb, mint 2")?; + test("hu", "ClearSpeak", expr, "minden x melyekre teljesül, hogy x nagyobb, mint 2")?; return Ok(()); } @@ -285,7 +285,7 @@ fn complicated_set_with_colon() -> Result<()> { 7 } "; - test("hu", "ClearSpeak", expr, "x az egész számok halmaza melyekre teljesül, hogy minden 2 kisebb, mint x kisebb, mint 7")?; + test("hu", "ClearSpeak", expr, "minden x az egész számok halmaza melyekre teljesül, hogy 2 kisebb, mint x kisebb, mint 7")?; return Ok(()); } @@ -302,7 +302,7 @@ fn complicated_set_with_mtext() -> Result<()> { } "; test("hu", "ClearSpeak", expr, - "x a természetes számok halmaza melyekre teljesül, hogy minden x páros szám")?; + "minden x a természetes számok halmaza melyekre teljesül, hogy x páros szám")?; return Ok(()); } @@ -323,7 +323,7 @@ fn set_with_bar_member() -> Result<()> { } "; test_ClearSpeak("hu", "ClearSpeak_SetMemberSymbol", "Member", - expr, "x tagja az egész számok halmaza melyekre teljesül, hogy minden x nagyobb, mint 5")?; + expr, "minden x tagja az egész számok halmaza melyekre teljesül, hogy x nagyobb, mint 5")?; return Ok(()); } @@ -375,7 +375,7 @@ fn set_with_bar_element() -> Result<()> { } "; test_ClearSpeak("hu", "ClearSpeak_SetMemberSymbol", "Element", - expr, "x eleme ennek:, az egész számok halmaza melyekre teljesül, hogy minden x nagyobb, mint 5")?; + expr, "minden x eleme ennek:, az egész számok halmaza melyekre teljesül, hogy x nagyobb, mint 5")?; return Ok(()); } @@ -426,7 +426,7 @@ fn set_with_bar_in() -> Result<()> { } "; test_ClearSpeak("hu", "ClearSpeak_SetMemberSymbol", "In", - expr, "x az egész számok halmaza melyekre teljesül, hogy minden x nagyobb, mint 5")?; + expr, "minden x az egész számok halmaza melyekre teljesül, hogy x nagyobb, mint 5")?; return Ok(()); } @@ -477,7 +477,7 @@ fn set_with_bar_belongs() -> Result<()> { } "; test_ClearSpeak("hu", "ClearSpeak_SetMemberSymbol", "Belongs", - expr, "x hozzátartozó eleme ennek:, az egész számok halmaza melyekre teljesül, hogy minden x nagyobb, mint 5")?; + expr, "minden x hozzátartozó eleme ennek:, az egész számok halmaza melyekre teljesül, hogy x nagyobb, mint 5")?; return Ok(()); } @@ -563,7 +563,7 @@ fn silent_bracket() -> Result<()> { {x|x>2} "; test_ClearSpeak("hu", "ClearSpeak_Sets", "SilentBracket", expr, - "x melyekre teljesül, hogy minden x nagyobb, mint 2")?; + "minden x melyekre teljesül, hogy x nagyobb, mint 2")?; return Ok(()); } diff --git a/tests/Languages/hu/ClearSpeak/symbols_and_adornments.rs b/tests/Languages/hu/ClearSpeak/symbols_and_adornments.rs index ff38686c..e137a3dd 100644 --- a/tests/Languages/hu/ClearSpeak/symbols_and_adornments.rs +++ b/tests/Languages/hu/ClearSpeak/symbols_and_adornments.rs @@ -233,7 +233,7 @@ fn vertical_line_set() -> Result<()> { } "; test_ClearSpeak("hu", "ClearSpeak_VerticalLine", "Auto", expr, - "x melyekre teljesül, hogy minden x nagyobb, mint 0")?; + "minden x melyekre teljesül, hogy x nagyobb, mint 0")?; return Ok(()); } @@ -254,7 +254,7 @@ fn vertical_line_set_such_that() -> Result<()> { } "; test_ClearSpeak("hu", "ClearSpeak_VerticalLine", "SuchThat", expr, - "x melyekre teljesül, hogy minden x nagyobb, mint 0")?; + "minden x melyekre teljesül, hogy x nagyobb, mint 0")?; return Ok(()); } @@ -275,7 +275,7 @@ fn vertical_line_set_given() -> Result<()> { "; // the rules for set will override all the options -- ClearSpeak spec should be clarified test_ClearSpeak("hu", "ClearSpeak_VerticalLine", "Given", expr, - "x melyekre teljesül, hogy minden x nagyobb, mint 0")?; + "minden x melyekre teljesül, hogy x nagyobb, mint 0")?; return Ok(()); } @@ -299,7 +299,7 @@ fn vertical_line_set_and_abs() -> Result<()> { } "; test_ClearSpeak("hu", "ClearSpeak_VerticalLine", "Auto", expr, - "x melyekre teljesül, hogy minden x abszolút értéke; nagyobb, mint 2")?; + "minden x melyekre teljesül, hogy x abszolút értéke; nagyobb, mint 2")?; return Ok(()); } diff --git a/tests/Languages/hu/definitions.rs b/tests/Languages/hu/definitions.rs index 542f4188..62f91018 100644 --- a/tests/Languages/hu/definitions.rs +++ b/tests/Languages/hu/definitions.rs @@ -32,7 +32,7 @@ fn my_set_basic() -> Result<()> { "#; - test("hu", "ClearSpeak", expr, "az üres halmaz")?; + test("hu", "ClearSpeak", expr, "a halmaz x vessző, y")?; Ok(()) } @@ -91,7 +91,7 @@ fn set_difference_basic() -> Result<()> { "#; - test( "hu", "ClearSpeak", expr, "különbséghalmaz nagy a vessző, nagy b")?; + test( "hu", "ClearSpeak", expr, "különbséghalmaz nagy a és nagy b")?; Ok(()) } @@ -107,7 +107,7 @@ fn postfix_test() -> Result<()> { T "#, - "transzponált x", + "x transzponált", ), ( "highlight", @@ -205,9 +205,9 @@ fn functions_and_inverses_tests() -> Result<()> { //("fraction", "fraction x over y end fraction"), ("mixed-fraction", "x és y"), - ("quotient", "egész rész osztva x vessző, y"), + ("quotient", "egész rész x osztva y"), ("evaluated-at", "x értékelve y"), - ("remainder", "a maradék, osztva x vessző, y"), + ("remainder", "a maradék x osztva y"), ("max", "max x vessző, y vessző, z"), ("min", "min x vessző, y vessző, z"), @@ -223,13 +223,13 @@ fn functions_and_inverses_tests() -> Result<()> { ("complex-conjugate", "Komplex konjugált x"), ("complex-arg", "argumentum x"), - ("real-part", "valós rész"), - ("imaginary-part", "képzetes rész"), + ("real-part", "az igazi rész x"), + ("imaginary-part", "a képzeletbeli rész x"), ("polar-coordinate", "poláris koordináta x vessző, y"), ("spherical-coordinate", "gömb koordináta x vessző, y vessző, z"), ("cartesian-coordinate", "derékszögű koordináta x vessző, y vessző, z"), - ("coordinate", "pont, x vessző y vessző z"), + ("coordinate", "koordináta x vessző, y vessző, z"), ("floor", "lépcső x"), ("ceiling", "mennyezet x"), @@ -528,7 +528,7 @@ fn statistics_and_probability_tests() -> Result<()> { ("mode", "mód x"), // conditional probability typically two arguments - // ("conditional-probability", "probability of x given y"), + // ("conditional-probability", "valószínűség x adott y"), ]; for (intent, expected) in tests { @@ -576,7 +576,7 @@ fn linear_algebra_tests() -> Result<()> { ("span", "fesztávolság x"), // transpose supports both postfix and function; we test function explicitly - ("transpose", "transzponált x"), + ("transpose", "x transzponált"), // dimensional product is infix ("dimensional-product", "x a(z) y"), @@ -727,13 +727,13 @@ fn general_concepts_tests() -> Result<()> { ("permutation-cycle", "permutációs ciklus x"), // Binary structural / infix-style - // ("ordered-pair", "the pair of x and y"), + ("ordered-pair", "a pár x és y"), ("rate", "x per y"), ("binomial-coefficient", "x választ y"), ("embellished-name", "x megjegyzéssel y"), ("indexed-by", "x alsó index y"), - // ("translation", "translation by x comma, y"), // Changes translation to comma + ("translation", "fordítás x vessző, y"), // Changes translation to comma ("constraint", "x feltétellel y"), ]; diff --git a/tests/Languages/hu/shared.rs b/tests/Languages/hu/shared.rs index 23439e48..087a203a 100644 --- a/tests/Languages/hu/shared.rs +++ b/tests/Languages/hu/shared.rs @@ -22,7 +22,7 @@ fn modified_vars() -> Result<()> { t "; test("hu", "SimpleSpeak", expr, - "a súlyozott, b tilde, c rövid, b ellenőrzés, c súlyozott; plusz, r hacsek karakter mint repülő ékezet; plusz; x pont, y pont, z dupla pont, u hármas pont, v négyes pont; plusz x kalap, plusz vektor kezdete t")?; + "a súlyozott, b tilde, c rövid, b ellenőrzés, c súlyozott; plusz, r hacsek karakter mint repülő ékezet, plusz; x pont, y pont, z dupla pont, u hármas pont, v négyes pont; plusz x kalap, plusz vektor kezdete t")?; return Ok(()); } @@ -483,7 +483,7 @@ fn literal_speak_perpendicular() -> Result<()> { "#; - test("hu", "LiteralSpeak", expr, "nagy a jobbra nyíl; merőleges nagy b jobbra nyíl")?; + test("hu", "LiteralSpeak", expr, "nagy a jobbra nyíl, merőleges nagy b jobbra nyíl")?; return Ok(()); } @@ -569,7 +569,7 @@ fn literal_intent_property() -> Result<()> { "#; - test("hu", "SimpleSpeak", expr, "nagy a jobbra nyíl; merőleges nagy b jobbra nyíl")?; + test("hu", "SimpleSpeak", expr, "nagy a jobbra nyíl, merőleges nagy b jobbra nyíl")?; return Ok(()); }