Skip to content

Commit

Permalink
v1.4.0.2 Chinese translations added #32 @killtimer920
Browse files Browse the repository at this point in the history
  • Loading branch information
torum committed Oct 1, 2024
1 parent 05ad0ab commit 6e919ba
Show file tree
Hide file tree
Showing 7 changed files with 1,877 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/ImageViewer.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<UseVersionInfo Value="True"/>
<MajorVersionNr Value="1"/>
<MinorVersionNr Value="4"/>
<BuildNr Value="1"/>
<BuildNr Value="2"/>
<StringTable FileDescription="Image Viewer" InternalName="ImageViewer" LegalCopyright="torum" OriginalFilename="ImageViewer.exe" ProductName="Simple Image Viewer"/>
</VersionInfo>
<BuildModes Count="1">
Expand Down
41 changes: 25 additions & 16 deletions src/ImageViewer.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,42 @@

procedure TranslateLCL;
var
Lang,FallbackLang: String;
strLang, strLanguageCode, strLanguageID: String;
LangID: TLanguageID;
begin

Lang:='en';
FallbackLang:='';
//LazGetLanguageIDs(Lang,FallbackLang); // This is now deprecated.
LangID := GetLanguageID;
Lang := LangID.LanguageID;
FallbackLang:=LangID.LanguageCode;

// OutputDebugString(PChar(LangID.CountryCode)); // JP
// OutputDebugString(PChar(LangID.LanguageCode)); // ja
// OutputDebugString(PChar(LangID.LanguageID)); // ja_JP

strLanguageCode:=LangID.LanguageCode;
strLanguageID := LangID.LanguageID;

strLang:='en';

if (Lang = 'en') or (Lang = 'en_US') or (Lang = 'us')
or (FallbackLang = 'us') or (FallbackLang = 'US') or (FallbackLang = 'en') then
Lang := 'en';
if (strLanguageCode = 'en') or (strLanguageID = 'en_US') then
strLang := 'en';

if (Lang = 'ja') or (Lang = 'ja_jp') or (Lang = 'jp_JP') or (Lang = 'jp')
or (FallbackLang = 'jp') or (FallbackLang = 'JP') or (FallbackLang = 'ja') then
Lang := 'ja';//'ja_JP';
if (strLanguageCode = 'ja') or (strLanguageID = 'ja_jp') or (strLanguageID = 'jp_JP') then
strLang := 'ja';//'ja_JP';

if (Lang = 'ru') or (Lang = 'ru_RU') or (Lang = 'RU')
or (FallbackLang = 'ru') or (FallbackLang = 'RU') then
Lang := 'ru';//'ru_RU';
if (strLanguageCode = 'ru') or (strLanguageID = 'ru_RU') then
strLang := 'ru';//'ru_RU';

if (strLanguageCode = 'zh') then begin
if (strLanguageID = 'zh-Hant') then begin
strLang := 'zh-Hant';
end else
if (strLanguageID = 'zh-CN') then begin
strLang := 'zh-CN';
end else begin
//
end;
end;

SetDefaultLang(Lang,'','',false);
SetDefaultLang(strLang,'','',false);

end;

Expand Down
Binary file modified src/ImageViewer.res
Binary file not shown.
183 changes: 183 additions & 0 deletions src/languages/ImageViewer.zh-CN.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"

#: umain.resstrabout
msgctxt "umain.resstrabout"
msgid "About"
msgstr "关于"

#: umain.resstrclose
msgctxt "umain.resstrclose"
msgid "&Close"
msgstr "关闭(&C)"

#: umain.resstreffect
msgctxt "umain.resstreffect"
msgid "&Effect"
msgstr "效果(&E)"

#: umain.resstrfilter
msgctxt "umain.resstrfilter"
msgid "&Filter"
msgstr "过滤器(&F)"

#: umain.resstrfilterfilesize
msgctxt "umain.resstrfilterfilesize"
msgid "File size"
msgstr "文件大小"

#: umain.resstrfullscreenslideshow
msgctxt "umain.resstrfullscreenslideshow"
msgid "Fullscreen Slideshow"
msgstr "全屏幻灯片"

#: umain.resstrfullscreenview
msgid "&Fullscreen View"
msgstr "全屏查看(&F)"

