Browse Source

文案-补充解密弹窗、打开文件失败、页面编辑操作失败提示文案

ZhouJieSheng 1 year ago
parent
commit
0a934f6706

+ 8 - 0
PDF Office/MultilingualResources/PDF Office.en.xlf

@@ -2588,6 +2588,14 @@ Some functions may not work, please restart or re-download PDF Reader Pro from o
           <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>
+        <trans-unit id="Main_OpenFileFailedWarning" translate="yes" xml:space="preserve">
+          <source>The file cannot be opened because the file format or file extension is invalid. Please make sure the file is not damaged and the file extension matches the file format.</source>
+          <target state="new">The file cannot be opened because the file format or file extension is invalid. Please make sure the file is not damaged and the file extension matches the file format.</target>
+        </trans-unit>
+        <trans-unit id="OpentonFail_Warning" translate="yes" xml:space="preserve">
+          <source>Operation failed, try again please</source>
+          <target state="new">Operation failed, try again please</target>
+        </trans-unit>
       </group>
     </body>
   </file>

+ 8 - 0
PDF Office/MultilingualResources/PDF Office.zh-Hans.xlf

@@ -2588,6 +2588,14 @@ Some functions may not work, please restart or re-download PDF Reader Pro from o
           <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>
+        <trans-unit id="Main_OpenFileFailedWarning" translate="yes" xml:space="preserve">
+          <source>The file cannot be opened because the file format or file extension is invalid. Please make sure the file is not damaged and the file extension matches the file format.</source>
+          <target state="new">The file cannot be opened because the file format or file extension is invalid. Please make sure the file is not damaged and the file extension matches the file format.</target>
+        </trans-unit>
+        <trans-unit id="OpentonFail_Warning" translate="yes" xml:space="preserve">
+          <source>Operation failed, try again please</source>
+          <target state="new">Operation failed, try again please</target>
+        </trans-unit>
       </group>
     </body>
   </file>

+ 8 - 0
PDF Office/MultilingualResources/PDF Office.zh-Hant.xlf

@@ -2588,6 +2588,14 @@ Some functions may not work, please restart or re-download PDF Reader Pro from o
           <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>
+        <trans-unit id="Main_OpenFileFailedWarning" translate="yes" xml:space="preserve">
+          <source>The file cannot be opened because the file format or file extension is invalid. Please make sure the file is not damaged and the file extension matches the file format.</source>
+          <target state="new">The file cannot be opened because the file format or file extension is invalid. Please make sure the file is not damaged and the file extension matches the file format.</target>
+        </trans-unit>
+        <trans-unit id="OpentonFail_Warning" translate="yes" xml:space="preserve">
+          <source>Operation failed, try again please</source>
+          <target state="new">Operation failed, try again please</target>
+        </trans-unit>
       </group>
     </body>
   </file>

+ 18 - 0
PDF Office/Strings/MainPage/MainPage.Designer.cs

@@ -1001,6 +1001,15 @@ namespace PDF_Master.Strings.MainPage {
             }
         }
         
