// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
import { DataSource } from "./types";

export const strings = {
    buttonLoadData: 'Load data',
    buttonThemeDark: 'Dark',
    buttonThemeLight: 'Light',
    buttonExport: 'Export',
    menuUserData: 'Use your own data',
    menuLocal: 'On this computer ...',
    menuUrl: 'Enter a URL ...',
    menuSnapshotsExportAsJSON: 'Export as .snapshots JSON file',
    menuSnapshotsExportAs: 'Export as ...',
    menuSnapshotsImport: 'Import a .snapshots JSON file',
    dialogTitleLocal: 'Use a file from your computer',
    dialogSubtextLocal: 'Your file will not be uploaded, it is only used by the browser on this computer.  The currently supported data formats are json (the default), csv (comma-separated values), tsv (tab-separated values), and topojson.',
    dialogTitleUrl: 'Use a data file via URL',
    dialogTitleSnapshotsExport: 'Export as',
    dialogTitleSnapshotsLocal: 'Use a snapshots file from your computer',
    dialogSubtextSnapshotsLocal: 'Use a file that was previously exported snapshots file. Your file will not be uploaded, it is only used by the browser on this computer.',
    dialogTitleSnapshotsUrl: 'Use a snapshots file via URL',
    dialogCloseButton: 'Close',
    dialogLoadButton: 'Load',
    labelLocal: '[local]',
    labelColorFilter: 'Note: Colors will be re-mapped to the filter when viewing this saved chart.',
    labelPreferences: 'Preferences',
    labelCompactUI: 'Compact UI',
    labelCompactUIDescription: 'Compact UI hides collapses labels on dropdown menus.',
    labelSnapshotsExportHTMLTitle: 'HTML',
    labelSnapshotsExportHTMLDescription: 'A self contained HTML page with current data and snapshots pre-loaded.',
    labelSnapshotsExportMarkdownTitle: 'Markdown',
    labelSnapshotsExportMarkdownDescription: 'Markdown is a language used by many blogging platforms. Exports a Markdown file with thumbnails of these snapshots which link back to the SandDance website.',
    labelSnapshotsShortcut: 'Tip: Your .snapshots JSON file can also be pre-loaded with this',
    labelLink: 'link',
    labelLinkDescription: 'A URL to revive this snapshot.',
    labelUrl: 'Url',
    labelDataFormat: 'Data format',
    labelDataUrlShortcut: 'Tip: Your data file can also be pre-loaded with this',
    urlInputPlaceholder: 'paste URL',
    sampleDataPrefix: 'Sample data',
    localFilePrefix: 'Local file',
    urlPrefix: 'Url',
    errorInvalidFileFormat: 'Invalid file format',
    errorNoUrl: 'Please enter a url',
    errorUrlHttp: 'Url must begin with "http"',
    errorDownloadFailure: 'Data could not be prepared for download.',
    errorDataSourceFromLocal: (ds: DataSource) => `Could not load ${ds.type} from local file.`,
    errorDataSourceFromUrl: (ds: DataSource) => `Could not load ${ds.type} from ${ds.dataUrl}`
};
