Răsfoiți Sursa

Localized menu items

Krzysztof Krysiński 2 ani în urmă
părinte
comite
4b3a40bba4

+ 20 - 2
src/PixiEditor/Data/Localization/Languages/en.json

@@ -72,6 +72,7 @@
   "VERSION": "Version {0}",
 
   "DEBUG": "Debug",
+  "OPEN_COMMAND_DEBUG_WINDOW": "Open command debug window",
   "ENABLE_DEBUG_MODE": "Enable Debug mode",
   "OPEN_CRASH_REPORTS_DIR": "Open crash reports directory",
   "OPEN_TEMP_DIR": "Open temp directory",
@@ -82,8 +83,12 @@
   "DUMP_ALL_COMMANDS_DESCRIPTIVE": "Dump all commands to a text file",
   "CRASH": "Crash",
   "CRASH_APP": "Crash application",
+  "DELETE": "Delete",
+  "USER_PREFS": "User preferences (Roaming)",
   "DELETE_USR_PREFS": "Delete user preferences (Roaming AppData)",
+  "SHORTCUT_FILE": "Shortcut file (Roaming)",
   "DELETE_SHORTCUT_FILE": "Delete shortcut file (Roaming AppData)",
+  "EDITOR_DATA": "Editor data (Local)",
   "DELETE_EDITOR_DATA": "Delete editor data (Local AppData)",
 
   "GENERATE_KEY_BINDINGS_TEMPLATE": "Generate key bindings template",
@@ -114,7 +119,8 @@
   "SHOW_IMAGE_NAME": "Show image name",
   "SHOW_IMAGE_SIZE": "Show image size",
   "SHOW_LAYER_COUNT": "Show layer count",
-  
+
+  "ABOUT": "About",
   "ABOUT_ME": "ABOUT ME",
   "BOT_DESCRIPTION": "Use me to display your .pixi files in Discord.\nStart by sending a file in any appropriate channel",
   "MEMBER_SINCE": "DISCORD MEMBER SINCE",
@@ -179,17 +185,25 @@
   "RESET_REFERENCE_LAYER_POS": "Reset reference layer position",
 
   "CLIP_CANVAS": "Clip Canvas",
+  "FLIP": "Flip",
   "FLIP_IMG_VERTICALLY": "Flip Image Vertically",
   "FLIP_IMG_HORIZONTALLY": "Flip Image Horizontally",
   "FLIP_LAYERS_VERTICALLY": "Flip Selected Layers Vertically",
   "FLIP_LAYERS_HORIZONTALLY": "Flip Selected Layers Horizontally",
 
+  "ROTATION": "Rotation",
   "ROT_IMG_90": "Rotate Image 90 degrees",
+  "ROT_IMG_90_D": "Rotate Image 90°",
   "ROT_IMG_180": "Rotate Image 180 degrees",
+  "ROT_IMG_180_D": "Rotate Image 180°",
   "ROT_IMG_-90": "Rotate Image -90 degrees",
+  "ROT_IMG_-90_D": "Rotate Image -90°",
   "ROT_LAYERS_90": "Rotate Selected Layers 90 degrees",
+  "ROT_LAYERS_90_D": "Rotate Selected Layers 90°",
   "ROT_LAYERS_180": "Rotate Selected Layers 180 degrees",
+  "ROT_LAYERS_180_D": "Rotate Selected Layers 180°",
   "ROT_LAYERS_-90": "Rotate Selected Layers -90 degrees",
+  "ROT_LAYERS_-90_D": "Rotate Selected Layers -90°",
 
   "TOGGLE_VERT_SYMMETRY_AXIS": "Toggle vertical symmetry axis",
   "TOGGLE_HOR_SYMMETRY_AXIS": "Toggle horizontal symmetry axis",
@@ -302,19 +316,22 @@
   "REDO_DESCRIPTIVE": "Redo last action",
   "WINDOWS": "Windows",
 
+  "VIEW": "View",
   "TOGGLE_GRIDLINES": "Toggle gridlines",
   "ZOOM_IN": "Zoom in",
   "ZOOM_OUT": "Zoom out",
   "NEW_WINDOW_FOR_IMG": "New window for current image",
   "CENTER_ACTIVE_VIEWPORT": "Center active viewport",
   "FLIP_VIEWPORT_HORIZONTALLY": "Flip viewport horizontally",
