mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(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:
@@ -127,4 +127,9 @@ describe('localization', function() {
|
||||
const scoped = makeT('Parent', instance);
|
||||
assert.equal(scoped('Not.Valid:Characters'), 'Works');
|
||||
});
|
||||
|
||||
it('makeT helper fallbacks to an argument', function() {
|
||||
const scoped = makeT('Parent', instance);
|
||||
assert.equal(scoped("I'm not there"), "I'm not there");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user