Explorar el Código

AI翻译-高保真文案修复

liyijie hace 1 año
padre
commit
d88eb58dd3

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

@@ -1166,6 +1166,14 @@ per month.</target>
           <source>Network error</source>
           <target state="new">Network error</target>
         </trans-unit>
+        <trans-unit id="AISelectTranslationBtn_LimitTip" translate="yes" xml:space="preserve">
+          <source>Limit document size to 10M, document 
+page number to 30, 10w characters per 
+month.</source>
+          <target state="new">Limit document size to 10M, document 
+page number to 30, 10w characters per 
+month.</target>
+        </trans-unit>
       </group>
     </body>
   </file>

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

@@ -1166,6 +1166,14 @@ per month.</target>
           <source>Network error</source>
           <target state="new">Network error</target>
         </trans-unit>
+        <trans-unit id="AISelectTranslationBtn_LimitTip" translate="yes" xml:space="preserve">
+          <source>Limit document size to 10M, document 
+page number to 30, 10w characters per 
+month.</source>
+          <target state="new">Limit document size to 10M, document 
+page number to 30, 10w characters per 
+month.</target>
+        </trans-unit>
       </group>
     </body>
   </file>

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

@@ -1166,6 +1166,14 @@ per month.</target>
           <source>Network error</source>
           <target state="new">Network error</target>
         </trans-unit>
+        <trans-unit id="AISelectTranslationBtn_LimitTip" translate="yes" xml:space="preserve">
+          <source>Limit document size to 10M, document 
+page number to 30, 10w characters per 
+month.</source>
+          <target state="new">Limit document size to 10M, document 
+page number to 30, 10w characters per 
+month.</target>
+        </trans-unit>
       </group>
     </body>
   </file>

+ 11 - 0
PDF Office/Strings/HomePage/HomePage.Designer.cs

@@ -96,6 +96,17 @@ namespace PDF_Master.Strings.HomePage {
             }
         }
         
+        /// <summary>
+        ///   查找类似 Limit document size to 10M, document 
+        ///page number to 30, 10w characters per 
+        ///month. 的本地化字符串。
+        /// </summary>
+        public static string AISelectTranslationBtn_LimitTip {
+            get {
+                return ResourceManager.GetString("AISelectTranslationBtn_LimitTip", resourceCulture);
+            }
+        }
+        
         /// <summary>
         ///   查找类似 Limit document size to 10M, document page number to 30, 10w characters 
         ///per month. 的本地化字符串。

+ 5 - 0
PDF Office/Strings/HomePage/HomePage.resx

@@ -129,6 +129,11 @@
   <data name="AIRewriteBtn_Title" xml:space="preserve">
     <value>AI Rewriting</value>
   </data>
+  <data name="AISelectTranslationBtn_LimitTip" xml:space="preserve">
+    <value>Limit document size to 10M, document 
+page number to 30, 10w characters per 
+month.</value>
+  </data>
   <data name="AITranslationBtn_DropTip" xml:space="preserve">
     <value>or drop file here</value>
   </data>

+ 1 - 1
PDF Office/ViewModels/Dialog/ChatGPTAIDialogs/SelectedTranslationDialogViewModel.cs

@@ -103,7 +103,7 @@ namespace PDF_Master.ViewModels.Dialog.ChatGPTAIDialogs
         private void InitString()
         {
             T_Title = App.HomePageLoader.GetString("ViewRightMenuText_AITranslationTitle");
-            T_LimitTip = App.HomePageLoader.GetString("AITranslationBtn_LimitTip");
+            T_LimitTip = App.HomePageLoader.GetString("AISelectTranslationBtn_LimitTip");
             T_TextBoxWatermark = App.HomePageLoader.GetString("ChatGTPAI_TextBoxWatermark");
             T_TranslationLanguage = App.HomePageLoader.GetString("AITranslationBtn_TranslationLanguage");
             T_Copy = App.HomePageLoader.GetString("ChatGTPAI_Copy");

+ 6 - 4
PDF Office/Views/Dialog/ChatGPTAIDialogs/SelectedTranslationDialog.xaml

@@ -74,8 +74,10 @@
             Foreground="{StaticResource color.sys.text.neutral.lv1}" Height="28"></TextBlock>
                 <Grid Width="16" Height="16" Margin="4,0,0,4" WindowChrome.IsHitTestVisibleInChrome="True">
                     <Grid.ToolTip>
-                        <ToolTip Background="White">
-                            <TextBlock FontWeight="Bold"  Text="{Binding T_LimitTip}" />
+                        <ToolTip Background="Transparent" BorderBrush="Transparent">
+                            <Border Background="{StaticResource color.sys.layout.dark.bg}" Width="255" Height="66" CornerRadius="4"> 
+                                <TextBlock  Foreground="{StaticResource color.sys.text.anti.norm}"  VerticalAlignment="Center" HorizontalAlignment="Center" Width="240"  FontSize="12"  Text="{Binding T_LimitTip}" />
+                            </Border>
                         </ToolTip>
                     </Grid.ToolTip>
                     <Ellipse Width="14" Height="14"  Fill="white" Stroke="#CED0D4">
@@ -126,11 +128,11 @@
                         <Grid>
                             <Border Width="250" Height="180" Margin="16,0,0,0"  Panel.ZIndex="1" BorderBrush="{StaticResource color.field.border.error}"  Visibility="{Binding ErrorVisible}" BorderThickness="1" CornerRadius="4"  >
                                 <StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="16">
-                                    <Grid Width="16" Height="16" Margin="4,0,8,0">
+                                    <Grid Width="16" Height="16" Margin="4,0,8,0" VerticalAlignment="Top"> 
                                         <Ellipse Width="14" Height="14" Fill="#F3465B"></Ellipse>
                                         <Path  Data="M7.25 4V9H8.75V4H7.25ZM7.25 10.5V12H8.75L8.75 10.5H7.25Z" Fill="white"/>
                                     </Grid>
-                                    <TextBlock Text="{Binding ErrorTipText}" FontSize="14" FontFamily="SF Pro Text" Foreground="#F3465B" VerticalAlignment="Center"></TextBlock>
+                                    <TextBlock Text="{Binding ErrorTipText}" FontSize="14" FontFamily="SF Pro Text" Foreground="#F3465B" VerticalAlignment="Center" TextWrapping="Wrap" Width="180"></TextBlock>
                                 </StackPanel>
                             </Border>
                             <cus:TextBoxEx x:Name="TranslateTextBoxEx" Width="250" Height="180" Margin="16,0,0,0" Text="{Binding TranslateText}" FontFamily="Segoe UI" ShowClose="False" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" Padding="8" IsReadOnly="True">