Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/pastebar-app-ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function App() {
}, [isAppLocked.value])

useEffect(() => {
appReady().then(res => {
appReady().then(async res => {
if (res === null) return

try {
Expand Down Expand Up @@ -284,6 +284,12 @@ function App() {
isAppLocked.value = true
}

// Clear any previously-registered global shortcuts before (re)registering,
// so changing a hotkey does not leave the old one grabbed until app restart.
if (window.isMainWindow) {
await unregisterAll().catch(() => {})
}

if (settings.hotKeysShowHideMainAppWindow?.valueText) {
try {
register(settings.hotKeysShowHideMainAppWindow?.valueText, async () => {
Expand Down
3 changes: 2 additions & 1 deletion packages/pastebar-app-ui/src/locales/date-locales/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import it from 'date-fns/locale/it'
import ru from 'date-fns/locale/ru'
import uk from 'date-fns/locale/uk'
import zhCN from 'date-fns/locale/zh-CN'
import zhTW from 'date-fns/locale/zh-TW'

interface LocaleMap {
[key: string]: Locale
}

const locales: LocaleMap = { en, esES, ru, uk, it, zhCN }
const locales: LocaleMap = { en, esES, ru, uk, it, zhCN, zhTW }

export function formatLocale(date: Date | number, formatStr = 'Pp'): string {
const currentLocale = window.__locale__ || 'en'
Expand Down
46 changes: 46 additions & 0 deletions packages/pastebar-app-ui/src/locales/lang/zhTW/backuprestore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Auto Backup on Restore: 還原時自動備份
Available Backups: 可用備份
Backup Files: 備份檔案
Backup Now: 立即備份
Backup and Restore: 備份與還原
Backup created successfully: 備份建立成功
Backup deleted successfully: 備份刪除成功
Backup on Restore: 還原時備份
Browse: 瀏覽
Create Backup: 建立備份
Create a backup of your data?: 要建立您的資料備份嗎?
Created: 建立時間
Creating backup...: 正在建立備份...
Delete: 刪除
Delete this backup? This action cannot be undone.: 刪除此備份?此操作無法復原。
Failed to create backup: 備份建立失敗
Failed to delete backup: 備份刪除失敗
Failed to load backup list: 備份清單載入失敗
Failed to open backup folder: 備份資料夾開啟失敗
Failed to restore backup: 備份還原失敗
Failed to select backup file: 備份檔案選取失敗
Include images in backup: 在備份中包含圖片
Invalid backup file: 無效的備份檔案
Loading backups...: 正在載入備份...
Move to another location?: 移動到其他位置?
No backups found: 未找到備份
Restore: 還原
Restore Data: 還原資料
Restore completed. The application will restart.: 還原完成。應用程式將重新啟動。
Restore from "{{filename}}"? This will replace all current data.: 從「{{filename}}」還原?這將取代所有目前的資料。
Restore from File...: 從檔案還原...
Restore from {{filename}}? This will replace all current data.: 從 {{filename}} 還原?這將取代所有目前的資料。
Restored from {{filename}}: 已從 {{filename}} 還原
Restoring a backup will automatically restart the application.: 還原備份將自動重新啟動應用程式。
Restoring backup...: 正在還原備份...
Restoring...: 還原中...
Select backup file: 選擇備份檔案
Size: 大小
The selected file is not a valid PasteBar backup: 所選檔案不是有效的 PasteBar 備份
This action cannot be undone. All current data will be replaced with the backup data.: 此操作無法復原。所有目前的資料將被備份資料取代。
This will create a backup file containing your database: 這將建立一個包含您資料庫的備份檔案
This will replace all current data. Are you sure?: 這將取代所有目前的資料。您確定嗎?
Total backup space {{size}}: '備份總空間:{{size}}'
and images: 和圖片
selected file: 所選檔案
will be permanently deleted.: 將被永久刪除。
22 changes: 22 additions & 0 deletions packages/pastebar-app-ui/src/locales/lang/zhTW/calendar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Day: 天
Days: 天
Days2: 天
Days3: 天
Month: 月
Months: 月
Months2: 月
Older then: 早於
Hour: 小時
Hours: 小時
Week: 週
Weeks: 週
Week2: 週
Year: 年
Years: 年
Years2: 年
and older: 及更早
last: 最近
last2: 最近
last3: 最近
older then: 早於
recent: 最近
26 changes: 26 additions & 0 deletions packages/pastebar-app-ui/src/locales/lang/zhTW/collections.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Add Collection: 新增收藏集
Add a description for your collection: 為您的收藏集新增描述
Add default menu, tab and board: 新增預設選單、分頁與看板
Are you sure you want to delete this collection?: 確定要刪除此收藏集嗎?
Choose which collections require PIN entry for access.: 選擇哪些收藏集需要輸入 PIN 才能存取。
Collection Options: 收藏集選項
Collection Title: 收藏集標題
Collections: 收藏集
Current Collection: 目前收藏集
Delete Collection: 刪除收藏集
Delete all menu items within this collection: 刪除此收藏集中的所有選單項目
? Deleting the collection will remove it permanently. You can also choose to delete all menu and clips items within the collection by checking the box below.
: 刪除此收藏集將永久移除。您也可以勾選下方核取方塊,同時刪除收藏集內的所有選單與片段項目。
Description: 描述
Display full name of selected collection on the navigation bar: 在導覽列顯示所選收藏集的完整名稱
Enter collection title: 輸入收藏集標題
Manage Collections: 管理收藏集
Pin Protected Collections: PIN 保護的收藏集
Protect Collections with PIN: 以 PIN 保護收藏集
Protected Collection: 受保護的收藏集
Select Collections: 選擇收藏集
Select protected collections: 選擇受保護的收藏集
Show collection name on the navbar: 在導覽列顯示收藏集名稱
Switch collections: 切換收藏集
You can add the selected text to your clips or menu. Please select the option below.: 您可以將所選文字新增至片段或選單。請在下方選擇選項。
You need to select a different collection before deleting the current one.: 刪除目前收藏集前,請先選擇另一個收藏集。
Loading