Skip to content

Commit

Permalink
src:increased support for Chinese and Japanese
Browse files Browse the repository at this point in the history
Signed-off-by: xiaoming <[email protected]>
  • Loading branch information
QQxiaoming committed Aug 9, 2023
1 parent 7ba3d97 commit 0017bad
Show file tree
Hide file tree
Showing 13 changed files with 501 additions and 70 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ CMakeLists.txt.user*
git_tag.inc
git_tag.ci.inc
.DS_Store
lang/yuvviewer_en_US.qm
lang/yuvviewer_ja_JP.qm
lang/yuvviewer_zh_CN.qm
5 changes: 5 additions & 0 deletions YUVviewer.pro
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ FORMS += \
RESOURCES += \
src/img.qrc

TRANSLATIONS += \
lang/yuvviewer_zh_CN.ts \
lang/yuvviewer_ja_JP.ts \
lang/yuvviewer_en_US.ts

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
Expand Down
1 change: 1 addition & 0 deletions build_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export QML2_IMPORT_PATH=$QT_DIR/qml
YUVVIEWER_VERSION="V"$YUVVIEWER_MAJARVERSION$YUVVIEWER_SUBVERSION$YUVVIEWER_REVISION
# 编译
rm -rf .qmake.stash Makefile
lrelease ./YUVviewer.pro
qmake ./YUVviewer.pro -spec linux-g++ CONFIG+=qtquickcompiler
make clean
make -j8
Expand Down
1 change: 1 addition & 0 deletions build_dmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export QML2_IMPORT_PATH=$QT_DIR/qml
YUVVIEWER_VERSION="V"$YUVVIEWER_MAJARVERSION$YUVVIEWER_SUBVERSION$YUVVIEWER_REVISION
# 编译
rm -rf .qmake.stash Makefile
$QT_DIR/bin/lrelease ./YUVviewer.pro
$QT_DIR/bin/qmake -makefile
make
cp -R ./test ./build_release/out/YUVviewer.app/Contents/Resources/test
Expand Down
1 change: 1 addition & 0 deletions build_setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ if exist ".\build_debug" (
if exist ".\build_release" (
rmdir /Q /S .\build_release
)
lrelease YUVviewer.pro
qmake YUVviewer.pro -spec win32-g++
mingw32-make -j8
:: clean打包目录
Expand Down
117 changes: 117 additions & 0 deletions lang/yuvviewer_en_US.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="en_US">
<context>
<name>ImgExportWindow</name>
<message>
<location filename="../src/UI_ImgExport.ui" line="14"/>
<source>Format</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_ImgExport.ui" line="20"/>
<source>File Format</source>
<translation></translation>
</message>
</context>
<context>
<name>ImgViewerWindow</name>
<message>
<location filename="../src/UI_ImgViewer.ui" line="20"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:24pt; font-weight:600;&quot;&gt;loading file, please wait ....&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation></translation>
</message>
</context>
<context>
<name>YUVviewer</name>
<message>
<location filename="../src/UI_YUVviewer.ui" line="43"/>
<source>Frame Size</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="72"/>
<source>Other</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="82"/>
<source>YUV Format</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="250"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;Width&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="288"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;Height&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="363"/>
<source>Play Parameters</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="373"/>
<source>Frame Rate</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="403"/>
<source>From</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="420"/>
<source>To</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="446"/>
<source>Open file</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="453"/>
<source>Open folder</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="460"/>
<source>Help</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="467"/>
<location filename="../src/YUVviewer.cpp" line="746"/>
<source>About</source>
<translation></translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="474"/>
<source>AboutQt</source>
<translation></translation>
</message>
<message>
<location filename="../src/YUVviewer.cpp" line="732"/>
<source>1.Select parameters on the main interface.
2.Click Open File or Folder to parse the image data and display the image.
3.Used in the image display interface
- scroll wheel to zoom in and out of the image,
- use the left button to drag the image,
- Double click the left button to export the image as png format or other raw format,
- Right click to reset image size and position,
- Double click on the right button to swap the image R and B channel display,
- Middle click to display the original size of the image.</source>
<translation></translation>
</message>
<message>
<location filename="../src/YUVviewer.cpp" line="747"/>
<source>&lt;p&gt;Version&lt;/p&gt;&lt;p&gt;&amp;nbsp;%1&lt;/p&gt;&lt;p&gt;Commit&lt;/p&gt;&lt;p&gt;&amp;nbsp;%2&lt;/p&gt;&lt;p&gt;Author&lt;/p&gt;&lt;p&gt;&amp;nbsp;[email protected]&lt;/p&gt;&lt;p&gt;&amp;nbsp;[email protected]&lt;/p&gt;&lt;p&gt;Website&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;a href=&apos;https://github.com/QQxiaoming/YUVviewer&apos;&gt;https://github.com/QQxiaoming&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;a href=&apos;https://gitee.com/QQxiaoming/YUVviewer&apos;&gt;https://gitee.com/QQxiaoming&lt;/a&gt;&lt;/p&gt;</source>
<translation></translation>
</message>
</context>
</TS>
125 changes: 125 additions & 0 deletions lang/yuvviewer_ja_JP.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="ja_JP">
<context>
<name>ImgExportWindow</name>
<message>
<location filename="../src/UI_ImgExport.ui" line="14"/>
<source>Format</source>
<translation>形式</translation>
</message>
<message>
<location filename="../src/UI_ImgExport.ui" line="20"/>
<source>File Format</source>
<translation>ファイル形式</translation>
</message>
</context>
<context>
<name>ImgViewerWindow</name>
<message>
<location filename="../src/UI_ImgViewer.ui" line="20"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:24pt; font-weight:600;&quot;&gt;loading file, please wait ....&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:24pt; font-weight:600;&quot;&gt;ファイルを読み込んでいます。お待ちください...&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
</context>
<context>
<name>YUVviewer</name>
<message>
<location filename="../src/UI_YUVviewer.ui" line="43"/>
<source>Frame Size</source>
<translation>フレームサイズ</translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="72"/>
<source>Other</source>
<translation>他の</translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="82"/>
<source>YUV Format</source>
<translation>YUV形式</translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="250"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;Width&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="288"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;Height&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;高い&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="363"/>
<source>Play Parameters</source>
<translation>プレイパラメータ</translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="373"/>
<source>Frame Rate</source>
<translation>フレームレート</translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="403"/>
<source>From</source>
<translation>から</translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="420"/>
<source>To</source>
<translation>まで</translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="446"/>
<source>Open file</source>
<translation>ファイルを開く</translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="453"/>
<source>Open folder</source>
<translation>開いたフォルダ</translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="460"/>
<source>Help</source>
<translation>ヘルプ</translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="467"/>
<location filename="../src/YUVviewer.cpp" line="746"/>
<source>About</source>
<translation>について</translation>
</message>
<message>
<location filename="../src/UI_YUVviewer.ui" line="474"/>
<source>AboutQt</source>
<translation>Qtについて</translation>
</message>
<message>
<location filename="../src/YUVviewer.cpp" line="732"/>
<source>1.Select parameters on the main interface.
2.Click Open File or Folder to parse the image data and display the image.
3.Used in the image display interface
- scroll wheel to zoom in and out of the image,
- use the left button to drag the image,
- Double click the left button to export the image as png format or other raw format,
- Right click to reset image size and position,
- Double click on the right button to swap the image R and B channel display,
- Middle click to display the original size of the image.</source>
<translation>1.メインインターフェイスでパラメータを選択します。
2.「ファイルまたはフォルダーを開く」をクリックして画像データを解析し、画像を表示します。
3.画像表示インターフェースで使用
- スクロール ホイールを使用して画像を拡大または縮小します。
- 左ボタンを使用して画像をドラッグします。
- 左ボタンをダブルクリックして、画像を png 形式またはその他の raw 形式でエクスポートします。
- 右クリックして画像のサイズと位置をリセットします。
- 右ボタンをダブルクリックして画像の R チャンネルと B チャンネルの表示を切り替えます。
- 中クリックすると、画像の元のサイズが表示されます。</translation>
</message>
<message>
<location filename="../src/YUVviewer.cpp" line="747"/>
<source>&lt;p&gt;Version&lt;/p&gt;&lt;p&gt;&amp;nbsp;%1&lt;/p&gt;&lt;p&gt;Commit&lt;/p&gt;&lt;p&gt;&amp;nbsp;%2&lt;/p&gt;&lt;p&gt;Author&lt;/p&gt;&lt;p&gt;&amp;nbsp;[email protected]&lt;/p&gt;&lt;p&gt;&amp;nbsp;[email protected]&lt;/p&gt;&lt;p&gt;Website&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;a href=&apos;https://github.com/QQxiaoming/YUVviewer&apos;&gt;https://github.com/QQxiaoming&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;a href=&apos;https://gitee.com/QQxiaoming/YUVviewer&apos;&gt;https://gitee.com/QQxiaoming&lt;/a&gt;&lt;/p&gt;</source>
<translation>&lt;p&gt;バージョン&lt;/p&gt;&lt;p&gt;&amp;nbsp;%1&lt;/p&gt;&lt;p&gt;コミット&lt;/p&gt;&lt;p&gt;&amp;nbsp;%2&lt;/p&gt;&lt;p&gt;開発者&lt;/p&gt;&lt;p&gt;&amp;nbsp;[email protected]&lt;/p&gt;&lt;p&gt;ウェブサイト&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;a href=&apos;https://github.com/QQxiaoming/YUVviewer&apos;&gt;https://github.com/QQxiaoming&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;a href=&apos;https://gitee.com/QQxiaoming/YUVviewer&apos;&gt;https://gitee.com/QQxiaoming&lt;/a&gt;&lt;/p&gt;</translation>
</message>
</context>
</TS>
Loading

0 comments on commit 0017bad

Please sign in to comment.