Skip to content

Commit

Permalink
feat(i18n): Simplified Chinese (partial) (#353)
Browse files Browse the repository at this point in the history
* i18n: apperance setting page

* invitation, actions, profile setting translation

* translation: words translation

* translation: sidebar

* translation: move translation

* remove namespace

* translation: sidebar context menu

* translation: apperance setting

* translation: general setting

* translaton: actions setting

* translation: shortcusts settings

* translation: invitations setting

* translation: about setting

* translation: article list

* translation: entry content view

* chore: disable  `noImplicitReturns`

Signed-off-by: Innei <[email protected]>

* fix: fill en source

Signed-off-by: Innei <[email protected]>

* chore: lint locales key

* feat: hmr fix

Signed-off-by: Innei <[email protected]>

* use namespace

* translation: make i18n key flat

* translation: update namespace type defination

* translation: shortcut namespace

* translation: feed form

* translation: update words.which

* translation: ai daily tooltip

* translation: date i18n

* translation: fix i18n key typo

* translation: update mark all as read button

* translation: fix about page translation

* translation: update apperance namespace

* translation: fix settings namespace

* translation: fix settings namespace key

* fix lint error

* fix: shortcuts guideline i18n

Signed-off-by: Innei <[email protected]>

* feat:setting zh-cn

Signed-off-by: Innei <[email protected]>

* translate

Signed-off-by: Innei <[email protected]>

* feat: discover

Signed-off-by: Innei <[email protected]>

---------

Signed-off-by: Innei <[email protected]>
Co-authored-by: Innei <[email protected]>
Co-authored-by: Stephen Zhou <[email protected]>
  • Loading branch information
3 people authored Sep 13, 2024
1 parent 74b960c commit 140d01a
Show file tree
Hide file tree
Showing 88 changed files with 1,838 additions and 1,005 deletions.
12 changes: 3 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,7 @@
"typescript.tsdk": "node_modules/typescript/lib",
"i18n-ally.enabledFrameworks": ["i18next"],
"i18n-ally.displayLanguage": "en",
"i18n-ally.localesPaths": [
// "locales/app",
// "locales/lang",
// "locales/common",
"locales/**/*"
]
// "i18n-ally.namespace": true,
// "i18n-ally.pathMatcher": "{namespace}/{locale}.json",
// "i18n-ally.defaultNamespace": "app",
"i18n-ally.localesPaths": ["locales"],
"i18n-ally.namespace": true,
"i18n-ally.pathMatcher": "{namespaces}/{locale}.json"
}
5 changes: 5 additions & 0 deletions configs/vite.render.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ export const viteRenderBaseConfig = {
{
name: "custom-i18n-hmr",
handleHotUpdate({ file, server }) {
server.ws.send({
type: "custom",
event: "hmr",
data: {},
})
if (file.endsWith(".json") && file.includes("locales")) {
server.ws.send({
type: "custom",
Expand Down
18 changes: 18 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,22 @@ export default defineConfig(
],
},
},
{
files: ["**/*.tsx"],
rules: {
"@stylistic/jsx-self-closing-comp": "error",
},
},
{
files: ["locales/**/*.json"],
rules: {
"jsonc/sort-keys": [
"error",
{
pathPattern: ".*",
order: { type: "asc" },
},
],
},
},
)
226 changes: 120 additions & 106 deletions locales/app/en.json
Original file line number Diff line number Diff line change
@@ -1,108 +1,122 @@
{
"words": {
"search": "Search",
"import": "Import",
"discover": "Discover",
"language": "Language"
},
"signin": {
"continue_with_github": "Continue with GitHub",
"continue_with_google": "Continue with Google",
"sign_in_to": "Sign in to"
},
"settings": {
"titles": {
"general": "General",
"appearance": "Appearance",
"actions": "Actions",
"integration": "Integration",
"about": "About",
"profile": "Profile",
"shortcuts": "Shortcuts",
"power": "Power",
"invitations": "Invitations"
},
"general": {
"app": "App",
"launch_at_login": "Launch at login",
"timeline": "Timeline",
"show_unread_on_launch": {
"description": "Show unread content on launch",
"label": "Show unread content on launch"
},
"rebuild_database": {
"warning": {
"line1": "Rebuilding the database will clear all your local data.",
"line2": "Are you sure you want to continue?"
},
"label": "Rebuild Database",
"description": "If you are experiencing rendering issues, rebuilding the database may solve them.",
"button": "Rebuild",
"title": "Rebuild Database"
},
"group_by_date": {
"label": "Group by date",
"description": "Group entries by date."
},
"mark_as_read": {
"scroll": {
"label": "Mark as read when scrolling",
"description": "Automatically mark entries as read when scrolled out of the view."
},
"hover": {
"label": "Mark as read when hovering",
"description": "Automatically mark entries as read when hovered."
},
"render": {
"label": "Mark as read when in the view",
"description": "Automatically mark single-level entries (e.g. social media posts, pictures, video views) as read when they enter the view."
}
},
"privacy_data": "Privacy & Data",
"data_persist": {
"label": "Persist data for offline usage",
"description": "Persist data locally to enable offline access and local search."
},
"send_anonymous_data": {
"label": "Send anonymous data",
"description": "By opting to send anonymized telemetry data, you contribute to improving the overall user experience of Follow."
},
"voices": "Voices"
},
"integration": {
"title": "Integration",
"eagle": {
"title": "Eagle",
"enable": {
"label": "Enable",
"description": "Display 'Save media to Eagle' button when available."
}
},
"readwise": {
"title": "Readwise",
"enable": {
"label": "Enable",
"description": "Display 'Save to Readwise' button when available."
},
"token": {
"label": "Readwise Access Token",
"description": "You can get it here: readwise.io/access_token."
}
},
"instapaper": {
"title": "Instapaper",
"enable": {
"label": "Enable",
"description": "Display 'Save to Instapaper' button when available."
},
"username": {
"label": "Instapaper Username"
},
"password": {
"label": "Instapaper Password"
}
},
"tip": "Tip: Your sensitive data is stored locally and is not uploaded to the server."
}
}
"ai_daily.title": "Top News - {{title}}",
"ai_daily.tooltip.content": "Here is news selected by AI from your timeline (<From /> - <To />) that may be important to you.",
"ai_daily.tooltip.update_schedule": "Update daily at 8 AM and 8 PM.",
"discover.any_url_or_keyword": "Any URL or Keyword",
"discover.default_option": " (default)",
"discover.feed_description": "The description of this feed is as follows, and you can fill out the parameter form with the relevant information.",
"discover.feed_maintainers": "This feed is provided by RSSHub, with credit to <maintainers />",
"discover.import.click_to_upload": "Click to upload OPML file",
"discover.popular": "Popular",
"discover.preview": "Preview",
"discover.rss_hub_route": "RSSHub Route",
"discover.rss_url": "RSS URL",
"discover.select_placeholder": "Select",
"early_access": "Early Access",
"entry_actions.copy_link": "Copy link",
"entry_actions.mark_as_read": "Mark as read",
"entry_actions.mark_as_unread": "Mark as unread",
"entry_actions.open_in_browser": "Open in browser",
"entry_actions.save_media_to_eagle": "Save media to Eagle",
"entry_actions.save_to_instapaper": "Save to Instapaper",
"entry_actions.save_to_readwise": "Save to Readwise",
"entry_actions.share": "Share",
"entry_actions.star": "Star",
"entry_actions.tip": "Tip",
"entry_actions.unstar": "Unstar",
"entry_column.refreshing": "Refreshing new entries...",
"entry_content.ai_summary": "AI summary",
"entry_content.fetching_content": "Fetching original content and processing...",
"entry_content.no_content": "No content",
"entry_content.readability_notice": "This content is provided by Readability. If you find typographical anomalies, please go to the source site to view the original content.",
"entry_content.render_error": "Render error:",
"entry_content.report_issue": "Report issue",
"entry_content.web_app_notice": "Maybe web app doesn't support this content type. But you can download the desktop app.",
"entry_list_header.daily_report": "Daily Report",
"entry_list_header.items": "items",
"entry_list_header.new_entries_available": "New entries available",
"entry_list_header.refetch": "Refetch",
"entry_list_header.refresh": "Refresh",
"entry_list_header.show_all": "Show all",
"entry_list_header.show_unread_only": "Show unread Only",
"entry_list_header.switch_to_grid": "Switch to Grid",
"entry_list_header.switch_to_masonry": "Switch to Masonry",
"entry_list_header.unread": "unread",
"feed_form.add_follow": "Add follow",
"feed_form.category": "Category",
"feed_form.category_description": "By default, your follows will be grouped by website.",
"feed_form.error_fetching_feed": "Error in fetching feed.",
"feed_form.fallback": "Fallback",
"feed_form.feed_not_found": "Feed not found.",
"feed_form.follow": "Follow",
"feed_form.followed": "🎉 Followed.",
"feed_form.private_follow": "Private Follow",
"feed_form.private_follow_description": "Whether this follow is publicly visible on your profile page.",
"feed_form.retry": "Retry",
"feed_form.title": "Title",
"feed_form.title_description": "Custom title for this Feed. Leave empty to use the default.",
"feed_form.unfollow": "Unfollow",
"feed_form.update": "Update",
"feed_form.update_follow": "Update follow",
"feed_form.updated": "🎉 Updated.",
"feed_form.view": "View",
"feed_view_type.articles": "Articles",
"feed_view_type.audios": "Audios",
"feed_view_type.notifications": "Notifications",
"feed_view_type.pictures": "Pictures",
"feed_view_type.social_media": "Social Media",
"feed_view_type.videos": "Videos",
"mark_all_read_button.auto_confirm_info": "Will be confirmed automatically after 3s.",
"mark_all_read_button.confirm": "Confirm",
"mark_all_read_button.confirm_mark_all": "Mark {{which}} as read?",
"mark_all_read_button.confirm_mark_all_info": "Confirm mark all as read?",
"mark_all_read_button.mark_all_as_read": "Mark all as read",
"mark_all_read_button.mark_as_read": "Mark {{which}} as read",
"mark_all_read_button.undo": "Undo",
"sidebar.category_remove_dialog.cancel": "Cancel",
"sidebar.category_remove_dialog.continue": "Continue",
"sidebar.category_remove_dialog.description": "This operation will delete your category, but the feeds it contains will be retained and grouped by website.",
"sidebar.category_remove_dialog.title": "Remove Category",
"sidebar.feed_actions.claim": "Claim",
"sidebar.feed_actions.claim_feed": "Claim Feed",
"sidebar.feed_actions.copy_feed_id": "Copy feed ID",
"sidebar.feed_actions.copy_feed_url": "Copy feed URL",
"sidebar.feed_actions.edit": "Edit",
"sidebar.feed_actions.edit_feed": "Edit feed",
"sidebar.feed_actions.feed_owned_by_you": "This feed is owned by you",
"sidebar.feed_actions.mark_all_as_read": "Mark all as read",
"sidebar.feed_actions.navigate_to_feed": "Navigate to feed",
"sidebar.feed_actions.open_feed_in_browser": "Open feed in browser",
"sidebar.feed_actions.open_site_in_browser": "Open site in browser",
"sidebar.feed_actions.unfollow": "Unfollow",
"sidebar.feed_actions.unfollow_feed": "Unfollow feed",
"sidebar.feed_column.context_menu.change_to_other_view": "Change to other view",
"sidebar.feed_column.context_menu.delete_category": "Delete category",
"sidebar.feed_column.context_menu.delete_category_confirmation": "Delete category {{folderName}}?",
"sidebar.feed_column.context_menu.mark_as_read": "Mark as read",
"sidebar.feed_column.context_menu.rename_category": "Rename category",
"sidebar.select_sort_method": "Select a sort method",
"signin.continue_with_github": "Continue with GitHub",
"signin.continue_with_google": "Continue with Google",
"signin.sign_in_to": "Sign in to",
"sync_indicator.offline": "Offline",
"sync_indicator.synced": "Synced with server",
"words.add": "Add",
"words.confirm": "Confirm",
"words.discover": "Discover",
"words.email": "Email",
"words.import": "Import",
"words.items": "Items",
"words.language": "Language",
"words.load_archived_entries": "Load archived entries",
"words.login": "Login",
"words.rss": "RSS",
"words.rss3": "RSS3",
"words.rsshub": "RSSHub",
"words.search": "Search",
"words.starred": "Starred",
"words.unread": "Unread",
"words.user": "User",
"words.which.all": "all",
"words.zero_items": "Zero items"
}
Loading

0 comments on commit 140d01a

Please sign in to comment.