Skip to content

Commit

Permalink
feat: add version info datat for windows, and application display name
Browse files Browse the repository at this point in the history
  • Loading branch information
BLumia committed Jul 21, 2020
1 parent cd942b4 commit 92ded93
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 43 deletions.
47 changes: 26 additions & 21 deletions languages/PineapplePictures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,105 +12,110 @@
<context>
<name>GraphicsView</name>
<message>
<location filename="../graphicsview.cpp" line="239"/>
<location filename="../graphicsview.cpp" line="243"/>
<source>File url list is empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../graphicsview.cpp" line="44"/>
<location filename="../graphicsview.cpp" line="46"/>
<source>File is not a valid image</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../graphicsview.cpp" line="247"/>
<location filename="../graphicsview.cpp" line="251"/>
<source>Image data is invalid</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../graphicsview.cpp" line="254"/>
<location filename="../graphicsview.cpp" line="258"/>
<source>Not supported mimedata: %1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<location filename="../mainwindow.cpp" line="143"/>
<location filename="../mainwindow.cpp" line="173"/>
<source>File url list is empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="322"/>
<location filename="../mainwindow.cpp" line="382"/>
<source>&amp;Copy</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="343"/>
<location filename="../mainwindow.cpp" line="403"/>
<source>Copy P&amp;ixmap</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="348"/>
<location filename="../mainwindow.cpp" line="408"/>
<source>Copy &amp;File Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="358"/>
<location filename="../mainwindow.cpp" line="418"/>
<source>&amp;Paste Image</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="363"/>
<location filename="../mainwindow.cpp" line="424"/>
<source>&amp;Paste Image File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="368"/>
<location filename="../mainwindow.cpp" line="387"/>
<location filename="../mainwindow.cpp" line="429"/>
<location filename="../mainwindow.cpp" line="448"/>
<source>Stay on top</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="374"/>
<location filename="../mainwindow.cpp" line="388"/>
<location filename="../mainwindow.cpp" line="435"/>
<location filename="../mainwindow.cpp" line="449"/>
<source>Protected mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="380"/>
<location filename="../mainwindow.cpp" line="441"/>
<source>Help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="383"/>
<location filename="../mainwindow.cpp" line="444"/>
<source>Launch application with image file path as argument to load the file.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="384"/>
<location filename="../mainwindow.cpp" line="445"/>
<source>Drag and drop image file onto the window is also supported.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="386"/>
<location filename="../mainwindow.cpp" line="447"/>
<source>Context menu option explanation:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="387"/>
<location filename="../mainwindow.cpp" line="448"/>
<source>Make window stay on top of all other windows.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="388"/>
<location filename="../mainwindow.cpp" line="449"/>
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>main</name>
<message>
<location filename="../main.cpp" line="24"/>
<location filename="../main.cpp" line="27"/>
<source>Pineapple Pictures</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.cpp" line="31"/>
<source>File list.</source>
<translation type="unfinished"></translation>
</message>
Expand Down
47 changes: 26 additions & 21 deletions languages/PineapplePictures_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,35 @@
<context>
<name>GraphicsView</name>
<message>
<location filename="../graphicsview.cpp" line="239"/>
<location filename="../graphicsview.cpp" line="243"/>
<source>File url list is empty</source>
<translation>文件 URL 列表为空</translation>
</message>
<message>
<location filename="../graphicsview.cpp" line="44"/>
<location filename="../graphicsview.cpp" line="46"/>
<source>File is not a valid image</source>
<translation>文件不是有效的图片文件</translation>
</message>
<message>
<location filename="../graphicsview.cpp" line="247"/>
<location filename="../graphicsview.cpp" line="251"/>
<source>Image data is invalid</source>
<translation>图片数据无效</translation>
</message>
<message>
<location filename="../graphicsview.cpp" line="254"/>
<location filename="../graphicsview.cpp" line="258"/>
<source>Not supported mimedata: %1</source>
<translation>不受支持的 MimeData 格式:%1</translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<location filename="../mainwindow.cpp" line="143"/>
<location filename="../mainwindow.cpp" line="173"/>
<source>File url list is empty</source>
<translation>文件 URL 列表为空</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="322"/>
<location filename="../mainwindow.cpp" line="382"/>
<source>&amp;Copy</source>
<translation>复制(&amp;C)</translation>
</message>
Expand All @@ -49,72 +49,77 @@
<translation type="vanished">复制位图(&amp;P)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="343"/>
<location filename="../mainwindow.cpp" line="403"/>
<source>Copy P&amp;ixmap</source>
<translation>复制位图(&amp;I)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="348"/>
<location filename="../mainwindow.cpp" line="408"/>
<source>Copy &amp;File Path</source>
<translation>复制文件路径(&amp;F)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="358"/>
<location filename="../mainwindow.cpp" line="418"/>
<source>&amp;Paste Image</source>
<translation>粘贴图像(&amp;P)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="363"/>
<location filename="../mainwindow.cpp" line="424"/>
<source>&amp;Paste Image File</source>
<translation>粘贴图像文件(&amp;P)</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="368"/>
<location filename="../mainwindow.cpp" line="387"/>
<location filename="../mainwindow.cpp" line="429"/>
<location filename="../mainwindow.cpp" line="448"/>
<source>Stay on top</source>
<translation>总在最前</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="374"/>
<location filename="../mainwindow.cpp" line="388"/>
<location filename="../mainwindow.cpp" line="435"/>
<location filename="../mainwindow.cpp" line="449"/>
<source>Protected mode</source>
<translation>保护模式</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="380"/>
<location filename="../mainwindow.cpp" line="441"/>
<source>Help</source>
<translation>帮助</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="383"/>
<location filename="../mainwindow.cpp" line="444"/>
<source>Launch application with image file path as argument to load the file.</source>
<translation>以图片文件的路径作为参数运行程序即可直接打开图片文件。</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="384"/>
<location filename="../mainwindow.cpp" line="445"/>
<source>Drag and drop image file onto the window is also supported.</source>
<translation>也支持拖放图片文件到窗口内来加载图片。</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="386"/>
<location filename="../mainwindow.cpp" line="447"/>
<source>Context menu option explanation:</source>
<translation>菜单项说明:</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="387"/>
<location filename="../mainwindow.cpp" line="448"/>
<source>Make window stay on top of all other windows.</source>
<translation>使窗口始终至于其它非置顶窗口上方。</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="388"/>
<location filename="../mainwindow.cpp" line="449"/>
<source>Avoid close window accidentally. (eg. by double clicking the window)</source>
<translation>避免窗口意外关闭。(如:不小心双击了窗口触发了关闭窗口行为)</translation>
</message>
</context>
<context>
<name>main</name>
<message>
<location filename="../main.cpp" line="24"/>
<location filename="../main.cpp" line="27"/>
<source>Pineapple Pictures</source>
<translation>菠萝看图</translation>
</message>
<message>
<location filename="../main.cpp" line="31"/>
<source>File list.</source>
<translation>文件列表。</translation>
</message>
Expand Down
2 changes: 2 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ int main(int argc, char *argv[])
#endif
translator.load(QString("PineapplePictures_%1").arg(QLocale::system().name()), qmDir);
a.installTranslator(&translator);
a.setApplicationName("Pineapple Pictures");
a.setApplicationDisplayName(QCoreApplication::translate("main", "Pineapple Pictures"));

// parse commandline arguments
QCommandLineParser parser;
Expand Down
18 changes: 17 additions & 1 deletion pineapple-pictures.rc
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
IDI_ICON1 ICON DISCARDABLE "icons/app-icon.ico"
IDI_ICON1 ICON DISCARDABLE "icons/app-icon.ico"
1 VERSIONINFO
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "FileDescription", "Pineapple Pictures - Image Viewer"
VALUE "LegalCopyright", "MIT/Expat License - Copyright (C) 2020 Gary Wang"
VALUE "ProductName", "Pineapple Pictures"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

0 comments on commit 92ded93

Please sign in to comment.