From babab520fcf532bf9c5de41f828fe797ba24330e Mon Sep 17 00:00:00 2001 From: houchengqiu Date: Thu, 18 Jul 2024 16:41:03 +0800 Subject: [PATCH] fix: fix UI bugs 1.Adjust the minimum size to avoid overlapping space in the title bar 2.Update the new album name copy 3.Time Range Chinese Display Update Log: fix UI bugs Bug: https://pms.uniontech.com/bug-view-218997.html, https://pms.uniontech.com/bug-view-193021.html, https://pms.uniontech.com/bug-view-193009.html --- src/src/albumControl.cpp | 12 ++ src/src/globalstatus.cpp | 2 +- src/translations/deepin-album.ts | 76 +++++---- src/translations/deepin-album_zh_CN.ts | 78 +++++---- src/translations/deepin-album_zh_HK.ts | 223 +++++++++++++------------ src/translations/deepin-album_zh_TW.ts | 223 +++++++++++++------------ 6 files changed, 334 insertions(+), 280 deletions(-) diff --git a/src/src/albumControl.cpp b/src/src/albumControl.cpp index 34de9ed5..cce5a9b3 100644 --- a/src/src/albumControl.cpp +++ b/src/src/albumControl.cpp @@ -2197,6 +2197,18 @@ QString AlbumControl::getFileTime(const QString &path1, const QString &path2) auto str1 = time1.toString("yyyy/MM/dd"); auto str2 = time2.toString("yyyy/MM/dd"); + QString language = QLocale::system().name(); + qWarning() << "language:" << language; + if (language == "zh_CN") { + str1 = QString(tr("%1Year%2Month%3Day")) + .arg(time1.date().year()) + .arg(time1.date().month()) + .arg(time1.date().day()); + str2 = QString(tr("%1Year%2Month%3Day")) + .arg(time2.date().year()) + .arg(time2.date().month()) + .arg(time2.date().day()); + } if (time1 < time2) { return str1 + "-" + str2; } else { diff --git a/src/src/globalstatus.cpp b/src/src/globalstatus.cpp index c8db5113..d179ab5a 100644 --- a/src/src/globalstatus.cpp +++ b/src/src/globalstatus.cpp @@ -7,7 +7,7 @@ #include "albumControl.h" static const int sc_MinHeight = 300; // 窗口最小高度 -static const int sc_MinWidth = 628; // 窗口最小宽度 +static const int sc_MinWidth = 658; // 窗口最小宽度 static const int sc_MinHideHeight = 425; // 调整窗口高度小于425px时,隐藏工具栏和标题栏 static const int sc_FloatMargin = 65; // 浮动按钮边距 static const int sc_TitleHeight = 50; // 标题栏栏高度 diff --git a/src/translations/deepin-album.ts b/src/translations/deepin-album.ts index 58f3398f..8edc7f2d 100644 --- a/src/translations/deepin-album.ts +++ b/src/translations/deepin-album.ts @@ -191,12 +191,18 @@ Unnamed - + + + %1Year%2Month%3Day + + + + Channel Channel - + Pictures Pictures @@ -204,106 +210,106 @@ AlbumTitle - + New album New album - + Import folders Import folders - + Album Album - + Version: Version: - + Album is a stylish management tool for viewing and organizing photos and videos. Album is a stylish management tool for viewing and organizing photos and videos. - + %1 is released under %2 %1 is released under %2 - + Show side pane Show side pane - + Hide side pane Hide side pane - + Original ratio Original ratio - + Square thumbnails Square thumbnails - - + + Y Y - - + + M M - - + + D D - - + + All All - + Search Search - + Import Photos and Videos Import Photos and Videos - + Favorite Favorite - + Unfavorite Unfavorite - + Rotate Rotate - + Delete Delete @@ -1071,28 +1077,28 @@ MainAlbumView - + Importing... Importing... - - + + Imported: Imported: - + %1/%2 %1/%2 - + Import successful Import successful - + Import failed Import failed @@ -1707,12 +1713,14 @@ ThumbnailListViewTools + Export successful - Export successful + Export successful + Export failed - Export failed + Export failed diff --git a/src/translations/deepin-album_zh_CN.ts b/src/translations/deepin-album_zh_CN.ts index 8d166e22..42240391 100644 --- a/src/translations/deepin-album_zh_CN.ts +++ b/src/translations/deepin-album_zh_CN.ts @@ -191,12 +191,18 @@ 未命名相册 - + + + %1Year%2Month%3Day + %1年%2月%3日 + + + Channel 声道 - + Pictures 图片 @@ -204,106 +210,106 @@ AlbumTitle - + New album 新建相册 - + Import folders 从文件夹导入 - + Album 相册 - + Version: 版本: - + Album is a stylish management tool for viewing and organizing photos and videos. 相册是一款可多种方式浏览、整理照片和视频的管理工具。 - + %1 is released under %2 %1遵循%2协议发布 - + Show side pane 展开侧边栏 - + Hide side pane 关闭侧边栏 - + Original ratio 显示为原始比例 - + Square thumbnails 显示为方图 - - + + Y - - + + M - - + + D - - + + All 所有项目 - + Search 搜索 - + Import Photos and Videos 导入照片和视频 - + Favorite 收藏 - + Unfavorite 取消收藏 - + Rotate 旋转 - + Delete 删除 @@ -1071,28 +1077,28 @@ MainAlbumView - + Importing... 正在导入,请稍候... - - + + Imported: 已导入: - + %1/%2 %1/%2 - + Import successful 导入成功 - + Import failed 导入失败 @@ -1121,7 +1127,7 @@ Name: - 文件名: + 名称: @@ -1707,12 +1713,14 @@ ThumbnailListViewTools + Export successful - 导出成功 + 导出成功 + Export failed - 导出失败 + 导出失败 diff --git a/src/translations/deepin-album_zh_HK.ts b/src/translations/deepin-album_zh_HK.ts index bbc0cd04..a659ce28 100644 --- a/src/translations/deepin-album_zh_HK.ts +++ b/src/translations/deepin-album_zh_HK.ts @@ -4,199 +4,205 @@ AlbumControl - + All photos and videos 所有照片和影片 - - + + Disk is busy, cannot eject now 磁盤文件被佔用,無法彈出 - - + + OK 確定 - + Fullscreen 全螢幕 - + Exit fullscreen/slideshow 退出全螢幕/幻燈片放映 - + Help 幫助 - + Display shortcuts 顯示快捷鍵 - + Display in file manager 在文件管理器中顯示 - + Slide show 幻燈片放映 - + View 查看 - + Export photos 導出照片 - + Import photos/videos 導入照片和影片 - + Select all 全選 - + Copy 複製 - + Delete 刪除 - + Photo/Video info 照片/影片訊息 - + Set as wallpaper 設為壁紙 - + Rotate clockwise 順時針旋轉 - + Rotate counterclockwise 逆時針旋轉 - + Zoom in 放大照片 - + Zoom out 縮小照片 - + Previous 上一張 - + Next 下一張 - + Favorite 收藏 - + Unfavorite 取消收藏 - + New album 新建相冊 - + Rename album 重命名相冊 - + Page up 向上滾動一屏 - + Page down 向下滾動一屏 - + Photos 照片 - + Albums 相冊 - + Settings 設置 - + Favorites 我的收藏 - + Screen Capture 截圖錄屏 - + Camera 相機 - + Draw 畫板 - + Unnamed 未命名相冊 - + + + %1Year%2Month%3Day + + + + Channel 聲道 - + Pictures 圖片 @@ -204,101 +210,106 @@ AlbumTitle - + New album 新建相冊 - + Import folders 從文件夾導入 - + Album 相冊 - + Version: 版本: - + Album is a stylish management tool for viewing and organizing photos and videos. 相冊是一款可多種方式瀏覽、整理照片和影片的管理工具。 - + %1 is released under %2 %1遵循%2協議發佈 - + Show side pane 展開側邊欄 - + Hide side pane 關閉側邊欄 - + Original ratio 顯示為原始比例 - + Square thumbnails 顯示為方圖 - - + + Y - - + + M - - + + D - - + + All 所有項目 - + Search 搜索 - + + Import Photos and Videos + 導入照片和影片 + + + Favorite 收藏 - + Unfavorite 取消收藏 - + Rotate 旋轉 - + Delete 刪除 @@ -439,22 +450,22 @@ DeepinStorage - + %1 Drive %1驅動器 - + Blank %1 Disc 空白%1光盤 - + %1 Encrypted %1已加密 - + %1 Volume %1卷 @@ -832,42 +843,42 @@ GlobalStatus - + 1 item selected (1 photo) 已選擇1項(1張照片) - + 1 item selected (1 video) 已選擇1項(1個影片) - + %1 items selected (%1 photos) 已選擇%1項(%1張照片) - + %1 items selected (%1 videos) 已選擇%1項(%1個影片) - + %1 item selected (1 photo, 1 video) 已選擇%1項(1張照片,1個影片) - + %1 items selected (1 photo, %2 videos) 已選擇%1項(1張照片,%2個影片) - + %1 items selected (%2 photos, 1 video) 已選擇%1項(%2張照片,1個影片) - + %1 items selected (%2 photos, %3 videos) 已選擇%1項(%2張照片,%3個影片) @@ -1066,28 +1077,28 @@ MainAlbumView - + Importing... 正在導入,請稍候... - - + + Imported: 已導入: - + %1/%2 %1/%2 - + Import successful 導入成功 - + Import failed 導入失敗 @@ -1095,7 +1106,7 @@ MonthCollection - + %1/%2 %1/%2 @@ -1132,17 +1143,17 @@ NoPictureView - + Import Photos and Videos 導入照片和影片 - + No photos or videos found 未發現照片或影片文件 - + Or drag them here 您也可以拖拽照片和影片到此 @@ -1158,7 +1169,7 @@ PathManager - + System Disk 系統盤 @@ -1174,28 +1185,28 @@ QObject - - + + %1/%2/%3 %4:%5 %1/%2/%3 %4:%5 - + %1 %1 - + %1/%2 %1/%2 - + %1/%2/%3 %1年%2月%3日 - + Trash 最近刪除 @@ -1322,12 +1333,12 @@ 搜索結果 - + Slide Show 幻燈片放映 - + No search results 無搜索結果 @@ -1460,12 +1471,12 @@ ThumbnailListDelegate - + days - + day @@ -1473,12 +1484,12 @@ ThumbnailListDelegate2 - + days - + day @@ -1702,12 +1713,14 @@ ThumbnailListViewTools + Export successful - 導出成功 + 導出成功 + Export failed - 導出失敗 + 導出失敗 @@ -1976,17 +1989,17 @@ YearCollection - + %1 %1 - + %1 items 共%1項 - + 1 item 共1項 @@ -1994,7 +2007,7 @@ main - + All photos and videos 所有照片和影片 diff --git a/src/translations/deepin-album_zh_TW.ts b/src/translations/deepin-album_zh_TW.ts index e295a398..f01aecdd 100644 --- a/src/translations/deepin-album_zh_TW.ts +++ b/src/translations/deepin-album_zh_TW.ts @@ -4,199 +4,205 @@ AlbumControl - + All photos and videos 所有照片和影片 - - + + Disk is busy, cannot eject now 磁碟文件被占用,無法彈出 - - + + OK 確定 - + Fullscreen 全螢幕 - + Exit fullscreen/slideshow 退出全螢幕/幻燈片放映 - + Help 幫助 - + Display shortcuts 顯示快捷鍵 - + Display in file manager 在檔案管理器中顯示 - + Slide show 幻燈片放映 - + View 查看 - + Export photos 匯出照片 - + Import photos/videos 匯入照片和影片 - + Select all 全選 - + Copy 複製 - + Delete 刪除 - + Photo/Video info 照片/影片訊息 - + Set as wallpaper 設為桌布 - + Rotate clockwise 順時針旋轉 - + Rotate counterclockwise 逆時針旋轉 - + Zoom in 放大照片 - + Zoom out 縮小照片 - + Previous 上一張 - + Next 下一張 - + Favorite 收藏 - + Unfavorite 取消收藏 - + New album 建立相冊 - + Rename album 重新命名相冊 - + Page up 向上滾動一屏 - + Page down 向下滾動一屏 - + Photos 照片 - + Albums 相冊 - + Settings 設定 - + Favorites 我的收藏 - + Screen Capture 截圖錄屏 - + Camera 相機 - + Draw 畫板 - + Unnamed 未命名相冊 - + + + %1Year%2Month%3Day + + + + Channel 聲道 - + Pictures 圖片 @@ -204,101 +210,106 @@ AlbumTitle - + New album 建立相冊 - + Import folders 從資料夾匯入 - + Album 相冊 - + Version: 版本: - + Album is a stylish management tool for viewing and organizing photos and videos. 相冊是一款可多種方式瀏覽、整理照片和影片的管理工具。 - + %1 is released under %2 %1遵循%2協議發布 - + Show side pane 展開側邊欄 - + Hide side pane 關閉側邊欄 - + Original ratio 顯示為原始比例 - + Square thumbnails 顯示為方圖 - - + + Y - - + + M - - + + D - - + + All 所有項目 - + Search 搜尋 - + + Import Photos and Videos + 匯入照片和影片 + + + Favorite 收藏 - + Unfavorite 取消收藏 - + Rotate 旋轉 - + Delete 刪除 @@ -439,22 +450,22 @@ DeepinStorage - + %1 Drive %1驅動器 - + Blank %1 Disc 空白%1光碟 - + %1 Encrypted %1已加密 - + %1 Volume %1卷 @@ -832,42 +843,42 @@ GlobalStatus - + 1 item selected (1 photo) 已選擇1項(1張照片) - + 1 item selected (1 video) 已選擇1項(1個影片) - + %1 items selected (%1 photos) 已選擇%1項(%1張照片) - + %1 items selected (%1 videos) 已選擇%1項(%1個影片) - + %1 item selected (1 photo, 1 video) 已選擇%1項(1張照片,1個影片) - + %1 items selected (1 photo, %2 videos) 已選擇%1項(1張照片,%2個影片) - + %1 items selected (%2 photos, 1 video) 已選擇%1項(%2張照片,1個影片) - + %1 items selected (%2 photos, %3 videos) 已選擇%1項(%2張照片,%3個影片) @@ -1066,28 +1077,28 @@ MainAlbumView - + Importing... 正在匯入,請稍候… - - + + Imported: 已匯入: - + %1/%2 %1/%2 - + Import successful 匯入成功 - + Import failed 匯入失敗 @@ -1095,7 +1106,7 @@ MonthCollection - + %1/%2 %1/%2 @@ -1132,17 +1143,17 @@ NoPictureView - + Import Photos and Videos 匯入照片和影片 - + No photos or videos found 未發現照片或影片檔案 - + Or drag them here 您也可以拖曳照片和影片到此 @@ -1158,7 +1169,7 @@ PathManager - + System Disk 系統盤 @@ -1174,28 +1185,28 @@ QObject - - + + %1/%2/%3 %4:%5 %1/%2/%3 %4:%5 - + %1 %1 - + %1/%2 %1/%2 - + %1/%2/%3 %1年%2月%3日 - + Trash 最近刪除 @@ -1322,12 +1333,12 @@ 搜尋結果 - + Slide Show 幻燈片放映 - + No search results 無搜尋結果 @@ -1460,12 +1471,12 @@ ThumbnailListDelegate - + days - + day @@ -1473,12 +1484,12 @@ ThumbnailListDelegate2 - + days - + day @@ -1702,12 +1713,14 @@ ThumbnailListViewTools + Export successful - 匯出成功 + 匯出成功 + Export failed - 匯出失敗 + 匯出失敗 @@ -1976,17 +1989,17 @@ YearCollection - + %1 %1 - + %1 items 共%1項 - + 1 item 共1項 @@ -1994,7 +2007,7 @@ main - + All photos and videos 所有照片和影片