From f6c8796571a67111f2070328e806b5a8adbfe9c6 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 7 Mar 2021 18:36:10 -0400 Subject: add support for localizing index (#123 etc) --- strings-default.json | 1 + upd8.js | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/strings-default.json b/strings-default.json index d9ab89a7..d611758c 100644 --- a/strings-default.json +++ b/strings-default.json @@ -27,6 +27,7 @@ "count.duration.minutes.withUnit": "{MINUTES}:{SECONDS} minutes", "count.duration.approximate": "~{DURATION}", "count.duration.missing": "_:__", + "count.index": "#{INDEX}", "count.words": "{WORDS}", "count.words.thousand": "{WORDS}k", "count.words.withUnit.singular": "{WORDS} word", diff --git a/upd8.js b/upd8.js index 7d191e0d..772573a8 100755 --- a/upd8.js +++ b/upd8.js @@ -568,8 +568,7 @@ const count = { }, index: (value, {strings}) => { - // TODO: Localize...? - return '#' + value; + return strings('count.index', {index: value}); }, number: value => strings.intl.number.format(value), -- cgit 1.3.0-6-gf8a5