From c2260ca7093d790b38af4c989c8f41167f16b255 Mon Sep 17 00:00:00 2001 From: K4YT3X Date: Mon, 14 Sep 2020 14:25:17 -0400 Subject: [PATCH] updated wordings and translations --- src/locale/zh_CN/LC_MESSAGES/video2x.mo | Bin 7165 -> 7865 bytes src/locale/zh_CN/LC_MESSAGES/zh_CN.mo | Bin 7165 -> 7865 bytes src/locale/zh_CN/LC_MESSAGES/zh_CN.po | 249 ++++++++++++++---------- src/upscaler.py | 4 +- src/video2x.pot | 232 +++++++++++++--------- src/video2x.py | 2 +- 6 files changed, 292 insertions(+), 195 deletions(-) diff --git a/src/locale/zh_CN/LC_MESSAGES/video2x.mo b/src/locale/zh_CN/LC_MESSAGES/video2x.mo index 0942d7fc587c69b01fdc61fd7ab0f8453a2e5146..dfcd6d8ceaaa9ac59b8de0fdaec9443b30bcff36 100644 GIT binary patch delta 2872 zcmZXVd2AF_9LL{63*{1MfgX5_Nm+maxq}^S2w}Ki{6cCk| zf>Y$sYEWd0NLOq`v89drhgVGSFAecXq_f)^qb8D=XiWTkXQycNWq>3TDSmi@b`~H={XIh=O;K07UT5{I0-5fi{KQc`avc-xYcJHRK&-jJpR<@U+{X? zLBdjoVsHw48mdG`q4azKRmvPxNrsYVm7)S(3~z)w7lO@F^q7C373#q*sEEIYLHHXi zgVlr~h4W!KTnTkP0%c$eROD|!o$rP+bPDc+0}xea3x~Atj3@t;(Y(oq1&>3e=qpID zrie6L21}vV*FmMO7LrwCLm5u`_xC|%A_H~qV~9<222Kqaa~58~dNNVSk);#Jzf!W6 z4SBQ?DzaVvfx}QWKLM5MZ=iZ2Fwq!(#^QobbB)hhXtBN@2H_?sLs_Wi?1j>Q#=rk( zGZXsC%$!tkWIp5#G50|k3`4yg&p?u5jzRUrM{p+m9o`75(W=O7cqQBkb-ov3!h8u8 zXdX)62%=RW%|RyGSOsNpBb356fB#!3Ma49VQd$nRp5w2VzzbN1ph~5N;t|sh)k7aZ zW#}6yJHJ3VSkBFBIBu3Qk%yb0J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=j>G0KWH<@5ZZ*i z90RYdHsXVX%4}jjF_R$iMFSrMt*_SPUP49dq+P3xqfe$bU=%T(NU#qNE3pfsFW8yG zgZ4MWp9q!29QD}YvENVkS8uQaeyniBjcOwuK3K*&G@%HcE`w^*wU4QPgT-N z=-ZLmp45Skiq@;i3SXsF;p2vy(z+`9Mq)v9!3?W#%FKdkp}eF#kKHsXXg{93%MMF< zEL5Hn^w>qIS96?KcRH^tn7-PgZu7tc7mo1BJr z%f6I$CH3@1r)5Xao-@w7EzX-~oXw5K+1=)BKVn}Won?n*Y_@|L<3c}V9P-%BS-G*j n!A-q;jtsVCpU?U|V`z%~TX*$#wf5}Y)_tm@??jt(W{dd`p&nJ^ diff --git a/src/locale/zh_CN/LC_MESSAGES/zh_CN.po b/src/locale/zh_CN/LC_MESSAGES/zh_CN.po index 189c9bf..ed0d82d 100644 --- a/src/locale/zh_CN/LC_MESSAGES/zh_CN.po +++ b/src/locale/zh_CN/LC_MESSAGES/zh_CN.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2020-09-09 13:04-0400\n" -"PO-Revision-Date: 2020-09-09 13:06-0400\n" +"POT-Creation-Date: 2020-09-14 14:24-0400\n" +"PO-Revision-Date: 2020-09-14 14:24-0400\n" "Last-Translator: \n" "Language-Team: \n" "Language: zh_CN\n" @@ -21,223 +21,275 @@ msgstr "" msgid "Processing: {} (pass {}/{})" msgstr "正在处理:{}(进度)" -#: upscaler.py:144 +#: upscaler.py:149 msgid "Specified or default cache directory is a file/link" msgstr "指定或默认的缓存目录是文件/链接" -#: upscaler.py:150 +#: upscaler.py:155 msgid "Creating cache directory {}" msgstr "创建缓存目录 {}" -#: upscaler.py:153 +#: upscaler.py:158 msgid "Unable to create {}" msgstr "无法创建 {}" -#: upscaler.py:158 +#: upscaler.py:163 msgid "Extracted frames are being saved to: {}" msgstr "提取的帧将被保存到:{}" -#: upscaler.py:160 +#: upscaler.py:165 msgid "Upscaled frames are being saved to: {}" msgstr "已放大的帧将被保存到:{}" -#: upscaler.py:170 +#: upscaler.py:175 msgid "Cleaning up cache directory: {}" msgstr "清理缓存目录:{}" -#: upscaler.py:175 +#: upscaler.py:180 msgid "Unable to delete: {}" msgstr "无法删除:{}" -#: upscaler.py:181 upscaler.py:196 upscaler.py:207 +#: upscaler.py:186 upscaler.py:201 upscaler.py:212 msgid "Input and output path type mismatch" msgstr "输入和输出路径类型不匹配" -#: upscaler.py:182 +#: upscaler.py:187 msgid "Input is multiple files but output is not directory" msgstr "输入是多个文件,但输出不是目录" -#: upscaler.py:186 +#: upscaler.py:191 msgid "Input path {} is neither a file nor a directory" msgstr "输入路径 {} 既不是文件也不是目录" -#: upscaler.py:190 upscaler.py:212 +#: upscaler.py:195 upscaler.py:217 msgid "Input directory and output directory cannot be the same" msgstr "输入目录和输出目录不能相同" -#: upscaler.py:197 +#: upscaler.py:202 msgid "Input is single file but output is directory" msgstr "所选的输入路径是单个文件,但输出路径是目录" -#: upscaler.py:200 +#: upscaler.py:205 msgid "No suffix found in output file path" msgstr "在输出文件路径中未找到后缀" -#: upscaler.py:201 +#: upscaler.py:206 msgid "Suffix must be specified" msgstr "必须指定文件后缀" -#: upscaler.py:208 +#: upscaler.py:213 msgid "Input is directory but output is existing single file" msgstr "输入是目录,但输出是现有的单个文件" -#: upscaler.py:217 +#: upscaler.py:222 msgid "Input path is neither a file nor a directory" msgstr "输入路径既不是文件也不是目录" -#: upscaler.py:226 +#: upscaler.py:231 msgid "FFmpeg or FFprobe cannot be found under the specified path" msgstr "在指定的路径下找不到 FFmpeg 或 FFprobe" -#: upscaler.py:227 upscaler.py:237 +#: upscaler.py:232 upscaler.py:242 msgid "Please check the configuration file settings" msgstr "请检查配置文件设置" -#: upscaler.py:236 +#: upscaler.py:241 msgid "Specified driver executable directory doesn't exist" msgstr "指定驱动的可执行文件不存在" -#: upscaler.py:263 +#: upscaler.py:268 msgid "Failed to parse driver argument: {}" msgstr "解析驱动程序参数失败:{}" -#: upscaler.py:283 +#: upscaler.py:288 msgid "Unrecognized driver: {}" msgstr "无法识别的驱动名称:{}" -#: upscaler.py:323 +#: upscaler.py:328 msgid "Starting progress monitor" msgstr "启动进度监视器" -#: upscaler.py:328 +#: upscaler.py:333 msgid "Starting upscaled image cleaner" msgstr "启动已放大图像清理程序" -#: upscaler.py:337 upscaler.py:354 +#: upscaler.py:342 upscaler.py:359 msgid "Killing progress monitor" msgstr "终结进度监视器" -#: upscaler.py:340 upscaler.py:357 +#: upscaler.py:345 upscaler.py:362 msgid "Killing upscaled image cleaner" msgstr "终结已放大图像清理程序" -#: upscaler.py:361 +#: upscaler.py:366 msgid "Terminating all processes" msgstr "正在终止所有进程" -#: upscaler.py:368 +#: upscaler.py:373 msgid "Main process waiting for subprocesses to exit" msgstr "主进程开始等待子进程结束" -#: upscaler.py:387 upscaler.py:391 +#: upscaler.py:392 upscaler.py:396 msgid "Subprocess {} exited with code {}" msgstr "子进程 {} 结束,返回码 {}" -#: upscaler.py:397 +#: upscaler.py:402 msgid "Stop signal received" msgstr "收到停止信号" -#: upscaler.py:402 +#: upscaler.py:407 msgid "Subprocess execution ran into an error" msgstr "子进程执行遇到错误" -#: upscaler.py:432 +#: upscaler.py:437 msgid "Loading files into processing queue" msgstr "正在将文件添加到处理队列中" -#: upscaler.py:433 +#: upscaler.py:438 msgid "Input path(s): {}" msgstr "输入路径:{}" -#: upscaler.py:495 +#: upscaler.py:484 +msgid "File MIME type: {}" +msgstr "文件 MIME 类型:{}" + +#: upscaler.py:500 msgid "File {} ({}) neither an image nor a video" msgstr "文件 {} ({}) 既不是图片也不是视频" -#: upscaler.py:496 +#: upscaler.py:501 msgid "Skipping this file" msgstr "将跳过此文件" -#: upscaler.py:521 +#: upscaler.py:526 msgid "Loaded files into processing queue" msgstr "文件已添加到处理队列" -#: upscaler.py:524 +#: upscaler.py:529 msgid "Input file: {}" msgstr "输入文件:{}" -#: upscaler.py:535 -msgid "Starting to upscale image" +#: upscaler.py:541 +msgid "Reading file information" +msgstr "正在读取视频信息" + +#: upscaler.py:550 +msgid "Starting upscaling image" msgstr "开始放大图像" -#: upscaler.py:538 upscaler.py:689 -msgid "Upscaling completed" -msgstr "放大完成" +#: upscaler.py:561 +msgid "Starting upscaling video/GIF" +msgstr "开始放大视频/GIF" -#: upscaler.py:552 -msgid "Reading video information" -msgstr "读取视频信息" - -#: upscaler.py:564 +#: upscaler.py:572 msgid "Aborting: No video stream found" msgstr "程序中止:文件中未找到视频流" -#: upscaler.py:571 -msgid "Framerate: {}" -msgstr "帧率:{}" - -#: upscaler.py:575 +#: upscaler.py:581 msgid "Getting total number of frames in the file" msgstr "正在获取文件中的总帧数" -#: upscaler.py:650 +#: upscaler.py:592 +msgid "Calculating scaling parameters" +msgstr "正在计算缩放参数" + +#: upscaler.py:656 +msgid "Framerate: {}" +msgstr "帧率:{}" + +#: upscaler.py:657 +msgid "Width: {}" +msgstr "宽:{}" + +#: upscaler.py:658 +msgid "Height: {}" +msgstr "高:{}" + +#: upscaler.py:659 +msgid "Total number of frames: {}" +msgstr "总帧数:{}" + +#: upscaler.py:660 +msgid "Output width: {}" +msgstr "输出宽度:{}" + +#: upscaler.py:661 +msgid "Output height: {}" +msgstr "输出高度:{}" + +#: upscaler.py:662 +msgid "Required scale ratio: {}" +msgstr "需要的缩放比例:{}" + +#: upscaler.py:663 msgid "Upscaling jobs queue: {}" msgstr "放大工作队列:{}" -#: upscaler.py:666 +#: upscaler.py:680 msgid "Unsupported pixel format: {}" msgstr "不支持的像素格式:{}" -#: upscaler.py:676 +#: upscaler.py:684 msgid "Starting to upscale extracted frames" msgstr "开始对提取的帧进行放大" -#: upscaler.py:696 +#: upscaler.py:701 +msgid "Upscaling completed" +msgstr "放大完成" + +#: upscaler.py:702 +msgid "Average processing speed: {} seconds per frame" +msgstr "平均处理速度:{} 秒每帧" + +#: upscaler.py:705 +msgid "Lanczos downscaling frames" +msgstr "正在使用 Lanczos 算法缩放图像" + +#: upscaler.py:710 +msgid "Downscaling" +msgstr "正在缩放图像" + +#: upscaler.py:729 +msgid "Exporting image" +msgstr "正在导出图像" + +#: upscaler.py:739 msgid "Converting extracted frames into GIF image" msgstr "正在将提取的帧转换为 GIF" -#: upscaler.py:700 upscaler.py:709 +#: upscaler.py:743 upscaler.py:752 msgid "Conversion completed" msgstr "转换已完成" -#: upscaler.py:705 +#: upscaler.py:748 msgid "Converting extracted frames into video" msgstr "正在将提取的帧转换为视频" -#: upscaler.py:713 +#: upscaler.py:756 msgid "Migrating audio, subtitles and other streams to upscaled video" msgstr "正在将音频、字幕和其他流迁移到放大后的视频" -#: upscaler.py:723 +#: upscaler.py:766 msgid "Failed to migrate streams" msgstr "迁移流失败" -#: upscaler.py:724 +#: upscaler.py:767 msgid "Trying to output video without additional streams" msgstr "正在尝试输出不含其他流的视频" -#: upscaler.py:740 +#: upscaler.py:783 msgid "Output video file exists" msgstr "输出目标文件已存在" -#: upscaler.py:744 +#: upscaler.py:787 msgid "Created temporary directory to contain file" msgstr "为文件创建了临时目录" -#: upscaler.py:747 +#: upscaler.py:790 msgid "Writing intermediate file to: {}" msgstr "正在将中间视频文件写入至:{}" -#: video2x.py:86 +#: video2x.py:85 msgid "" "Video2X CLI Version: {}\n" "Upscaler Version: {}\n" @@ -253,90 +305,91 @@ msgstr "" "GitHub 主页:https://github.com/k4yt3x/video2x\n" "联系方式:k4yt3x@k4yt3x.com" -#: video2x.py:109 +#: video2x.py:108 msgid "Video2X Options" msgstr "Video2X 选项" -#: video2x.py:110 +#: video2x.py:109 msgid "show this help message and exit" msgstr "显示此帮助消息并退出" -#: video2x.py:117 +#: video2x.py:116 msgid "source video file/directory" msgstr "源视频文件/目录" -#: video2x.py:118 +#: video2x.py:117 msgid "output video file/directory" msgstr "输出视频文件/目录" -#: video2x.py:120 -msgid "video2x config file path" -msgstr "video2x 配置文件路径" +#: video2x.py:119 +msgid "Video2X config file path" +msgstr "Video2X 配置文件路径" -#: video2x.py:122 +#: video2x.py:121 msgid "log file path" msgstr "日志文件路径" -#: video2x.py:124 -msgid "disable logging" -msgstr "禁用日志" - -#: video2x.py:125 +#: video2x.py:122 msgid "display version, lawful information and exit" msgstr "显示版本和法律信息并退出" -#: video2x.py:128 +#: video2x.py:125 msgid "Upscaling Options" msgstr "视频放大选项" -#: video2x.py:129 +#: video2x.py:126 msgid "scaling ratio" msgstr "缩放比" -#: video2x.py:130 +#: video2x.py:127 msgid "output width" msgstr "输出宽度" -#: video2x.py:131 +#: video2x.py:128 msgid "output height" msgstr "输出高度" -#: video2x.py:132 +#: video2x.py:129 msgid "upscaling driver" msgstr "视频放大驱动" -#: video2x.py:133 +#: video2x.py:130 msgid "number of processes to use for upscaling" msgstr "并发进程数" -#: video2x.py:134 +#: video2x.py:131 msgid "preserve extracted and upscaled frames" msgstr "保留提取的和放大的帧" -#: video2x.py:174 +#: video2x.py:171 msgid "This file cannot be imported" msgstr "此文件无法被当作模块导入" -#: video2x.py:190 +#: video2x.py:187 msgid "Specify either scaling ratio or scaling resolution, not both" msgstr "您只能指定缩放比或输出分辨率两者之一" -#: video2x.py:194 -msgid "Only one of scaling width and scaling height is specified" -msgstr "输出高度和宽度仅有其中一项被指定" - -#: video2x.py:200 -msgid "Redirecting console logs to {}" -msgstr "将控制台日志重定向到 {}" - -#: video2x.py:276 +#: video2x.py:273 msgid "Program completed, taking {} seconds" msgstr "程序执行完毕,总计花费 {} 秒" -#: video2x.py:279 +#: video2x.py:277 msgid "An exception has occurred" msgstr "发生了异常" +#: video2x.py:292 +msgid "The error log file can be found at: {}" +msgstr "错误日志已被保存到:{}" + +#~ msgid "disable logging" +#~ msgstr "禁用日志" + +#~ msgid "Only one of scaling width and scaling height is specified" +#~ msgstr "输出高度和宽度仅有其中一项被指定" + +#~ msgid "Redirecting console logs to {}" +#~ msgstr "将控制台日志重定向到 {}" + #~ msgid "Upscaling Progress" #~ msgstr "放大进度" diff --git a/src/upscaler.py b/src/upscaler.py index e3a5516..1122361 100755 --- a/src/upscaler.py +++ b/src/upscaler.py @@ -702,12 +702,12 @@ class Upscaler: Avalon.info(_('Average processing speed: {} seconds per frame').format(self.total_frames / (time.time() - upscale_begin_time))) # downscale frames with Lanczos - Avalon.info(_('Lanczos downsampling frames')) + Avalon.info(_('Lanczos downscaling frames')) shutil.rmtree(self.extracted_frames) shutil.move(self.upscaled_frames, self.extracted_frames) self.upscaled_frames.mkdir(parents=True, exist_ok=True) - for image in tqdm([i for i in self.extracted_frames.iterdir() if i.is_file() and i.name.endswith(self.extracted_frame_format)], ascii=True, desc=_('Downsamping')): + for image in tqdm([i for i in self.extracted_frames.iterdir() if i.is_file() and i.name.endswith(self.extracted_frame_format)], ascii=True, desc=_('Downscaling')): image_object = Image.open(image) # if the image dimensions are not equal to the output size diff --git a/src/video2x.pot b/src/video2x.pot index 0e87a0a..1cf333e 100644 --- a/src/video2x.pot +++ b/src/video2x.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2020-09-09 13:04-0400\n" +"POT-Creation-Date: 2020-09-14 14:24-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,223 +19,275 @@ msgstr "" msgid "Processing: {} (pass {}/{})" msgstr "" -#: upscaler.py:144 +#: upscaler.py:149 msgid "Specified or default cache directory is a file/link" msgstr "" -#: upscaler.py:150 +#: upscaler.py:155 msgid "Creating cache directory {}" msgstr "" -#: upscaler.py:153 +#: upscaler.py:158 msgid "Unable to create {}" msgstr "" -#: upscaler.py:158 +#: upscaler.py:163 msgid "Extracted frames are being saved to: {}" msgstr "" -#: upscaler.py:160 +#: upscaler.py:165 msgid "Upscaled frames are being saved to: {}" msgstr "" -#: upscaler.py:170 +#: upscaler.py:175 msgid "Cleaning up cache directory: {}" msgstr "" -#: upscaler.py:175 +#: upscaler.py:180 msgid "Unable to delete: {}" msgstr "" -#: upscaler.py:181 upscaler.py:196 upscaler.py:207 +#: upscaler.py:186 upscaler.py:201 upscaler.py:212 msgid "Input and output path type mismatch" msgstr "" -#: upscaler.py:182 +#: upscaler.py:187 msgid "Input is multiple files but output is not directory" msgstr "" -#: upscaler.py:186 +#: upscaler.py:191 msgid "Input path {} is neither a file nor a directory" msgstr "" -#: upscaler.py:190 upscaler.py:212 +#: upscaler.py:195 upscaler.py:217 msgid "Input directory and output directory cannot be the same" msgstr "" -#: upscaler.py:197 +#: upscaler.py:202 msgid "Input is single file but output is directory" msgstr "" -#: upscaler.py:200 +#: upscaler.py:205 msgid "No suffix found in output file path" msgstr "" -#: upscaler.py:201 +#: upscaler.py:206 msgid "Suffix must be specified" msgstr "" -#: upscaler.py:208 +#: upscaler.py:213 msgid "Input is directory but output is existing single file" msgstr "" -#: upscaler.py:217 +#: upscaler.py:222 msgid "Input path is neither a file nor a directory" msgstr "" -#: upscaler.py:226 +#: upscaler.py:231 msgid "FFmpeg or FFprobe cannot be found under the specified path" msgstr "" -#: upscaler.py:227 upscaler.py:237 +#: upscaler.py:232 upscaler.py:242 msgid "Please check the configuration file settings" msgstr "" -#: upscaler.py:236 +#: upscaler.py:241 msgid "Specified driver executable directory doesn't exist" msgstr "" -#: upscaler.py:263 +#: upscaler.py:268 msgid "Failed to parse driver argument: {}" msgstr "" -#: upscaler.py:283 +#: upscaler.py:288 msgid "Unrecognized driver: {}" msgstr "" -#: upscaler.py:323 +#: upscaler.py:328 msgid "Starting progress monitor" msgstr "" -#: upscaler.py:328 +#: upscaler.py:333 msgid "Starting upscaled image cleaner" msgstr "" -#: upscaler.py:337 upscaler.py:354 +#: upscaler.py:342 upscaler.py:359 msgid "Killing progress monitor" msgstr "" -#: upscaler.py:340 upscaler.py:357 +#: upscaler.py:345 upscaler.py:362 msgid "Killing upscaled image cleaner" msgstr "" -#: upscaler.py:361 +#: upscaler.py:366 msgid "Terminating all processes" msgstr "" -#: upscaler.py:368 +#: upscaler.py:373 msgid "Main process waiting for subprocesses to exit" msgstr "" -#: upscaler.py:387 upscaler.py:391 +#: upscaler.py:392 upscaler.py:396 msgid "Subprocess {} exited with code {}" msgstr "" -#: upscaler.py:397 +#: upscaler.py:402 msgid "Stop signal received" msgstr "" -#: upscaler.py:402 +#: upscaler.py:407 msgid "Subprocess execution ran into an error" msgstr "" -#: upscaler.py:432 +#: upscaler.py:437 msgid "Loading files into processing queue" msgstr "" -#: upscaler.py:433 +#: upscaler.py:438 msgid "Input path(s): {}" msgstr "" -#: upscaler.py:495 +#: upscaler.py:484 +msgid "File MIME type: {}" +msgstr "" + +#: upscaler.py:500 msgid "File {} ({}) neither an image nor a video" msgstr "" -#: upscaler.py:496 +#: upscaler.py:501 msgid "Skipping this file" msgstr "" -#: upscaler.py:521 +#: upscaler.py:526 msgid "Loaded files into processing queue" msgstr "" -#: upscaler.py:524 +#: upscaler.py:529 msgid "Input file: {}" msgstr "" -#: upscaler.py:535 -msgid "Starting to upscale image" +#: upscaler.py:541 +msgid "Reading file information" msgstr "" -#: upscaler.py:538 upscaler.py:689 -msgid "Upscaling completed" +#: upscaler.py:550 +msgid "Starting upscaling image" msgstr "" -#: upscaler.py:552 -msgid "Reading video information" +#: upscaler.py:561 +msgid "Starting upscaling video/GIF" msgstr "" -#: upscaler.py:564 +#: upscaler.py:572 msgid "Aborting: No video stream found" msgstr "" -#: upscaler.py:571 -msgid "Framerate: {}" -msgstr "" - -#: upscaler.py:575 +#: upscaler.py:581 msgid "Getting total number of frames in the file" msgstr "" -#: upscaler.py:650 +#: upscaler.py:592 +msgid "Calculating scaling parameters" +msgstr "" + +#: upscaler.py:656 +msgid "Framerate: {}" +msgstr "" + +#: upscaler.py:657 +msgid "Width: {}" +msgstr "" + +#: upscaler.py:658 +msgid "Height: {}" +msgstr "" + +#: upscaler.py:659 +msgid "Total number of frames: {}" +msgstr "" + +#: upscaler.py:660 +msgid "Output width: {}" +msgstr "" + +#: upscaler.py:661 +msgid "Output height: {}" +msgstr "" + +#: upscaler.py:662 +msgid "Required scale ratio: {}" +msgstr "" + +#: upscaler.py:663 msgid "Upscaling jobs queue: {}" msgstr "" -#: upscaler.py:666 +#: upscaler.py:680 msgid "Unsupported pixel format: {}" msgstr "" -#: upscaler.py:676 +#: upscaler.py:684 msgid "Starting to upscale extracted frames" msgstr "" -#: upscaler.py:696 -msgid "Converting extracted frames into GIF image" +#: upscaler.py:701 +msgid "Upscaling completed" msgstr "" -#: upscaler.py:700 upscaler.py:709 -msgid "Conversion completed" +#: upscaler.py:702 +msgid "Average processing speed: {} seconds per frame" msgstr "" #: upscaler.py:705 +msgid "Lanczos downscaling frames" +msgstr "" + +#: upscaler.py:710 +msgid "Downscaling" +msgstr "" + +#: upscaler.py:729 +msgid "Exporting image" +msgstr "" + +#: upscaler.py:739 +msgid "Converting extracted frames into GIF image" +msgstr "" + +#: upscaler.py:743 upscaler.py:752 +msgid "Conversion completed" +msgstr "" + +#: upscaler.py:748 msgid "Converting extracted frames into video" msgstr "" -#: upscaler.py:713 +#: upscaler.py:756 msgid "Migrating audio, subtitles and other streams to upscaled video" msgstr "" -#: upscaler.py:723 +#: upscaler.py:766 msgid "Failed to migrate streams" msgstr "" -#: upscaler.py:724 +#: upscaler.py:767 msgid "Trying to output video without additional streams" msgstr "" -#: upscaler.py:740 +#: upscaler.py:783 msgid "Output video file exists" msgstr "" -#: upscaler.py:744 +#: upscaler.py:787 msgid "Created temporary directory to contain file" msgstr "" -#: upscaler.py:747 +#: upscaler.py:790 msgid "Writing intermediate file to: {}" msgstr "" -#: video2x.py:86 +#: video2x.py:85 msgid "" "Video2X CLI Version: {}\n" "Upscaler Version: {}\n" @@ -245,87 +297,79 @@ msgid "" "Contact: k4yt3x@k4yt3x.com" msgstr "" -#: video2x.py:109 +#: video2x.py:108 msgid "Video2X Options" msgstr "" -#: video2x.py:110 +#: video2x.py:109 msgid "show this help message and exit" msgstr "" -#: video2x.py:117 +#: video2x.py:116 msgid "source video file/directory" msgstr "" -#: video2x.py:118 +#: video2x.py:117 msgid "output video file/directory" msgstr "" -#: video2x.py:120 -msgid "video2x config file path" +#: video2x.py:119 +msgid "Video2X config file path" msgstr "" -#: video2x.py:122 +#: video2x.py:121 msgid "log file path" msgstr "" -#: video2x.py:124 -msgid "disable logging" -msgstr "" - -#: video2x.py:125 +#: video2x.py:122 msgid "display version, lawful information and exit" msgstr "" -#: video2x.py:128 +#: video2x.py:125 msgid "Upscaling Options" msgstr "" -#: video2x.py:129 +#: video2x.py:126 msgid "scaling ratio" msgstr "" -#: video2x.py:130 +#: video2x.py:127 msgid "output width" msgstr "" -#: video2x.py:131 +#: video2x.py:128 msgid "output height" msgstr "" -#: video2x.py:132 +#: video2x.py:129 msgid "upscaling driver" msgstr "" -#: video2x.py:133 +#: video2x.py:130 msgid "number of processes to use for upscaling" msgstr "" -#: video2x.py:134 +#: video2x.py:131 msgid "preserve extracted and upscaled frames" msgstr "" -#: video2x.py:174 +#: video2x.py:171 msgid "This file cannot be imported" msgstr "" -#: video2x.py:190 +#: video2x.py:187 msgid "Specify either scaling ratio or scaling resolution, not both" msgstr "" -#: video2x.py:194 -msgid "Only one of scaling width and scaling height is specified" -msgstr "" - -#: video2x.py:200 -msgid "Redirecting console logs to {}" -msgstr "" - -#: video2x.py:276 +#: video2x.py:273 msgid "Program completed, taking {} seconds" msgstr "" -#: video2x.py:279 +#: video2x.py:277 msgid "An exception has occurred" msgstr "" +#: video2x.py:292 +msgid "The error log file can be found at: {}" +msgstr "" + diff --git a/src/video2x.py b/src/video2x.py index a475116..c2e6ed9 100755 --- a/src/video2x.py +++ b/src/video2x.py @@ -116,7 +116,7 @@ def parse_arguments(): video2x_options.add_argument('-i', '--input', type=pathlib.Path, help=_('source video file/directory'), required=require_input_output) video2x_options.add_argument('-o', '--output', type=pathlib.Path, help=_('output video file/directory'), required=require_input_output) - video2x_options.add_argument('-c', '--config', type=pathlib.Path, help=_('video2x config file path'), action='store', + video2x_options.add_argument('-c', '--config', type=pathlib.Path, help=_('Video2X config file path'), action='store', default=pathlib.Path(__file__).parent.absolute() / 'video2x.yaml') video2x_options.add_argument('--log', type=pathlib.Path, help=_('log file path')) video2x_options.add_argument('-v', '--version', help=_('display version, lawful information and exit'), action='store_true')