From 19acbddef5d0ad23e70ca125ebf060f901190dff Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 14 Aug 2025 15:53:52 +0100 Subject: [PATCH] Add en-GB localisation (#289) --- README.md | 5 +- src/i18n/index.ts | 1 + src/i18n/locales/en-gb.ts | 148 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 152 insertions(+), 2 deletions(-) create mode 100644 src/i18n/locales/en-gb.ts diff --git a/README.md b/README.md index 0fbb9d48..872838c6 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ _⚠️ READ BEFORE PROCEEDING_ - Setup usage limits to avoid unexpected charges (_recommended_) 2. Add rate limiting (_recommended_) - As an additional precaution, create an Upstash Redis store from the storage tab of the Vercel dashboard and link it to your project in order to enable rate limiting—no further configuration necessary -3. Configure auto-generated fields (optional) +3. Configure auto-generated fields (optional) - Set which text fields auto-generate when uploading a photo by storing a comma-separated list, e.g., `AI_TEXT_AUTO_GENERATED_FIELDS = title,semantic` - Accepted values: - `all` @@ -292,6 +292,7 @@ Partial internationalization (for non-admin, user-facing text) provided for a ha ### Supported Languages - `bd-bn` - `en-us` +- `en-gb` - `id-id` - `pt-br` - `pt-pt` @@ -300,7 +301,7 @@ Partial internationalization (for non-admin, user-facing text) provided for a ha To add support for a new language, open a PR following instructions in [/src/i18n/index.ts](https://github.com/sambecker/exif-photo-blog/blob/main/src/i18n/index.ts), using [en-us.ts](https://github.com/sambecker/exif-photo-blog/blob/main/src/i18n/locales/en-us.ts) as reference. -Thank you ❤️ translators: [@sconetto](https://github.com/sconetto) (`pt-br`, `pt-pt`), [@brandnholl](https://github.com/brandnholl) (`id-id`), [@TongEc](https://github.com/TongEc) (`zh-cn`), [@xahidex](https://github.com/xahidex) (`bd-bn`), [@mehmetabak](https://github.com/mehmetabak) (`tr-tr`) +Thank you ❤️ translators: [@sconetto](https://github.com/sconetto) (`pt-br`, `pt-pt`), [@brandnholl](https://github.com/brandnholl) (`id-id`), [@TongEc](https://github.com/TongEc) (`zh-cn`), [@xahidex](https://github.com/xahidex) (`bd-bn`), [@mehmetabak](https://github.com/mehmetabak) (`tr-tr`), [@simondeeley](https://github.com/simondeeley) (`en-gb`) 📖  FAQ - diff --git a/src/i18n/index.ts b/src/i18n/index.ts index 566738bc..ecfd97c7 100644 --- a/src/i18n/index.ts +++ b/src/i18n/index.ts @@ -24,6 +24,7 @@ const LOCALE_TEXT_IMPORTS: Record< 'zh-cn': () => import('./locales/zh-cn').then(m => m.TEXT), 'bd-bn': () => import('./locales/bd-bn').then(m => m.TEXT), 'tr-tr': () => import('./locales/tr-tr').then(m => m.TEXT), + 'en-gb': () => import('./locales/en-gb').then(m => m.TEXT), }; export const getTextForLocale = async (locale: string): Promise => { diff --git a/src/i18n/locales/en-gb.ts b/src/i18n/locales/en-gb.ts new file mode 100644 index 00000000..06d33c3c --- /dev/null +++ b/src/i18n/locales/en-gb.ts @@ -0,0 +1,148 @@ +import { I18N } from '..'; +export { enGB as default } from 'date-fns/locale/en-GB'; + +export const TEXT: I18N = { + photo: { + photo: 'Photo', + photoPlural: 'Photos', + taken: 'Taken', + created: 'Created', + updated: 'Updated', + copied: 'Link to photo copied', + }, + category: { + camera: 'Camera', + cameraPlural: 'Cameras', + cameraTitle: 'Shot on {{camera}}', + cameraShare: 'Photos shot on {{camera}}', + lens: 'Lens', + lensPlural: 'Lenses', + tag: 'Tag', + tagPlural: 'Tags', + tagged: 'Tagged', + taggedPhotos: 'Tagged Photos', + taggedPhrase: 'Photos tagged {{tag}}', + taggedFavs: 'Favorite Photos', + recipe: 'Recipe', + recipePlural: 'Recipes', + recipeShare: '{{recipe}} recipe photos', + film: 'Film', + filmPlural: 'Films', + filmShare: 'Photos shot on {{film}}', + focalLength: 'Focal Length', + focalLengthPlural: 'Focal Lengths', + focalLengthTitle: 'Focal Length {{focal}}', + focalLengthShare: 'Photos shot at {{focal}}', + year: 'Year', + yearPlural: 'Years', + yearShare: '{{year}} photos', + yearTitle: 'Photos taken in {{year}}', + recent: 'Recent', + recentPlural: 'Recents', + recentTitle: 'Recent Photos', + recentSubhead: 'Uploaded {{distance}} ago', + }, + nav: { + home: 'Home', + full: 'Full', + grid: 'Grid', + admin: 'Admin', + search: 'Search', + prev: 'Previous', + prevShort: 'Prev', + next: 'Next', + nextShort: 'Next', + }, + sort: { + sort: 'Sort', + newest: 'Newest', + oldest: 'Oldest', + descending: 'Descending', + ascending: 'Ascending', + newestFirst: 'Newest first', + oldestFirst: 'Oldest first', + viewNewest: 'View newest', + viewOldest: 'View oldest', + takenAt: 'Taken at', + byTakenAt: 'By taken at', + uploadedAt: 'Uploaded at', + byUploadedAt: 'By uploaded at', + uploadedAtShort: 'Uploaded', + color: 'Chromatic', + byColor: 'By colour', + clearSort: 'Clear sort', + }, + cmdk: { + placeholder: 'Search photos, views, settings ...', + searching: 'Searching ...', + noResults: 'No results found', + pages: 'Pages', + }, + tooltip: { + '35mm': '35mm Equivalent', + zoom: 'Zoom In', + sharePhoto: 'Share Photo', + recipeInfo: 'Recipe Info', + recipeCopy: 'Copy Recipe Text', + download: 'Download Original File', + }, + theme: { + theme: 'Theme', + system: 'System', + light: 'Light Mode', + dark: 'Dark Mode', + }, + auth: { + signIn: 'Sign In', + signOut: 'Sign Out', + email: 'Admin Email', + password: 'Admin Password', + invalidEmailPassword: 'Invalid email/password', + }, + admin: { + uploadPhotos: 'Upload Photos', + upload: 'Upload', + uploadPlural: 'Uploads', + uploading: 'Uploading', + update: 'Update', + updatePlural: 'Updates', + managePhotos: 'Manage Photos', + manageCameras: 'Manage Cameras', + manageLenses: 'Manage Lenses', + manageTags: 'Manage Tags', + manageRecipes: 'Manage Recipes', + batchEdit: 'Batch Edit Photos ...', + batchEditShort: 'Batch Edit ...', + batchExitEdit: 'Exit Batch Edit', + appInsights: 'App Insights', + appConfig: 'App Configuration', + edit: 'Edit', + favorite: 'Favourite', + unfavorite: 'Unfavourite', + private: 'Make Private', + public: 'Make Public', + download: 'Download', + sync: 'Sync', + delete: 'Delete', + deleteConfirm: 'Are you sure you want to delete "{{photoTitle}}?"', + }, + onboarding: { + setupComplete: 'Setup Complete!', + setupIncomplete: 'Finish Setup', + setupSignIn: 'Sign in to upload photos', + setupFirstPhoto: 'Add your first photo', + // eslint-disable-next-line max-len + setupConfig: 'Change the site name and other configuration by editing environment variables referenced in', + }, + misc: { + loading: 'Loading ...', + finishing: 'Finishing ...', + uploading: 'Uploading', + repo: 'Made with', + copyPhrase: '{{label}} copied', + }, + utility: { + paginate: '{{index}} of {{count}}', + paginateAction: '{{action}} {{index}} of {{count}}', + }, +};