From 52ff733b819fc366e2dbb0b48bcc858a097438b9 Mon Sep 17 00:00:00 2001 From: Mikias Menjeta <51849053+OMikiasO@users.noreply.github.com> Date: Fri, 29 Mar 2024 15:58:07 +0300 Subject: [PATCH] Add Amharic support See [#220][0]. [0]: https://github.com/EvanHahn/HumanizeDuration.js/pull/220 --- HISTORY.md | 4 +++ README.md | 2 ++ bower.json | 3 +- humanize-duration.js | 10 ++++++ package.json | 3 +- test/definitions/am.tsv | 72 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 test/definitions/am.tsv diff --git a/HISTORY.md b/HISTORY.md index 55ea3e5..2c65446 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +# Unreleased + +- new: Amharic support (`am`) + # 3.31.0 / 2023-11-10 - new: Central Kurdish support (`ckb`) diff --git a/README.md b/README.md index 8151500..bb3350f 100644 --- a/README.md +++ b/README.md @@ -342,6 +342,7 @@ Humanize Duration supports the following languages: | -------------------- | -------- | | Afrikaans | `af` | | Albanian | `sq` | +| Amharic | `am` | | Arabic | `ar` | | Basque | `eu` | | Bengali | `bn` | @@ -447,6 +448,7 @@ Lovingly made by [Evan Hahn](https://evanhahn.com/) with help from: - [Aryan Rawlani](https://github.com/aryanrawlani28) for Hindi support - [Kristijan Jesenski](https://github.com/kjesenski) for Slovenian support - [Michal Karzel](https://github.com/Misioka) for improving Arabic support +- [Mikias Menjeta](https://github.com/OMikiasO) for Amharic support Licensed under the permissive [Unlicense](https://unlicense.org/). Enjoy! diff --git a/bower.json b/bower.json index 2072bbb..418fb90 100644 --- a/bower.json +++ b/bower.json @@ -32,7 +32,8 @@ "Aryan Rawlani (https://github.com/aryanrawlani28)", "Kristijan Jesenski (https://github.com/kjesenski)", "Michal Karzel (https://github.com/Misioka)", - "Batmend Ganbaatar (https://github.com/theironbatka)" + "Batmend Ganbaatar (https://github.com/theironbatka)", + "Mikias Menjeta (https://github.com/OMikiasO)" ], "version": "3.31.0", "description": "Convert millisecond durations to English and many other languages.", diff --git a/humanize-duration.js b/humanize-duration.js index 07d0603..dbb59a5 100644 --- a/humanize-duration.js +++ b/humanize-duration.js @@ -124,6 +124,16 @@ }, "," ), + am: language( + "ዓመት", + "ወር", + "ሳምንት", + "ቀን", + "ሰዓት", + "ደቂቃ", + "ሰከንድ", + "ሚሊሰከንድ" + ), ar: assign( language( function (c) { diff --git a/package.json b/package.json index f786c73..8953294 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,8 @@ "Aryan Rawlani (https://github.com/aryanrawlani28)", "Kristijan Jesenski (https://github.com/kjesenski)", "Michal Karzel (https://github.com/Misioka)", - "Batmend Ganbaatar (https://github.com/theironbatka)" + "Batmend Ganbaatar (https://github.com/theironbatka)", + "Mikias Menjeta (https://github.com/OMikiasO)" ], "version": "3.31.0", "description": "Convert millisecond durations to English and many other languages.", diff --git a/test/definitions/am.tsv b/test/definitions/am.tsv new file mode 100644 index 0000000..f194eda --- /dev/null +++ b/test/definitions/am.tsv @@ -0,0 +1,72 @@ +0 0 ሚሊሰከንድ +1 1 ሚሊሰከንድ +2 2 ሚሊሰከንድ +5 5 ሚሊሰከንድ +12 12 ሚሊሰከንድ +420 420 ሚሊሰከንድ +500 500 ሚሊሰከንድ +1000 1 ሰከንድ +1500 1 ሰከንድ+500 ሚሊሰከንድ +2000 2 ሰከንድ +2500 2 ሰከንድ+500 ሚሊሰከንድ +3000 3 ሰከንድ +1001 1 ሰከንድ+1 ሚሊሰከንድ +1002 1 ሰከንድ+2 ሚሊሰከንድ +2001 2 ሰከንድ+1 ሚሊሰከንድ +2003 2 ሰከንድ+3 ሚሊሰከንድ +1200 1 ሰከንድ+200 ሚሊሰከንድ +6900 6 ሰከንድ+900 ሚሊሰከንድ +30000 30 ሰከንድ +60000 1 ደቂቃ +90000 1 ደቂቃ+30 ሰከንድ +120000 2 ደቂቃ +150000 2 ደቂቃ+30 ሰከንድ +180000 3 ደቂቃ +61000 1 ደቂቃ+1 ሰከንድ +78000 1 ደቂቃ+18 ሰከንድ +61001 1 ደቂቃ+1 ሰከንድ+1 ሚሊሰከንድ +61005 1 ደቂቃ+1 ሰከንድ+5 ሚሊሰከንድ +62001 1 ደቂቃ+2 ሰከንድ+1 ሚሊሰከንድ +62005 1 ደቂቃ+2 ሰከንድ+5 ሚሊሰከንድ +121001 2 ደቂቃ+1 ሰከንድ+1 ሚሊሰከንድ +121007 2 ደቂቃ+1 ሰከንድ+7 ሚሊሰከንድ +138001 2 ደቂቃ+18 ሰከንድ+1 ሚሊሰከንድ +138006 2 ደቂቃ+18 ሰከንድ+6 ሚሊሰከንድ +1800000 30 ደቂቃ +3600000 1 ሰዓት +5400000 1 ሰዓት+30 ደቂቃ +7200000 2 ሰዓት +9000000 2 ሰዓት+30 ደቂቃ +10800000 3 ሰዓት +3660000 1 ሰዓት+1 ደቂቃ +3720000 1 ሰዓት+2 ደቂቃ +10860000 3 ሰዓት+1 ደቂቃ +11040000 3 ሰዓት+4 ደቂቃ +43200000 12 ሰዓት +86400000 1 ቀን +129600000 1 ቀን+12 ሰዓት +172800000 2 ቀን +216000000 2 ቀን+12 ሰዓት +259200000 3 ቀን +302400000 3 ቀን+12 ሰዓት +604800000 1 ሳምንት +907200000 1 ሳምንት+3 ቀን+12 ሰዓት +1209600000 2 ሳምንት +1512000000 2 ሳምንት+3 ቀን+12 ሰዓት +1814400000 3 ሳምንት +1314900000 2 ሳምንት+1 ቀን+5 ሰዓት+15 ደቂቃ +2629800000 1 ወር +3944700000 1 ወር+2 ሳምንት+1 ቀን+5 ሰዓት+15 ደቂቃ +5259600000 2 ወር +6574500000 2 ወር+2 ሳምንት+1 ቀን+5 ሰዓት+15 ደቂቃ +7889400000 3 ወር +15778800000 6 ወር +31557600000 1 ዓመት +47336400000 1 ዓመት+6 ወር +63115200000 2 ዓመት +78894000000 2 ዓመት+6 ወር +94672800000 3 ዓመት +-420 420 ሚሊሰከንድ +0.12 0.12 ሚሊሰከንድ +1.5 1.5 ሚሊሰከንድ +420.69 420.69 ሚሊሰከንድ