+        /// <summary>
+        ///   查找类似 The file cannot be opened because the file format or file extension is invalid. Please make sure the file is not damaged and the file extension matches the file format. 的本地化字符串。
+        /// </summary>
+        public static string Main_OpenFileFailedWarning {
+            get {
+                return ResourceManager.GetString("Main_OpenFileFailedWarning", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 Sorry, we couldn&apos;t find this PDF file. Is it possible it was moved, renamed or deleted? 的本地化字符串。
         /// </summary>
@@ -1363,6 +1372,15 @@ namespace PDF_Master.Strings.MainPage {
             }
         }
         
+        /// <summary>
+        ///   查找类似 Operation failed, try again please 的本地化字符串。
+        /// </summary>
+        public static string OpentonFail_Warning {
+            get {
+                return ResourceManager.GetString("OpentonFail_Warning", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 Operation failed, try again please 的本地化字符串。
         /// </summary>

+ 6 - 0
PDF Office/Strings/MainPage/MainPage.resx

@@ -493,6 +493,9 @@ The file format you selected is not supported by this feature, please select the
     <value>Want to save your changes to '{0}' ?
  Your changes will be lost if you don't save them.</value>
   </data>
+  <data name="Main_OpenFileFailedWarning" xml:space="preserve">
+    <value>The file cannot be opened because the file format or file extension is invalid. Please make sure the file is not damaged and the file extension matches the file format.</value>
+  </data>
   <data name="Main_TheFileNotExistWarning" xml:space="preserve">
     <value>Sorry, we couldn't find this PDF file. Is it possible it was moved, renamed or deleted?</value>
   </data>
@@ -594,6 +597,9 @@ Drag files to reorder as you need.</value>
     <value>Opacity</value>
     <comment>点击水滴按钮打开的透明度弹窗标题</comment>
   </data>
+  <data name="OpentonFail_Warning" xml:space="preserve">
+    <value>Operation failed, try again please</value>
+  </data>
   <data name="OperationFailWarning" xml:space="preserve">
     <value>Operation failed, try again please</value>
     <comment>各种操作失败时,统一提示文案</comment>

+ 2 - 1
PDF Office/ViewModels/Dialog/ToolsDialogs/SaftyDialogs/CheckPasswordDialogViewModel.cs

@@ -196,7 +196,8 @@ namespace PDF_Master.ViewModels.Dialog.ToolsDialogs.SaftyDialogs
                 }
                 InputPasswordMsg = "\"" + document.FileName + ".pdf\"" + " is protected, please enter a Document Password.";
                 CheckPasswordMsg = "Password";
-                ErrorPasswordMsg = "Tips Text";
+                //跟登陆窗口,错误密码的提示保持一致
+                ErrorPasswordMsg = App.ServiceLoader.GetString("code311"); ;
             }
         }
         #endregion

+ 2 - 0
PDF Office/ViewModels/MainContentViewModel.cs

@@ -311,6 +311,8 @@ namespace PDF_Master.ViewModels
             var result = LoadFileFormPath(filePath);
             if (!result)
             {
+                AlertsMessage alertsMessage = new AlertsMessage();
+                alertsMessage.ShowDialog("",App.MainPageLoader.GetString("Main_OpenFileFailedWarning"), App.ServiceLoader.GetString("Text_ok"));
                 return;
             }
             FilePath = filePath;

+ 4 - 4
PDF Office/ViewModels/PageEdit/PageEditContentViewModel.cs

@@ -1183,7 +1183,7 @@ namespace PDF_Master.ViewModels.PageEdit
             bool result = CacheFilePath.Instance.CopyDoc.ImportPages(PDFViewer.Document, String.Join(",", pages));
             if (!result)
             {
-                ShowToast("复制失败");
+                ShowToast();
                 return;
             }
 
@@ -1226,7 +1226,7 @@ namespace PDF_Master.ViewModels.PageEdit
                 bool result = CacheFilePath.Instance.CopyDoc.ImportPages(PDFViewer.Document, String.Join(",", pages));
                 if (!result)
                 {
-                    ShowToast("复制失败");
+                    ShowToast();
                     return;
                 }
             }
@@ -1275,7 +1275,7 @@ namespace PDF_Master.ViewModels.PageEdit
             if (!result)
             {
                 IsLoading = Visibility.Collapsed;
-                ShowToast("粘贴失败");
+                ShowToast();
                 return;
             }
 
@@ -1448,7 +1448,7 @@ namespace PDF_Master.ViewModels.PageEdit
             }
             else
             {
-                ToastText = "操作失败";
+                ToastText =App.MainPageLoader.GetString("OpentonFail_Warning");
             }
             ShowTip = Visibility.Visible;
         }

+ 3 - 2
PDF Office/Views/Dialog/ToolsDialogs/SaftyDialogs/CheckPasswordDialog.xaml

@@ -6,10 +6,10 @@
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
     xmlns:help="clr-namespace:PDF_Master.Helper"
     xmlns:prism="http://prismlibrary.com/"
-    Loaded="UserControl_Loaded"
     xmlns:saftydialogs="clr-namespace:PDF_Master.ViewModels.Dialog.ToolsDialogs.SaftyDialogs"
     prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
-    prism:ViewModelLocator.AutoWireViewModel="True">
+    prism:ViewModelLocator.AutoWireViewModel="True"
+    Loaded="UserControl_Loaded">
     <UserControl.Resources>
         <Style x:Key="CheckPasswordBoxStyle" TargetType="PasswordBox">
             <Setter Property="Height" Value="32" />
@@ -144,6 +144,7 @@
                         <TextBlock
                             Foreground="#F3465B"
                             Text="{Binding ErrorPasswordMsg, Mode=TwoWay}"
+                            TextWrapping="Wrap"
                             Visibility="{Binding ErrorPasswordMsgVisibility, Mode=TwoWay}" />
                     </Grid>
                 </Grid>