Notion-繁體中文化

轉換Notion為繁體中文化

  1. // ==UserScript==
  2. // @name Notion-繁體中文化
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1.1
  5. // @license MIT
  6. // @description 轉換Notion為繁體中文化
  7. // @author dasu88
  8. // @match *://www.notion.so/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14.  
  15. function I18N() {
  16. this.lang = 'en';
  17. }
  18.  
  19. I18N.prototype.install = function (langName, keymap) {
  20. if (this[langName] === undefined) {
  21. this[langName] = keymap;
  22. }
  23. };
  24.  
  25. const I18n = new I18N();
  26.  
  27. I18n.install('zh', {
  28. 'Free Plan': '免費套餐',
  29. "Personal (Education) Plan": '個人(教育)套餐',
  30. 'Create or Join Workspace': '建立或加入工作區',
  31. "Windows App": 'Windows應用',
  32. "Mobile App": '移動端應用',
  33. "Web Clipper": '網頁剪裁',
  34. 'Log Out (': '登出',
  35. 'Quick Find': '快速查詢',
  36. 'All Updates': '所有的更新',
  37. 'Followed': '已關注',
  38. 'Mentions': '提到我的',
  39. 'Open notifications settings': '打開訊息設定',
  40. "created": "建立",
  41. "view": "頁面",
  42. "property": "屬性",
  43. "edited": "編輯",
  44. "in": "在",
  45. "Learn about page updates": "學習如何修改頁面",
  46. 'Settings & Members': '設定 & 成員',
  47. 'Share': '分享',
  48. 'Updates': '更新',
  49. 'Favorite': '收藏',
  50. 'Templates': '模板',
  51. 'Import': '匯入',
  52. 'Trash': '垃圾桶',
  53. 'New Page': '新建頁面',
  54. 'Add a Page': '新增一個頁面',
  55. 'All workspace members can access these pages': '所有在工作空間中的使用者都能訪問這個頁面',
  56. 'Quickly add a page inside': '快速新增一個頁面',
  57. 'Delete, duplicate, and more': '刪除,複製或是更多操作',
  58. "Filter...": "篩選...",
  59. "people": "人物",
  60. "animals and nature": "動物與自然",
  61. "food and drink": "食物與飲品",
  62. "activity": "活動",
  63. "travel and places": "交通工具與地點",
  64. "objects": "物品",
  65. "symbols": "符號",
  66. "flags": "標誌",
  67. 'Link': '鏈接',
  68. 'Upload an Image': '上傳圖片',
  69. "Choose an Image": "選擇圖片",
  70. "Recommended size is 280 × 280 pixels": "推薦大小為280 x 280 像素",
  71. "The maximum size per file is ": "檔案最大大小為",
  72. "Paste an image link...": "輸入圖片鏈接",
  73. "Submit": "提交",
  74. "Works with any image from the web": "符合任何在網路上能訪問到的圖片",
  75. 'Remove': '移除',
  76. 'No Pages Inside': '沒有更多頁面',
  77. 'Default View': '預設檢視',
  78. 'Copy Link to View': '複製頁面鏈接',
  79. 'Properties': '屬性',
  80. 'Group by ': '基於',
  81. 'Filter': '過濾',
  82. 'Sort': '排序',
  83. 'Search': '搜索',
  84. 'New': '新增',
  85. 'Empty Page': '空頁面',
  86. 'New Template': '新的模版',
  87. 'Edit': '編輯',
  88. 'Hide': '隱藏',
  89. 'Create new page': '建立',
  90. 'Untitled': '未命名',
  91. 'Type a name...': '輸入一個名字...',
  92. 'Drag': '拖動',
  93. 'Add Icon': '新增圖示',
  94. 'Add Cover': '新增封面',
  95. 'Add Discussion': '新增議題',
  96. 'Drag': '拖動',
  97. 'Click': '點選',
  98. 'to move': '來移動行',
  99. 'to open menu': '打開選單',
  100. 'to add a block below': '在下方新增一個編輯區塊',
  101. 'Rename, delete, and more...': '重新命名,刪除,及更多...',
  102. 'Change icon': '改變圖示',
  103. 'Delete': '刪除',
  104. 'Duplicate': '重複',
  105. 'Turn Into': '換成',
  106. 'Style': '風格',
  107. 'Small Text': '更小的字型',
  108. 'Full Width': '更寬的編輯區',
  109. 'Page Lock': '鎖定頁面',
  110. 'Add to Favorites': '新增至收藏',
  111. 'Open in Windows App': '在客戶端中打開',
  112. 'Undo': '撤銷',
  113. 'Page History': '歷史修改',
  114. 'Show Deleted Pages': '顯示已經刪除的頁面',
  115. 'Copy Link': '複製鏈接',
  116. 'Rename': '重新命名',
  117. 'Move To': '移動到',
  118. 'Word Count: ': "字數統計",
  119. 'Edit Property': '編輯屬性',
  120. 'Comment': '評論',
  121. 'Color': '顏色',
  122. 'Me': '我',
  123. 'My Account': '我的帳號',
  124. 'Changes to account settings will apply to all of your workspaces.': '帳戶設定的更改將應用於您的所有工作區。',
  125. 'Learn more.': '瞭解更多',
  126. 'Photo': '相片',
  127. 'Upload Photo': '上傳相片',
  128. 'Personal Info': '個人資訊',
  129. 'Email': '信箱',
  130. 'Change Email': '更改信箱',
  131. 'Given Name': '名',
  132. 'Family Name': '姓',
  133. 'Password': '密碼',
  134. 'You can set a permanent password if you don\'t want to use temporary login codes.': '如果您不想使用臨時登錄碼,則可以設定永久密碼。',
  135. 'Change Password': '更改密碼',
  136. 'Remove Password': '移除密碼',
  137. 'Calendar': '日曆',
  138. 'Start week on Monday': '一週從星期一開始',
  139. 'This will change how all calendars in your app look.': '這將會更改您應用中所有日曆的外觀。',
  140. 'Danger Zone': '危險操作',
  141. 'Delete My Account': '刪除我的帳號',
  142. 'Update': '更新',
  143. 'Cancel': '取消',
  144. 'My Notifications': '通知',
  145. 'Learn about mobile and desktop notifications.': '瞭解有關手機和桌面通知的訊息。',
  146. 'Mobile Push Notifications': '向手機推送通知',
  147. 'Receive push notifications on mentions and comments immediately via your mobile apps.': '立即通過您的移動應用接收有關提及和評論的推送通知。',
  148. 'Email Notifications': '郵件通知',
  149. 'Receive email updates on mentions, comments, and edit digests for all the pages you have followed.': '接收有關您關注的所有頁面的提及,評論和編輯摘要的電子郵件更新。',
  150. 'My Connected Apps': '已關聯的應用',
  151. 'Learn more about embedding content in Notion.': '瞭解更多',
  152. 'Connect': '連線',
  153. 'Find and embed your files': '查詢和嵌入你的檔案',
  154. 'Import notebooks': '匯入筆記',
  155. 'Import your boards': '匯入你的看板',
  156. 'Import tasks from boards and lists': '從看板和列表匯入任務',
  157. 'Earn Credit': '獲取獎勵',
  158. 'Learn how to earn and apply credits.': '學習更多',
  159. "Credit Balance": "獲取獎勵",
  160. 'Your current credit balance is': '已獲取獎勵為',
  161. 'That\\\'s equivalent to': '這相當於',
  162. 'month': '個月',
  163. 'of free Notion.': '的免費使用',
  164. 'Upgrade for free': '免費升級套餐',
  165. 'Invite Friends and Earn Credit': '邀請和獎勵',
  166. 'You』ll receive': '你將獲得',
  167. 'in Notion credit when the person you invite signs up for a Notion account, and they』ll also get': '在Notion中,並且你的朋友也會獲取',
  168. 'in credits to get started.': '的獎勵',
  169. 'Enter email address...': '輸入信箱地址...',
  170. 'Invite': '邀請',
  171. 'Other Ways to Earn Credit': '其他方式的獎勵',
  172. 'Log in on the Web': '首次登入Web端',
  173. 'Sign in to Notion from any web browser': '使用任意瀏覽器登入Notion',
  174. 'Log in on the Desktop App': '首次登入客戶端',
  175. 'Download the desktop app and sign in': '下載客戶端並登入帳號',
  176. 'Log in on the Mobile App': '首次登入移動端',
  177. 'Download the mobile app and sign in': '下載移動端並登入帳號',
  178. 'Import from Evernote': '從Evernote國際版匯入',
  179. 'Import your notes and notebooks': '匯入你的筆記和筆記本',
  180. 'Use the Web Clipper': '首次使用剪裁',
  181. 'Download the Chrome Extension and save a link': '下載Chrome外掛並儲存鏈接',
  182. 'Use the iOS or Android System Share Menu': '使用移動裝置分享',
  183. 'Use the share menu to save a link into Notion': '使用手機系統分享鏈接至Notion',
  184. 'Total credit earned': '獲取獎勵總額',
  185. 'Workspace': '工作空間',
  186. 'Settings': '設定',
  187. 'Name': '名稱',
  188. 'You can use your name or the name of your team. Keep it simple.': '您可以使用您的名字或團隊的名字,來保持簡單化。',
  189. 'Icon': '圖示',
  190. 'Upload an image or pick an emoji. It will show up in your sidebar and notifications.': '上傳圖片或選擇表情符號。 它將顯示在側邊欄和通知中。',
  191. 'Domain': '域名',
  192. 'Share the link ': '分享這個鏈接 ',
  193. ' to add anyone with an allowed email domain to your workspace.': ' 來新增任何來自該域下擁有信箱賬號的使用者到你的工作空間',
  194. 'Allowed Email Domains': '允許的電子信箱域',
  195. 'Anyone with email addresses at these domains can automatically join your workspace.': '在這些域中擁有電子郵件地址的任何人都可以自動加入您的工作區。',
  196. 'Export Content': '導出',
  197. 'Export All Workspace Content': '導出整個工作區',
  198. 'Learn about exporting workspaces.': '瞭解更多關於導出工作空間',
  199. 'Export Members': '導出使用者',
  200. 'Export Members as CSV': '導出使用者表為CSV格式',
  201. 'Learn about exporting members.': '瞭解更多關於導出使用者',
  202. 'Export Members': '導出使用者',
  203. 'Danger Zone': '危險操作',
  204. 'Delete Entire Workspace': '刪除整個工作區',
  205. 'Learn about deleting workspaces.': '瞭解更多關於刪除工作區',
  206. "Member": '成員',
  207. "Members": '所有成員',
  208. "Groups": '分組',
  209. "Manage members here, or": '在此管理成員,或是',
  210. "set up a domain": '設定一個域名',
  211. ", so everyone with allowed email domain can join the workspace automatically.": '如果電子郵件在設定的域名下則會自動加入該工作空間',
  212. "Add a Member": '新增成員',
  213. "User": '使用者',
  214. "Access Level": '訪問級別',
  215. "Admin": '管理員',
  216. "Can change workspace settings and invite new members to the workspace.": '可以更改工作空間設定並邀請新成員加入工作空間。',
  217. "Cannot change workspace settings or invite new members to the workspace.": '無法更改工作空間設定或邀請新成員加入工作空間。',
  218. "Leave Team": '退出團隊',
  219. "Guests (": '訪客 (',
  220. "Convert to ": '轉換為',
  221. "This guest can access these pages": '他可以訪問這些頁面',
  222. "Page": '個頁面',
  223. 'Upgrade': '升級',
  224. 'Plans': '方案',
  225. 'Free': '免費',
  226. 'Personal': '個人',
  227. 'Team': '團隊',
  228. 'Enterprise': '企業',
  229. 'Usage': '使用對像',
  230. 'Guests': '訪客',
  231. 'Blocks': '區塊數量',
  232. 'File uploads': '上傳限制',
  233. 'Version history': '版本歷史',
  234. 'Features': '功能',
  235. 'Web, desktop, & mobile apps': 'Web端,客戶端以及移動端使用',
  236. '40+ block types & embeds': '40多種嵌入式區塊型別',
  237. '50+ designer templates': '50多個精心設計的模版',
  238. 'Databases with 5 views': '具有5個檢視的資料庫',
  239. 'Admin & security features': '管理和安全功能',
  240. 'Admin tools': '管理員工具',
  241. 'Advanced permissions': '高級許可權控制',
  242. 'Bulk PDF export': '批量導出PDF',
  243. 'Access new features early': '儘早享受新功能',
  244. 'Support': '升級',
  245. 'Priority support': '升級',
  246. 'Dedicated manager': '升級',
  247. 'Custom contract & invoicing': '升級',
  248. 'Current Plan': '目前計劃',
  249. 'Upgrade': '升級',
  250. 'Security & SAML': '安全 & SAML',
  251. 'Dark Mode': '夜間模式',
  252. 'Open as Page': '作為頁面打開',
  253. 'Navigate to this page': '導航到這個頁面',
  254. 'Add to': '新增到',
  255. 'Press Enter': '按下 Enter 鍵',
  256. ' to continue with an empty page': '以空白頁繼續',
  257. ', or pick a template': ',或者選擇一個模板',
  258. ' (↑↓ to select)': ' (↑↓ 鍵選擇)',
  259. 'Press Enter to continue with an empty page, or pick a template': '按下 Enter 鍵產生一個空白頁面或選擇一個模板',
  260. 'Empty With Icon': '空白有圖示',
  261. 'Empty with icon': '空白有圖示',
  262. 'Empty': '空白',
  263. 'Database': '資料庫',
  264. 'Table': '表格',
  265. 'Board': '看板',
  266. 'List': '列表',
  267. 'Calendar': '日曆',
  268. 'Gallery': '相簿',
  269. 'Language & region': '語言與地區',
  270. 'My account': '我的帳號',
  271. 'Account': '帳號',
  272. 'Upload photo': '上傳照片',
  273. 'Personal info': '個人資訊',
  274. 'Change email': '更換信箱',
  275. 'Log out of all devices': '從所有裝置登出',
  276. 'You will be logged out of all other active sessions besides this one and will have to log back in.': '您將立即登出其他所有上線裝置,並且必須重新登入。',
  277. 'Log out': '登出',
  278. 'Danger zone': '危險區域',
  279. 'Delete my account': '刪除我的帳號',
  280. 'Set a password': '設定密碼',
  281. 'My notifications': '我的通知',
  282. 'Notifications': '通知',
  283. 'Mobile push notifications': '行動裝置推送通知',
  284. 'Receive push notifications on mentions and comments via your mobile app.': '通過您的行動應用接收有關提及和評論的推送通知。',
  285. 'Email notifications': '郵件通知',
  286. 'Always send email notifications': '一律發送電子郵件通知',
  287. 'Receive updates by email, even when you’re active on the app.': '即使您正在使用該應用,也可以通過電子郵件接收更新。',
  288. 'Learn about mobile and desktop notifications': '了解關於行動裝置和桌面應用程式通知',
  289. 'My notifications & settings': '我的通知與設定',
  290. 'My connected apps': '我的連結 apps',
  291. 'Earn credit': '賺取信用',
  292. 'Billing': '計費',
  293. 'Security & identity': '安全性與身份',
  294. 'Integrations': '集成商',
  295. 'Members': '成員',
  296. 'Add members': '新增成員',
  297. 'Share with unlimited members': '與無限會員分享',
  298. 'Calendar view': '日曆檢視',
  299. 'Group': '群組',
  300. 'Groups for': '群組為',
  301. 'Group by': '群組依據',
  302. 'Connected apps': '連結 apps',
  303. 'Learn more about embedding content in Notion': '了解更多關於在Notion中嵌入內容的訊息。',
  304. 'Choose a language you\'d like to use with Notion.': '選擇您要使用的語言。',
  305. 'Workspace settings': '工作區設定',
  306. 'Export members': '導出成員',
  307. 'Members': '成員',
  308. 'Manage members here.': '管理成員',
  309. 'Learn about adding members to your workspace': '了解更多關於在工作區新增成員的資訊。',
  310. 'Filter by email or name': '依信箱或名稱篩選',
  311. 'Access level': '存取層級',
  312. 'Dark mode': '夜間模式',
  313. 'Add a view': '建立檢視',
  314. 'Copy link to view': '複製連結至檢視',
  315. 'New page': '新頁面',
  316. 'Add a page': '增加一頁',
  317. 'Add a property': '增加屬性',
  318. 'View name': '檢視名稱',
  319. 'Table with types to store and view any kind of structured data': '表格類形,用於儲存和查看任何類型的結構化資料。',
  320. 'Kanban board, great for project planning and bug tracking': '看板類形,非常適合項目規畫和錯誤追蹤。',
  321. 'Month view, for event planning and scheduling': '月檢視,適用於活動計劃和安排',
  322. 'Grid of cards, use for mood boards, index cards, and recipes': '圖片網格,適用於心情看板、索引卡和選單。',
  323. 'Learn how to use database views': '了解如何使用資料庫檢視',
  324. 'A simplified page view, great for bookmarks and notes': '簡化的頁面檢視,非常適合書籤和筆記。',
  325. 'Create': '建立',
  326. 'Learn about databases': '了解關於資料庫',
  327. 'New template': '新建模板',
  328. 'Templates for': '模版 針對',
  329. 'Replicate page formats inside this database with templates.': '在此資料庫中使用模板複製頁面格式。',
  330. 'Untitled': '未命名',
  331. 'Press Enter to continue with an empty page, or pick a template': '按下 Enter 鍵產生一個空白頁面或選擇一個模板',
  332. 'to select': '鍵選擇',
  333. 'Empty with icon': '空白包含圖示',
  334. 'Use this template': '使用這個模板',
  335. 'Design': '設計',
  336. 'Roadmap': '地圖',
  337. 'User Research Database': '使用者研究資料庫',
  338. 'Design Tasks': '設計任務',
  339. 'Meeting Notes': '會議筆記',
  340. 'Design System': '設計系統',
  341. 'Education': '教育',
  342. 'Class Notes': '經典筆記',
  343. 'Job Applications': '工作申請',
  344. 'Grade Calculator': '成績計算',
  345. 'Club Homepage': '俱樂部首頁',
  346. 'Reading List': '閱讀清單',
  347. 'Thesis Planning': '論文規劃',
  348. 'Cornell Notes System': '康奈爾筆記系統',
  349. 'Personal CRM': '個人CRM',
  350. 'Roommate Space': '室友空間',
  351. 'Simple Budget': '簡單預算',
  352. 'Syllabus': '教學大綱',
  353. 'Classroom Home': '教室首頁',
  354. 'Lesson Plans': '課程計劃',
  355. 'Course Schedule': '課程安排',
  356. 'Class Directory': '班級目錄',
  357. 'Engineering': '工程類',
  358. 'Human resources': '人力資源',
  359. 'Marketing': '市場營銷',
  360. 'Product management': '專案管理',
  361. 'Sales': '銷售類',
  362. 'Small text': '小型文字',
  363. 'Full width': '最大寬度',
  364. 'Page lock': '頁面鎖定',
  365. 'Copy link': '複製鏈結',
  366. 'Open in Windows app': '以 Windows 應用程式開啟',
  367. 'Show deleted pages': '顯示刪除頁面',
  368. 'Export': '匯出',
  369. 'Move to': '移動至',
  370. 'Share or publish to the web': '分享或發佈至網站',
  371. 'View past changes to this page': '查看本頁面過去的更改紀錄',
  372. 'Show this page in your sidebar': '在側欄中顯示此頁面',
  373. 'Learn about importing': '了解關於匯入',
  374. 'All pages': '所有頁面',
  375. 'In current page': '在目前頁面',
  376. 'This pages is in Trash.': '此頁面於垃圾桶內',
  377. 'Restore page': '還原頁面',
  378. 'Delete permanently': '永久刪除',
  379. 'Add view': '新增檢視',
  380. 'Add icon': '新增圖示',
  381. 'Add cover': '新增封面',
  382. 'Add description': '新增描述',
  383. 'Layout': '版面',
  384. 'Lock database': '鎖定資料庫',
  385. 'Duplicate view': '重製檢視',
  386. 'Delete view': '刪除檢視',
  387. 'Calculate': '計算',
  388. 'None': '無',
  389. 'Count all': '計算全部',
  390. 'Count values': '計算值',
  391. 'Count unique values': '計算唯一值',
  392. 'Count empty': '計算空白',
  393. 'Count not empty': '計算非空白',
  394. 'Percent empty': '空置百分比',
  395. 'Percent not empty': '百分比不為空',
  396. 'Earliest date': '最早日期',
  397. 'Latest date': '最晚日期',
  398. 'Date range': '日期區間',
  399. 'Count': '筆數',
  400. 'View options': '檢視選項',
  401. 'Search for a view...': '搜尋屬性條件-檢視',
  402. 'Date': '日期',
  403. 'Tags': '標籤',
  404. 'Deleted properties': '刪除屬性',
  405. 'Learn about properties': '了解關於屬性設定',
  406. 'New property': '新增屬性',
  407. 'Hide all': '全部隱藏',
  408. 'more': '更多',
  409. 'Shown in table': '依表格顯示',
  410. 'Add a comment...': '新增評論...',
  411. 'RECENT PAGES': '最近開啟頁面',
  412. 'Clear': '清除',
  413. 'Select': '選擇',
  414. 'Open': '開啟',
  415. 'Open in a new tab': '在新頁籤開啟',
  416. 'Members': '會員',
  417. 'Try it free': '免費試用',
  418. 'Learn more': '學習更多',
  419. 'Try Notion for Teams for a collaborative workspace, unlimited team members, and advanced permissions.': '試用 Notion for Teams 以獲得協作工作區、無限的團隊成員和高級權限。',
  420. 'My settings': '我的設定',
  421. 'Appearance': '外觀',
  422. 'Customize how Notion looks on your device.': '自訂Notion的外觀',
  423. 'Open on start': '啟動時開啟',
  424. 'Choose what to show when Notion starts or when you switch workspaces.': '選擇啟動Notion或切換工作區時的顯示畫面',
  425. 'Cookie settings': 'Cookie 設定',
  426. 'Customize cookies. See Cookie Notice for details.': '自訂Cookie',
  427. 'Language': '語言',
  428. 'Change the language used in the user interface.': '更改要使用的語言界面'
  429. });
  430.  
  431.  
  432.  
  433. const NotionApp = window.document.getElementById('notion-app');
  434.  
  435. function getTextNode(node) {
  436. const sentences = [];
  437.  
  438. const _getTextNode = function (node) {
  439. for (let childNode of node.childNodes) {
  440. if (childNode instanceof window.Text) {
  441. if (childNode.data.replace(/[' ']*/, '')) {
  442. sentences.push(childNode);
  443. }
  444. } else if (childNode.placeholder) {
  445.  
  446. }
  447. _getTextNode(childNode);
  448. }
  449. };
  450. _getTextNode(node);
  451. return sentences;
  452. }
  453.  
  454. function translate(node) {
  455. const sentences = getTextNode(node);
  456. for (let text of sentences) {
  457. const string = text.data;
  458. if (I18n.zh[string]) {
  459. text.parentNode.replaceChild(new window.Text(I18n.zh[string]), text);
  460. }
  461. }
  462. }
  463.  
  464. setTimeout(() => {
  465. window.requestIdleCallback(() => {
  466. translate(NotionApp);
  467.  
  468. const observer = new MutationObserver(function (mutationsList) {
  469. return window.requestIdleCallback(function () {
  470. mutationsList = mutationsList.filter(MutationRecord => {
  471. return MutationRecord.addedNodes.length !== 0;
  472. }).map(MutationRecord => {
  473. return MutationRecord.addedNodes;
  474. });
  475.  
  476. for (let nodeList of mutationsList) {
  477. for (let node of nodeList) {
  478. translate(node);
  479. }
  480. }
  481. });
  482. });
  483.  
  484. observer.observe(NotionApp, {
  485. childList: true,
  486. subtree: true
  487. });
  488. });
  489. });
  490. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址