mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
trad: make the widgets and the Welcome Tour translatable
trad: make the widgets and the Welcome Tour translatable feat(translation): create automatisation for synchronize key in other locals than en trad: add french translations fix(trad): remove all useless code fix(trad): convert tab to space indentation fix(trad): add line to english trads
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import { makeT } from 'app/client/lib/localization';
|
||||
import {ACSelectItem, buildACSelect} from "app/client/lib/ACSelect";
|
||||
import {Computed, IDisposableOwner, Observable} from "grainjs";
|
||||
import {ACIndexImpl} from "app/client/lib/ACIndex";
|
||||
import {testId} from 'app/client/ui2018/cssVars';
|
||||
import {currencies} from 'app/common/Locales';
|
||||
|
||||
const t = makeT('CurrencyPicker');
|
||||
|
||||
interface CurrencyPickerOptions {
|
||||
// The label to use in the select menu for the default option.
|
||||
defaultCurrencyLabel: string;
|
||||
@@ -40,7 +43,7 @@ export function buildCurrencyPicker(
|
||||
save(_, item: ACSelectItem | undefined) {
|
||||
// Save only if we have found a match
|
||||
if (!item) {
|
||||
throw new Error("Invalid currency");
|
||||
throw new Error(t("Invalid currency"));
|
||||
}
|
||||
// For default value, return undefined to use default currency for document.
|
||||
onSave(item.value === defaultCurrencyLabel ? undefined : item.value);
|
||||
|
||||
Reference in New Issue
Block a user