Compare commits

..

4 commits

Author SHA1 Message Date
github-actions[bot]
ea320d2cdf doc: Update translation status and sort locale files
Some checks are pending
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Continuous Integration / Package (push) Blocked by required conditions
Localization Check / localization-check (push) Waiting to run
2025-05-17 05:17:22 +00:00
popara
01945f231e
Added workspaces shortcuts (#1328)
- added Alt+Space for opening Workspaces context menu (which can then be navigated normally with arrows)
- added Alt+1 through Alt+9 for switching to corresponding workspace
2025-05-17 13:17:10 +08:00
github-actions[bot]
506dbc218c doc: Update translation status and sort locale files 2025-05-17 05:12:20 +00:00
Javier J. Martínez M.
d3a740fb95
localization: update spanish translations (#1329)
add missing translations
2025-05-17 13:12:01 +08:00
7 changed files with 122 additions and 22 deletions

View file

@ -6,13 +6,15 @@ This document shows the translation status of each locale file in the repository
### ![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen)
### ![de__DE](https://img.shields.io/badge/de__DE-98.73%25-yellow)
### ![de__DE](https://img.shields.io/badge/de__DE-98.48%25-yellow)
<details>
<summary>Missing keys in de_DE.axaml</summary>
- Text.GitFlow.FinishWithPush
- Text.GitFlow.FinishWithSquash
- Text.Hotkeys.Global.OpenWorkspaces
- Text.Hotkeys.Global.OpenWorkspaceAtIndex
- Text.Hotkeys.TextEditor.OpenExternalMergeTool
- Text.Repository.ShowSubmodulesAsTree
- Text.Submodule.Status
@ -24,23 +26,17 @@ This document shows the translation status of each locale file in the repository
</details>
### ![es__ES](https://img.shields.io/badge/es__ES-98.98%25-yellow)
### ![es__ES](https://img.shields.io/badge/es__ES-99.75%25-yellow)
<details>
<summary>Missing keys in es_ES.axaml</summary>
- Text.Hotkeys.TextEditor.OpenExternalMergeTool
- Text.Repository.ShowSubmodulesAsTree
- Text.Submodule.Status
- Text.Submodule.Status.Modified
- Text.Submodule.Status.NotInited
- Text.Submodule.Status.RevisionChanged
- Text.Submodule.Status.Unmerged
- Text.Submodule.URL
- Text.Hotkeys.Global.OpenWorkspaces
- Text.Hotkeys.Global.OpenWorkspaceAtIndex
</details>
### ![fr__FR](https://img.shields.io/badge/fr__FR-94.53%25-yellow)
### ![fr__FR](https://img.shields.io/badge/fr__FR-94.29%25-yellow)
<details>
<summary>Missing keys in fr_FR.axaml</summary>
@ -64,6 +60,8 @@ This document shows the translation status of each locale file in the repository
- Text.ConfirmEmptyCommit.WithLocalChanges
- Text.GitFlow.FinishWithPush
- Text.GitFlow.FinishWithSquash
- Text.Hotkeys.Global.OpenWorkspaces
- Text.Hotkeys.Global.OpenWorkspaceAtIndex
- Text.Hotkeys.TextEditor.OpenExternalMergeTool
- Text.Preferences.Git.IgnoreCRAtEOLInDiff
- Text.Repository.BranchSort
@ -91,9 +89,17 @@ This document shows the translation status of each locale file in the repository
</details>
### ![it__IT](https://img.shields.io/badge/it__IT-%E2%88%9A-brightgreen)
### ![it__IT](https://img.shields.io/badge/it__IT-99.75%25-yellow)
### ![ja__JP](https://img.shields.io/badge/ja__JP-94.27%25-yellow)
<details>
<summary>Missing keys in it_IT.axaml</summary>
- Text.Hotkeys.Global.OpenWorkspaces
- Text.Hotkeys.Global.OpenWorkspaceAtIndex
</details>
### ![ja__JP](https://img.shields.io/badge/ja__JP-94.04%25-yellow)
<details>
<summary>Missing keys in ja_JP.axaml</summary>
@ -117,6 +123,8 @@ This document shows the translation status of each locale file in the repository
- Text.ConfirmEmptyCommit.WithLocalChanges
- Text.GitFlow.FinishWithPush
- Text.GitFlow.FinishWithSquash
- Text.Hotkeys.Global.OpenWorkspaces
- Text.Hotkeys.Global.OpenWorkspaceAtIndex
- Text.Hotkeys.TextEditor.OpenExternalMergeTool
- Text.Preferences.Git.IgnoreCRAtEOLInDiff
- Text.Repository.BranchSort
@ -146,7 +154,7 @@ This document shows the translation status of each locale file in the repository
</details>
### ![pt__BR](https://img.shields.io/badge/pt__BR-86.01%25-yellow)
### ![pt__BR](https://img.shields.io/badge/pt__BR-85.79%25-yellow)
<details>
<summary>Missing keys in pt_BR.axaml</summary>
@ -199,6 +207,8 @@ This document shows the translation status of each locale file in the repository
- Text.GitFlow.FinishWithPush
- Text.GitFlow.FinishWithSquash
- Text.Hotkeys.Global.Clone
- Text.Hotkeys.Global.OpenWorkspaces
- Text.Hotkeys.Global.OpenWorkspaceAtIndex
- Text.Hotkeys.TextEditor.OpenExternalMergeTool
- Text.InProgress.CherryPick.Head
- Text.InProgress.Merge.Operating
@ -264,16 +274,18 @@ This document shows the translation status of each locale file in the repository
</details>
### ![ru__RU](https://img.shields.io/badge/ru__RU-99.87%25-yellow)
### ![ru__RU](https://img.shields.io/badge/ru__RU-99.62%25-yellow)
<details>
<summary>Missing keys in ru_RU.axaml</summary>
- Text.Hotkeys.Global.OpenWorkspaces
- Text.Hotkeys.Global.OpenWorkspaceAtIndex
- Text.Repository.ShowSubmodulesAsTree
</details>
### ![ta__IN](https://img.shields.io/badge/ta__IN-94.53%25-yellow)
### ![ta__IN](https://img.shields.io/badge/ta__IN-94.29%25-yellow)
<details>
<summary>Missing keys in ta_IN.axaml</summary>
@ -297,6 +309,8 @@ This document shows the translation status of each locale file in the repository
- Text.ConfirmEmptyCommit.WithLocalChanges
- Text.GitFlow.FinishWithPush
- Text.GitFlow.FinishWithSquash
- Text.Hotkeys.Global.OpenWorkspaces
- Text.Hotkeys.Global.OpenWorkspaceAtIndex
- Text.Hotkeys.TextEditor.OpenExternalMergeTool
- Text.Preferences.Git.IgnoreCRAtEOLInDiff
- Text.Repository.BranchSort
@ -324,7 +338,7 @@ This document shows the translation status of each locale file in the repository
</details>
### ![uk__UA](https://img.shields.io/badge/uk__UA-95.67%25-yellow)
### ![uk__UA](https://img.shields.io/badge/uk__UA-95.43%25-yellow)
<details>
<summary>Missing keys in uk_UA.axaml</summary>
@ -344,6 +358,8 @@ This document shows the translation status of each locale file in the repository
- Text.ConfigureWorkspace.Name
- Text.GitFlow.FinishWithPush
- Text.GitFlow.FinishWithSquash
- Text.Hotkeys.Global.OpenWorkspaces
- Text.Hotkeys.Global.OpenWorkspaceAtIndex
- Text.Hotkeys.TextEditor.OpenExternalMergeTool
- Text.Preferences.Git.IgnoreCRAtEOLInDiff
- Text.Repository.BranchSort
@ -366,6 +382,22 @@ This document shows the translation status of each locale file in the repository
</details>
### ![zh__CN](https://img.shields.io/badge/zh__CN-%E2%88%9A-brightgreen)
### ![zh__CN](https://img.shields.io/badge/zh__CN-99.75%25-yellow)
### ![zh__TW](https://img.shields.io/badge/zh__TW-%E2%88%9A-brightgreen)
<details>
<summary>Missing keys in zh_CN.axaml</summary>
- Text.Hotkeys.Global.OpenWorkspaces
- Text.Hotkeys.Global.OpenWorkspaceAtIndex
</details>
### ![zh__TW](https://img.shields.io/badge/zh__TW-99.75%25-yellow)
<details>
<summary>Missing keys in zh_TW.axaml</summary>
- Text.Hotkeys.Global.OpenWorkspaces
- Text.Hotkeys.Global.OpenWorkspaceAtIndex
</details>

View file

@ -386,6 +386,8 @@
<x:String x:Key="Text.Hotkeys.Global.GotoPrevTab" xml:space="preserve">Go to previous page</x:String>
<x:String x:Key="Text.Hotkeys.Global.NewTab" xml:space="preserve">Create new page</x:String>
<x:String x:Key="Text.Hotkeys.Global.OpenPreferences" xml:space="preserve">Open Preferences dialog</x:String>
<x:String x:Key="Text.Hotkeys.Global.OpenWorkspaces" xml:space="preserve">Open Workspaces dialog</x:String>
<x:String x:Key="Text.Hotkeys.Global.OpenWorkspaceAtIndex" xml:space="preserve">Switch to corresponding workspace</x:String>
<x:String x:Key="Text.Hotkeys.Repo" xml:space="preserve">REPOSITORY</x:String>
<x:String x:Key="Text.Hotkeys.Repo.Commit" xml:space="preserve">Commit staged changes</x:String>
<x:String x:Key="Text.Hotkeys.Repo.CommitAndPush" xml:space="preserve">Commit and push staged changes</x:String>

View file

@ -410,6 +410,7 @@
<x:String x:Key="Text.Hotkeys.TextEditor.CloseSearch" xml:space="preserve">Cerrar panel de búsqueda</x:String>
<x:String x:Key="Text.Hotkeys.TextEditor.GotoNextMatch" xml:space="preserve">Buscar siguiente coincidencia</x:String>
<x:String x:Key="Text.Hotkeys.TextEditor.GotoPrevMatch" xml:space="preserve">Buscar coincidencia anterior</x:String>
<x:String x:Key="Text.Hotkeys.TextEditor.OpenExternalMergeTool" xml:space="preserve">Abrir con herramienta diff/merge externa</x:String>
<x:String x:Key="Text.Hotkeys.TextEditor.Search" xml:space="preserve">Abrir panel de búsqueda</x:String>
<x:String x:Key="Text.Hunk.Discard" xml:space="preserve">Descartar</x:String>
<x:String x:Key="Text.Hunk.Stage" xml:space="preserve">Stage</x:String>
@ -620,6 +621,7 @@
<x:String x:Key="Text.Repository.Search.ByMessage" xml:space="preserve">Mensaje</x:String>
<x:String x:Key="Text.Repository.Search.BySHA" xml:space="preserve">SHA</x:String>
<x:String x:Key="Text.Repository.Search.InCurrentBranch" xml:space="preserve">Rama Actual</x:String>
<x:String x:Key="Text.Repository.ShowSubmodulesAsTree" xml:space="preserve">Mostrar Submódulos como Árbol</x:String>
<x:String x:Key="Text.Repository.ShowTagsAsTree" xml:space="preserve">Mostrar Etiquetas como Árbol</x:String>
<x:String x:Key="Text.Repository.Skip" xml:space="preserve">OMITIR</x:String>
<x:String x:Key="Text.Repository.Statistics" xml:space="preserve">Estadísticas</x:String>
@ -708,6 +710,12 @@
<x:String x:Key="Text.Submodule.RelativePath" xml:space="preserve">Ruta Relativa:</x:String>
<x:String x:Key="Text.Submodule.RelativePath.Placeholder" xml:space="preserve">Carpeta relativa para almacenar este módulo.</x:String>
<x:String x:Key="Text.Submodule.Remove" xml:space="preserve">Eliminar Submódulo</x:String>
<x:String x:Key="Text.Submodule.Status" xml:space="preserve">ESTADO</x:String>
<x:String x:Key="Text.Submodule.Status.Modified" xml:space="preserve">modificado</x:String>
<x:String x:Key="Text.Submodule.Status.NotInited" xml:space="preserve">no inicializado</x:String>
<x:String x:Key="Text.Submodule.Status.RevisionChanged" xml:space="preserve">revisión cambiada</x:String>
<x:String x:Key="Text.Submodule.Status.Unmerged" xml:space="preserve">unmerged</x:String>
<x:String x:Key="Text.Submodule.URL" xml:space="preserve">URL</x:String>
<x:String x:Key="Text.Sure" xml:space="preserve">OK</x:String>
<x:String x:Key="Text.TagCM.Copy" xml:space="preserve">Copiar Nombre de la Etiqueta</x:String>
<x:String x:Key="Text.TagCM.CopyMessage" xml:space="preserve">Copiar Mensaje de la Etiqueta</x:String>

View file

@ -463,6 +463,14 @@ namespace SourceGit.ViewModels
return menu;
}
public void SwitchWorkspace(int idx)
{
var pref = Preferences.Instance;
if (idx >= pref.Workspaces.Count || pref.Workspaces[idx].IsActive) return;
SwitchWorkspace(pref.Workspaces[idx]);
}
private string GetRepositoryGitDir(string repo)
{
var fullpath = Path.Combine(repo, ".git");
@ -493,7 +501,7 @@ namespace SourceGit.ViewModels
return new Commands.QueryGitDir(repo).Result();
}
private void SwitchWorkspace(Workspace to)
{
foreach (var one in Pages)

View file

@ -45,7 +45,7 @@
FontSize="{Binding Source={x:Static vm:Preferences.Instance}, Path=DefaultFontSize, Converter={x:Static c:DoubleConverters.Increase}}"
Margin="0,0,0,8"/>
<Grid RowDefinitions="20,20,20,20,20,20,20,20" ColumnDefinitions="150,*">
<Grid RowDefinitions="20,20,20,20,20,20,20,20,20,20" ColumnDefinitions="150,*">
<TextBlock Grid.Row="0" Grid.Column="0" Classes="primary bold" Text="{OnPlatform Ctrl+Shift+P, macOS=⌘+\,}"/>
<TextBlock Grid.Row="0" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.OpenPreferences}"/>
@ -69,6 +69,12 @@
<TextBlock Grid.Row="7" Grid.Column="0" Classes="primary bold" Text="{OnPlatform Ctrl+Q, macOS=⌘+Q}"/>
<TextBlock Grid.Row="7" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Quit}" />
<TextBlock Grid.Row="8" Grid.Column="0" Classes="primary bold" Text="{OnPlatform Alt+Space, macOS=⌥+␣}"/>
<TextBlock Grid.Row="8" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.OpenWorkspaces}" />
<TextBlock Grid.Row="9" Grid.Column="0" Classes="primary bold" Text="{OnPlatform Alt+1 - Alt+9, macOS=⌥+1 - ⌥+9}"/>
<TextBlock Grid.Row="9" Grid.Column="1" Margin="16,0,0,0" Text="{DynamicResource Text.Hotkeys.Global.OpenWorkspaceAtIndex}" />
</Grid>
<TextBlock Text="{DynamicResource Text.Hotkeys.Repo}"

