From 00f70d6ba031647665279b964d8b804389020c2c Mon Sep 17 00:00:00 2001 From: Xylight Date: Tue, 4 Jun 2024 13:52:56 -0700 Subject: [PATCH] i18n: localize settings page --- src/lib/i18n/en.json | 141 ++++++++++++++++++ src/routes/settings/+page.svelte | 244 +++++++++++++++---------------- 2 files changed, 262 insertions(+), 123 deletions(-) diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.json index 69bf80a1..092f67c7 100644 --- a/src/lib/i18n/en.json +++ b/src/lib/i18n/en.json @@ -507,5 +507,146 @@ "blockUser": "Blocked that user.", "unblockUser": "Unblocked that user.", "purgeUser": "Purged that user." + }, + "settings": { + "title": "Settings", + "navigation": { + "title": "Navigation", + "dockPos": { + "title": "Dock position", + "description": "Where the dock should be positioned on the screen.", + "top": "Top", + "bottom": "Bottom", + "adaptive": "Adaptive" + }, + "panel": { + "title": "Panel mode", + "description": "Extend the dock to the screen edges, similar to a panel.", + "on": "On", + "off": "Off", + "adaptive": "Adaptive" + } + }, + "app": { + "title": "Photon", + "theming": { + "title": "Theming", + "description": "Customize Photon's colors.", + "link": "Go to themes" + }, + "lang": { + "title": "Language", + "description": "The language used for Photon's UI.", + "note": "Languages other than English and Hebrew are community translated, and may be incomplete.", + "": "Dont translate the below!", + "en": "English", + "en-US": "English", + "he": "Hebrew", + "auto": "Auto" + }, + "view": { + "title": "Post style", + "list": "Show posts in a list, with post bodies and compact media.", + "cozy": "Show posts with large images, rich embeds, and longer post bodies.", + "compact": "Show posts in a list, without post bodies and with tighter spacing.", + "legacy": "The old look of Photon." + }, + "sort": { + "title": "Default sort", + "description": "The default sorting to use in feeds." + }, + "postsInNewTab": { + "title": "Open posts in new tab", + "description": "Open posts in a separate tab instead of the current." + }, + "displayName": { + "title": "Use display name", + "description": "Show users' display names instead of their actual usernames." + }, + "limitLayoutWidth": { + "title": "Limit layout width", + "description": "Improve readability by limiting the main content width." + }, + "placeholders": { + "title": "Random placeholders", + "description": "Show random placeholders for certain text inputs." + }, + "expandImages": { + "title": "Expand images", + "description": "Clicking on a post's image brings you to an expanded view rather than the post page." + }, + "duplicateTitles": { + "title": "Hide duplicate titles/bodies", + "description": "Hides the post title and body if they are identical to the embed." + }, + "thumbnailSide": { + "title": "Thumbnail alignment", + "description": "Where thumbnails should be on the post in list/compact mode", + "left": "Left", + "right": "Right" + }, + "font": { + "title": "Font", + "description": "What font Photon uses in the UI." + } + }, + "embeds": { + "title": "Embeds", + "clickToView": { + "title": "Click to view", + "description": "Only load embeds once you click on them." + }, + "youtube": { + "description": "The website to embed YouTube content in." + } + }, + "lemmy": { + "title": "Lemmy", + "compactFeatured": { + "title": "Compact featured posts", + "description": "Make featured posts more compact" + }, + "markReadPosts": { + "title": "Mark read posts", + "description": "Mark a post as read when you click on it" + }, + "fadeReadPosts": { + "title": "Fade read posts", + "description": "Fade the title of posts you've already read" + }, + "crosspostMarker": { + "title": "Mark crossposts", + "description": "Show 'crossposted from' when crossposting." + }, + "hideSubmissions": { + "title": "Hide submissions", + "description": "Hide certain types of submissions.", + "deleted": "Deleted by user", + "removed": "Removed by moderator" + }, + "nsfwBlur": { + "title": "NSFW blur", + "description": "Blur images and remove post bodies of NSFW posts." + }, + "instances": { + "title": "Show instances", + "description": "Show the instances where certain content is from." + } + }, + "moderation": { + "title": "Moderation", + "replyPresets": { + "title": "Removal reply presets", + "description": "Presets to use for 'reply reason' in the submission removal dialog.", + "syntax": "Syntax" + } + }, + "other": { + "title": "Other", + "debug": { + "title": "Debug info", + "description": "Display debug information" + } + } } } diff --git a/src/routes/settings/+page.svelte b/src/routes/settings/+page.svelte index 634e23de..e8b861db 100644 --- a/src/routes/settings/+page.svelte +++ b/src/routes/settings/+page.svelte @@ -36,11 +36,13 @@ - Settings + {$t('settings.title')}

