Skip to content

Flatten BaseTranslation object #3137

@seancolsen

Description

@seancolsen

Current behavior

src/i18n/en/index.ts looks like this:

const en: BaseTranslation = {
  general: {
    import: 'Import',
    // ...
  },
  importUploadPage: {
    uploadAFile: 'Upload a file',
    // ...
  },
  // ...
};

Then in ImportUploadPage.svelte we do:

$LL.importUploadPage.uploadAFile()

Desired behavior

I would like src/i18n/en/index.ts to instead look like this:

const en: BaseTranslation = {
  import: 'Import',
  uploadAFile: 'Upload a file',
  // ...
};

Then in ImportUploadPage.svelte we would do:

$LL.uploadAFile()

Metadata

Metadata

Assignees

Labels

readyReady for implementationrestricted: maintainersOnly maintainers can resolve this issuework: frontendRelated to frontend code in the mathesar_ui directory

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions