(core) Making makeT helper use the unprefixed key as a fallback

Summary:
By default the fallback contains the prefix, which doesn't
work well with a key based translations. Now makeT helper will fallback
to the passed key (without a prefix).

Test Plan: Added new client test

Reviewers: paulfitz

Reviewed By: paulfitz

Subscribers: paulfitz

Differential Revision: https://phab.getgrist.com/D3758
This commit is contained in:
Jarosław Sadziński
2023-01-05 12:10:10 +01:00
parent 92276cdbda
commit 30600c5dc2
3 changed files with 14 additions and 2 deletions

View File

@@ -9,5 +9,5 @@ export default function getCurrentTime(): moment.Moment {
if (typeof window === 'undefined' || !window) { return getDefault(); }
const searchParams = new URLSearchParams(window.location.search);
return searchParams.has('currentTime') ? moment(searchParams.get('currentTime')) : getDefault();
return searchParams.has('currentTime') ? moment(searchParams.get('currentTime')!) : getDefault();
}