+  "HORIZONTAL_LINE_SYMMETRY": "Horizontal line symmetry",
+  "VERTICAL_LINE_SYMMETRY": "Vertical line symmetry",
   "FLIP_VIEWPORT_VERTICALLY": "Flip viewport vertically",
   "SETTINGS": "Settings",
   "OPEN_SETTINGS": "Open settings",
   "OPEN_SETTINGS_DESCRIPTIVE": "Open settings window",
 
   "OPEN_STARTUP_WINDOW": "Open startup window",
-  "OPEN_SHORTCUT_WINDOW": "Open shortcut window",
+  "OPEN_SHORTCUT_WINDOW": "Open shortcuts window",
   "OPEN_ABOUT_WINDOW": "Open about window",
   "OPEN_NAVIGATION_WINDOW": "Open navigation window",
 
@@ -328,6 +345,7 @@
   "PROJECT_MAINTAINERS": "Project Maintainers",
   "OTHER_AWESOME_CONTRIBUTORS": "And other awesome contributors",
 
+  "HELP": "Help",
   "REDDIT": "Reddit",
   "GITHUB": "GitHub",
   "YOUTUBE": "YouTube",

+ 45 - 44
src/PixiEditor/Views/MainWindow.xaml

@@ -254,133 +254,134 @@
                     <MenuItem
                         views:Translator.Key="IMAGE">
                         <MenuItem
-                            Header="Resize _Image..."
+                            views:Translator.Key="RESIZE_IMAGE"
                             cmds:Menu.Command="PixiEditor.Document.ResizeDocument" />
                         <MenuItem
-                            Header="Resize _Canvas..."
+                            views:Translator.Key="RESIZE_CANVAS"
                             cmds:Menu.Command="PixiEditor.Document.ResizeCanvas" />
                         <Separator />
                         <MenuItem
-                            Header="Cli_p Canvas"
+                            views:Translator.Key="CLIP_CANVAS"
                             cmds:Menu.Command="PixiEditor.Document.ClipCanvas" />
                         <MenuItem
-                            Header="Cente_r Content"
+                            views:Translator.Key="CENTER_CONTENT"
                             cmds:Menu.Command="PixiEditor.Document.CenterContent" />
                         <Separator />
                         <MenuItem
                             IsCheckable="True"
                             IsEnabled="{Binding DocumentManagerSubViewModel.ActiveDocument, Source={vm:MainVM}, Converter={converters:NotNullToBoolConverter}}"
                             IsChecked="{Binding DocumentManagerSubViewModel.ActiveDocument.HorizontalSymmetryAxisEnabledBindable}"
-                            Header="_Horizontal Line Symmetry"/>
+                            views:Translator.Key="HORIZONTAL_LINE_SYMMETRY"
+                            />
                         <MenuItem
                             IsCheckable="True"
                             IsEnabled="{Binding DocumentManagerSubViewModel.ActiveDocument, Source={vm:MainVM}, Converter={converters:NotNullToBoolConverter}}"
                             IsChecked="{Binding DocumentManagerSubViewModel.ActiveDocument.VerticalSymmetryAxisEnabledBindable}"
-                            Header="_Vertical Line Symmetry"/>
+                            views:Translator.Key="VERTICAL_LINE_SYMMETRY"/>
                         <Separator/>
-                        <MenuItem Header="_Rotation">
-                            <MenuItem Header="Rotate Image 90&#186;" cmds:Menu.Command="PixiEditor.Document.Rotate90Deg"/>
-                            <MenuItem Header="Rotate Image 180&#186;" cmds:Menu.Command="PixiEditor.Document.Rotate180Deg"/>
-                            <MenuItem Header="Rotate Image -90&#186;" cmds:Menu.Command="PixiEditor.Document.Rotate270Deg"/>
+                        <MenuItem views:Translator.Key="ROTATION">
+                            <MenuItem views:Translator.Key="ROT_IMG_90_D" cmds:Menu.Command="PixiEditor.Document.Rotate90Deg"/>
+                            <MenuItem views:Translator.Key="ROT_IMG_180_D" cmds:Menu.Command="PixiEditor.Document.Rotate180Deg"/>
+                            <MenuItem views:Translator.Key="ROT_IMG_-90_D" cmds:Menu.Command="PixiEditor.Document.Rotate270Deg"/>
                             
                             <Separator/>