- Settings

-
-
- -
+
- Dock position - Where the dock should be put + {$t('settings.navigation.dockPos.title')} + + {$t('settings.navigation.dockPos.description')} + - Panel mode + {$t('settings.navigation.panel.title')} - Extend the dock to screen edges, similar to a panel. + {$t('settings.navigation.panel.description')}
-
+
- Theming - Customize Photon's colors. + {$t('settings.app.theming.title')} + {$t('settings.app.theming.description')} - Language + {$t('settings.app.lang.title')}

- The language used for Photon's UI. + {$t('settings.app.lang.description')} - All languages other than US English and Hebrew are community - translated, and may be incomplete! + {$t('settings.app.lang.note')}

- Post style + {$t('settings.app.view.title')}

{#if $userSettings.view == 'list'} - Show posts in a list, with post bodies and compact images. + {$t('settings.app.view.list')} {:else if $userSettings.view == 'cozy'} - Show posts with large images, rich embeds and longer post bodies. + {$t('settings.app.view.cozy')} {:else if $userSettings.view == 'compact'} - Show posts in a list, without post bodies and with tighter spacing. + {$t('settings.app.view.compact')} {:else if $userSettings.view == 'card'} - Photon's old post style. + {$t('settings.app.view.legacy')} {/if}

- Default sort - The default sort to use for feeds. + {$t('settings.app.sort.title')} + {$t('settings.app.sort.description')}
@@ -154,80 +158,63 @@
- Thumbnail alignment + {$t('settings.app.thumbnailSide.title')} - Where thumbnails should be on the post in list/compact view. + {$t('settings.app.thumbnailSide.title')} -
- -
- - - YouTube - - The website to use to embed YouTube content. - - - - Font - What font Photon should use. + {$t('settings.app.font.title')} + {$t('settings.app.font.description')}
-
+
+ + + YouTube + + {$t('settings.embeds.youtube.description')} + + + +
+ +
- Hide Submissions + {$t('settings.lemmy.hideSubmissions.title')} -

Hide certain types of submissions.

-

- Looking to hide read posts? That was moved to your - profile settings. - -

+

{$t('settings.lemmy.hideSubmissions.description')}

- Deleted + + {$t('settings.lemmy.hideSubmissions.deleted')} + - Removed by Moderator + {$t('settings.lemmy.hideSubmissions.removed')}
- Show instances - Show items' instances. + {$t('settings.lemmy.instances.title')} + + {$t('settings.lemmy.instances.description')} +
- Users + {$t('content.users')} - Comments + {$t('content.comments')} - Communities + {$t('content.communities')}
-
+
- Removal reply presets + {$t('settings.moderation.replyPresets.title')} -

Presets to use for "Reply reason" in a submission removal.

+

{$t('settings.moderation.replyPresets.description')}

    -
  • Syntax:
  • +
  • {$t('settings.moderation.replyPresets.syntax')}
  • {'{{reason}}'} - : The provided reason
  • {'{{post}}'} - : The title of the post
  • {'{{community}}'} - : The community the submission was removed in.
  • {'{{username}}'} - : The username of the creator of the submission.
@@ -395,11 +393,11 @@
-
+