From 70168299ba87f5b7ff1a54c1a55c37e3454dd049 Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 11 Jun 2025 20:10:49 +0800 Subject: [PATCH] Adds support for Traditional Chinese translation (#1282) * Adds support for Traditional Chinese translation * Reformats the style to match black formatter --- cms/settings.py | 1 + files/frontend_translations/zh_hant.py | 104 +++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 files/frontend_translations/zh_hant.py diff --git a/cms/settings.py b/cms/settings.py index cd8918e1..77b279de 100644 --- a/cms/settings.py +++ b/cms/settings.py @@ -465,6 +465,7 @@ LANGUAGES = [ ('pt', _('Portuguese')), ('ru', _('Russian')), ('zh-hans', _('Simplified Chinese')), + ('zh-hant', _('Traditional Chinese')), ('es', _('Spanish')), ('tr', _('Turkish')), ('el', _('Greek')), diff --git a/files/frontend_translations/zh_hant.py b/files/frontend_translations/zh_hant.py new file mode 100644 index 00000000..6105e27a --- /dev/null +++ b/files/frontend_translations/zh_hant.py @@ -0,0 +1,104 @@ +translation_strings = { + 'ABOUT': '關於', + 'AUTOPLAY': '自動播放', + 'About': '關於', + 'Add a ': '新增', + 'COMMENT': '留言', + 'Categories': '分類', + 'Category': '分類', + 'Change Language': '切換語言', + 'Change password': '變更密碼', + 'Comment': '留言', + 'Comments': '留言', + 'Comments are disabled': '留言功能已關閉', + 'Contact': '聯絡資訊', + 'DELETE MEDIA': '刪除影片', + 'DOWNLOAD': '下載', + 'EDIT MEDIA': '編輯影片', + 'EDIT PROFILE': '編輯個人資料', + 'EDIT SUBTITLE': '編輯字幕', + 'Edit media': '編輯影片', + 'Edit profile': '編輯個人資料', + 'Edit subtitle': '編輯字幕', + 'Featured': '精選內容', + 'Go': '執行', # in context of "execution" + 'History': '觀看紀錄', + 'Home': '首頁', + 'Language': '語言', + 'Latest': '最新內容', + 'Liked media': '我喜歡的影片', + 'Manage comments': '留言管理', + 'Manage media': '媒體管理', + 'Manage users': '使用者管理', + 'Media': '媒體', + 'Media was edited': '媒體已更新', + 'Members': '會員', + 'My media': '我的媒體', + 'My playlists': '我的播放清單', + 'No': '無', # in context of "no comments", etc. + 'No comment yet': '尚無留言', + 'No comments yet': '尚未有留言', + 'No results for': '查無相關結果:', + 'PLAYLISTS': '播放清單', + 'Playlists': '播放清單', + 'Powered by': '技術提供為', + 'Published on': '發布日期為', + 'Recommended': '推薦內容', + 'Register': '註冊', + 'SAVE': '儲存', + 'SEARCH': '搜尋', + 'SHARE': '分享', + 'SHOW MORE': '顯示更多', + 'SUBMIT': '送出', + 'Search': '搜尋', + 'Select': '選擇', + 'Sign in': '登入', + 'Sign out': '登出', + 'Subtitle was added': '字幕已新增', + 'Tags': '標籤', + 'Terms': '使用條款', + 'UPLOAD': '上傳', + 'Up next': '即將播放', + 'Upload': '上傳', + 'Upload media': '上傳媒體', + 'Uploads': '上傳內容', + 'VIEW ALL': '查看全部', + 'View all': '瀏覽全部', + 'comment': '留言', + 'is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media': '這是一個現代化且功能完整的開源影音內容管理系統,專為現代網路平台的觀賞與分享需求所打造。', + 'media in category': '此分類下的媒體', + 'media in tag': '此標籤下的媒體', + 'view': '次觀看', + 'views': '次觀看', + 'yet': ' ', # no such usage in this language, +} + +replacement_strings = { + 'Apr': '四月', + 'Aug': '八月', + 'Dec': '十二月', + 'Feb': '二月', + 'Jan': '一月', + 'Jul': '七月', + 'Jun': '六月', + 'Mar': '三月', + 'May': '五月', + 'Nov': '十一月', + 'Oct': '十月', + 'Sep': '九月', + 'day ago': '天前', + 'days ago': '天前', + 'hour ago': '小時前', + 'hours ago': '小時前', + 'just now': '剛剛', + 'minute ago': '分鐘前', + 'minutes ago': '分鐘前', + 'month ago': '個月前', + 'months ago': '個月前', + 'second ago': '秒前', + 'seconds ago': '秒前', + 'week ago': '週前', + 'weeks ago': '週前', + 'year ago': '年前', + 'years ago': '年前', +}