-                            <MenuItem Header="Rotate Selected Layers 90&#186;" cmds:Menu.Command="PixiEditor.Document.Rotate90DegLayers"/>
-                            <MenuItem Header="Rotate Selected Layers 180&#186;" cmds:Menu.Command="PixiEditor.Document.Rotate180DegLayers"/>
-                            <MenuItem Header="Rotate Selected Layers -90&#186;" cmds:Menu.Command="PixiEditor.Document.Rotate270DegLayers"/>
+                            <MenuItem views:Translator.Key="ROT_LAYERS_90_D" cmds:Menu.Command="PixiEditor.Document.Rotate90DegLayers"/>
+                            <MenuItem views:Translator.Key="ROT_LAYERS_180_D" cmds:Menu.Command="PixiEditor.Document.Rotate180DegLayers"/>
+                            <MenuItem views:Translator.Key="ROT_LAYERS_-90_D" cmds:Menu.Command="PixiEditor.Document.Rotate270DegLayers"/>
                         </MenuItem>
-                        <MenuItem Header="_Flip">
-                            <MenuItem Header="Flip Image _Horizontally" cmds:Menu.Command="PixiEditor.Document.FlipImageHorizontal"/>
-                            <MenuItem Header="Flip Image _Vertically" cmds:Menu.Command="PixiEditor.Document.FlipImageVertical"/>
-                            <MenuItem Header="Flip Selected Layers _Horizontally" cmds:Menu.Command="PixiEditor.Document.FlipLayersHorizontal"/>
-                            <MenuItem Header="Flip Selected Layers _Vertically" cmds:Menu.Command="PixiEditor.Document.FlipLayersVertical"/>
+                        <MenuItem views:Translator.Key="FLIP">
+                            <MenuItem views:Translator.Key="FLIP_IMG_HORIZONTALLY" cmds:Menu.Command="PixiEditor.Document.FlipImageHorizontal"/>
+                            <MenuItem views:Translator.Key="FLIP_IMG_VERTICALLY" cmds:Menu.Command="PixiEditor.Document.FlipImageVertical"/>
+                            <MenuItem views:Translator.Key="FLIP_LAYERS_HORIZONTALLY" cmds:Menu.Command="PixiEditor.Document.FlipLayersHorizontal"/>
+                            <MenuItem views:Translator.Key="FLIP_LAYERS_VERTICALLY" cmds:Menu.Command="PixiEditor.Document.FlipLayersVertical"/>
                         </MenuItem>
                     </MenuItem>
                     <MenuItem
-                        Header="_View">
+                        views:Translator.Key="VIEW">
                         <MenuItem
-                            Header="New window for current image"
+                            views:Translator.Key="NEW_WINDOW_FOR_IMG"
                             cmds:Menu.Command="PixiEditor.Window.CreateNewViewport" />
                         <Separator/>
                         <MenuItem
-                            Header="Open _Startup Window"
+                            views:Translator.Key="OPEN_STARTUP_WINDOW"
                             ToolTip="Hello there!"
                             cmds:Menu.Command="PixiEditor.Window.OpenStartupWindow" />
                         <MenuItem
-                            Header="Open _Navigation Window"
+                            views:Translator.Key="OPEN_NAVIGATION_WINDOW"
                             cmds:Menu.Command="PixiEditor.Window.OpenNavigationWindow" />
                         <MenuItem
-                            Header="Open Short_cuts Window"
+                            views:Translator.Key="OPEN_SHORTCUT_WINDOW"
                             cmds:Menu.Command="PixiEditor.Window.OpenShortcutWindow" />
                         <Separator/>
                         <MenuItem
-                            Header="Show _Grid Lines"
+                            views:Translator.Key="TOGGLE_GRIDLINES"
                             IsChecked="{Binding ViewportSubViewModel.GridLinesEnabled, Mode=TwoWay}"
                             IsCheckable="True"
                             InputGestureText="{cmds:ShortcutBinding PixiEditor.View.ToggleGrid}" />
                     </MenuItem>
                     <MenuItem
