Kaynağa Gözat

文案-补充部分新增文案

ZhouJieSheng 1 yıl önce
ebeveyn
işleme
0e24fc0ef6

+ 14 - 2
PDF Office/MultilingualResources/PDF Office.en.xlf

@@ -2321,8 +2321,8 @@ The file format you selected is not supported by this feature, please select the
           <target state="new">The current file is fixed. Please save it by Save As.</target>
         </trans-unit>
         <trans-unit id="NoOffice_Warning" translate="yes" xml:space="preserve">
-          <source>{0} file could not be open. Please try again or choose another file.</source>
-          <target state="new">{0} file could not be open. Please try again or choose another file.</target>
+          <source>Please install Microsoft Office to create PDFs from Office files</source>
+          <target state="new">Please install Microsoft Office to create PDFs from Office files</target>
           <note from="MultilingualBuild" annotates="source" priority="2">没有安装office,无法从office创建文档时</note>
         </trans-unit>
         <trans-unit id="OperationFailWarning" translate="yes" xml:space="preserve">
@@ -2578,6 +2578,18 @@ Whether to continue?</target>
           <source>The target page is invalid, please relocate it.</source>
           <target state="new">The target page is invalid, please relocate it.</target>
         </trans-unit>
+        <trans-unit id="NoPasswrod_Waring" translate="yes" xml:space="preserve">
+          <source>This file is not password protected. No password needs to be removed.</source>
+          <target state="new">This file is not password protected. No password needs to be removed.</target>
+        </trans-unit>
+        <trans-unit id="NoPrinter_Warning" translate="yes" xml:space="preserve">
+          <source>Printer busy or error</source>
+          <target state="new">Printer busy or error</target>
+        </trans-unit>
+        <trans-unit id="Tip_ReversePage" translate="yes" xml:space="preserve">
+          <source>Please turn the stack over, and click "OK" to print the second side.</source>
+          <target state="new">Please turn the stack over, and click "OK" to print the second side.</target>
+        </trans-unit>
       </group>
     </body>
   </file>

+ 14 - 2
PDF Office/MultilingualResources/PDF Office.zh-Hans.xlf

@@ -2321,8 +2321,8 @@ The file format you selected is not supported by this feature, please select the
           <target state="new">The current file is fixed. Please save it by Save As.</target>
         </trans-unit>
         <trans-unit id="NoOffice_Warning" translate="yes" xml:space="preserve">
-          <source>{0} file could not be open. Please try again or choose another file.</source>
-          <target state="new">{0} file could not be open. Please try again or choose another file.</target>
+          <source>Please install Microsoft Office to create PDFs from Office files</source>
+          <target state="new">Please install Microsoft Office to create PDFs from Office files</target>
           <note from="MultilingualBuild" annotates="source" priority="2">没有安装office,无法从office创建文档时</note>
         </trans-unit>
         <trans-unit id="OperationFailWarning" translate="yes" xml:space="preserve">
@@ -2578,6 +2578,18 @@ Whether to continue?</target>
           <source>The target page is invalid, please relocate it.</source>
           <target state="new">The target page is invalid, please relocate it.</target>
         </trans-unit>
+        <trans-unit id="NoPasswrod_Waring" translate="yes" xml:space="preserve">
+          <source>This file is not password protected. No password needs to be removed.</source>
+          <target state="new">This file is not password protected. No password needs to be removed.</target>
+        </trans-unit>
+        <trans-unit id="NoPrinter_Warning" translate="yes" xml:space="preserve">
+          <source>Printer busy or error</source>
+          <target state="new">Printer busy or error</target>
+        </trans-unit>
+        <trans-unit id="Tip_ReversePage" translate="yes" xml:space="preserve">
+          <source>Please turn the stack over, and click "OK" to print the second side.</source>
+          <target state="new">Please turn the stack over, and click "OK" to print the second side.</target>
+        </trans-unit>
       </group>
     </body>
   </file>

+ 14 - 2
PDF Office/MultilingualResources/PDF Office.zh-Hant.xlf

@@ -2321,8 +2321,8 @@ The file format you selected is not supported by this feature, please select the
           <target state="new">The current file is fixed. Please save it by Save As.</target>
         </trans-unit>
         <trans-unit id="NoOffice_Warning" translate="yes" xml:space="preserve">
-          <source>{0} file could not be open. Please try again or choose another file.</source>
-          <target state="new">{0} file could not be open. Please try again or choose another file.</target>
+          <source>Please install Microsoft Office to create PDFs from Office files</source>
+          <target state="new">Please install Microsoft Office to create PDFs from Office files</target>
           <note from="MultilingualBuild" annotates="source" priority="2">没有安装office,无法从office创建文档时</note>
         </trans-unit>
         <trans-unit id="OperationFailWarning" translate="yes" xml:space="preserve">
@@ -2578,6 +2578,18 @@ Whether to continue?</target>
           <source>The target page is invalid, please relocate it.</source>
           <target state="new">The target page is invalid, please relocate it.</target>
         </trans-unit>
