@wix/himalaya-cli 0.2048.0 → 0.2050.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +301 -200
- package/guides/one-app-to-himi-app.md +6 -1
- package/package.json +2 -2
- package/templates/beauty-salon/l10n/ar.json +6 -0
- package/templates/beauty-salon/l10n/cs.json +6 -0
- package/templates/beauty-salon/l10n/da.json +6 -0
- package/templates/beauty-salon/l10n/de.json +6 -0
- package/templates/beauty-salon/l10n/el.json +6 -0
- package/templates/beauty-salon/l10n/en.json +6 -0
- package/templates/beauty-salon/l10n/es.json +6 -0
- package/templates/beauty-salon/l10n/fi.json +6 -0
- package/templates/beauty-salon/l10n/fr.json +6 -0
- package/templates/beauty-salon/l10n/he.json +5 -0
- package/templates/beauty-salon/l10n/hu.json +6 -0
- package/templates/beauty-salon/l10n/id.json +6 -0
- package/templates/beauty-salon/l10n/it.json +6 -0
- package/templates/beauty-salon/l10n/ja.json +6 -0
- package/templates/beauty-salon/l10n/ko.json +6 -0
- package/templates/beauty-salon/l10n/lt.json +6 -0
- package/templates/beauty-salon/l10n/nl.json +6 -0
- package/templates/beauty-salon/l10n/no.json +6 -0
- package/templates/beauty-salon/l10n/pl.json +6 -0
- package/templates/beauty-salon/l10n/pt.json +6 -0
- package/templates/beauty-salon/l10n/ru.json +6 -0
- package/templates/beauty-salon/l10n/sv.json +6 -0
- package/templates/beauty-salon/l10n/th.json +6 -0
- package/templates/beauty-salon/l10n/tr.json +6 -0
- package/templates/beauty-salon/l10n/uk.json +6 -0
- package/templates/beauty-salon/l10n/vi.json +6 -0
- package/templates/beauty-salon/l10n/zh.json +6 -0
- package/templates/beauty-salon/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/branded-lite/recipes/announcement-card.json +85 -34
- package/templates/branded-lite/tier5-src/_shared/announcement-section.ts +52 -10
- package/templates/branded-lite/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/community-club/l10n/ar.json +6 -0
- package/templates/community-club/l10n/cs.json +6 -0
- package/templates/community-club/l10n/da.json +6 -0
- package/templates/community-club/l10n/de.json +6 -0
- package/templates/community-club/l10n/el.json +6 -0
- package/templates/community-club/l10n/en.json +6 -0
- package/templates/community-club/l10n/es.json +6 -0
- package/templates/community-club/l10n/fi.json +6 -0
- package/templates/community-club/l10n/fr.json +6 -0
- package/templates/community-club/l10n/he.json +5 -0
- package/templates/community-club/l10n/hu.json +6 -0
- package/templates/community-club/l10n/id.json +6 -0
- package/templates/community-club/l10n/it.json +6 -0
- package/templates/community-club/l10n/ja.json +6 -0
- package/templates/community-club/l10n/ko.json +6 -0
- package/templates/community-club/l10n/lt.json +6 -0
- package/templates/community-club/l10n/nl.json +6 -0
- package/templates/community-club/l10n/no.json +6 -0
- package/templates/community-club/l10n/pl.json +6 -0
- package/templates/community-club/l10n/pt.json +6 -0
- package/templates/community-club/l10n/ru.json +6 -0
- package/templates/community-club/l10n/sv.json +6 -0
- package/templates/community-club/l10n/th.json +6 -0
- package/templates/community-club/l10n/tr.json +6 -0
- package/templates/community-club/l10n/uk.json +6 -0
- package/templates/community-club/l10n/vi.json +6 -0
- package/templates/community-club/l10n/zh.json +6 -0
- package/templates/community-club/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/events-meetups/l10n/ar.json +6 -0
- package/templates/events-meetups/l10n/cs.json +6 -0
- package/templates/events-meetups/l10n/da.json +6 -0
- package/templates/events-meetups/l10n/de.json +6 -0
- package/templates/events-meetups/l10n/el.json +6 -0
- package/templates/events-meetups/l10n/en.json +6 -0
- package/templates/events-meetups/l10n/es.json +6 -0
- package/templates/events-meetups/l10n/fi.json +6 -0
- package/templates/events-meetups/l10n/fr.json +6 -0
- package/templates/events-meetups/l10n/he.json +5 -0
- package/templates/events-meetups/l10n/hu.json +6 -0
- package/templates/events-meetups/l10n/id.json +6 -0
- package/templates/events-meetups/l10n/it.json +6 -0
- package/templates/events-meetups/l10n/ja.json +6 -0
- package/templates/events-meetups/l10n/ko.json +6 -0
- package/templates/events-meetups/l10n/lt.json +6 -0
- package/templates/events-meetups/l10n/nl.json +6 -0
- package/templates/events-meetups/l10n/no.json +6 -0
- package/templates/events-meetups/l10n/pl.json +6 -0
- package/templates/events-meetups/l10n/pt.json +6 -0
- package/templates/events-meetups/l10n/ru.json +6 -0
- package/templates/events-meetups/l10n/sv.json +6 -0
- package/templates/events-meetups/l10n/th.json +6 -0
- package/templates/events-meetups/l10n/tr.json +6 -0
- package/templates/events-meetups/l10n/uk.json +6 -0
- package/templates/events-meetups/l10n/vi.json +6 -0
- package/templates/events-meetups/l10n/zh.json +6 -0
- package/templates/events-meetups/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/gym-fitness/l10n/ar.json +6 -0
- package/templates/gym-fitness/l10n/cs.json +6 -0
- package/templates/gym-fitness/l10n/da.json +6 -0
- package/templates/gym-fitness/l10n/de.json +6 -0
- package/templates/gym-fitness/l10n/el.json +6 -0
- package/templates/gym-fitness/l10n/en.json +6 -0
- package/templates/gym-fitness/l10n/es.json +6 -0
- package/templates/gym-fitness/l10n/fi.json +6 -0
- package/templates/gym-fitness/l10n/fr.json +6 -0
- package/templates/gym-fitness/l10n/he.json +5 -0
- package/templates/gym-fitness/l10n/hu.json +6 -0
- package/templates/gym-fitness/l10n/id.json +6 -0
- package/templates/gym-fitness/l10n/it.json +6 -0
- package/templates/gym-fitness/l10n/ja.json +6 -0
- package/templates/gym-fitness/l10n/ko.json +6 -0
- package/templates/gym-fitness/l10n/lt.json +6 -0
- package/templates/gym-fitness/l10n/nl.json +6 -0
- package/templates/gym-fitness/l10n/no.json +6 -0
- package/templates/gym-fitness/l10n/pl.json +6 -0
- package/templates/gym-fitness/l10n/pt.json +6 -0
- package/templates/gym-fitness/l10n/ru.json +6 -0
- package/templates/gym-fitness/l10n/sv.json +6 -0
- package/templates/gym-fitness/l10n/th.json +6 -0
- package/templates/gym-fitness/l10n/tr.json +6 -0
- package/templates/gym-fitness/l10n/uk.json +6 -0
- package/templates/gym-fitness/l10n/vi.json +6 -0
- package/templates/gym-fitness/l10n/zh.json +6 -0
- package/templates/gym-fitness/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/nonprofit-cause/l10n/ar.json +6 -0
- package/templates/nonprofit-cause/l10n/cs.json +6 -0
- package/templates/nonprofit-cause/l10n/da.json +6 -0
- package/templates/nonprofit-cause/l10n/de.json +6 -0
- package/templates/nonprofit-cause/l10n/el.json +6 -0
- package/templates/nonprofit-cause/l10n/en.json +6 -0
- package/templates/nonprofit-cause/l10n/es.json +6 -0
- package/templates/nonprofit-cause/l10n/fi.json +6 -0
- package/templates/nonprofit-cause/l10n/fr.json +6 -0
- package/templates/nonprofit-cause/l10n/he.json +5 -0
- package/templates/nonprofit-cause/l10n/hu.json +6 -0
- package/templates/nonprofit-cause/l10n/id.json +6 -0
- package/templates/nonprofit-cause/l10n/it.json +6 -0
- package/templates/nonprofit-cause/l10n/ja.json +6 -0
- package/templates/nonprofit-cause/l10n/ko.json +6 -0
- package/templates/nonprofit-cause/l10n/lt.json +6 -0
- package/templates/nonprofit-cause/l10n/nl.json +6 -0
- package/templates/nonprofit-cause/l10n/no.json +6 -0
- package/templates/nonprofit-cause/l10n/pl.json +6 -0
- package/templates/nonprofit-cause/l10n/pt.json +6 -0
- package/templates/nonprofit-cause/l10n/ru.json +6 -0
- package/templates/nonprofit-cause/l10n/sv.json +6 -0
- package/templates/nonprofit-cause/l10n/th.json +6 -0
- package/templates/nonprofit-cause/l10n/tr.json +6 -0
- package/templates/nonprofit-cause/l10n/uk.json +6 -0
- package/templates/nonprofit-cause/l10n/vi.json +6 -0
- package/templates/nonprofit-cause/l10n/zh.json +6 -0
- package/templates/nonprofit-cause/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/podcast-creator/l10n/ar.json +6 -0
- package/templates/podcast-creator/l10n/cs.json +6 -0
- package/templates/podcast-creator/l10n/da.json +6 -0
- package/templates/podcast-creator/l10n/de.json +6 -0
- package/templates/podcast-creator/l10n/el.json +6 -0
- package/templates/podcast-creator/l10n/en.json +6 -0
- package/templates/podcast-creator/l10n/es.json +6 -0
- package/templates/podcast-creator/l10n/fi.json +6 -0
- package/templates/podcast-creator/l10n/fr.json +6 -0
- package/templates/podcast-creator/l10n/he.json +5 -0
- package/templates/podcast-creator/l10n/hu.json +6 -0
- package/templates/podcast-creator/l10n/id.json +6 -0
- package/templates/podcast-creator/l10n/it.json +6 -0
- package/templates/podcast-creator/l10n/ja.json +6 -0
- package/templates/podcast-creator/l10n/ko.json +6 -0
- package/templates/podcast-creator/l10n/lt.json +6 -0
- package/templates/podcast-creator/l10n/nl.json +6 -0
- package/templates/podcast-creator/l10n/no.json +6 -0
- package/templates/podcast-creator/l10n/pl.json +6 -0
- package/templates/podcast-creator/l10n/pt.json +6 -0
- package/templates/podcast-creator/l10n/ru.json +6 -0
- package/templates/podcast-creator/l10n/sv.json +6 -0
- package/templates/podcast-creator/l10n/th.json +6 -0
- package/templates/podcast-creator/l10n/tr.json +6 -0
- package/templates/podcast-creator/l10n/uk.json +6 -0
- package/templates/podcast-creator/l10n/vi.json +6 -0
- package/templates/podcast-creator/l10n/zh.json +6 -0
- package/templates/podcast-creator/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/portfolio-creative/l10n/ar.json +6 -0
- package/templates/portfolio-creative/l10n/cs.json +6 -0
- package/templates/portfolio-creative/l10n/da.json +6 -0
- package/templates/portfolio-creative/l10n/de.json +6 -0
- package/templates/portfolio-creative/l10n/el.json +6 -0
- package/templates/portfolio-creative/l10n/en.json +6 -0
- package/templates/portfolio-creative/l10n/es.json +6 -0
- package/templates/portfolio-creative/l10n/fi.json +6 -0
- package/templates/portfolio-creative/l10n/fr.json +6 -0
- package/templates/portfolio-creative/l10n/he.json +5 -0
- package/templates/portfolio-creative/l10n/hu.json +6 -0
- package/templates/portfolio-creative/l10n/id.json +6 -0
- package/templates/portfolio-creative/l10n/it.json +6 -0
- package/templates/portfolio-creative/l10n/ja.json +6 -0
- package/templates/portfolio-creative/l10n/ko.json +6 -0
- package/templates/portfolio-creative/l10n/lt.json +6 -0
- package/templates/portfolio-creative/l10n/nl.json +6 -0
- package/templates/portfolio-creative/l10n/no.json +6 -0
- package/templates/portfolio-creative/l10n/pl.json +6 -0
- package/templates/portfolio-creative/l10n/pt.json +6 -0
- package/templates/portfolio-creative/l10n/ru.json +6 -0
- package/templates/portfolio-creative/l10n/sv.json +6 -0
- package/templates/portfolio-creative/l10n/th.json +6 -0
- package/templates/portfolio-creative/l10n/tr.json +6 -0
- package/templates/portfolio-creative/l10n/uk.json +6 -0
- package/templates/portfolio-creative/l10n/vi.json +6 -0
- package/templates/portfolio-creative/l10n/zh.json +6 -0
- package/templates/portfolio-creative/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/professional-services/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/restaurant/l10n/ar.json +6 -0
- package/templates/restaurant/l10n/cs.json +6 -0
- package/templates/restaurant/l10n/da.json +6 -0
- package/templates/restaurant/l10n/de.json +6 -0
- package/templates/restaurant/l10n/el.json +6 -0
- package/templates/restaurant/l10n/en.json +6 -0
- package/templates/restaurant/l10n/es.json +6 -0
- package/templates/restaurant/l10n/fi.json +6 -0
- package/templates/restaurant/l10n/fr.json +6 -0
- package/templates/restaurant/l10n/he.json +5 -0
- package/templates/restaurant/l10n/hu.json +6 -0
- package/templates/restaurant/l10n/id.json +6 -0
- package/templates/restaurant/l10n/it.json +6 -0
- package/templates/restaurant/l10n/ja.json +6 -0
- package/templates/restaurant/l10n/ko.json +6 -0
- package/templates/restaurant/l10n/lt.json +6 -0
- package/templates/restaurant/l10n/nl.json +6 -0
- package/templates/restaurant/l10n/no.json +6 -0
- package/templates/restaurant/l10n/pl.json +6 -0
- package/templates/restaurant/l10n/pt.json +6 -0
- package/templates/restaurant/l10n/ru.json +6 -0
- package/templates/restaurant/l10n/sv.json +6 -0
- package/templates/restaurant/l10n/th.json +6 -0
- package/templates/restaurant/l10n/tr.json +6 -0
- package/templates/restaurant/l10n/uk.json +6 -0
- package/templates/restaurant/l10n/vi.json +6 -0
- package/templates/restaurant/l10n/zh.json +6 -0
- package/templates/restaurant/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/retail-store/l10n/ar.json +6 -0
- package/templates/retail-store/l10n/cs.json +6 -0
- package/templates/retail-store/l10n/da.json +6 -0
- package/templates/retail-store/l10n/de.json +6 -0
- package/templates/retail-store/l10n/el.json +6 -0
- package/templates/retail-store/l10n/en.json +6 -0
- package/templates/retail-store/l10n/es.json +6 -0
- package/templates/retail-store/l10n/fi.json +6 -0
- package/templates/retail-store/l10n/fr.json +6 -0
- package/templates/retail-store/l10n/he.json +5 -0
- package/templates/retail-store/l10n/hu.json +6 -0
- package/templates/retail-store/l10n/id.json +6 -0
- package/templates/retail-store/l10n/it.json +6 -0
- package/templates/retail-store/l10n/ja.json +6 -0
- package/templates/retail-store/l10n/ko.json +6 -0
- package/templates/retail-store/l10n/lt.json +6 -0
- package/templates/retail-store/l10n/nl.json +6 -0
- package/templates/retail-store/l10n/no.json +6 -0
- package/templates/retail-store/l10n/pl.json +6 -0
- package/templates/retail-store/l10n/pt.json +6 -0
- package/templates/retail-store/l10n/ru.json +6 -0
- package/templates/retail-store/l10n/sv.json +6 -0
- package/templates/retail-store/l10n/th.json +6 -0
- package/templates/retail-store/l10n/tr.json +6 -0
- package/templates/retail-store/l10n/uk.json +6 -0
- package/templates/retail-store/l10n/vi.json +6 -0
- package/templates/retail-store/l10n/zh.json +6 -0
- package/templates/retail-store/tier5-src/_shared/relative-time.ts +35 -2
- package/templates/yoga-studio/l10n/ar.json +6 -0
- package/templates/yoga-studio/l10n/cs.json +6 -0
- package/templates/yoga-studio/l10n/da.json +6 -0
- package/templates/yoga-studio/l10n/de.json +6 -0
- package/templates/yoga-studio/l10n/el.json +6 -0
- package/templates/yoga-studio/l10n/en.json +6 -0
- package/templates/yoga-studio/l10n/es.json +6 -0
- package/templates/yoga-studio/l10n/fi.json +6 -0
- package/templates/yoga-studio/l10n/fr.json +6 -0
- package/templates/yoga-studio/l10n/he.json +5 -0
- package/templates/yoga-studio/l10n/hu.json +6 -0
- package/templates/yoga-studio/l10n/id.json +6 -0
- package/templates/yoga-studio/l10n/it.json +6 -0
- package/templates/yoga-studio/l10n/ja.json +6 -0
- package/templates/yoga-studio/l10n/ko.json +6 -0
- package/templates/yoga-studio/l10n/lt.json +6 -0
- package/templates/yoga-studio/l10n/nl.json +6 -0
- package/templates/yoga-studio/l10n/no.json +6 -0
- package/templates/yoga-studio/l10n/pl.json +6 -0
- package/templates/yoga-studio/l10n/pt.json +6 -0
- package/templates/yoga-studio/l10n/ru.json +6 -0
- package/templates/yoga-studio/l10n/sv.json +6 -0
- package/templates/yoga-studio/l10n/th.json +6 -0
- package/templates/yoga-studio/l10n/tr.json +6 -0
- package/templates/yoga-studio/l10n/uk.json +6 -0
- package/templates/yoga-studio/l10n/vi.json +6 -0
- package/templates/yoga-studio/l10n/zh.json +6 -0
- package/templates/yoga-studio/tier5-src/_shared/relative-time.ts +35 -2
|
@@ -80,6 +80,12 @@
|
|
|
80
80
|
"translation": "I dag",
|
|
81
81
|
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.dateRangeSelect.today"
|
|
82
82
|
},
|
|
83
|
+
"h_da24830f1f70": {
|
|
84
|
+
"key": "businessChat.yesterday",
|
|
85
|
+
"source": "Yesterday",
|
|
86
|
+
"translation": "I går",
|
|
87
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
88
|
+
},
|
|
83
89
|
"h_33ce417454bf": {
|
|
84
90
|
"key": "common.detailLoadingText",
|
|
85
91
|
"source": "Loading…",
|
|
@@ -80,6 +80,12 @@
|
|
|
80
80
|
"translation": "Dzisiaj",
|
|
81
81
|
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.dateRangeSelect.today"
|
|
82
82
|
},
|
|
83
|
+
"h_da24830f1f70": {
|
|
84
|
+
"key": "businessChat.yesterday",
|
|
85
|
+
"source": "Yesterday",
|
|
86
|
+
"translation": "Wczoraj",
|
|
87
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
88
|
+
},
|
|
83
89
|
"h_33ce417454bf": {
|
|
84
90
|
"key": "common.detailLoadingText",
|
|
85
91
|
"source": "Loading…",
|
|
@@ -80,6 +80,12 @@
|
|
|
80
80
|
"translation": "Hoje",
|
|
81
81
|
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.dateRangeSelect.today"
|
|
82
82
|
},
|
|
83
|
+
"h_da24830f1f70": {
|
|
84
|
+
"key": "businessChat.yesterday",
|
|
85
|
+
"source": "Yesterday",
|
|
86
|
+
"translation": "Ontem",
|
|
87
|
+
"origin": "machine"
|
|
88
|
+
},
|
|
83
89
|
"h_33ce417454bf": {
|
|
84
90
|
"key": "common.detailLoadingText",
|
|
85
91
|
"source": "Loading…",
|
|
@@ -80,6 +80,12 @@
|
|
|
80
80
|
"translation": "Сегодня",
|
|
81
81
|
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.dateRangeSelect.today"
|
|
82
82
|
},
|
|
83
|
+
"h_da24830f1f70": {
|
|
84
|
+
"key": "businessChat.yesterday",
|
|
85
|
+
"source": "Yesterday",
|
|
86
|
+
"translation": "Вчера",
|
|
87
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
88
|
+
},
|
|
83
89
|
"h_33ce417454bf": {
|
|
84
90
|
"key": "common.detailLoadingText",
|
|
85
91
|
"source": "Loading…",
|
|
@@ -80,6 +80,12 @@
|
|
|
80
80
|
"translation": "Idag",
|
|
81
81
|
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.dateRangeSelect.today"
|
|
82
82
|
},
|
|
83
|
+
"h_da24830f1f70": {
|
|
84
|
+
"key": "businessChat.yesterday",
|
|
85
|
+
"source": "Yesterday",
|
|
86
|
+
"translation": "Igår",
|
|
87
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
88
|
+
},
|
|
83
89
|
"h_33ce417454bf": {
|
|
84
90
|
"key": "common.detailLoadingText",
|
|
85
91
|
"source": "Loading…",
|
|
@@ -80,6 +80,12 @@
|
|
|
80
80
|
"translation": "วันนี้",
|
|
81
81
|
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.dateRangeSelect.today"
|
|
82
82
|
},
|
|
83
|
+
"h_da24830f1f70": {
|
|
84
|
+
"key": "businessChat.yesterday",
|
|
85
|
+
"source": "Yesterday",
|
|
86
|
+
"translation": "เมื่อวานนี้",
|
|
87
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
88
|
+
},
|
|
83
89
|
"h_33ce417454bf": {
|
|
84
90
|
"key": "common.detailLoadingText",
|
|
85
91
|
"source": "Loading…",
|
|
@@ -80,6 +80,12 @@
|
|
|
80
80
|
"translation": "Bugün",
|
|
81
81
|
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.dateRangeSelect.today"
|
|
82
82
|
},
|
|
83
|
+
"h_da24830f1f70": {
|
|
84
|
+
"key": "businessChat.yesterday",
|
|
85
|
+
"source": "Yesterday",
|
|
86
|
+
"translation": "Dün",
|
|
87
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
88
|
+
},
|
|
83
89
|
"h_33ce417454bf": {
|
|
84
90
|
"key": "common.detailLoadingText",
|
|
85
91
|
"source": "Loading…",
|
|
@@ -80,6 +80,12 @@
|
|
|
80
80
|
"translation": "Сьогодні",
|
|
81
81
|
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.dateRangeSelect.today"
|
|
82
82
|
},
|
|
83
|
+
"h_da24830f1f70": {
|
|
84
|
+
"key": "businessChat.yesterday",
|
|
85
|
+
"source": "Yesterday",
|
|
86
|
+
"translation": "Вчора",
|
|
87
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
88
|
+
},
|
|
83
89
|
"h_33ce417454bf": {
|
|
84
90
|
"key": "common.detailLoadingText",
|
|
85
91
|
"source": "Loading…",
|
|
@@ -80,6 +80,12 @@
|
|
|
80
80
|
"translation": "Hôm nay",
|
|
81
81
|
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.dateRangeSelect.today"
|
|
82
82
|
},
|
|
83
|
+
"h_da24830f1f70": {
|
|
84
|
+
"key": "businessChat.yesterday",
|
|
85
|
+
"source": "Yesterday",
|
|
86
|
+
"translation": "Hôm qua",
|
|
87
|
+
"origin": "machine"
|
|
88
|
+
},
|
|
83
89
|
"h_33ce417454bf": {
|
|
84
90
|
"key": "common.detailLoadingText",
|
|
85
91
|
"source": "Loading…",
|
|
@@ -80,6 +80,12 @@
|
|
|
80
80
|
"translation": "今日",
|
|
81
81
|
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.dateRangeSelect.today"
|
|
82
82
|
},
|
|
83
|
+
"h_da24830f1f70": {
|
|
84
|
+
"key": "businessChat.yesterday",
|
|
85
|
+
"source": "Yesterday",
|
|
86
|
+
"translation": "昨天",
|
|
87
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
88
|
+
},
|
|
83
89
|
"h_33ce417454bf": {
|
|
84
90
|
"key": "common.detailLoadingText",
|
|
85
91
|
"source": "Loading…",
|
|
@@ -7,6 +7,8 @@ const MINUTE = 60_000;
|
|
|
7
7
|
const HOUR = 60 * MINUTE;
|
|
8
8
|
const DAY = 24 * HOUR;
|
|
9
9
|
const RELATIVE_DAYS = 7;
|
|
10
|
+
/** How far ahead of the device a timestamp may be and still count as now (himi-blog-post's `CLOCK_SKEW_MS`). */
|
|
11
|
+
const CLOCK_SKEW = 5 * MINUTE;
|
|
10
12
|
|
|
11
13
|
/** "" when `iso` is missing or not a date. A time in the future (a clock skew) reads as the date, never "-3 minutes ago". */
|
|
12
14
|
export function relativeTime(iso: string | undefined, now: number): string {
|
|
@@ -16,6 +18,37 @@ export function relativeTime(iso: string | undefined, now: number): string {
|
|
|
16
18
|
if (age < 0 || age >= RELATIVE_DAYS * DAY) return formatDateMedium(new Date(at));
|
|
17
19
|
if (age < MINUTE) return copyParam("relativeTime.justNow", "Just now");
|
|
18
20
|
if (age < HOUR) return copyPlural("relativeTime.minutesAgo", "{n, plural, one {# minute ago} other {# minutes ago}}", Math.floor(age / MINUTE));
|
|
19
|
-
if (age < DAY) return
|
|
20
|
-
return
|
|
21
|
+
if (age < DAY) return hoursAgo(Math.floor(age / HOUR));
|
|
22
|
+
return daysAgo(Math.floor(age / DAY));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// One literal each: a pinned app's translations are matched by this exact English text.
|
|
26
|
+
const hoursAgo = (n: number): string => copyPlural("relativeTime.hoursAgo", "{n, plural, one {# hour ago} other {# hours ago}}", n);
|
|
27
|
+
const daysAgo = (n: number): string => copyPlural("relativeTime.daysAgo", "{n, plural, one {# day ago} other {# days ago}}", n);
|
|
28
|
+
|
|
29
|
+
/** How many calendar days (device zone) `at` is before `now`: 0 today, 1 yesterday, …, capped at RELATIVE_DAYS. The local dates
|
|
30
|
+
* are compared as UTC midnights, so a 23- or 25-hour DST day cannot move a time to another day, and no Intl is used. */
|
|
31
|
+
function calendarDaysBefore(at: number, now: number): number {
|
|
32
|
+
const when = new Date(at);
|
|
33
|
+
const today = new Date(now);
|
|
34
|
+
const days = Math.round((Date.UTC(today.getFullYear(), today.getMonth(), today.getDate()) - Date.UTC(when.getFullYear(), when.getMonth(), when.getDate())) / DAY);
|
|
35
|
+
// A backward offset change across local midnight can give an earlier instant a later local date: never fewer than 0 days.
|
|
36
|
+
return Math.min(Math.max(days, 0), RELATIVE_DAYS);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** As the One App's announcement card says it: "Just now" and minutes for the last hour, hours for the rest of today, "Yesterday",
|
|
40
|
+
* then "N days ago" by CALENDAR day (so an older post never reads newer than a later one), and the date once it is a week old. */
|
|
41
|
+
export function relativeDay(iso: string | undefined, now: number): string {
|
|
42
|
+
const at = iso ? Date.parse(iso) : NaN;
|
|
43
|
+
if (!Number.isFinite(at)) return "";
|
|
44
|
+
const age = now - at;
|
|
45
|
+
// A post just made on a server whose clock runs a little ahead reads "Just now"; further in the future it is the date.
|
|
46
|
+
if (age < 0) return -age <= CLOCK_SKEW ? copyParam("relativeTime.justNow", "Just now") : formatDateMedium(new Date(at));
|
|
47
|
+
if (age < HOUR) return relativeTime(iso, now);
|
|
48
|
+
const days = calendarDaysBefore(at, now);
|
|
49
|
+
// Hours for all of today, a 25-hour DST day included.
|
|
50
|
+
if (days === 0) return hoursAgo(Math.floor(age / HOUR));
|
|
51
|
+
if (days === 1) return copyParam("relativeTime.yesterday", "Yesterday");
|
|
52
|
+
if (days < RELATIVE_DAYS) return daysAgo(days);
|
|
53
|
+
return formatDateMedium(new Date(at));
|
|
21
54
|
}
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "غير مؤكد",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "أمس",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Nepotvrzeno",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Včera",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Ikke bekræftet",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "I går",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Nicht bestätigt",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Gestern",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Δεν επιβεβαιώθηκε",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Χθες",
|
|
81
|
+
"origin": "machine"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -1591,6 +1591,12 @@
|
|
|
1591
1591
|
"key": "collection.filterTitle",
|
|
1592
1592
|
"keyOrigin": "string-table"
|
|
1593
1593
|
},
|
|
1594
|
+
"h_da24830f1f70": {
|
|
1595
|
+
"source": "Yesterday",
|
|
1596
|
+
"kind": "Worker.copy",
|
|
1597
|
+
"translation": "",
|
|
1598
|
+
"key": "businessChat.yesterday"
|
|
1599
|
+
},
|
|
1594
1600
|
"h_dc1649a16c14": {
|
|
1595
1601
|
"source": "Sign out",
|
|
1596
1602
|
"kind": "Text.text",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Sin confirmar",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Ayer",
|
|
81
|
+
"origin": "machine"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Vahvistamaton",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Eilen",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -20,6 +20,12 @@
|
|
|
20
20
|
"translation": "Non confirmé",
|
|
21
21
|
"origin": "machine"
|
|
22
22
|
},
|
|
23
|
+
"h_da24830f1f70": {
|
|
24
|
+
"key": "businessChat.yesterday",
|
|
25
|
+
"source": "Yesterday",
|
|
26
|
+
"translation": "Hier",
|
|
27
|
+
"origin": "machine"
|
|
28
|
+
},
|
|
23
29
|
"h_33ce417454bf": {
|
|
24
30
|
"key": "common.detailLoadingText",
|
|
25
31
|
"source": "Loading…",
|
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
"key": "businessChat.unconfirmed",
|
|
17
17
|
"translation": "לא אושר"
|
|
18
18
|
},
|
|
19
|
+
"h_da24830f1f70": {
|
|
20
|
+
"source": "Yesterday",
|
|
21
|
+
"key": "businessChat.yesterday",
|
|
22
|
+
"translation": "אתמול"
|
|
23
|
+
},
|
|
19
24
|
"h_33ce417454bf": {
|
|
20
25
|
"source": "Loading…",
|
|
21
26
|
"key": "common.detailLoadingText",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Nincs megerősítve",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Tegnap",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Belum dikonfirmasi",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Kemarin",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Non confermato",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Ieri",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "未確認",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "昨日",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "확인되지 않음",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "어제",
|
|
81
|
+
"origin": "one-app:mobile-apps-virtual-numbers:calls_list.subheading.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Nepatvirtinta",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Vakar",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Niet bevestigd",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Gisteren",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Ikke bekreftet",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "I går",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Niepotwierdzone",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Wczoraj",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Não confirmada",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Ontem",
|
|
81
|
+
"origin": "machine"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Не подтверждено",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Вчера",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Inte bekräftat",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Igår",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "ยังไม่ได้ยืนยัน",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "เมื่อวานนี้",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Onaylanmadı",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Dün",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Не підтверджено",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Вчора",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "Chưa xác nhận",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "Hôm qua",
|
|
81
|
+
"origin": "machine"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "未確認",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "昨天",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|
|
@@ -7,6 +7,8 @@ const MINUTE = 60_000;
|
|
|
7
7
|
const HOUR = 60 * MINUTE;
|
|
8
8
|
const DAY = 24 * HOUR;
|
|
9
9
|
const RELATIVE_DAYS = 7;
|
|
10
|
+
/** How far ahead of the device a timestamp may be and still count as now (himi-blog-post's `CLOCK_SKEW_MS`). */
|
|
11
|
+
const CLOCK_SKEW = 5 * MINUTE;
|
|
10
12
|
|
|
11
13
|
/** "" when `iso` is missing or not a date. A time in the future (a clock skew) reads as the date, never "-3 minutes ago". */
|
|
12
14
|
export function relativeTime(iso: string | undefined, now: number): string {
|
|
@@ -16,6 +18,37 @@ export function relativeTime(iso: string | undefined, now: number): string {
|
|
|
16
18
|
if (age < 0 || age >= RELATIVE_DAYS * DAY) return formatDateMedium(new Date(at));
|
|
17
19
|
if (age < MINUTE) return copyParam("relativeTime.justNow", "Just now");
|
|
18
20
|
if (age < HOUR) return copyPlural("relativeTime.minutesAgo", "{n, plural, one {# minute ago} other {# minutes ago}}", Math.floor(age / MINUTE));
|
|
19
|
-
if (age < DAY) return
|
|
20
|
-
return
|
|
21
|
+
if (age < DAY) return hoursAgo(Math.floor(age / HOUR));
|
|
22
|
+
return daysAgo(Math.floor(age / DAY));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// One literal each: a pinned app's translations are matched by this exact English text.
|
|
26
|
+
const hoursAgo = (n: number): string => copyPlural("relativeTime.hoursAgo", "{n, plural, one {# hour ago} other {# hours ago}}", n);
|
|
27
|
+
const daysAgo = (n: number): string => copyPlural("relativeTime.daysAgo", "{n, plural, one {# day ago} other {# days ago}}", n);
|
|
28
|
+
|
|
29
|
+
/** How many calendar days (device zone) `at` is before `now`: 0 today, 1 yesterday, …, capped at RELATIVE_DAYS. The local dates
|
|
30
|
+
* are compared as UTC midnights, so a 23- or 25-hour DST day cannot move a time to another day, and no Intl is used. */
|
|
31
|
+
function calendarDaysBefore(at: number, now: number): number {
|
|
32
|
+
const when = new Date(at);
|
|
33
|
+
const today = new Date(now);
|
|
34
|
+
const days = Math.round((Date.UTC(today.getFullYear(), today.getMonth(), today.getDate()) - Date.UTC(when.getFullYear(), when.getMonth(), when.getDate())) / DAY);
|
|
35
|
+
// A backward offset change across local midnight can give an earlier instant a later local date: never fewer than 0 days.
|
|
36
|
+
return Math.min(Math.max(days, 0), RELATIVE_DAYS);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** As the One App's announcement card says it: "Just now" and minutes for the last hour, hours for the rest of today, "Yesterday",
|
|
40
|
+
* then "N days ago" by CALENDAR day (so an older post never reads newer than a later one), and the date once it is a week old. */
|
|
41
|
+
export function relativeDay(iso: string | undefined, now: number): string {
|
|
42
|
+
const at = iso ? Date.parse(iso) : NaN;
|
|
43
|
+
if (!Number.isFinite(at)) return "";
|
|
44
|
+
const age = now - at;
|
|
45
|
+
// A post just made on a server whose clock runs a little ahead reads "Just now"; further in the future it is the date.
|
|
46
|
+
if (age < 0) return -age <= CLOCK_SKEW ? copyParam("relativeTime.justNow", "Just now") : formatDateMedium(new Date(at));
|
|
47
|
+
if (age < HOUR) return relativeTime(iso, now);
|
|
48
|
+
const days = calendarDaysBefore(at, now);
|
|
49
|
+
// Hours for all of today, a 25-hour DST day included.
|
|
50
|
+
if (days === 0) return hoursAgo(Math.floor(age / HOUR));
|
|
51
|
+
if (days === 1) return copyParam("relativeTime.yesterday", "Yesterday");
|
|
52
|
+
if (days < RELATIVE_DAYS) return daysAgo(days);
|
|
53
|
+
return formatDateMedium(new Date(at));
|
|
21
54
|
}
|
|
@@ -74,6 +74,12 @@
|
|
|
74
74
|
"translation": "غير مؤكد",
|
|
75
75
|
"origin": "machine"
|
|
76
76
|
},
|
|
77
|
+
"h_da24830f1f70": {
|
|
78
|
+
"key": "businessChat.yesterday",
|
|
79
|
+
"source": "Yesterday",
|
|
80
|
+
"translation": "أمس",
|
|
81
|
+
"origin": "one-app:wix-one-app-merchant-settings__merchantSettingsStrings__messages_en.json:transactionsDashboard.timeRangeFilter.yesterday"
|
|
82
|
+
},
|
|
77
83
|
"h_33ce417454bf": {
|
|
78
84
|
"key": "common.detailLoadingText",
|
|
79
85
|
"source": "Loading…",
|