View file

@ -73,7 +73,7 @@
</Button>
<!-- Workspace Switcher -->
<Button Grid.Column="1" Classes="icon_button" VerticalAlignment="Bottom" Margin="0,0,0,1" Click="OnOpenWorkspaceMenu">
<Button Grid.Column="1" Classes="icon_button" Name="WorkspacesButton" VerticalAlignment="Bottom" Margin="0,0,0,1" Click="OnOpenWorkspaceMenu">
<ToolTip.Tip>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{DynamicResource Text.Workspace}" FontWeight="Bold" Foreground="{DynamicResource Brush.FG2}"/>

View file

@ -248,6 +248,27 @@ namespace SourceGit.Views
}
}
}
else if (e.KeyModifiers.HasFlag(KeyModifiers.Alt))
{
if (e.Key == Key.Space && DataContext is ViewModels.Launcher launcher)
{
var menu = launcher.CreateContextForWorkspace();
var workspacesButton = this.FindControl<Button>("WorkspacesButton");
if (menu != null)
{
menu.PlacementTarget = workspacesButton;
menu.Placement = PlacementMode.BottomEdgeAlignedLeft;
menu.Open(workspacesButton);
}
}
else
{
SwitchToWorkspaceIndex(e.Key);
}
e.Handled = true;
return;
}
else if (e.Key == Key.Escape)
{
vm.ActivePage.CancelPopup();
@ -282,6 +303,29 @@ namespace SourceGit.Views
}
}
private void SwitchToWorkspaceIndex(Key eKey)
{
int newIndex;
switch (eKey)
{
case Key.D1 or Key.NumPad1: newIndex = 0; break;
case Key.D2 or Key.NumPad2: newIndex = 1; break;
case Key.D3 or Key.NumPad3: newIndex = 2; break;
case Key.D4 or Key.NumPad4: newIndex = 3; break;
case Key.D5 or Key.NumPad5: newIndex = 4; break;
case Key.D6 or Key.NumPad6: newIndex = 5; break;
case Key.D7 or Key.NumPad7: newIndex = 6; break;
case Key.D8 or Key.NumPad8: newIndex = 7; break;
case Key.D9 or Key.NumPad9: newIndex = 8; break;
default: return;
}
if (DataContext is ViewModels.Launcher launcher)
{
launcher.SwitchWorkspace(newIndex);
}
}
protected override void OnKeyUp(KeyEventArgs e)
{
base.OnKeyUp(e);