+        <trans-unit id="NoPasswrod_Waring" translate="yes" xml:space="preserve">
+          <source>This file is not password protected. No password needs to be removed.</source>
+          <target state="new">This file is not password protected. No password needs to be removed.</target>
+        </trans-unit>
+        <trans-unit id="NoPrinter_Warning" translate="yes" xml:space="preserve">
+          <source>Printer busy or error</source>
+          <target state="new">Printer busy or error</target>
+        </trans-unit>
+        <trans-unit id="Tip_ReversePage" translate="yes" xml:space="preserve">
+          <source>Please turn the stack over, and click "OK" to print the second side.</source>
+          <target state="new">Please turn the stack over, and click "OK" to print the second side.</target>
+        </trans-unit>
       </group>
     </body>
   </file>

+ 28 - 1
PDF Office/Strings/MainPage/MainPage.Designer.cs

@@ -1328,7 +1328,7 @@ namespace PDF_Master.Strings.MainPage {
         }
         
         /// <summary>
-        ///   查找类似 {0} file could not be open. Please try again or choose another file. 的本地化字符串。
+        ///   查找类似 Please install Microsoft Office to create PDFs from Office files 的本地化字符串。
         /// </summary>
         public static string NoOffice_Warning {
             get {
@@ -1336,6 +1336,24 @@ namespace PDF_Master.Strings.MainPage {
             }
         }
         
+        /// <summary>
+        ///   查找类似 This file is not password protected. No password needs to be removed. 的本地化字符串。
+        /// </summary>
+        public static string NoPasswrod_Waring {
+            get {
+                return ResourceManager.GetString("NoPasswrod_Waring", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   查找类似 Printer busy or error 的本地化字符串。
+        /// </summary>
+        public static string NoPrinter_Warning {
+            get {
+                return ResourceManager.GetString("NoPrinter_Warning", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 Opacity 的本地化字符串。
         /// </summary>
@@ -2635,6 +2653,15 @@ namespace PDF_Master.Strings.MainPage {
             }
         }
         
+        /// <summary>
+        ///   查找类似 Please turn the stack over, and click &quot;OK&quot; to print the second side. 的本地化字符串。
+        /// </summary>
+        public static string Tip_ReversePage {
+            get {
+                return ResourceManager.GetString("Tip_ReversePage", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 Remove Restrictions 的本地化字符串。
         /// </summary>

+ 10 - 1
PDF Office/Strings/MainPage/MainPage.resx

@@ -581,9 +581,15 @@ Drag files to reorder as you need.</value>
     <comment>右键菜单-重命名</comment>
   </data>
   <data name="NoOffice_Warning" xml:space="preserve">
-    <value>{0} file could not be open. Please try again or choose another file.</value>
+    <value>Please install Microsoft Office to create PDFs from Office files</value>
     <comment>没有安装office,无法从office创建文档时</comment>
   </data>
+  <data name="NoPasswrod_Waring" xml:space="preserve">
+    <value>This file is not password protected. No password needs to be removed.</value>
+  </data>
+  <data name="NoPrinter_Warning" xml:space="preserve">
+    <value>Printer busy or error</value>
+  </data>
   <data name="Opacity_Title" xml:space="preserve">
     <value>Opacity</value>
     <comment>点击水滴按钮打开的透明度弹窗标题</comment>
@@ -1053,6 +1059,9 @@ Some functions may not work, please restart or re-download PDF Reader Pro from o
   <data name="TipContent_RestrictedTitle" xml:space="preserve">
     <value>File Restricted</value>
   </data>
+  <data name="Tip_ReversePage" xml:space="preserve">
+    <value>Please turn the stack over, and click "OK" to print the second side.</value>
+  </data>
   <data name="ToolsBar_Compress" xml:space="preserve">
     <value>Compress</value>
   </data>

+ 2 - 2
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDialogViewModel.cs

@@ -1087,7 +1087,7 @@ namespace PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                             this.printEvent.GetEvent<SendPrintQueueEvent>().Publish(new PrintQueueWithUnicode { printQueue = this.printQueue, EnumBothSidesStage = EnumBothSidesStage.StatusFrontSide, Unicode = this.Unicode });
                             if (FinishedFrontSideFlag)
                             {
-                                alertsMessage.ShowDialog("Message", "Printing on the front side of the paper is complete. Please reverse the paper, click 'OK' to print the reverse side", "Cancel", "OK");
+                                alertsMessage.ShowDialog("", App.MainPageLoader.GetString("Tip_ReversePage"), App.ServiceLoader.GetString("Text_cancel"), App.ServiceLoader.GetString("Text_ok"));
                                 if (alertsMessage.result == ContentResult.Ok)
                                 {
                                     this.printEvent.GetEvent<SendPrintQueueEvent>().Publish(new PrintQueueWithUnicode { printQueue = this.printQueue, EnumBothSidesStage = EnumBothSidesStage.StatusBackSide, Unicode = this.Unicode });
@@ -1101,7 +1101,7 @@ namespace PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                         this.printEvent.GetEvent<SendPrintQueueEvent>().Publish(new PrintQueueWithUnicode { printQueue = this.printQueue, EnumBothSidesStage = EnumBothSidesStage.StatusFrontSide, Unicode = this.Unicode });
                         if (FinishedFrontSideFlag)
                         {
-                            alertsMessage.ShowDialog("Message", "Printing on the front side of the paper is complete. Please reverse the paper, click 'OK' to print the reverse side", "Cancel", "OK");
+                            alertsMessage.ShowDialog("", App.MainPageLoader.GetString("Tip_ReversePage"), App.ServiceLoader.GetString("Text_cancel"), App.ServiceLoader.GetString("Text_ok"));
                             if (alertsMessage.result == ContentResult.Ok)
                             {
                                 this.printEvent.GetEvent<SendPrintQueueEvent>().Publish(new PrintQueueWithUnicode { printQueue = this.printQueue, EnumBothSidesStage = EnumBothSidesStage.StatusBackSide, Unicode = this.Unicode });

+ 1 - 1
PDF Office/ViewModels/Dialog/HomePageToolsDialogs/HomePagePrinter/HomePagePrinterDocumentContentViewModel.cs

@@ -346,7 +346,7 @@ namespace PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter
                 catch
                 {
                     AlertsMessage alertsMessage = new AlertsMessage();
-                    alertsMessage.ShowDialog("错误", "另一个线程正在占用该打印机,或发生未知错误", "确定");
+                    alertsMessage.ShowDialog("", App.MainPageLoader.GetString("NoPrinter_Warning"), App.ServiceLoader.GetString("Text_ok"));
                 }
                 finally
                 {

+ 1 - 1
PDF Office/ViewModels/MainContentViewModel.cs

@@ -545,7 +545,7 @@ namespace PDF_Master.ViewModels
                 if (str != "没有安装")
                 {
 
-                    alertsMessage.ShowDialog("", string.Format(App.MainPageLoader.GetString("NoOffice_Warning"), System.IO.Path.GetExtension(sourcepath)), App.ServiceLoader.GetString("Text_ok"));
+                    alertsMessage.ShowDialog("",App.MainPageLoader.GetString("NoOffice_Warning"), App.ServiceLoader.GetString("Text_ok"));
                 }
                 else
                 {

+ 1 - 1
PDF Office/ViewModels/Tools/ToolsBarContentViewModel.cs

@@ -300,7 +300,7 @@ namespace PDF_Master.ViewModels.Tools
             if ((!PDFViewer.Document.IsEncrypted && !viewContentViewModel.SecurityInfo.IsPasswordChanged) || (viewContentViewModel.SecurityInfo.IsPasswordRemoved))
             {
                 AlertsMessage alertsMessage = new AlertsMessage();
-                alertsMessage.ShowDialog("Message", "No security settings available ", "OK");
+                alertsMessage.ShowDialog("", App.MainPageLoader.GetString("NoPasswrod_Waring"), App.ServiceLoader.GetString("Text_ok"));
             }
             else
             {

+ 8 - 4
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -1206,7 +1206,7 @@ namespace PDF_Master.ViewModels
             if ((!PDFViewer.Document.IsEncrypted && !SecurityInfo.IsPasswordChanged) || (SecurityInfo.IsPasswordRemoved))
             {
                 AlertsMessage alertsMessage = new AlertsMessage();
-                alertsMessage.ShowDialog("", "No security settings available ", "OK");
+                alertsMessage.ShowDialog("", App.MainPageLoader.GetString("NoPasswrod_Waring"), App.ServiceLoader.GetString("Text_ok"));
             }
             else
             {
@@ -2567,10 +2567,14 @@ namespace PDF_Master.ViewModels
                 else
                 {
                     //弹窗前 激活主窗体
-                    App.Current.MainWindow.Activate();
+                    //App.Current.MainWindow.Activate();
                     AlertsMessage alertsMessage = new AlertsMessage();
-                    //文件被占用 保存失败时
-                    alertsMessage.ShowDialog("", App.MainPageLoader.GetString("Main_TheFileOccupiedWarning"), App.ServiceLoader.GetString("Text_cancel"), App.ServiceLoader.GetString("Text_ok"));
+                    System.Windows.Application.Current.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Send, new Action(() =>
+                    {
+
+                        //文件被占用 保存失败时
+                        alertsMessage.ShowDialog("", App.MainPageLoader.GetString("Main_TheFileOccupiedWarning"), App.ServiceLoader.GetString("Text_cancel"), App.ServiceLoader.GetString("Text_ok"));
+                    }));
                     if (alertsMessage.result == ContentResult.Ok)
                         return saveAsFile();
                     else

+ 1 - 0
PDF Office/Views/MainWindow.xaml

@@ -18,6 +18,7 @@
     d:DataContext="{d:DesignInstance Type=viewmodels:MainWindowViewModel}"
     prism:ViewModelLocator.AutoWireViewModel="True"
     Activated="Window_Activated"
+    SnapsToDevicePixels="True"
     BorderBrush="{StaticResource color.sys.layout.bg.tabbar}"
     BorderThickness="2"
     Closed="Window_Closed"