Files
spacedrive/interface/locales
Lkhsss d246154c2d Update Chinese Translations (#2656)
* Update Chinses tanstation

Chinese will be used in different ways in different places.If it's just a translation program or a word-for-word translation, it's going to be very stiff. Call me if you need a translator.<a href="mailto:lkhsss1019@gmail.com">lkhsss1019@gmail.com</a>

1.[fix] `"direction": "方向",`to`"direction": "次序",`
2.[fix]`"ascending": "上升",`to`"ascending": "升序",`
3.[fix]`"item_size": "项目大小"`,to`"item_size": "图标大小",`
.........etc   太多了数不过来了。。。

## I Need Some Help
Please send me a screenshot of where these entries are in the app so I can best translate them!(Better tell me where they are in the app.)
- failed_to_open_file_with
- file_from
- file_one
- file_picker_not_supported
- for_library
- image
- incoming_spacedrop
- indexed_new_files
- indexer_rules_error
- indexer_rules_not_available
- accept_files
- app_crashed_description
- collection
- directories
- directory
- do_the_thing
- dont_have_any
- dotfile
- ends_with
- erase
- erase_a_file
- erase_a_file_description
- file_picker_not_supported
- files_many
- for_library
- gitignore
- hosted_locations
- my_sick_location

* Change some translations...
2024-08-13 11:06:56 +00:00
..
2024-08-13 11:06:56 +00:00
2024-01-08 20:26:46 +00:00

Locales

This directory contains the translations for the application.

Adding a new language

To add a new language, create a new directory with the language code (e.g. es for Spanish) and copy the en directory into it. Then, translate the strings in the new directory.

To display the new language as an option in the application, add the language code to the LANGUAGE_OPTIONS array in interface/app/$libraryId/settings/client/appearance.tsx.

export const LANGUAGE_OPTIONS = [
  { value: 'en', label: 'English' },
  { value: 'es', label: 'Español' },
  // The rest of the languages
];

Finally, add the new language code to the dayjsLocales object in interface/locales/index.ts. list of dayjs locales can be found here

const dayjsLocales: Record<string, any> = {
  // Add the new language code and import statement here
  // Example:
  // es: () => import('dayjs/locale/es.js'),
  en: () => import('dayjs/locale/en.js'),
  de: () => import('dayjs/locale/de.js'),
  // The rest of the languages
};

Syncing locales

This command will help you sync locales with the source language (en) and find missing keys.

npx i18next-locales-sync -p en -s it -l ./interface/locales

replace it with the language you want to sync with the source language.

If you want to sync all locales with the source language (en), run:

pnpm i18n:sync