-                        Header="_Help">
+                        views:Translator.Key="HELP">
                         <MenuItem
-                            Header="_Documentation"
+                            views:Translator.Key="DOCUMENTATION"
                             cmds:Menu.Command="PixiEditor.Links.OpenDocumentation" />
                         <MenuItem
-                            Header="_Website"
+                            views:Translator.Key="WEBSITE"
                             cmds:Menu.Command="PixiEditor.Links.OpenWebsite" />
                         <MenuItem
-                            Header="_Repository"
+                            views:Translator.Key="REPOSITORY"
                             cmds:Menu.Command="PixiEditor.Links.OpenRepository" />
                         <Separator />
                         <MenuItem
-                            Header="_License"
+                            views:Translator.Key="LICENSE"
                             cmds:Menu.Command="PixiEditor.Links.OpenLicense" />
                         <MenuItem
-                            Header="_Third Party Licenses"
+                            views:Translator.Key="THIRD_PARTY_LICENSES"
                             cmds:Menu.Command="PixiEditor.Links.OpenOtherLicenses" />
                         <Separator/>
                         <MenuItem
-                            Header="_About"
+                            views:Translator.Key="ABOUT"
                             cmds:Menu.Command="PixiEditor.Window.OpenAboutWindow" />
                     </MenuItem>
                     <MenuItem
-                        Header="_Debug"
+                        views:Translator.Key="DEBUG"
                         Visibility="{Binding DebugSubViewModel.UseDebug, Converter={StaticResource BoolToVisibilityConverter}}">
                         <MenuItem
-                            Header="Open Command Debug Window"
+                            views:Translator.Key="OPEN_COMMAND_DEBUG_WINDOW"
                             cmds:Menu.Command="PixiEditor.Debug.OpenCommandDebugWindow"/>
                         <Separator/>
                         <MenuItem
-                            Header="Open _Local App Data"
+                            views:Translator.Key="OPEN_LOCAL_APPDATA_DIR"
                             cmds:Menu.Command="PixiEditor.Debug.OpenLocalAppDataDirectory" />
                         <MenuItem
-                            Header="Open _Roaming App Data"
+                            views:Translator.Key="OPEN_ROAMING_APPDATA_DIR"
                             cmds:Menu.Command="PixiEditor.Debug.OpenRoamingAppDataDirectory" />
                         <MenuItem
-                            Header="Open _Temp App Data"
+                            views:Translator.Key="OPEN_TEMP_DIR"
                             cmds:Menu.Command="PixiEditor.Debug.OpenTempDirectory" />
                         <MenuItem
-                            Header="Open _Install Location"
+                            views:Translator.Key="OPEN_INSTALLATION_DIR"
                             cmds:Menu.Command="PixiEditor.Debug.OpenInstallDirectory" />
                         <MenuItem
-                            Header="Open Crash _Reports Location"
+                            views:Translator.Key="OPEN_CRASH_REPORTS_DIR"
                             cmds:Menu.Command="PixiEditor.Debug.OpenCrashReportsDirectory" />
                         <Separator />
                         <MenuItem
-                            Header="_Crash"
+                            views:Translator.Key="CRASH"
                             cmds:Menu.Command="PixiEditor.Debug.Crash" />
                         <MenuItem
-                            Header="Delete">
+                            views:Translator.Key="DELETE">
                             <MenuItem
-                                Header="User Preferences (Roaming)"
+                                views:Translator.Key="USER_PREFS"
                                 cmds:Menu.Command="PixiEditor.Debug.DeleteUserPreferences" />
                             <MenuItem
-                                Header="Shortcut File (Roaming)"
+                                views:Translator.Key="SHORTCUT_FILE"
                                 cmds:Menu.Command="PixiEditor.Debug.DeleteShortcutFile" />
                             <MenuItem
-                                Header="Editor Data (Local)"
+                                views:Translator.Key="EDITOR_DATA"
                                 cmds:Menu.Command="PixiEditor.Debug.DeleteEditorData" />
                             <Separator/>
                             <MenuItem
-                                Header="_Clear recent documents"
+                                views:Translator.Key="CLEAR_RECENT_DOCUMENTS"
                                 cmds:Menu.Command="PixiEditor.Debug.ClearRecentDocument"/>
                         </MenuItem>
                     </MenuItem>