#: umain.resstrinframeslideshow
msgctxt "umain.resstrinframeslideshow"
msgid "InFrame Slideshow"
msgstr "框架内幻灯片"

#: umain.resstrinframeview
msgid "&InFrame View"
msgstr "框架内查看(&I)"

#: umain.resstrinterval
msgctxt "umain.resstrinterval"
msgid "&Interval"
msgstr "间隔(&I)"

#: umain.resstrleavefullscreen
msgctxt "umain.resstrleavefullscreen"
msgid "&Leave Fullscreen"
msgstr "退出全屏(&L)"

#: umain.resstrleaveinframe
msgctxt "umain.resstrleaveinframe"
msgid "&Leave InFrame"
msgstr "退出框架(&L)"

#: umain.resstrminute
msgctxt "umain.resstrminute"
msgid "minute"
msgstr "分钟"

#: umain.resstrminutes
msgctxt "umain.resstrminutes"
msgid "minutes"
msgstr "分钟"

#: umain.resstrmoniter
msgctxt "umain.resstrmoniter"
msgid "Moniter"
msgstr "监视器"

#: umain.resstrmoniters
msgctxt "umain.resstrmoniters"
msgid "&Moniters"
msgstr "监视器(&M)"

#: umain.resstrplayback
msgctxt "umain.resstrplayback"
msgid "&Playback"
msgstr "播放(&P)"

#: umain.resstrplaybacknext
msgctxt "umain.resstrplaybacknext"
msgid "&Next"
msgstr "下一个(&N)"

#: umain.resstrplaybackpause
msgctxt "umain.resstrplaybackpause"
msgid "Pau&se"
msgstr "暂停(&S)"

#: umain.resstrplaybackprevious
msgctxt "umain.resstrplaybackprevious"
msgid "&Back"
msgstr "上一个(&B)"

#: umain.resstrquit
msgctxt "umain.resstrquit"
msgid "&Quit"
msgstr "退出(&Q)"

#: umain.resstrrandom
msgctxt "umain.resstrrandom"
msgid "Ran&dom"
msgstr "随机(&D)"

#: umain.resstrrepeat
msgctxt "umain.resstrrepeat"
msgid "Repe&at"
msgstr "重复(&A)"

#: umain.resstrsecond
msgctxt "umain.resstrsecond"
msgid "second"
msgstr "秒"

#: umain.resstrseconds
msgctxt "umain.resstrseconds"
msgid "seconds"
msgstr "秒"

#: umain.resstrstartfullscreenslideshow
msgid "Start &Fullscreen Slideshow"
msgstr "开始全屏幻灯片(&F)"

#: umain.resstrstartinframeslideshow
msgid "Start &InFrame Slideshow"
msgstr "开始框架内幻灯片(&I)"

#: umain.resstrstayontop
msgctxt "umain.resstrstayontop"
msgid "Stay on top"
msgstr "置顶"

#: umain.resstrbackground
msgctxt "umain.background"
msgid "Background Color"
msgstr "背景颜色"

#: umain.resstrbackgroundblack
msgctxt "umain.backgroundblack"
msgid "Black"
msgstr "黑色"

#: umain.resstrbackgroundwhite
msgctxt "umain.backgroundwhite"
msgid "White"
msgstr "白色"

#: umain.resstrstopfullscreenslideshow
msgctxt "umain.resstrstopfullscreenslideshow"
msgid "&Stop Fullscreen Slideshow"
msgstr "停止全屏幻灯片(&S)"

#: umain.resstrstopinframeslideshow
msgctxt "umain.resstrstopinframeslideshow"
msgid "&Stop InFrame Slideshow"
msgstr "停止框架内幻灯片(&S)"

#: umain.resstrstretch
msgctxt "umain.resstrstretch"
msgid "Stretch"
msgstr "拉伸"

#: umain.resstrstretchin
msgctxt "umain.resstrstretchin"
msgid "In (big->screen)"
msgstr "拉伸入 (大->屏幕)"

#: umain.resstrstretchout
msgctxt "umain.resstrstretchout"
msgid "Out (small->screen)"
msgstr "拉伸出 (小->屏幕)"

#: umain.resstropenpictures
msgctxt "umain.resstropenpictures"
msgid "Open picture(s)"
msgstr "打开图片"
Loading

0 comments on commit 6e919ba

Please sign in to comment.