OpenVoiceOS / OpenVoiceOS/ovos-date-parser

Add special formatting for teen numbers (11-19) in Hungarian 'decade_format'

Open
#42 0 comments 0 reactions 1 assignee View on GitHub

@JarbasAl is already working on this.

Since Nov 7, 2024.

hu
Dominant language
Python
Stars
0
Forks
8
Avg merge
7h 9m
Merged PRs (30d)
17

Description

This issue tracks the suggestion to add special formatting for teen numbers (11-19) in the decade_format of ovos_date_parser/res/hu-hu/date_time.json.

Add special formatting for teen numbers (11-19).

The decade formatting rules should include a special case for teen numbers (11-19) as they have unique forms in Hungarian. Currently, they would fall back to the general format.

Add this format before the default case:

   "decade_format": {
     "1": {"match": "^\\d$", "format": "{x}"},
-    "2": {"match": "^1\\d$", "format": "{xx}"},
+    "2": {"match": "^1[1-9]$", "format": "tizen{x}"},
     "3": {"match": "^20$", "format": "húsz"},
     "4": {"match": "^\\d0$", "format": "{x0}"},
     "5": {"match": "^[2-9]\\d$", "format": "{x0}{x}"},
     "default": "{number}"
   }

Reference:

Requested by @JarbasAl.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.