From 489d78730605b483a7a6c8057f3d3f8af81c30f5 Mon Sep 17 00:00:00 2001 From: Chili Palmer Date: Fri, 29 May 2026 13:25:32 +0200 Subject: [PATCH] fix: A1-13 wire git sidebar to BDS.Git with branch, changes, history, and actions --- SPECGAPS.md | 2 +- lib/bds/desktop/shell_live.ex | 166 +++++++++- .../desktop/shell_live/sidebar_components.ex | 136 +++++++++ lib/bds/git.ex | 52 +++- lib/bds/ui/sidebar.ex | 142 +++++++-- priv/gettext/de/LC_MESSAGES/ui.po | 230 +++++++++++--- priv/gettext/en/LC_MESSAGES/ui.po | 230 +++++++++++--- priv/gettext/es/LC_MESSAGES/ui.po | 230 +++++++++++--- priv/gettext/fr/LC_MESSAGES/ui.po | 230 +++++++++++--- priv/gettext/it/LC_MESSAGES/ui.po | 230 +++++++++++--- priv/gettext/ui.pot | 230 +++++++++++--- test/bds/desktop/shell_live_test.exs | 284 +++++++++++++++--- test/bds/git_test.exs | 10 +- 13 files changed, 1854 insertions(+), 318 deletions(-) diff --git a/SPECGAPS.md b/SPECGAPS.md index f116e99..dab261b 100644 --- a/SPECGAPS.md +++ b/SPECGAPS.md @@ -22,7 +22,7 @@ Gap categories: **SC** = spec correct, fix code | **CS** = code correct, update | A1-10 | ~~Template file written on create~~ | engine_side_effects.allium:151-153 | `create_template` now computes `file_path` and writes template file with YAML frontmatter on create | **Resolved:** `create_template/1` writes `templates/{slug}.liquid` on create, `next_template_file_path` always computes path, 1 test added | | A1-11 | ~~Graceful shutdown with inflight request tracking~~ | preview.allium:47-48 | `stop_preview` now closes the listener, parks the reply, and drains monitored inflight request tasks before reporting stopped | **Resolved:** acceptor transfers socket ownership to each request task; GenServer monitors inflight tasks, `begin_graceful_stop` stops accepting and finalizes via `:DOWN`/`:drain_timeout` (5s force-kill cap), 1 test added | | A1-12 | ~~Real Pagefind integration for search~~ | generation.allium:208 | Functional client-side search: `PagefindUI` defined in bundled `pagefind-ui.js`, fragment index records url/title/body-scoped text per page, search-runtime wires it up | **Resolved:** bundled real `PagefindUI` (fetch index, ranked full-text match, highlighted excerpts) + `pagefind-ui.css` as local assets read into `Pagefind`; index scoped to `data-pagefind-body` (unmarked pages excluded per PagefindHtmlMarking), title from ``/`<h1>`; localized "No results found" label via `data-search-no-results` (de/fr/it/es); 3 unit tests added | -| A1-13 | Git sidebar shows only "Working tree" placeholder | sidebar_views.allium:651-770 | `sidebar.ex:782-798` returns single entity_list item; `BDS.Git` has full status/diff/commit/history/fetch/pull/push/prune_lfs but sidebar doesn't use it | Fix code: wire sidebar `git_view/0` to `BDS.Git` — render branch, ahead/behind, status file list, commit input, history entries, action buttons per spec | +| A1-13 | ~~Git sidebar shows only "Working tree" placeholder~~ | sidebar_views.allium:651-770 | `git_view/1` now builds a full `layout: "git"` view from `BDS.Git` (repository/remote_state/status/history); `SidebarComponents` renders active + not_a_repo states | **Resolved:** `git_view/1` in sidebar.ex assembles branch/upstream/ahead/behind, status files, paginated history (20/page); `render_git_sidebar` renders branch header, sync legend, fetch/pull/push/prune-lfs buttons, commit form, clickable status files (open git_diff), history entries; shell_live wires `git_commit` (closes git_diff tabs), `git_fetch`/`git_pull`/`git_push`/`git_prune_lfs`, `git_initialize`; `BDS.Git.history` enriched with author/date, `BDS.Git.set_remote/2` added; i18n for de/fr/it/es; 3 shell tests + git author/date assertions added | | A1-14 | Embedding uses TF-IDF hash projection instead of real neural model | embedding.allium:44-53, invariants ModelCaching/VectorCacheInDb | `backends/in_app.ex` hashes terms into sparse vectors via `:erlang.phash2`; no ONNX model, no `"query: "` prefix, no mean pooling, vectors stored as JSON text not Float32Array BLOB, snapshot-based neighbor lookup instead of USearch HNSW index | Fix code: (1) add Bumblebee + ONNX runtime deps to run `Xenova/multilingual-e5-small`, (2) implement lazy model download + cache in app data dir, (3) `"query: "` prefix + mean pooling + L2 norm in backend, (4) store vectors as binary BLOB (1536 bytes), (5) replace JSON snapshot with USearch HNSW index (cosine, M=16, ef=128/64, 5s debounce), (6) cross-language semantic similarity must work | | A1-15 | ~~Preview vs generation content source strategy undocumented~~ | preview.allium (no invariant), generation.allium (no invariant) | Generation uses only published .md file content (`Generation.Data` snapshots set `content: nil`); preview includes published+draft posts and prefers DB content over file (`Preview.Router` queries `:published`/`:draft`, uses `editor_body`) | **Resolved:** added `PreviewDraftOverlay` invariant to preview.allium and `GenerationPublishedOnly` invariant to generation.allium; both cross-reference each other; code already correct, 3 tests added for draft-in-preview behavior | diff --git a/lib/bds/desktop/shell_live.ex b/lib/bds/desktop/shell_live.ex index ad27a04..1bf128b 100644 --- a/lib/bds/desktop/shell_live.ex +++ b/lib/bds/desktop/shell_live.ex @@ -84,6 +84,8 @@ defmodule BDS.Desktop.ShellLive do "load_more_sidebar" ] + @git_action_events ["git_fetch", "git_pull", "git_push", "git_prune_lfs"] + @layout_menu_actions MapSet.new([ :toggle_sidebar, :toggle_panel, @@ -192,7 +194,8 @@ defmodule BDS.Desktop.ShellLive do end def handle_event("toggle_assistant_sidebar", _params, socket) do - {:noreply, refresh_layout(socket, Workbench.toggle_assistant_sidebar(socket.assigns.workbench))} + {:noreply, + refresh_layout(socket, Workbench.toggle_assistant_sidebar(socket.assigns.workbench))} end def handle_event("select_view", %{"view" => view_id}, socket) do @@ -237,6 +240,20 @@ defmodule BDS.Desktop.ShellLive do SidebarEvents.handle(socket, event, params, &refresh_sidebar/2) end + def handle_event(event, _params, socket) when event in @git_action_events do + {:noreply, run_git_action(socket, event)} + end + + def handle_event("git_commit", params, socket) do + message = params |> get_in(["git", "message"]) |> to_string() |> String.trim() + {:noreply, commit_git(socket, message)} + end + + def handle_event("git_initialize", params, socket) do + remote_url = params |> get_in(["git", "remote_url"]) |> normalize_git_remote_url() + {:noreply, initialize_git(socket, remote_url)} + end + def handle_event("create_sidebar_item", %{"kind" => kind}, socket) do {:noreply, create_sidebar_item(socket, kind)} end @@ -424,7 +441,9 @@ defmodule BDS.Desktop.ShellLive do Task.Supervisor.start_child(BDS.TCP.TaskSupervisor, fn -> case FilePicker.choose_files(dgettext("ui", "Add Gallery Images"), - image_only: true, multiple: true) do + image_only: true, + multiple: true + ) do {:ok, paths} when is_list(paths) and paths != [] -> GalleryImport.start(paths, project_id, post_id, language, concurrency_limit, parent) @@ -623,7 +642,13 @@ defmodule BDS.Desktop.ShellLive do def handle_info({:add_image_processed, title}, socket) do {:noreply, - append_output_entry(socket, dgettext("ui", "Add Gallery Images"), dgettext("ui", "Added %{title}", title: title), nil, "info")} + append_output_entry( + socket, + dgettext("ui", "Add Gallery Images"), + dgettext("ui", "Added %{title}", title: title), + nil, + "info" + )} end def handle_info({:add_images_complete, count}, socket) do @@ -660,7 +685,13 @@ defmodule BDS.Desktop.ShellLive do def handle_info({:add_images_error, reason}, socket) do {:noreply, - append_output_entry(socket, dgettext("ui", "Add Gallery Images"), inspect(reason), nil, "error")} + append_output_entry( + socket, + dgettext("ui", "Add Gallery Images"), + inspect(reason), + nil, + "error" + )} end def handle_info({:add_image_error, path, reason}, socket) do @@ -668,7 +699,10 @@ defmodule BDS.Desktop.ShellLive do append_output_entry( socket, dgettext("ui", "Add Gallery Images"), - dgettext("ui", "Failed to process %{path}: %{reason}", path: Path.basename(path), reason: inspect(reason)), + dgettext("ui", "Failed to process %{path}: %{reason}", + path: Path.basename(path), + reason: inspect(reason) + ), nil, "error" )} @@ -696,13 +730,17 @@ defmodule BDS.Desktop.ShellLive do defp refresh_layout(socket, workbench) do git_badge_count = socket.assigns[:git_badge_count] || 0 activity_buttons = Workbench.activity_buttons(workbench, git_badge_count) - task_status = socket.assigns[:task_status] || %{running_task_message: nil, running_task_overflow: nil} + + task_status = + socket.assigns[:task_status] || %{running_task_message: nil, running_task_overflow: nil} + dashboard = socket.assigns[:dashboard] || BDS.UI.Dashboard.empty_snapshot() page_language = socket.assigns[:page_language] || ShellData.ui_language() offline_mode = Map.get(socket.assigns, :offline_mode, true) sidebar_data = socket.assigns[:sidebar_data] || %{} current_tab = current_tab(workbench) prev_tab = socket.assigns[:current_tab] + prev_panel_tab = case socket.assigns[:workbench] do %Workbench{panel: %{active_tab: tab}} -> tab @@ -1017,6 +1055,122 @@ defmodule BDS.Desktop.ShellLive do |> push_url_state() end + defp run_git_action(socket, event) do + project_id = current_project_id(socket) + + {label, result} = + case event do + "git_fetch" -> {dgettext("ui", "Fetch"), git_call(project_id, &BDS.Git.fetch/1)} + "git_pull" -> {dgettext("ui", "Pull"), git_call(project_id, &BDS.Git.pull/1)} + "git_push" -> {dgettext("ui", "Push"), git_call(project_id, &BDS.Git.push/1)} + "git_prune_lfs" -> {dgettext("ui", "Prune LFS"), prune_lfs(project_id)} + end + + socket + |> append_git_result(label, result) + |> refresh_sidebar(socket.assigns.workbench) + end + + defp commit_git(socket, "") do + socket + |> append_output_entry( + dgettext("ui", "Commit"), + dgettext("ui", "Commit message is required"), + nil, + "error" + ) + |> refresh_sidebar(socket.assigns.workbench) + end + + defp commit_git(socket, message) do + case git_call(current_project_id(socket), &BDS.Git.commit_all(&1, message)) do + {:ok, _result} -> + workbench = close_git_diff_tabs(socket.assigns.workbench) + tab_meta = TabHelpers.sync_tab_meta(workbench, socket.assigns[:tab_meta] || %{}) + + socket + |> assign(:tab_meta, tab_meta) + |> append_output_entry(dgettext("ui", "Commit"), message) + |> refresh_sidebar(workbench) + |> push_url_state() + + {:error, reason} -> + socket + |> append_output_entry(dgettext("ui", "Commit"), format_git_error(reason), nil, "error") + |> refresh_sidebar(socket.assigns.workbench) + end + end + + defp initialize_git(socket, remote_url) do + project_id = current_project_id(socket) + + case git_call(project_id, &BDS.Git.initialize_repo/1) do + {:ok, _repo} -> + _ = maybe_set_git_remote(project_id, remote_url) + + socket + |> append_output_entry( + dgettext("ui", "Initialize Git"), + dgettext("ui", "Repository initialized") + ) + |> refresh_sidebar(socket.assigns.workbench) + + {:error, reason} -> + socket + |> append_output_entry( + dgettext("ui", "Initialize Git"), + format_git_error(reason), + nil, + "error" + ) + |> refresh_sidebar(socket.assigns.workbench) + end + end + + defp git_call(nil, _fun), do: {:error, :no_project} + defp git_call("default", _fun), do: {:error, :no_project} + defp git_call(project_id, fun) when is_binary(project_id), do: fun.(project_id) + + defp prune_lfs(nil), do: {:error, :no_project} + defp prune_lfs("default"), do: {:error, :no_project} + + defp prune_lfs(project_id) when is_binary(project_id), + do: BDS.Git.prune_lfs_cache(project_id, 10) + + defp maybe_set_git_remote(_project_id, nil), do: :ok + + defp maybe_set_git_remote(project_id, remote_url), + do: BDS.Git.set_remote(project_id, remote_url) + + defp append_git_result(socket, label, {:ok, _result}) do + append_output_entry(socket, label, dgettext("ui", "Done")) + end + + defp append_git_result(socket, label, {:error, reason}) do + append_output_entry(socket, label, format_git_error(reason), nil, "error") + end + + defp format_git_error(:no_project), do: dgettext("ui", "No active project") + defp format_git_error(%{message: message}) when is_binary(message), do: message + defp format_git_error(%{guidance: guidance}) when is_binary(guidance), do: guidance + defp format_git_error({:git_failed, message}) when is_binary(message), do: message + defp format_git_error(reason), do: inspect(reason) + + defp close_git_diff_tabs(workbench) do + workbench.tabs + |> Enum.filter(&(&1.type == :git_diff)) + |> Enum.reduce(workbench, fn tab, wb -> Workbench.close_tab(wb, :git_diff, tab.id) end) + end + + defp current_project_id(socket), do: (socket.assigns[:projects] || %{})[:active_project_id] + + defp normalize_git_remote_url(value) do + case value |> to_string() |> String.trim() do + "" -> nil + url -> url + end + end + defp sidebar_create_action(view), do: SidebarCreate.action(view) defp set_page_language(socket, language) do diff --git a/lib/bds/desktop/shell_live/sidebar_components.ex b/lib/bds/desktop/shell_live/sidebar_components.ex index 4e7c83e..80c06b6 100644 --- a/lib/bds/desktop/shell_live/sidebar_components.ex +++ b/lib/bds/desktop/shell_live/sidebar_components.ex @@ -257,6 +257,7 @@ defmodule BDS.Desktop.ShellLive.SidebarComponents do "media_grid" -> render_media_sidebar(assigns) "entity_list" -> render_entity_sidebar(assigns) "nav_list" -> render_nav_sidebar(assigns) + "git" -> render_git_sidebar(assigns) _other -> render_default_sidebar(assigns) end end @@ -483,6 +484,141 @@ defmodule BDS.Desktop.ShellLive.SidebarComponents do """ end + defp render_git_sidebar(assigns) do + assigns = assign(assigns, :git_state, Map.get(assigns.sidebar_data, :git_state, "not_a_repo")) + + ~H""" + <div class="git-sidebar"> + <%= if @git_state == "active" do %> + <%= render_git_active(assigns) %> + <% else %> + <%= render_git_not_a_repo(assigns) %> + <% end %> + </div> + """ + end + + defp render_git_not_a_repo(assigns) do + ~H""" + <section class="git-section git-not-a-repo"> + <p class="git-empty-hint"><%= dgettext("ui", "This project is not a Git repository yet.") %></p> + <form class="git-init-form flex flex-col gap-2" data-testid="git-init-form" phx-submit="git_initialize"> + <input + type="text" + name="git[remote_url]" + placeholder={dgettext("ui", "Remote URL (optional)")} + value={Map.get(@sidebar_data, :remote_url) || ""} + /> + <button class="git-action-button" data-testid="git-initialize" type="submit"> + <%= dgettext("ui", "Initialize Git") %> + </button> + </form> + </section> + """ + end + + defp render_git_active(assigns) do + ~H""" + <header class="git-header"> + <div class="git-branch-row flex items-center gap-2"> + <span class="git-branch-icon">⎇</span> + <span class="git-branch" data-testid="git-branch"><%= @sidebar_data.branch %></span> + <%= if @sidebar_data.upstream do %> + <span class="git-upstream" data-testid="git-upstream"><%= @sidebar_data.upstream %></span> + <% end %> + </div> + <div class="git-tracking flex items-center gap-3"> + <span class="git-ahead" data-testid="git-ahead" title={dgettext("ui", "Ahead")}>↑ <%= @sidebar_data.ahead %></span> + <span class="git-behind" data-testid="git-behind" title={dgettext("ui", "Behind")}>↓ <%= @sidebar_data.behind %></span> + </div> + <div class="git-sync-legend flex items-center gap-3"> + <span class="git-legend-item"><span class="git-sync-dot git-sync-synced"></span><%= dgettext("ui", "Synced") %></span> + <span class="git-legend-item"><span class="git-sync-dot git-sync-local_only"></span><%= dgettext("ui", "Local only") %></span> + <span class="git-legend-item"><span class="git-sync-dot git-sync-remote_only"></span><%= dgettext("ui", "Remote only") %></span> + </div> + </header> + + <div class="git-actions flex items-center gap-2"> + <button class="git-action-button" data-testid="git-action-fetch" type="button" phx-click="git_fetch" title={dgettext("ui", "Fetch")}><%= dgettext("ui", "Fetch") %></button> + <button class="git-action-button" data-testid="git-action-pull" type="button" phx-click="git_pull" title={dgettext("ui", "Pull")}><%= dgettext("ui", "Pull") %></button> + <button class="git-action-button" data-testid="git-action-push" type="button" phx-click="git_push" title={dgettext("ui", "Push")}><%= dgettext("ui", "Push") %></button> + <button class="git-action-button" data-testid="git-action-prune-lfs" type="button" phx-click="git_prune_lfs" title={dgettext("ui", "Prune LFS")}><%= dgettext("ui", "Prune LFS") %></button> + </div> + + <section class="git-section git-changes"> + <div class="git-section-title"> + <span><%= dgettext("ui", "Changes") %></span> + <span class="git-section-count"><%= length(@sidebar_data.status_files) %></span> + </div> + + <form class="git-commit-form flex flex-col gap-2" data-testid="git-commit-form" phx-submit="git_commit"> + <input type="text" name="git[message]" placeholder={dgettext("ui", "Commit message")} /> + <button class="git-action-button" data-testid="git-commit" type="submit"><%= dgettext("ui", "Commit") %></button> + </form> + + <%= if Enum.any?(@sidebar_data.status_files) do %> + <div class="git-status-list flex flex-col"> + <%= for file <- @sidebar_data.status_files do %> + <button + class="git-status-file flex items-center justify-between gap-2" + data-testid="git-status-file" + data-route="git_diff" + type="button" + title={"#{file.label}: #{file.path}"} + phx-click="open_sidebar_item" + phx-value-route="git_diff" + phx-value-id={"git-diff:" <> file.path} + phx-value-title={file.path} + phx-value-subtitle={file.label} + > + <span class="git-status-path"><%= file.path %></span> + <span class={"git-status-badge git-status-#{file.status}"}><%= file.code %></span> + </button> + <% end %> + </div> + <% else %> + <p class="git-empty-hint"><%= dgettext("ui", "No changes") %></p> + <% end %> + </section> + + <section class="git-section git-history"> + <div class="git-section-title"> + <span><%= dgettext("ui", "History") %></span> + </div> + <%= if Enum.any?(@sidebar_data.history_entries) do %> + <div class="git-history-list flex flex-col"> + <%= for entry <- @sidebar_data.history_entries do %> + <button + class="git-history-entry flex flex-col" + data-testid="git-history-entry" + data-route="git_diff" + type="button" + phx-click="open_sidebar_item" + phx-value-route="git_diff" + phx-value-id={"git-diff:commit:" <> entry.short_hash} + phx-value-title={entry.short_hash} + phx-value-subtitle={entry.subject || ""} + > + <span class="git-history-subject"><%= entry.subject %></span> + <span class="git-history-meta flex items-center gap-2"> + <span class={"git-sync-dot git-sync-#{entry.sync_status}"}></span> + <span class="git-history-hash"><%= entry.short_hash %></span> + <%= if entry.author do %><span class="git-history-author"><%= entry.author %></span><% end %> + <%= if entry.date do %><span class="git-history-date"><%= entry.date %></span><% end %> + </span> + </button> + <% end %> + </div> + <%= if @sidebar_data.has_more_history do %> + <p class="git-history-more"><%= dgettext("ui", "Older history available") %></p> + <% end %> + <% else %> + <p class="git-empty-hint"><%= dgettext("ui", "No commits yet") %></p> + <% end %> + </section> + """ + end + defp render_default_sidebar(assigns) do ~H""" <%= for section <- Map.get(@sidebar_data, :sections, []) do %> diff --git a/lib/bds/git.ex b/lib/bds/git.ex index 47f0cd1..84186fd 100644 --- a/lib/bds/git.ex +++ b/lib/bds/git.ex @@ -114,10 +114,19 @@ defmodule BDS.Git do def history(project_id, branch, opts \\ []) when is_binary(project_id) and is_binary(branch) and is_list(opts) do with {:ok, project_dir} <- project_dir(project_id), - {:ok, local_log} <- run_git(project_dir, ["log", "--format=%H%x09%s", branch], opts), - {:ok, remote_log} <- - run_git(project_dir, ["log", "--format=%H", "origin/#{branch}"], opts) do - local_commits = parse_local_history(local_log) + {:ok, local_log} <- + run_git( + project_dir, + ["log", "--date=short", "--format=%H%x09%an%x09%ad%x09%s", branch], + opts + ) do + remote_log = + case run_git(project_dir, ["log", "--format=%H", "origin/#{branch}"], opts) do + {:ok, output} -> output + {:error, {:git_failed, _message}} -> "" + end + + local_commits = parse_history_log(local_log) remote_hashes = MapSet.new(parse_remote_history(remote_log)) local_hashes = MapSet.new(Enum.map(local_commits, & &1.hash)) @@ -126,7 +135,7 @@ defmodule BDS.Git do |> MapSet.difference(local_hashes) |> MapSet.to_list() |> Enum.map(fn hash -> - %{hash: hash, subject: nil, sync_status: %{kind: :remote_only}} + %{hash: hash, subject: nil, author: nil, date: nil, sync_status: %{kind: :remote_only}} end) commits = @@ -204,6 +213,22 @@ defmodule BDS.Git do end end + def set_remote(project_id, remote_url, opts \\ []) + when is_binary(project_id) and is_binary(remote_url) and is_list(opts) do + with {:ok, project_dir} <- project_dir(project_id) do + case run_git(project_dir, ["remote", "add", "origin", remote_url], opts) do + {:ok, _output} -> + {:ok, %{remote_url: remote_url}} + + {:error, {:git_failed, _message}} -> + with {:ok, _output} <- + run_git(project_dir, ["remote", "set-url", "origin", remote_url], opts) do + {:ok, %{remote_url: remote_url}} + end + end + end + end + def remote_state(project_id, opts \\ []) when is_binary(project_id) and is_list(opts) do with {:ok, project_dir} <- project_dir(project_id), {:ok, local_branch} <- current_branch(project_dir, opts) do @@ -380,6 +405,23 @@ defmodule BDS.Git do end) end + defp parse_history_log(output) do + output + |> String.split("\n", trim: true) + |> Enum.map(fn line -> + case String.split(line, "\t", parts: 4) do + [hash, author, date, subject] -> + %{hash: hash, author: author, date: date, subject: subject} + + [hash, author, date] -> + %{hash: hash, author: author, date: date, subject: nil} + + [hash | _rest] -> + %{hash: hash, author: nil, date: nil, subject: nil} + end + end) + end + defp parse_remote_history(output) do String.split(output, "\n", trim: true) end diff --git a/lib/bds/ui/sidebar.ex b/lib/bds/ui/sidebar.ex index e6c210f..5560f1b 100644 --- a/lib/bds/ui/sidebar.ex +++ b/lib/bds/ui/sidebar.ex @@ -35,7 +35,7 @@ defmodule BDS.UI.Sidebar do "import", list_import_definitions(project_id) ), - "git" => git_view(), + "git" => git_view(project_id), "settings" => settings_nav_view() } end @@ -94,7 +94,7 @@ defmodule BDS.UI.Sidebar do ) "git" -> - git_view() + git_view(project_id) "settings" -> settings_nav_view() @@ -139,13 +139,17 @@ defmodule BDS.UI.Sidebar do "import", [] ), - "git" => git_view(), + "git" => git_view(nil), "settings" => settings_nav_view() } end - defp empty_view("posts"), do: build_posts_view([], %{}, false, empty_filter_params(), %{}, [], [], []) - defp empty_view("pages"), do: build_posts_view([], %{}, true, empty_filter_params(), %{}, [], [], []) + defp empty_view("posts"), + do: build_posts_view([], %{}, false, empty_filter_params(), %{}, [], [], []) + + defp empty_view("pages"), + do: build_posts_view([], %{}, true, empty_filter_params(), %{}, [], [], []) + defp empty_view("media"), do: build_media_view([], empty_filter_params(), %{}, [], [], 0) defp empty_view("scripts"), @@ -186,7 +190,7 @@ defmodule BDS.UI.Sidebar do [] ) - defp empty_view("git"), do: git_view() + defp empty_view("git"), do: git_view(nil) defp empty_view("settings"), do: settings_nav_view() defp empty_view(_other), @@ -563,7 +567,14 @@ defmodule BDS.UI.Sidebar do build_media_view(limited_media, filters, tag_colors, year_months, avail_tags, total_count) end - defp build_media_view(limited_media, filters, tag_colors, year_month_counts, available_tags, total_count) do + defp build_media_view( + limited_media, + filters, + tag_colors, + year_month_counts, + available_tags, + total_count + ) do loaded_count = length(limited_media) %{ @@ -779,24 +790,115 @@ defmodule BDS.UI.Sidebar do } end - defp git_view do - %{ + @git_history_page_size 20 + + defp git_view(project_id) do + base = %{ title: dgettext("ui", "Git"), subtitle: dgettext("ui", "Working tree and history"), - layout: "entity_list", - empty_message: dgettext("ui", "No items"), - items: [ - %{ - id: "git-working-tree", - title: dgettext("ui", "Working tree"), - meta: dgettext("ui", "Working tree and history"), - route: "git_diff", - updated_at: nil - } - ] + layout: "git", + empty_message: dgettext("ui", "No items") + } + + if git_repo?(project_id) do + Map.merge(base, active_git_view(project_id)) + else + Map.merge(base, %{git_state: "not_a_repo", remote_url: nil}) + end + end + + defp git_repo?(nil), do: false + + defp git_repo?(project_id) when is_binary(project_id) do + case BDS.Projects.get_project(project_id) do + nil -> false + project -> File.dir?(Path.join(BDS.Projects.project_data_dir(project), ".git")) + end + end + + defp active_git_view(project_id) do + repo = + case BDS.Git.repository(project_id) do + {:ok, repo} -> repo + _other -> %{current_branch: nil, remote_url: nil} + end + + branch = repo[:current_branch] + + remote = + case BDS.Git.remote_state(project_id) do + {:ok, state} -> state + _other -> %{upstream_branch: nil, ahead: 0, behind: 0} + end + + status_files = + case BDS.Git.status(project_id) do + {:ok, %{files: files}} -> Enum.map(files, &git_status_file/1) + _other -> [] + end + + commits = + if is_binary(branch) do + case BDS.Git.history(project_id, branch) do + {:ok, %{commits: commits}} -> commits + _other -> [] + end + else + [] + end + + %{ + git_state: "active", + branch: branch, + upstream: remote[:upstream_branch], + ahead: remote[:ahead] || 0, + behind: remote[:behind] || 0, + status_files: status_files, + history_entries: + commits |> Enum.take(@git_history_page_size) |> Enum.map(&git_history_entry/1), + has_more_history: length(commits) > @git_history_page_size, + remote_url: repo[:remote_url] } end + defp git_status_file(%{status: status} = file) do + %{ + path: Map.get(file, :path, ""), + status: to_string(status), + code: git_status_code(status), + label: git_status_label(status) + } + end + + defp git_status_code(:added), do: "A" + defp git_status_code(:deleted), do: "D" + defp git_status_code(:modified), do: "M" + defp git_status_code(:renamed), do: "R" + defp git_status_code(:untracked), do: "U" + defp git_status_code(_other), do: "M" + + defp git_status_label(:added), do: dgettext("ui", "added") + defp git_status_label(:deleted), do: dgettext("ui", "deleted") + defp git_status_label(:modified), do: dgettext("ui", "modified") + defp git_status_label(:renamed), do: dgettext("ui", "renamed") + defp git_status_label(:untracked), do: dgettext("ui", "untracked") + defp git_status_label(_other), do: dgettext("ui", "modified") + + defp git_history_entry(commit) do + %{ + short_hash: commit |> Map.get(:hash, "") |> String.slice(0, 7), + subject: Map.get(commit, :subject), + author: Map.get(commit, :author), + date: Map.get(commit, :date), + sync_status: git_sync_status(get_in(commit, [:sync_status, :kind])) + } + end + + defp git_sync_status(:both), do: "synced" + defp git_sync_status(:local_only), do: "local_only" + defp git_sync_status(:remote_only), do: "remote_only" + defp git_sync_status(_other), do: "synced" + defp entity_list_view(title, subtitle, route, items) do %{ title: title, diff --git a/priv/gettext/de/LC_MESSAGES/ui.po b/priv/gettext/de/LC_MESSAGES/ui.po index 11923af..9d0640d 100644 --- a/priv/gettext/de/LC_MESSAGES/ui.po +++ b/priv/gettext/de/LC_MESSAGES/ui.po @@ -257,7 +257,7 @@ msgid "Auto" msgstr "Automatisch" #: lib/bds/desktop/shell_data.ex:98 -#: lib/bds/desktop/shell_live.ex:414 +#: lib/bds/desktop/shell_live.ex:430 #: lib/bds/desktop/shell_live/chat_editor.ex:231 #: lib/bds/desktop/shell_live/media_editor.ex:156 #: lib/bds/desktop/shell_live/media_editor.ex:349 @@ -404,7 +404,7 @@ msgstr "Kategorie-Standards, Render-Flags und Template-Zuordnung" msgid "Category name is required" msgstr "Kategoriename ist erforderlich" -#: lib/bds/desktop/shell_live.ex:937 +#: lib/bds/desktop/shell_live.ex:953 #: lib/bds/desktop/shell_live/chat_editor.ex:87 #: lib/bds/desktop/shell_live/chat_editor.ex:230 #: lib/bds/desktop/shell_live/chat_editor.ex:318 @@ -636,12 +636,12 @@ msgstr "Standard-Bearbeitungsmodus und Diff-Darstellung" #: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:166 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:116 #: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:16 -#: lib/bds/desktop/shell_live/sidebar_components.ex:515 -#: lib/bds/desktop/shell_live/sidebar_components.ex:518 -#: lib/bds/desktop/shell_live/sidebar_components.ex:521 -#: lib/bds/desktop/shell_live/sidebar_components.ex:524 -#: lib/bds/desktop/shell_live/sidebar_components.ex:527 -#: lib/bds/desktop/shell_live/sidebar_components.ex:529 +#: lib/bds/desktop/shell_live/sidebar_components.ex:651 +#: lib/bds/desktop/shell_live/sidebar_components.ex:654 +#: lib/bds/desktop/shell_live/sidebar_components.ex:657 +#: lib/bds/desktop/shell_live/sidebar_components.ex:660 +#: lib/bds/desktop/shell_live/sidebar_components.ex:663 +#: lib/bds/desktop/shell_live/sidebar_components.ex:665 #: lib/bds/desktop/shell_live/sidebar_delete.ex:72 #: lib/bds/desktop/shell_live/sidebar_delete.ex:174 #: lib/bds/desktop/shell_live/sidebar_delete.ex:175 @@ -665,7 +665,7 @@ msgstr "Medium loeschen" msgid "Delete Translation" msgstr "Übersetzung löschen" -#: lib/bds/desktop/shell_live/sidebar_components.ex:514 +#: lib/bds/desktop/shell_live/sidebar_components.ex:650 #: lib/bds/desktop/shell_live/sidebar_delete.ex:173 #, elixir-autogen, elixir-format msgid "Delete conversation" @@ -991,8 +991,8 @@ msgstr "Galerie" msgid "Generate Site" msgstr "Website generieren" -#: lib/bds/desktop/shell_live.ex:938 -#: lib/bds/ui/sidebar.ex:784 +#: lib/bds/desktop/shell_live.ex:954 +#: lib/bds/ui/sidebar.ex:786 #, elixir-autogen, elixir-format msgid "Git" msgstr "Git" @@ -1004,7 +1004,7 @@ msgid "Git Diff" msgstr "Git-Diff" #: lib/bds/desktop/shell_data.ex:244 -#: lib/bds/desktop/shell_live.ex:934 +#: lib/bds/desktop/shell_live.ex:950 #: lib/bds/desktop/shell_live/panel_renderer.ex:171 #, elixir-autogen, elixir-format msgid "Git Log" @@ -1075,7 +1075,7 @@ msgstr "Bilder und Dateien" #: lib/bds/desktop/shell_live/import_editor/taxonomy_editing.ex:127 #: lib/bds/desktop/shell_live/import_editor/taxonomy_editing.ex:137 #: lib/bds/desktop/shell_live/misc_editor_html/misc_editor.html.heex:182 -#: lib/bds/desktop/shell_live/sidebar_components.ex:527 +#: lib/bds/desktop/shell_live/sidebar_components.ex:663 #: lib/bds/desktop/shell_live/sidebar_delete.ex:181 #: lib/bds/ui/registry.ex:70 #: lib/bds/ui/registry.ex:105 @@ -1127,9 +1127,9 @@ msgstr "Importdefinitionen" msgid "Import failed: %{error}" msgstr "Import fehlgeschlagen: %{error}" -#: lib/bds/desktop/shell_live.ex:585 -#: lib/bds/desktop/shell_live.ex:975 -#: lib/bds/desktop/shell_live.ex:981 +#: lib/bds/desktop/shell_live.ex:601 +#: lib/bds/desktop/shell_live.ex:991 +#: lib/bds/desktop/shell_live.ex:997 #: lib/bds/desktop/shell_live/sidebar_create.ex:47 #, elixir-autogen, elixir-format msgid "Import media" @@ -1304,7 +1304,7 @@ msgstr "Maximale Beiträge pro Seite" #: lib/bds/desktop/shell_live/media_editor.ex:494 #: lib/bds/desktop/shell_live/misc_editor.ex:744 #: lib/bds/desktop/shell_live/misc_editor.ex:771 -#: lib/bds/desktop/shell_live/sidebar_components.ex:518 +#: lib/bds/desktop/shell_live/sidebar_components.ex:654 #: lib/bds/desktop/shell_live/sidebar_delete.ex:175 #: lib/bds/ui/registry.ex:30 #: lib/bds/ui/registry.ex:100 @@ -1453,12 +1453,12 @@ msgstr "Noch keine Git-Historie" #: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:72 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:308 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:320 -#: lib/bds/desktop/shell_live/sidebar_components.ex:320 -#: lib/bds/desktop/shell_live/sidebar_components.ex:380 -#: lib/bds/desktop/shell_live/sidebar_components.ex:454 +#: lib/bds/desktop/shell_live/sidebar_components.ex:321 +#: lib/bds/desktop/shell_live/sidebar_components.ex:381 +#: lib/bds/desktop/shell_live/sidebar_components.ex:455 #: lib/bds/ui/sidebar.ex:198 -#: lib/bds/ui/sidebar.ex:787 -#: lib/bds/ui/sidebar.ex:805 +#: lib/bds/ui/sidebar.ex:789 +#: lib/bds/ui/sidebar.ex:896 #, elixir-autogen, elixir-format msgid "No items" msgstr "Keine Einträge" @@ -1721,7 +1721,7 @@ msgstr "Sonstige" msgid "Other (%{count})" msgstr "Andere (%{count})" -#: lib/bds/desktop/shell_live.ex:933 +#: lib/bds/desktop/shell_live.ex:949 #: lib/bds/desktop/shell_live/panel_renderer.ex:83 #, elixir-autogen, elixir-format msgid "Output" @@ -1796,7 +1796,7 @@ msgstr "Die erkannte Sprache für dieses Medium speichern" #: lib/bds/desktop/shell_live/post_editor.ex:604 #: lib/bds/desktop/shell_live/post_editor.ex:634 #: lib/bds/desktop/shell_live/post_editor.ex:637 -#: lib/bds/desktop/shell_live/sidebar_components.ex:515 +#: lib/bds/desktop/shell_live/sidebar_components.ex:651 #: lib/bds/desktop/shell_live/sidebar_delete.ex:174 #: lib/bds/ui/registry.ex:99 #, elixir-autogen, elixir-format @@ -2184,7 +2184,7 @@ msgid "Scanning entries..." msgstr "Einträge werden gescannt..." #: lib/bds/desktop/shell_live/misc_editor.ex:746 -#: lib/bds/desktop/shell_live/sidebar_components.ex:521 +#: lib/bds/desktop/shell_live/sidebar_components.ex:657 #: lib/bds/desktop/shell_live/sidebar_delete.ex:176 #: lib/bds/ui/registry.ex:133 #, elixir-autogen, elixir-format @@ -2483,7 +2483,7 @@ msgstr "Schlagwortname" msgid "Tags" msgstr "Tags" -#: lib/bds/desktop/shell_live.ex:932 +#: lib/bds/desktop/shell_live.ex:948 #: lib/bds/desktop/shell_live/panel_renderer.ex:54 #, elixir-autogen, elixir-format msgid "Tasks" @@ -2497,7 +2497,7 @@ msgstr "Technik" #: lib/bds/desktop/shell_live/misc_editor.ex:747 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:286 -#: lib/bds/desktop/shell_live/sidebar_components.ex:524 +#: lib/bds/desktop/shell_live/sidebar_components.ex:660 #: lib/bds/desktop/shell_live/sidebar_delete.ex:179 #: lib/bds/ui/registry.ex:134 #, elixir-autogen, elixir-format @@ -2735,7 +2735,7 @@ msgstr "Nicht gespeichert" #: lib/bds/desktop/shell_live/import_editor.ex:867 #: lib/bds/desktop/shell_live/post_editor/post_metadata.ex:166 -#: lib/bds/ui/sidebar.ex:1014 +#: lib/bds/ui/sidebar.ex:1105 #, elixir-autogen, elixir-format msgid "Untitled" msgstr "Ohne Titel" @@ -2829,14 +2829,12 @@ msgid "WYSIWYG" msgstr "WYSIWYG" #: lib/bds/desktop/shell_live/tab_helpers.ex:191 -#: lib/bds/ui/sidebar.ex:791 #, elixir-autogen, elixir-format msgid "Working tree" msgstr "Arbeitsverzeichnis" #: lib/bds/desktop/shell_live/tab_helpers.ex:191 -#: lib/bds/ui/sidebar.ex:785 -#: lib/bds/ui/sidebar.ex:792 +#: lib/bds/ui/sidebar.ex:787 #, elixir-autogen, elixir-format msgid "Working tree and history" msgstr "Arbeitsverzeichnis und Verlauf" @@ -3179,12 +3177,12 @@ msgstr "Willkommen beim KI-Assistenten" msgid "Comparing database and filesystem metadata" msgstr "Vergleicht Datenbank- und Dateisystem-Metadaten" -#: lib/bds/desktop/shell_live.ex:655 +#: lib/bds/desktop/shell_live.ex:671 #, elixir-autogen, elixir-format msgid "Added %{count} images to post" msgstr "%{count} Bilder zum Beitrag hinzugefügt" -#: lib/bds/desktop/shell_live.ex:626 +#: lib/bds/desktop/shell_live.ex:642 #, elixir-autogen, elixir-format msgid "Added %{title}" msgstr "%{title} hinzugefügt" @@ -3204,18 +3202,18 @@ msgstr "Endbenutzer-Anleitung für redaktionelle Arbeitsabläufe, Medien, Vorlag msgid "Image Import Concurrency" msgstr "Gleichzeitige Bildimporte" -#: lib/bds/desktop/shell_live.ex:413 -#: lib/bds/desktop/shell_live.ex:426 -#: lib/bds/desktop/shell_live.ex:626 -#: lib/bds/desktop/shell_live.ex:654 -#: lib/bds/desktop/shell_live.ex:663 +#: lib/bds/desktop/shell_live.ex:429 +#: lib/bds/desktop/shell_live.ex:442 +#: lib/bds/desktop/shell_live.ex:642 #: lib/bds/desktop/shell_live.ex:670 +#: lib/bds/desktop/shell_live.ex:679 +#: lib/bds/desktop/shell_live.ex:686 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:407 #, elixir-autogen, elixir-format msgid "Add Gallery Images" msgstr "Galerie-Bilder hinzufügen" -#: lib/bds/desktop/shell_live.ex:671 +#: lib/bds/desktop/shell_live.ex:687 #, elixir-autogen, elixir-format msgid "Failed to process %{path}: %{reason}" msgstr "%{path} konnte nicht verarbeitet werden: %{reason}" @@ -3249,3 +3247,157 @@ msgstr "Diesen Beitrag als Entwurf wiederherstellen" #, elixir-autogen, elixir-format msgid "Unarchive" msgstr "Wiederherstellen" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:531 +#, elixir-autogen, elixir-format +msgid "Ahead" +msgstr "Voraus" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:532 +#, elixir-autogen, elixir-format +msgid "Behind" +msgstr "Zurück" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:550 +#, elixir-autogen, elixir-format +msgid "Changes" +msgstr "Änderungen" + +#: lib/bds/desktop/shell_live.ex:1055 +#: lib/bds/desktop/shell_live.ex:1071 +#: lib/bds/desktop/shell_live.ex:1077 +#: lib/bds/desktop/shell_live/sidebar_components.ex:556 +#, elixir-autogen, elixir-format +msgid "Commit" +msgstr "Commit" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:555 +#, elixir-autogen, elixir-format +msgid "Commit message" +msgstr "Commit-Nachricht" + +#: lib/bds/desktop/shell_live.ex:1056 +#, elixir-autogen, elixir-format +msgid "Commit message is required" +msgstr "Commit-Nachricht erforderlich" + +#: lib/bds/desktop/shell_live.ex:1120 +#, elixir-autogen, elixir-format +msgid "Done" +msgstr "Fertig" + +#: lib/bds/desktop/shell_live.ex:1041 +#: lib/bds/desktop/shell_live/sidebar_components.ex:542 +#: lib/bds/desktop/shell_live/sidebar_components.ex:542 +#, elixir-autogen, elixir-format +msgid "Fetch" +msgstr "Abrufen" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:586 +#, elixir-autogen, elixir-format +msgid "History" +msgstr "Verlauf" + +#: lib/bds/desktop/shell_live.ex:1091 +#: lib/bds/desktop/shell_live.ex:1099 +#: lib/bds/desktop/shell_live/sidebar_components.ex:513 +#, elixir-autogen, elixir-format +msgid "Initialize Git" +msgstr "Git initialisieren" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:536 +#, elixir-autogen, elixir-format +msgid "Local only" +msgstr "Nur lokal" + +#: lib/bds/desktop/shell_live.ex:1127 +#, elixir-autogen, elixir-format +msgid "No active project" +msgstr "Kein aktives Projekt" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:580 +#, elixir-autogen, elixir-format +msgid "No changes" +msgstr "Keine Änderungen" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:616 +#, elixir-autogen, elixir-format +msgid "No commits yet" +msgstr "Noch keine Commits" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:613 +#, elixir-autogen, elixir-format +msgid "Older history available" +msgstr "Ältere Einträge verfügbar" + +#: lib/bds/desktop/shell_live.ex:1044 +#: lib/bds/desktop/shell_live/sidebar_components.ex:545 +#: lib/bds/desktop/shell_live/sidebar_components.ex:545 +#, elixir-autogen, elixir-format +msgid "Prune LFS" +msgstr "LFS bereinigen" + +#: lib/bds/desktop/shell_live.ex:1042 +#: lib/bds/desktop/shell_live/sidebar_components.ex:543 +#: lib/bds/desktop/shell_live/sidebar_components.ex:543 +#, elixir-autogen, elixir-format +msgid "Pull" +msgstr "Pull" + +#: lib/bds/desktop/shell_live.ex:1043 +#: lib/bds/desktop/shell_live/sidebar_components.ex:544 +#: lib/bds/desktop/shell_live/sidebar_components.ex:544 +#, elixir-autogen, elixir-format +msgid "Push" +msgstr "Push" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:509 +#, elixir-autogen, elixir-format +msgid "Remote URL (optional)" +msgstr "Remote-URL (optional)" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:537 +#, elixir-autogen, elixir-format +msgid "Remote only" +msgstr "Nur remote" + +#: lib/bds/desktop/shell_live.ex:1092 +#, elixir-autogen, elixir-format +msgid "Repository initialized" +msgstr "Repository initialisiert" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:535 +#, elixir-autogen, elixir-format +msgid "Synced" +msgstr "Synchronisiert" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:504 +#, elixir-autogen, elixir-format +msgid "This project is not a Git repository yet." +msgstr "Dieses Projekt ist noch kein Git-Repository." + +#: lib/bds/ui/sidebar.ex:869 +#, elixir-autogen, elixir-format +msgid "added" +msgstr "hinzugefügt" + +#: lib/bds/ui/sidebar.ex:870 +#, elixir-autogen, elixir-format +msgid "deleted" +msgstr "gelöscht" + +#: lib/bds/ui/sidebar.ex:871 +#: lib/bds/ui/sidebar.ex:874 +#, elixir-autogen, elixir-format +msgid "modified" +msgstr "geändert" + +#: lib/bds/ui/sidebar.ex:872 +#, elixir-autogen, elixir-format +msgid "renamed" +msgstr "umbenannt" + +#: lib/bds/ui/sidebar.ex:873 +#, elixir-autogen, elixir-format +msgid "untracked" +msgstr "nicht verfolgt" diff --git a/priv/gettext/en/LC_MESSAGES/ui.po b/priv/gettext/en/LC_MESSAGES/ui.po index 87e8288..a33d2c9 100644 --- a/priv/gettext/en/LC_MESSAGES/ui.po +++ b/priv/gettext/en/LC_MESSAGES/ui.po @@ -257,7 +257,7 @@ msgid "Auto" msgstr "" #: lib/bds/desktop/shell_data.ex:98 -#: lib/bds/desktop/shell_live.ex:414 +#: lib/bds/desktop/shell_live.ex:430 #: lib/bds/desktop/shell_live/chat_editor.ex:231 #: lib/bds/desktop/shell_live/media_editor.ex:156 #: lib/bds/desktop/shell_live/media_editor.ex:349 @@ -404,7 +404,7 @@ msgstr "" msgid "Category name is required" msgstr "" -#: lib/bds/desktop/shell_live.ex:937 +#: lib/bds/desktop/shell_live.ex:953 #: lib/bds/desktop/shell_live/chat_editor.ex:87 #: lib/bds/desktop/shell_live/chat_editor.ex:230 #: lib/bds/desktop/shell_live/chat_editor.ex:318 @@ -636,12 +636,12 @@ msgstr "" #: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:166 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:116 #: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:16 -#: lib/bds/desktop/shell_live/sidebar_components.ex:515 -#: lib/bds/desktop/shell_live/sidebar_components.ex:518 -#: lib/bds/desktop/shell_live/sidebar_components.ex:521 -#: lib/bds/desktop/shell_live/sidebar_components.ex:524 -#: lib/bds/desktop/shell_live/sidebar_components.ex:527 -#: lib/bds/desktop/shell_live/sidebar_components.ex:529 +#: lib/bds/desktop/shell_live/sidebar_components.ex:651 +#: lib/bds/desktop/shell_live/sidebar_components.ex:654 +#: lib/bds/desktop/shell_live/sidebar_components.ex:657 +#: lib/bds/desktop/shell_live/sidebar_components.ex:660 +#: lib/bds/desktop/shell_live/sidebar_components.ex:663 +#: lib/bds/desktop/shell_live/sidebar_components.ex:665 #: lib/bds/desktop/shell_live/sidebar_delete.ex:72 #: lib/bds/desktop/shell_live/sidebar_delete.ex:174 #: lib/bds/desktop/shell_live/sidebar_delete.ex:175 @@ -665,7 +665,7 @@ msgstr "" msgid "Delete Translation" msgstr "" -#: lib/bds/desktop/shell_live/sidebar_components.ex:514 +#: lib/bds/desktop/shell_live/sidebar_components.ex:650 #: lib/bds/desktop/shell_live/sidebar_delete.ex:173 #, elixir-autogen, elixir-format msgid "Delete conversation" @@ -991,8 +991,8 @@ msgstr "" msgid "Generate Site" msgstr "" -#: lib/bds/desktop/shell_live.ex:938 -#: lib/bds/ui/sidebar.ex:784 +#: lib/bds/desktop/shell_live.ex:954 +#: lib/bds/ui/sidebar.ex:786 #, elixir-autogen, elixir-format msgid "Git" msgstr "" @@ -1004,7 +1004,7 @@ msgid "Git Diff" msgstr "" #: lib/bds/desktop/shell_data.ex:244 -#: lib/bds/desktop/shell_live.ex:934 +#: lib/bds/desktop/shell_live.ex:950 #: lib/bds/desktop/shell_live/panel_renderer.ex:171 #, elixir-autogen, elixir-format msgid "Git Log" @@ -1075,7 +1075,7 @@ msgstr "" #: lib/bds/desktop/shell_live/import_editor/taxonomy_editing.ex:127 #: lib/bds/desktop/shell_live/import_editor/taxonomy_editing.ex:137 #: lib/bds/desktop/shell_live/misc_editor_html/misc_editor.html.heex:182 -#: lib/bds/desktop/shell_live/sidebar_components.ex:527 +#: lib/bds/desktop/shell_live/sidebar_components.ex:663 #: lib/bds/desktop/shell_live/sidebar_delete.ex:181 #: lib/bds/ui/registry.ex:70 #: lib/bds/ui/registry.ex:105 @@ -1127,9 +1127,9 @@ msgstr "" msgid "Import failed: %{error}" msgstr "" -#: lib/bds/desktop/shell_live.ex:585 -#: lib/bds/desktop/shell_live.ex:975 -#: lib/bds/desktop/shell_live.ex:981 +#: lib/bds/desktop/shell_live.ex:601 +#: lib/bds/desktop/shell_live.ex:991 +#: lib/bds/desktop/shell_live.ex:997 #: lib/bds/desktop/shell_live/sidebar_create.ex:47 #, elixir-autogen, elixir-format msgid "Import media" @@ -1304,7 +1304,7 @@ msgstr "" #: lib/bds/desktop/shell_live/media_editor.ex:494 #: lib/bds/desktop/shell_live/misc_editor.ex:744 #: lib/bds/desktop/shell_live/misc_editor.ex:771 -#: lib/bds/desktop/shell_live/sidebar_components.ex:518 +#: lib/bds/desktop/shell_live/sidebar_components.ex:654 #: lib/bds/desktop/shell_live/sidebar_delete.ex:175 #: lib/bds/ui/registry.ex:30 #: lib/bds/ui/registry.ex:100 @@ -1453,12 +1453,12 @@ msgstr "" #: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:72 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:308 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:320 -#: lib/bds/desktop/shell_live/sidebar_components.ex:320 -#: lib/bds/desktop/shell_live/sidebar_components.ex:380 -#: lib/bds/desktop/shell_live/sidebar_components.ex:454 +#: lib/bds/desktop/shell_live/sidebar_components.ex:321 +#: lib/bds/desktop/shell_live/sidebar_components.ex:381 +#: lib/bds/desktop/shell_live/sidebar_components.ex:455 #: lib/bds/ui/sidebar.ex:198 -#: lib/bds/ui/sidebar.ex:787 -#: lib/bds/ui/sidebar.ex:805 +#: lib/bds/ui/sidebar.ex:789 +#: lib/bds/ui/sidebar.ex:896 #, elixir-autogen, elixir-format msgid "No items" msgstr "" @@ -1721,7 +1721,7 @@ msgstr "" msgid "Other (%{count})" msgstr "" -#: lib/bds/desktop/shell_live.ex:933 +#: lib/bds/desktop/shell_live.ex:949 #: lib/bds/desktop/shell_live/panel_renderer.ex:83 #, elixir-autogen, elixir-format msgid "Output" @@ -1796,7 +1796,7 @@ msgstr "" #: lib/bds/desktop/shell_live/post_editor.ex:604 #: lib/bds/desktop/shell_live/post_editor.ex:634 #: lib/bds/desktop/shell_live/post_editor.ex:637 -#: lib/bds/desktop/shell_live/sidebar_components.ex:515 +#: lib/bds/desktop/shell_live/sidebar_components.ex:651 #: lib/bds/desktop/shell_live/sidebar_delete.ex:174 #: lib/bds/ui/registry.ex:99 #, elixir-autogen, elixir-format @@ -2184,7 +2184,7 @@ msgid "Scanning entries..." msgstr "" #: lib/bds/desktop/shell_live/misc_editor.ex:746 -#: lib/bds/desktop/shell_live/sidebar_components.ex:521 +#: lib/bds/desktop/shell_live/sidebar_components.ex:657 #: lib/bds/desktop/shell_live/sidebar_delete.ex:176 #: lib/bds/ui/registry.ex:133 #, elixir-autogen, elixir-format @@ -2483,7 +2483,7 @@ msgstr "" msgid "Tags" msgstr "" -#: lib/bds/desktop/shell_live.ex:932 +#: lib/bds/desktop/shell_live.ex:948 #: lib/bds/desktop/shell_live/panel_renderer.ex:54 #, elixir-autogen, elixir-format msgid "Tasks" @@ -2497,7 +2497,7 @@ msgstr "" #: lib/bds/desktop/shell_live/misc_editor.ex:747 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:286 -#: lib/bds/desktop/shell_live/sidebar_components.ex:524 +#: lib/bds/desktop/shell_live/sidebar_components.ex:660 #: lib/bds/desktop/shell_live/sidebar_delete.ex:179 #: lib/bds/ui/registry.ex:134 #, elixir-autogen, elixir-format @@ -2735,7 +2735,7 @@ msgstr "" #: lib/bds/desktop/shell_live/import_editor.ex:867 #: lib/bds/desktop/shell_live/post_editor/post_metadata.ex:166 -#: lib/bds/ui/sidebar.ex:1014 +#: lib/bds/ui/sidebar.ex:1105 #, elixir-autogen, elixir-format msgid "Untitled" msgstr "" @@ -2829,14 +2829,12 @@ msgid "WYSIWYG" msgstr "" #: lib/bds/desktop/shell_live/tab_helpers.ex:191 -#: lib/bds/ui/sidebar.ex:791 #, elixir-autogen, elixir-format msgid "Working tree" msgstr "" #: lib/bds/desktop/shell_live/tab_helpers.ex:191 -#: lib/bds/ui/sidebar.ex:785 -#: lib/bds/ui/sidebar.ex:792 +#: lib/bds/ui/sidebar.ex:787 #, elixir-autogen, elixir-format msgid "Working tree and history" msgstr "" @@ -3179,12 +3177,12 @@ msgstr "" msgid "Comparing database and filesystem metadata" msgstr "Comparing database and filesystem metadata" -#: lib/bds/desktop/shell_live.ex:655 +#: lib/bds/desktop/shell_live.ex:671 #, elixir-autogen, elixir-format msgid "Added %{count} images to post" msgstr "Added %{count} images to post" -#: lib/bds/desktop/shell_live.ex:626 +#: lib/bds/desktop/shell_live.ex:642 #, elixir-autogen, elixir-format msgid "Added %{title}" msgstr "Added %{title}" @@ -3204,18 +3202,18 @@ msgstr "" msgid "Image Import Concurrency" msgstr "Image Import Concurrency" -#: lib/bds/desktop/shell_live.ex:413 -#: lib/bds/desktop/shell_live.ex:426 -#: lib/bds/desktop/shell_live.ex:626 -#: lib/bds/desktop/shell_live.ex:654 -#: lib/bds/desktop/shell_live.ex:663 +#: lib/bds/desktop/shell_live.ex:429 +#: lib/bds/desktop/shell_live.ex:442 +#: lib/bds/desktop/shell_live.ex:642 #: lib/bds/desktop/shell_live.ex:670 +#: lib/bds/desktop/shell_live.ex:679 +#: lib/bds/desktop/shell_live.ex:686 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:407 #, elixir-autogen, elixir-format msgid "Add Gallery Images" msgstr "Add Gallery Images" -#: lib/bds/desktop/shell_live.ex:671 +#: lib/bds/desktop/shell_live.ex:687 #, elixir-autogen, elixir-format msgid "Failed to process %{path}: %{reason}" msgstr "Failed to process %{path}: %{reason}" @@ -3249,3 +3247,157 @@ msgstr "" #, elixir-autogen, elixir-format, fuzzy msgid "Unarchive" msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:531 +#, elixir-autogen, elixir-format +msgid "Ahead" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:532 +#, elixir-autogen, elixir-format +msgid "Behind" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:550 +#, elixir-autogen, elixir-format +msgid "Changes" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1055 +#: lib/bds/desktop/shell_live.ex:1071 +#: lib/bds/desktop/shell_live.ex:1077 +#: lib/bds/desktop/shell_live/sidebar_components.ex:556 +#, elixir-autogen, elixir-format +msgid "Commit" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:555 +#, elixir-autogen, elixir-format +msgid "Commit message" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1056 +#, elixir-autogen, elixir-format +msgid "Commit message is required" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1120 +#, elixir-autogen, elixir-format, fuzzy +msgid "Done" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1041 +#: lib/bds/desktop/shell_live/sidebar_components.ex:542 +#: lib/bds/desktop/shell_live/sidebar_components.ex:542 +#, elixir-autogen, elixir-format +msgid "Fetch" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:586 +#, elixir-autogen, elixir-format +msgid "History" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1091 +#: lib/bds/desktop/shell_live.ex:1099 +#: lib/bds/desktop/shell_live/sidebar_components.ex:513 +#, elixir-autogen, elixir-format +msgid "Initialize Git" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:536 +#, elixir-autogen, elixir-format +msgid "Local only" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1127 +#, elixir-autogen, elixir-format +msgid "No active project" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:580 +#, elixir-autogen, elixir-format +msgid "No changes" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:616 +#, elixir-autogen, elixir-format, fuzzy +msgid "No commits yet" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:613 +#, elixir-autogen, elixir-format +msgid "Older history available" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1044 +#: lib/bds/desktop/shell_live/sidebar_components.ex:545 +#: lib/bds/desktop/shell_live/sidebar_components.ex:545 +#, elixir-autogen, elixir-format +msgid "Prune LFS" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1042 +#: lib/bds/desktop/shell_live/sidebar_components.ex:543 +#: lib/bds/desktop/shell_live/sidebar_components.ex:543 +#, elixir-autogen, elixir-format +msgid "Pull" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1043 +#: lib/bds/desktop/shell_live/sidebar_components.ex:544 +#: lib/bds/desktop/shell_live/sidebar_components.ex:544 +#, elixir-autogen, elixir-format, fuzzy +msgid "Push" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:509 +#, elixir-autogen, elixir-format +msgid "Remote URL (optional)" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:537 +#, elixir-autogen, elixir-format +msgid "Remote only" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1092 +#, elixir-autogen, elixir-format +msgid "Repository initialized" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:535 +#, elixir-autogen, elixir-format, fuzzy +msgid "Synced" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:504 +#, elixir-autogen, elixir-format +msgid "This project is not a Git repository yet." +msgstr "" + +#: lib/bds/ui/sidebar.ex:869 +#, elixir-autogen, elixir-format, fuzzy +msgid "added" +msgstr "" + +#: lib/bds/ui/sidebar.ex:870 +#, elixir-autogen, elixir-format, fuzzy +msgid "deleted" +msgstr "" + +#: lib/bds/ui/sidebar.ex:871 +#: lib/bds/ui/sidebar.ex:874 +#, elixir-autogen, elixir-format +msgid "modified" +msgstr "" + +#: lib/bds/ui/sidebar.ex:872 +#, elixir-autogen, elixir-format, fuzzy +msgid "renamed" +msgstr "" + +#: lib/bds/ui/sidebar.ex:873 +#, elixir-autogen, elixir-format +msgid "untracked" +msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/ui.po b/priv/gettext/es/LC_MESSAGES/ui.po index dcd6a7b..418674b 100644 --- a/priv/gettext/es/LC_MESSAGES/ui.po +++ b/priv/gettext/es/LC_MESSAGES/ui.po @@ -257,7 +257,7 @@ msgid "Auto" msgstr "Automático" #: lib/bds/desktop/shell_data.ex:98 -#: lib/bds/desktop/shell_live.ex:414 +#: lib/bds/desktop/shell_live.ex:430 #: lib/bds/desktop/shell_live/chat_editor.ex:231 #: lib/bds/desktop/shell_live/media_editor.ex:156 #: lib/bds/desktop/shell_live/media_editor.ex:349 @@ -404,7 +404,7 @@ msgstr "Valores predeterminados de categoría, opciones de renderizado y conexi msgid "Category name is required" msgstr "El nombre de la categoría es obligatorio" -#: lib/bds/desktop/shell_live.ex:937 +#: lib/bds/desktop/shell_live.ex:953 #: lib/bds/desktop/shell_live/chat_editor.ex:87 #: lib/bds/desktop/shell_live/chat_editor.ex:230 #: lib/bds/desktop/shell_live/chat_editor.ex:318 @@ -636,12 +636,12 @@ msgstr "Modo de edición predeterminado y presentación de diff" #: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:166 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:116 #: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:16 -#: lib/bds/desktop/shell_live/sidebar_components.ex:515 -#: lib/bds/desktop/shell_live/sidebar_components.ex:518 -#: lib/bds/desktop/shell_live/sidebar_components.ex:521 -#: lib/bds/desktop/shell_live/sidebar_components.ex:524 -#: lib/bds/desktop/shell_live/sidebar_components.ex:527 -#: lib/bds/desktop/shell_live/sidebar_components.ex:529 +#: lib/bds/desktop/shell_live/sidebar_components.ex:651 +#: lib/bds/desktop/shell_live/sidebar_components.ex:654 +#: lib/bds/desktop/shell_live/sidebar_components.ex:657 +#: lib/bds/desktop/shell_live/sidebar_components.ex:660 +#: lib/bds/desktop/shell_live/sidebar_components.ex:663 +#: lib/bds/desktop/shell_live/sidebar_components.ex:665 #: lib/bds/desktop/shell_live/sidebar_delete.ex:72 #: lib/bds/desktop/shell_live/sidebar_delete.ex:174 #: lib/bds/desktop/shell_live/sidebar_delete.ex:175 @@ -665,7 +665,7 @@ msgstr "Eliminar medio" msgid "Delete Translation" msgstr "Eliminar traducción" -#: lib/bds/desktop/shell_live/sidebar_components.ex:514 +#: lib/bds/desktop/shell_live/sidebar_components.ex:650 #: lib/bds/desktop/shell_live/sidebar_delete.ex:173 #, elixir-autogen, elixir-format msgid "Delete conversation" @@ -991,8 +991,8 @@ msgstr "Galeria" msgid "Generate Site" msgstr "Generar sitio" -#: lib/bds/desktop/shell_live.ex:938 -#: lib/bds/ui/sidebar.ex:784 +#: lib/bds/desktop/shell_live.ex:954 +#: lib/bds/ui/sidebar.ex:786 #, elixir-autogen, elixir-format msgid "Git" msgstr "Git" @@ -1004,7 +1004,7 @@ msgid "Git Diff" msgstr "Diff de Git" #: lib/bds/desktop/shell_data.ex:244 -#: lib/bds/desktop/shell_live.ex:934 +#: lib/bds/desktop/shell_live.ex:950 #: lib/bds/desktop/shell_live/panel_renderer.ex:171 #, elixir-autogen, elixir-format msgid "Git Log" @@ -1075,7 +1075,7 @@ msgstr "Imágenes y archivos" #: lib/bds/desktop/shell_live/import_editor/taxonomy_editing.ex:127 #: lib/bds/desktop/shell_live/import_editor/taxonomy_editing.ex:137 #: lib/bds/desktop/shell_live/misc_editor_html/misc_editor.html.heex:182 -#: lib/bds/desktop/shell_live/sidebar_components.ex:527 +#: lib/bds/desktop/shell_live/sidebar_components.ex:663 #: lib/bds/desktop/shell_live/sidebar_delete.ex:181 #: lib/bds/ui/registry.ex:70 #: lib/bds/ui/registry.ex:105 @@ -1127,9 +1127,9 @@ msgstr "Definiciones de importación" msgid "Import failed: %{error}" msgstr "La importación falló: %{error}" -#: lib/bds/desktop/shell_live.ex:585 -#: lib/bds/desktop/shell_live.ex:975 -#: lib/bds/desktop/shell_live.ex:981 +#: lib/bds/desktop/shell_live.ex:601 +#: lib/bds/desktop/shell_live.ex:991 +#: lib/bds/desktop/shell_live.ex:997 #: lib/bds/desktop/shell_live/sidebar_create.ex:47 #, elixir-autogen, elixir-format msgid "Import media" @@ -1304,7 +1304,7 @@ msgstr "Máximo de publicaciones por página" #: lib/bds/desktop/shell_live/media_editor.ex:494 #: lib/bds/desktop/shell_live/misc_editor.ex:744 #: lib/bds/desktop/shell_live/misc_editor.ex:771 -#: lib/bds/desktop/shell_live/sidebar_components.ex:518 +#: lib/bds/desktop/shell_live/sidebar_components.ex:654 #: lib/bds/desktop/shell_live/sidebar_delete.ex:175 #: lib/bds/ui/registry.ex:30 #: lib/bds/ui/registry.ex:100 @@ -1453,12 +1453,12 @@ msgstr "Aún no hay historial de Git" #: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:72 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:308 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:320 -#: lib/bds/desktop/shell_live/sidebar_components.ex:320 -#: lib/bds/desktop/shell_live/sidebar_components.ex:380 -#: lib/bds/desktop/shell_live/sidebar_components.ex:454 +#: lib/bds/desktop/shell_live/sidebar_components.ex:321 +#: lib/bds/desktop/shell_live/sidebar_components.ex:381 +#: lib/bds/desktop/shell_live/sidebar_components.ex:455 #: lib/bds/ui/sidebar.ex:198 -#: lib/bds/ui/sidebar.ex:787 -#: lib/bds/ui/sidebar.ex:805 +#: lib/bds/ui/sidebar.ex:789 +#: lib/bds/ui/sidebar.ex:896 #, elixir-autogen, elixir-format msgid "No items" msgstr "No hay elementos" @@ -1721,7 +1721,7 @@ msgstr "Otros" msgid "Other (%{count})" msgstr "Otros (%{count})" -#: lib/bds/desktop/shell_live.ex:933 +#: lib/bds/desktop/shell_live.ex:949 #: lib/bds/desktop/shell_live/panel_renderer.ex:83 #, elixir-autogen, elixir-format msgid "Output" @@ -1796,7 +1796,7 @@ msgstr "Guardar el idioma detectado para este medio" #: lib/bds/desktop/shell_live/post_editor.ex:604 #: lib/bds/desktop/shell_live/post_editor.ex:634 #: lib/bds/desktop/shell_live/post_editor.ex:637 -#: lib/bds/desktop/shell_live/sidebar_components.ex:515 +#: lib/bds/desktop/shell_live/sidebar_components.ex:651 #: lib/bds/desktop/shell_live/sidebar_delete.ex:174 #: lib/bds/ui/registry.ex:99 #, elixir-autogen, elixir-format @@ -2184,7 +2184,7 @@ msgid "Scanning entries..." msgstr "Escaneando entradas..." #: lib/bds/desktop/shell_live/misc_editor.ex:746 -#: lib/bds/desktop/shell_live/sidebar_components.ex:521 +#: lib/bds/desktop/shell_live/sidebar_components.ex:657 #: lib/bds/desktop/shell_live/sidebar_delete.ex:176 #: lib/bds/ui/registry.ex:133 #, elixir-autogen, elixir-format @@ -2483,7 +2483,7 @@ msgstr "Nombre de la etiqueta" msgid "Tags" msgstr "Etiquetas" -#: lib/bds/desktop/shell_live.ex:932 +#: lib/bds/desktop/shell_live.ex:948 #: lib/bds/desktop/shell_live/panel_renderer.ex:54 #, elixir-autogen, elixir-format msgid "Tasks" @@ -2497,7 +2497,7 @@ msgstr "Tecnología" #: lib/bds/desktop/shell_live/misc_editor.ex:747 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:286 -#: lib/bds/desktop/shell_live/sidebar_components.ex:524 +#: lib/bds/desktop/shell_live/sidebar_components.ex:660 #: lib/bds/desktop/shell_live/sidebar_delete.ex:179 #: lib/bds/ui/registry.ex:134 #, elixir-autogen, elixir-format @@ -2735,7 +2735,7 @@ msgstr "Sin guardar" #: lib/bds/desktop/shell_live/import_editor.ex:867 #: lib/bds/desktop/shell_live/post_editor/post_metadata.ex:166 -#: lib/bds/ui/sidebar.ex:1014 +#: lib/bds/ui/sidebar.ex:1105 #, elixir-autogen, elixir-format msgid "Untitled" msgstr "Sin título" @@ -2829,14 +2829,12 @@ msgid "WYSIWYG" msgstr "WYSIWYG" #: lib/bds/desktop/shell_live/tab_helpers.ex:191 -#: lib/bds/ui/sidebar.ex:791 #, elixir-autogen, elixir-format msgid "Working tree" msgstr "Árbol de trabajo" #: lib/bds/desktop/shell_live/tab_helpers.ex:191 -#: lib/bds/ui/sidebar.ex:785 -#: lib/bds/ui/sidebar.ex:792 +#: lib/bds/ui/sidebar.ex:787 #, elixir-autogen, elixir-format msgid "Working tree and history" msgstr "Árbol de trabajo e historial" @@ -3179,12 +3177,12 @@ msgstr "Bienvenido al asistente de IA" msgid "Comparing database and filesystem metadata" msgstr "Comparando metadatos de la base de datos y del sistema de archivos" -#: lib/bds/desktop/shell_live.ex:655 +#: lib/bds/desktop/shell_live.ex:671 #, elixir-autogen, elixir-format msgid "Added %{count} images to post" msgstr "%{count} imágenes añadidas a la publicación" -#: lib/bds/desktop/shell_live.ex:626 +#: lib/bds/desktop/shell_live.ex:642 #, elixir-autogen, elixir-format msgid "Added %{title}" msgstr "%{title} añadido" @@ -3204,18 +3202,18 @@ msgstr "Guía del usuario para flujos editoriales, medios, plantillas, traducci msgid "Image Import Concurrency" msgstr "Importación simultánea de imágenes" -#: lib/bds/desktop/shell_live.ex:413 -#: lib/bds/desktop/shell_live.ex:426 -#: lib/bds/desktop/shell_live.ex:626 -#: lib/bds/desktop/shell_live.ex:654 -#: lib/bds/desktop/shell_live.ex:663 +#: lib/bds/desktop/shell_live.ex:429 +#: lib/bds/desktop/shell_live.ex:442 +#: lib/bds/desktop/shell_live.ex:642 #: lib/bds/desktop/shell_live.ex:670 +#: lib/bds/desktop/shell_live.ex:679 +#: lib/bds/desktop/shell_live.ex:686 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:407 #, elixir-autogen, elixir-format msgid "Add Gallery Images" msgstr "Añadir imágenes a la galería" -#: lib/bds/desktop/shell_live.ex:671 +#: lib/bds/desktop/shell_live.ex:687 #, elixir-autogen, elixir-format msgid "Failed to process %{path}: %{reason}" msgstr "No se pudo procesar %{path}: %{reason}" @@ -3249,3 +3247,157 @@ msgstr "Restaurar este artículo como borrador" #, elixir-autogen, elixir-format msgid "Unarchive" msgstr "Desarchivar" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:531 +#, elixir-autogen, elixir-format +msgid "Ahead" +msgstr "Adelante" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:532 +#, elixir-autogen, elixir-format +msgid "Behind" +msgstr "Atrás" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:550 +#, elixir-autogen, elixir-format +msgid "Changes" +msgstr "Cambios" + +#: lib/bds/desktop/shell_live.ex:1055 +#: lib/bds/desktop/shell_live.ex:1071 +#: lib/bds/desktop/shell_live.ex:1077 +#: lib/bds/desktop/shell_live/sidebar_components.ex:556 +#, elixir-autogen, elixir-format +msgid "Commit" +msgstr "Commit" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:555 +#, elixir-autogen, elixir-format +msgid "Commit message" +msgstr "Mensaje de commit" + +#: lib/bds/desktop/shell_live.ex:1056 +#, elixir-autogen, elixir-format +msgid "Commit message is required" +msgstr "Se requiere un mensaje de commit" + +#: lib/bds/desktop/shell_live.ex:1120 +#, elixir-autogen, elixir-format +msgid "Done" +msgstr "Listo" + +#: lib/bds/desktop/shell_live.ex:1041 +#: lib/bds/desktop/shell_live/sidebar_components.ex:542 +#: lib/bds/desktop/shell_live/sidebar_components.ex:542 +#, elixir-autogen, elixir-format +msgid "Fetch" +msgstr "Obtener" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:586 +#, elixir-autogen, elixir-format +msgid "History" +msgstr "Historial" + +#: lib/bds/desktop/shell_live.ex:1091 +#: lib/bds/desktop/shell_live.ex:1099 +#: lib/bds/desktop/shell_live/sidebar_components.ex:513 +#, elixir-autogen, elixir-format +msgid "Initialize Git" +msgstr "Inicializar Git" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:536 +#, elixir-autogen, elixir-format +msgid "Local only" +msgstr "Solo local" + +#: lib/bds/desktop/shell_live.ex:1127 +#, elixir-autogen, elixir-format +msgid "No active project" +msgstr "Sin proyecto activo" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:580 +#, elixir-autogen, elixir-format +msgid "No changes" +msgstr "Sin cambios" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:616 +#, elixir-autogen, elixir-format +msgid "No commits yet" +msgstr "Aún no hay commits" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:613 +#, elixir-autogen, elixir-format +msgid "Older history available" +msgstr "Hay historial más antiguo disponible" + +#: lib/bds/desktop/shell_live.ex:1044 +#: lib/bds/desktop/shell_live/sidebar_components.ex:545 +#: lib/bds/desktop/shell_live/sidebar_components.ex:545 +#, elixir-autogen, elixir-format +msgid "Prune LFS" +msgstr "Limpiar LFS" + +#: lib/bds/desktop/shell_live.ex:1042 +#: lib/bds/desktop/shell_live/sidebar_components.ex:543 +#: lib/bds/desktop/shell_live/sidebar_components.ex:543 +#, elixir-autogen, elixir-format +msgid "Pull" +msgstr "Pull" + +#: lib/bds/desktop/shell_live.ex:1043 +#: lib/bds/desktop/shell_live/sidebar_components.ex:544 +#: lib/bds/desktop/shell_live/sidebar_components.ex:544 +#, elixir-autogen, elixir-format +msgid "Push" +msgstr "Push" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:509 +#, elixir-autogen, elixir-format +msgid "Remote URL (optional)" +msgstr "URL remota (opcional)" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:537 +#, elixir-autogen, elixir-format +msgid "Remote only" +msgstr "Solo remoto" + +#: lib/bds/desktop/shell_live.ex:1092 +#, elixir-autogen, elixir-format +msgid "Repository initialized" +msgstr "Repositorio inicializado" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:535 +#, elixir-autogen, elixir-format +msgid "Synced" +msgstr "Sincronizado" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:504 +#, elixir-autogen, elixir-format +msgid "This project is not a Git repository yet." +msgstr "Este proyecto aún no es un repositorio Git." + +#: lib/bds/ui/sidebar.ex:869 +#, elixir-autogen, elixir-format +msgid "added" +msgstr "añadido" + +#: lib/bds/ui/sidebar.ex:870 +#, elixir-autogen, elixir-format +msgid "deleted" +msgstr "eliminado" + +#: lib/bds/ui/sidebar.ex:871 +#: lib/bds/ui/sidebar.ex:874 +#, elixir-autogen, elixir-format +msgid "modified" +msgstr "modificado" + +#: lib/bds/ui/sidebar.ex:872 +#, elixir-autogen, elixir-format +msgid "renamed" +msgstr "renombrado" + +#: lib/bds/ui/sidebar.ex:873 +#, elixir-autogen, elixir-format +msgid "untracked" +msgstr "sin seguimiento" diff --git a/priv/gettext/fr/LC_MESSAGES/ui.po b/priv/gettext/fr/LC_MESSAGES/ui.po index c0e46a5..a7f0d97 100644 --- a/priv/gettext/fr/LC_MESSAGES/ui.po +++ b/priv/gettext/fr/LC_MESSAGES/ui.po @@ -257,7 +257,7 @@ msgid "Auto" msgstr "Automatique" #: lib/bds/desktop/shell_data.ex:98 -#: lib/bds/desktop/shell_live.ex:414 +#: lib/bds/desktop/shell_live.ex:430 #: lib/bds/desktop/shell_live/chat_editor.ex:231 #: lib/bds/desktop/shell_live/media_editor.ex:156 #: lib/bds/desktop/shell_live/media_editor.ex:349 @@ -404,7 +404,7 @@ msgstr "Valeurs par défaut des catégories, options de rendu et liaison des mod msgid "Category name is required" msgstr "Le nom de la catégorie est requis" -#: lib/bds/desktop/shell_live.ex:937 +#: lib/bds/desktop/shell_live.ex:953 #: lib/bds/desktop/shell_live/chat_editor.ex:87 #: lib/bds/desktop/shell_live/chat_editor.ex:230 #: lib/bds/desktop/shell_live/chat_editor.ex:318 @@ -636,12 +636,12 @@ msgstr "Mode d’édition par défaut et présentation des diffs" #: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:166 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:116 #: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:16 -#: lib/bds/desktop/shell_live/sidebar_components.ex:515 -#: lib/bds/desktop/shell_live/sidebar_components.ex:518 -#: lib/bds/desktop/shell_live/sidebar_components.ex:521 -#: lib/bds/desktop/shell_live/sidebar_components.ex:524 -#: lib/bds/desktop/shell_live/sidebar_components.ex:527 -#: lib/bds/desktop/shell_live/sidebar_components.ex:529 +#: lib/bds/desktop/shell_live/sidebar_components.ex:651 +#: lib/bds/desktop/shell_live/sidebar_components.ex:654 +#: lib/bds/desktop/shell_live/sidebar_components.ex:657 +#: lib/bds/desktop/shell_live/sidebar_components.ex:660 +#: lib/bds/desktop/shell_live/sidebar_components.ex:663 +#: lib/bds/desktop/shell_live/sidebar_components.ex:665 #: lib/bds/desktop/shell_live/sidebar_delete.ex:72 #: lib/bds/desktop/shell_live/sidebar_delete.ex:174 #: lib/bds/desktop/shell_live/sidebar_delete.ex:175 @@ -665,7 +665,7 @@ msgstr "Supprimer le media" msgid "Delete Translation" msgstr "Supprimer la traduction" -#: lib/bds/desktop/shell_live/sidebar_components.ex:514 +#: lib/bds/desktop/shell_live/sidebar_components.ex:650 #: lib/bds/desktop/shell_live/sidebar_delete.ex:173 #, elixir-autogen, elixir-format msgid "Delete conversation" @@ -991,8 +991,8 @@ msgstr "Galerie" msgid "Generate Site" msgstr "Générer le site" -#: lib/bds/desktop/shell_live.ex:938 -#: lib/bds/ui/sidebar.ex:784 +#: lib/bds/desktop/shell_live.ex:954 +#: lib/bds/ui/sidebar.ex:786 #, elixir-autogen, elixir-format msgid "Git" msgstr "Git" @@ -1004,7 +1004,7 @@ msgid "Git Diff" msgstr "Diff Git" #: lib/bds/desktop/shell_data.ex:244 -#: lib/bds/desktop/shell_live.ex:934 +#: lib/bds/desktop/shell_live.ex:950 #: lib/bds/desktop/shell_live/panel_renderer.ex:171 #, elixir-autogen, elixir-format msgid "Git Log" @@ -1075,7 +1075,7 @@ msgstr "Images et fichiers" #: lib/bds/desktop/shell_live/import_editor/taxonomy_editing.ex:127 #: lib/bds/desktop/shell_live/import_editor/taxonomy_editing.ex:137 #: lib/bds/desktop/shell_live/misc_editor_html/misc_editor.html.heex:182 -#: lib/bds/desktop/shell_live/sidebar_components.ex:527 +#: lib/bds/desktop/shell_live/sidebar_components.ex:663 #: lib/bds/desktop/shell_live/sidebar_delete.ex:181 #: lib/bds/ui/registry.ex:70 #: lib/bds/ui/registry.ex:105 @@ -1127,9 +1127,9 @@ msgstr "Définitions d’import" msgid "Import failed: %{error}" msgstr "Échec de l’import : %{error}" -#: lib/bds/desktop/shell_live.ex:585 -#: lib/bds/desktop/shell_live.ex:975 -#: lib/bds/desktop/shell_live.ex:981 +#: lib/bds/desktop/shell_live.ex:601 +#: lib/bds/desktop/shell_live.ex:991 +#: lib/bds/desktop/shell_live.ex:997 #: lib/bds/desktop/shell_live/sidebar_create.ex:47 #, elixir-autogen, elixir-format msgid "Import media" @@ -1304,7 +1304,7 @@ msgstr "Nombre maximal d’articles par page" #: lib/bds/desktop/shell_live/media_editor.ex:494 #: lib/bds/desktop/shell_live/misc_editor.ex:744 #: lib/bds/desktop/shell_live/misc_editor.ex:771 -#: lib/bds/desktop/shell_live/sidebar_components.ex:518 +#: lib/bds/desktop/shell_live/sidebar_components.ex:654 #: lib/bds/desktop/shell_live/sidebar_delete.ex:175 #: lib/bds/ui/registry.ex:30 #: lib/bds/ui/registry.ex:100 @@ -1453,12 +1453,12 @@ msgstr "Pas encore d'historique Git" #: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:72 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:308 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:320 -#: lib/bds/desktop/shell_live/sidebar_components.ex:320 -#: lib/bds/desktop/shell_live/sidebar_components.ex:380 -#: lib/bds/desktop/shell_live/sidebar_components.ex:454 +#: lib/bds/desktop/shell_live/sidebar_components.ex:321 +#: lib/bds/desktop/shell_live/sidebar_components.ex:381 +#: lib/bds/desktop/shell_live/sidebar_components.ex:455 #: lib/bds/ui/sidebar.ex:198 -#: lib/bds/ui/sidebar.ex:787 -#: lib/bds/ui/sidebar.ex:805 +#: lib/bds/ui/sidebar.ex:789 +#: lib/bds/ui/sidebar.ex:896 #, elixir-autogen, elixir-format msgid "No items" msgstr "Aucun élément" @@ -1721,7 +1721,7 @@ msgstr "Autre" msgid "Other (%{count})" msgstr "Autres (%{count})" -#: lib/bds/desktop/shell_live.ex:933 +#: lib/bds/desktop/shell_live.ex:949 #: lib/bds/desktop/shell_live/panel_renderer.ex:83 #, elixir-autogen, elixir-format msgid "Output" @@ -1796,7 +1796,7 @@ msgstr "Enregistrer la langue détectée pour ce média" #: lib/bds/desktop/shell_live/post_editor.ex:604 #: lib/bds/desktop/shell_live/post_editor.ex:634 #: lib/bds/desktop/shell_live/post_editor.ex:637 -#: lib/bds/desktop/shell_live/sidebar_components.ex:515 +#: lib/bds/desktop/shell_live/sidebar_components.ex:651 #: lib/bds/desktop/shell_live/sidebar_delete.ex:174 #: lib/bds/ui/registry.ex:99 #, elixir-autogen, elixir-format @@ -2184,7 +2184,7 @@ msgid "Scanning entries..." msgstr "Analyse des entrées..." #: lib/bds/desktop/shell_live/misc_editor.ex:746 -#: lib/bds/desktop/shell_live/sidebar_components.ex:521 +#: lib/bds/desktop/shell_live/sidebar_components.ex:657 #: lib/bds/desktop/shell_live/sidebar_delete.ex:176 #: lib/bds/ui/registry.ex:133 #, elixir-autogen, elixir-format @@ -2483,7 +2483,7 @@ msgstr "Nom du mot-clé" msgid "Tags" msgstr "Tags" -#: lib/bds/desktop/shell_live.ex:932 +#: lib/bds/desktop/shell_live.ex:948 #: lib/bds/desktop/shell_live/panel_renderer.ex:54 #, elixir-autogen, elixir-format msgid "Tasks" @@ -2497,7 +2497,7 @@ msgstr "Technologie" #: lib/bds/desktop/shell_live/misc_editor.ex:747 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:286 -#: lib/bds/desktop/shell_live/sidebar_components.ex:524 +#: lib/bds/desktop/shell_live/sidebar_components.ex:660 #: lib/bds/desktop/shell_live/sidebar_delete.ex:179 #: lib/bds/ui/registry.ex:134 #, elixir-autogen, elixir-format @@ -2735,7 +2735,7 @@ msgstr "Non enregistré" #: lib/bds/desktop/shell_live/import_editor.ex:867 #: lib/bds/desktop/shell_live/post_editor/post_metadata.ex:166 -#: lib/bds/ui/sidebar.ex:1014 +#: lib/bds/ui/sidebar.ex:1105 #, elixir-autogen, elixir-format msgid "Untitled" msgstr "Sans titre" @@ -2829,14 +2829,12 @@ msgid "WYSIWYG" msgstr "WYSIWYG" #: lib/bds/desktop/shell_live/tab_helpers.ex:191 -#: lib/bds/ui/sidebar.ex:791 #, elixir-autogen, elixir-format msgid "Working tree" msgstr "Arbre de travail" #: lib/bds/desktop/shell_live/tab_helpers.ex:191 -#: lib/bds/ui/sidebar.ex:785 -#: lib/bds/ui/sidebar.ex:792 +#: lib/bds/ui/sidebar.ex:787 #, elixir-autogen, elixir-format msgid "Working tree and history" msgstr "Arbre de travail et historique" @@ -3179,12 +3177,12 @@ msgstr "Bienvenue dans l’assistant IA" msgid "Comparing database and filesystem metadata" msgstr "Comparaison des métadonnées entre la base et le système de fichiers" -#: lib/bds/desktop/shell_live.ex:655 +#: lib/bds/desktop/shell_live.ex:671 #, elixir-autogen, elixir-format msgid "Added %{count} images to post" msgstr "%{count} images ajoutées à l'article" -#: lib/bds/desktop/shell_live.ex:626 +#: lib/bds/desktop/shell_live.ex:642 #, elixir-autogen, elixir-format msgid "Added %{title}" msgstr "%{title} ajouté" @@ -3204,18 +3202,18 @@ msgstr "Guide utilisateur pour les flux éditoriaux, médias, modèles, traducti msgid "Image Import Concurrency" msgstr "Importation simultanée d'images" -#: lib/bds/desktop/shell_live.ex:413 -#: lib/bds/desktop/shell_live.ex:426 -#: lib/bds/desktop/shell_live.ex:626 -#: lib/bds/desktop/shell_live.ex:654 -#: lib/bds/desktop/shell_live.ex:663 +#: lib/bds/desktop/shell_live.ex:429 +#: lib/bds/desktop/shell_live.ex:442 +#: lib/bds/desktop/shell_live.ex:642 #: lib/bds/desktop/shell_live.ex:670 +#: lib/bds/desktop/shell_live.ex:679 +#: lib/bds/desktop/shell_live.ex:686 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:407 #, elixir-autogen, elixir-format msgid "Add Gallery Images" msgstr "Ajouter des images à la galerie" -#: lib/bds/desktop/shell_live.ex:671 +#: lib/bds/desktop/shell_live.ex:687 #, elixir-autogen, elixir-format msgid "Failed to process %{path}: %{reason}" msgstr "Impossible de traiter %{path} : %{reason}" @@ -3249,3 +3247,157 @@ msgstr "Restaurer cet article en brouillon" #, elixir-autogen, elixir-format msgid "Unarchive" msgstr "Désarchiver" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:531 +#, elixir-autogen, elixir-format +msgid "Ahead" +msgstr "En avance" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:532 +#, elixir-autogen, elixir-format +msgid "Behind" +msgstr "En retard" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:550 +#, elixir-autogen, elixir-format +msgid "Changes" +msgstr "Modifications" + +#: lib/bds/desktop/shell_live.ex:1055 +#: lib/bds/desktop/shell_live.ex:1071 +#: lib/bds/desktop/shell_live.ex:1077 +#: lib/bds/desktop/shell_live/sidebar_components.ex:556 +#, elixir-autogen, elixir-format +msgid "Commit" +msgstr "Commit" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:555 +#, elixir-autogen, elixir-format +msgid "Commit message" +msgstr "Message de commit" + +#: lib/bds/desktop/shell_live.ex:1056 +#, elixir-autogen, elixir-format +msgid "Commit message is required" +msgstr "Le message de commit est requis" + +#: lib/bds/desktop/shell_live.ex:1120 +#, elixir-autogen, elixir-format +msgid "Done" +msgstr "Terminé" + +#: lib/bds/desktop/shell_live.ex:1041 +#: lib/bds/desktop/shell_live/sidebar_components.ex:542 +#: lib/bds/desktop/shell_live/sidebar_components.ex:542 +#, elixir-autogen, elixir-format +msgid "Fetch" +msgstr "Récupérer" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:586 +#, elixir-autogen, elixir-format +msgid "History" +msgstr "Historique" + +#: lib/bds/desktop/shell_live.ex:1091 +#: lib/bds/desktop/shell_live.ex:1099 +#: lib/bds/desktop/shell_live/sidebar_components.ex:513 +#, elixir-autogen, elixir-format +msgid "Initialize Git" +msgstr "Initialiser Git" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:536 +#, elixir-autogen, elixir-format +msgid "Local only" +msgstr "Local uniquement" + +#: lib/bds/desktop/shell_live.ex:1127 +#, elixir-autogen, elixir-format +msgid "No active project" +msgstr "Aucun projet actif" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:580 +#, elixir-autogen, elixir-format +msgid "No changes" +msgstr "Aucune modification" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:616 +#, elixir-autogen, elixir-format +msgid "No commits yet" +msgstr "Aucun commit pour l’instant" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:613 +#, elixir-autogen, elixir-format +msgid "Older history available" +msgstr "Historique plus ancien disponible" + +#: lib/bds/desktop/shell_live.ex:1044 +#: lib/bds/desktop/shell_live/sidebar_components.ex:545 +#: lib/bds/desktop/shell_live/sidebar_components.ex:545 +#, elixir-autogen, elixir-format +msgid "Prune LFS" +msgstr "Nettoyer LFS" + +#: lib/bds/desktop/shell_live.ex:1042 +#: lib/bds/desktop/shell_live/sidebar_components.ex:543 +#: lib/bds/desktop/shell_live/sidebar_components.ex:543 +#, elixir-autogen, elixir-format +msgid "Pull" +msgstr "Pull" + +#: lib/bds/desktop/shell_live.ex:1043 +#: lib/bds/desktop/shell_live/sidebar_components.ex:544 +#: lib/bds/desktop/shell_live/sidebar_components.ex:544 +#, elixir-autogen, elixir-format +msgid "Push" +msgstr "Push" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:509 +#, elixir-autogen, elixir-format +msgid "Remote URL (optional)" +msgstr "URL distante (facultatif)" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:537 +#, elixir-autogen, elixir-format +msgid "Remote only" +msgstr "Distant uniquement" + +#: lib/bds/desktop/shell_live.ex:1092 +#, elixir-autogen, elixir-format +msgid "Repository initialized" +msgstr "Dépôt initialisé" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:535 +#, elixir-autogen, elixir-format +msgid "Synced" +msgstr "Synchronisé" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:504 +#, elixir-autogen, elixir-format +msgid "This project is not a Git repository yet." +msgstr "Ce projet n’est pas encore un dépôt Git." + +#: lib/bds/ui/sidebar.ex:869 +#, elixir-autogen, elixir-format +msgid "added" +msgstr "ajouté" + +#: lib/bds/ui/sidebar.ex:870 +#, elixir-autogen, elixir-format +msgid "deleted" +msgstr "supprimé" + +#: lib/bds/ui/sidebar.ex:871 +#: lib/bds/ui/sidebar.ex:874 +#, elixir-autogen, elixir-format +msgid "modified" +msgstr "modifié" + +#: lib/bds/ui/sidebar.ex:872 +#, elixir-autogen, elixir-format +msgid "renamed" +msgstr "renommé" + +#: lib/bds/ui/sidebar.ex:873 +#, elixir-autogen, elixir-format +msgid "untracked" +msgstr "non suivi" diff --git a/priv/gettext/it/LC_MESSAGES/ui.po b/priv/gettext/it/LC_MESSAGES/ui.po index d8bd642..8c0164f 100644 --- a/priv/gettext/it/LC_MESSAGES/ui.po +++ b/priv/gettext/it/LC_MESSAGES/ui.po @@ -257,7 +257,7 @@ msgid "Auto" msgstr "Automatico" #: lib/bds/desktop/shell_data.ex:98 -#: lib/bds/desktop/shell_live.ex:414 +#: lib/bds/desktop/shell_live.ex:430 #: lib/bds/desktop/shell_live/chat_editor.ex:231 #: lib/bds/desktop/shell_live/media_editor.ex:156 #: lib/bds/desktop/shell_live/media_editor.ex:349 @@ -404,7 +404,7 @@ msgstr "Valori predefiniti delle categorie, opzioni di rendering e collegamento msgid "Category name is required" msgstr "Il nome della categoria è obbligatorio" -#: lib/bds/desktop/shell_live.ex:937 +#: lib/bds/desktop/shell_live.ex:953 #: lib/bds/desktop/shell_live/chat_editor.ex:87 #: lib/bds/desktop/shell_live/chat_editor.ex:230 #: lib/bds/desktop/shell_live/chat_editor.ex:318 @@ -636,12 +636,12 @@ msgstr "Modalità di modifica predefinita e presentazione dei diff" #: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:166 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:116 #: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:16 -#: lib/bds/desktop/shell_live/sidebar_components.ex:515 -#: lib/bds/desktop/shell_live/sidebar_components.ex:518 -#: lib/bds/desktop/shell_live/sidebar_components.ex:521 -#: lib/bds/desktop/shell_live/sidebar_components.ex:524 -#: lib/bds/desktop/shell_live/sidebar_components.ex:527 -#: lib/bds/desktop/shell_live/sidebar_components.ex:529 +#: lib/bds/desktop/shell_live/sidebar_components.ex:651 +#: lib/bds/desktop/shell_live/sidebar_components.ex:654 +#: lib/bds/desktop/shell_live/sidebar_components.ex:657 +#: lib/bds/desktop/shell_live/sidebar_components.ex:660 +#: lib/bds/desktop/shell_live/sidebar_components.ex:663 +#: lib/bds/desktop/shell_live/sidebar_components.ex:665 #: lib/bds/desktop/shell_live/sidebar_delete.ex:72 #: lib/bds/desktop/shell_live/sidebar_delete.ex:174 #: lib/bds/desktop/shell_live/sidebar_delete.ex:175 @@ -665,7 +665,7 @@ msgstr "Elimina media" msgid "Delete Translation" msgstr "Elimina traduzione" -#: lib/bds/desktop/shell_live/sidebar_components.ex:514 +#: lib/bds/desktop/shell_live/sidebar_components.ex:650 #: lib/bds/desktop/shell_live/sidebar_delete.ex:173 #, elixir-autogen, elixir-format msgid "Delete conversation" @@ -991,8 +991,8 @@ msgstr "Galleria" msgid "Generate Site" msgstr "Genera sito" -#: lib/bds/desktop/shell_live.ex:938 -#: lib/bds/ui/sidebar.ex:784 +#: lib/bds/desktop/shell_live.ex:954 +#: lib/bds/ui/sidebar.ex:786 #, elixir-autogen, elixir-format msgid "Git" msgstr "Git" @@ -1004,7 +1004,7 @@ msgid "Git Diff" msgstr "Diff Git" #: lib/bds/desktop/shell_data.ex:244 -#: lib/bds/desktop/shell_live.ex:934 +#: lib/bds/desktop/shell_live.ex:950 #: lib/bds/desktop/shell_live/panel_renderer.ex:171 #, elixir-autogen, elixir-format msgid "Git Log" @@ -1075,7 +1075,7 @@ msgstr "Immagini e file" #: lib/bds/desktop/shell_live/import_editor/taxonomy_editing.ex:127 #: lib/bds/desktop/shell_live/import_editor/taxonomy_editing.ex:137 #: lib/bds/desktop/shell_live/misc_editor_html/misc_editor.html.heex:182 -#: lib/bds/desktop/shell_live/sidebar_components.ex:527 +#: lib/bds/desktop/shell_live/sidebar_components.ex:663 #: lib/bds/desktop/shell_live/sidebar_delete.ex:181 #: lib/bds/ui/registry.ex:70 #: lib/bds/ui/registry.ex:105 @@ -1127,9 +1127,9 @@ msgstr "Definizioni di importazione" msgid "Import failed: %{error}" msgstr "Importazione non riuscita: %{error}" -#: lib/bds/desktop/shell_live.ex:585 -#: lib/bds/desktop/shell_live.ex:975 -#: lib/bds/desktop/shell_live.ex:981 +#: lib/bds/desktop/shell_live.ex:601 +#: lib/bds/desktop/shell_live.ex:991 +#: lib/bds/desktop/shell_live.ex:997 #: lib/bds/desktop/shell_live/sidebar_create.ex:47 #, elixir-autogen, elixir-format msgid "Import media" @@ -1304,7 +1304,7 @@ msgstr "Numero massimo di post per pagina" #: lib/bds/desktop/shell_live/media_editor.ex:494 #: lib/bds/desktop/shell_live/misc_editor.ex:744 #: lib/bds/desktop/shell_live/misc_editor.ex:771 -#: lib/bds/desktop/shell_live/sidebar_components.ex:518 +#: lib/bds/desktop/shell_live/sidebar_components.ex:654 #: lib/bds/desktop/shell_live/sidebar_delete.ex:175 #: lib/bds/ui/registry.ex:30 #: lib/bds/ui/registry.ex:100 @@ -1453,12 +1453,12 @@ msgstr "Nessuna cronologia Git" #: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:72 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:308 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:320 -#: lib/bds/desktop/shell_live/sidebar_components.ex:320 -#: lib/bds/desktop/shell_live/sidebar_components.ex:380 -#: lib/bds/desktop/shell_live/sidebar_components.ex:454 +#: lib/bds/desktop/shell_live/sidebar_components.ex:321 +#: lib/bds/desktop/shell_live/sidebar_components.ex:381 +#: lib/bds/desktop/shell_live/sidebar_components.ex:455 #: lib/bds/ui/sidebar.ex:198 -#: lib/bds/ui/sidebar.ex:787 -#: lib/bds/ui/sidebar.ex:805 +#: lib/bds/ui/sidebar.ex:789 +#: lib/bds/ui/sidebar.ex:896 #, elixir-autogen, elixir-format msgid "No items" msgstr "Nessun elemento" @@ -1721,7 +1721,7 @@ msgstr "Altro" msgid "Other (%{count})" msgstr "Altro (%{count})" -#: lib/bds/desktop/shell_live.ex:933 +#: lib/bds/desktop/shell_live.ex:949 #: lib/bds/desktop/shell_live/panel_renderer.ex:83 #, elixir-autogen, elixir-format msgid "Output" @@ -1796,7 +1796,7 @@ msgstr "Salva la lingua rilevata per questo media" #: lib/bds/desktop/shell_live/post_editor.ex:604 #: lib/bds/desktop/shell_live/post_editor.ex:634 #: lib/bds/desktop/shell_live/post_editor.ex:637 -#: lib/bds/desktop/shell_live/sidebar_components.ex:515 +#: lib/bds/desktop/shell_live/sidebar_components.ex:651 #: lib/bds/desktop/shell_live/sidebar_delete.ex:174 #: lib/bds/ui/registry.ex:99 #, elixir-autogen, elixir-format @@ -2184,7 +2184,7 @@ msgid "Scanning entries..." msgstr "Scansione delle voci..." #: lib/bds/desktop/shell_live/misc_editor.ex:746 -#: lib/bds/desktop/shell_live/sidebar_components.ex:521 +#: lib/bds/desktop/shell_live/sidebar_components.ex:657 #: lib/bds/desktop/shell_live/sidebar_delete.ex:176 #: lib/bds/ui/registry.ex:133 #, elixir-autogen, elixir-format @@ -2483,7 +2483,7 @@ msgstr "Nome del tag" msgid "Tags" msgstr "Tag" -#: lib/bds/desktop/shell_live.ex:932 +#: lib/bds/desktop/shell_live.ex:948 #: lib/bds/desktop/shell_live/panel_renderer.ex:54 #, elixir-autogen, elixir-format msgid "Tasks" @@ -2497,7 +2497,7 @@ msgstr "Tecnologia" #: lib/bds/desktop/shell_live/misc_editor.ex:747 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:286 -#: lib/bds/desktop/shell_live/sidebar_components.ex:524 +#: lib/bds/desktop/shell_live/sidebar_components.ex:660 #: lib/bds/desktop/shell_live/sidebar_delete.ex:179 #: lib/bds/ui/registry.ex:134 #, elixir-autogen, elixir-format @@ -2735,7 +2735,7 @@ msgstr "Non salvato" #: lib/bds/desktop/shell_live/import_editor.ex:867 #: lib/bds/desktop/shell_live/post_editor/post_metadata.ex:166 -#: lib/bds/ui/sidebar.ex:1014 +#: lib/bds/ui/sidebar.ex:1105 #, elixir-autogen, elixir-format msgid "Untitled" msgstr "Senza titolo" @@ -2829,14 +2829,12 @@ msgid "WYSIWYG" msgstr "WYSIWYG" #: lib/bds/desktop/shell_live/tab_helpers.ex:191 -#: lib/bds/ui/sidebar.ex:791 #, elixir-autogen, elixir-format msgid "Working tree" msgstr "Working tree" #: lib/bds/desktop/shell_live/tab_helpers.ex:191 -#: lib/bds/ui/sidebar.ex:785 -#: lib/bds/ui/sidebar.ex:792 +#: lib/bds/ui/sidebar.ex:787 #, elixir-autogen, elixir-format msgid "Working tree and history" msgstr "Working tree e cronologia" @@ -3179,12 +3177,12 @@ msgstr "Benvenuto nell’assistente IA" msgid "Comparing database and filesystem metadata" msgstr "Confronto tra i metadati del database e del filesystem" -#: lib/bds/desktop/shell_live.ex:655 +#: lib/bds/desktop/shell_live.ex:671 #, elixir-autogen, elixir-format msgid "Added %{count} images to post" msgstr "%{count} immagini aggiunte al post" -#: lib/bds/desktop/shell_live.ex:626 +#: lib/bds/desktop/shell_live.ex:642 #, elixir-autogen, elixir-format msgid "Added %{title}" msgstr "%{title} aggiunto" @@ -3204,18 +3202,18 @@ msgstr "Guida per l'utente finale per flussi editoriali, media, modelli, traduzi msgid "Image Import Concurrency" msgstr "Importazione simultanea immagini" -#: lib/bds/desktop/shell_live.ex:413 -#: lib/bds/desktop/shell_live.ex:426 -#: lib/bds/desktop/shell_live.ex:626 -#: lib/bds/desktop/shell_live.ex:654 -#: lib/bds/desktop/shell_live.ex:663 +#: lib/bds/desktop/shell_live.ex:429 +#: lib/bds/desktop/shell_live.ex:442 +#: lib/bds/desktop/shell_live.ex:642 #: lib/bds/desktop/shell_live.ex:670 +#: lib/bds/desktop/shell_live.ex:679 +#: lib/bds/desktop/shell_live.ex:686 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:407 #, elixir-autogen, elixir-format msgid "Add Gallery Images" msgstr "Aggiungi immagini alla galleria" -#: lib/bds/desktop/shell_live.ex:671 +#: lib/bds/desktop/shell_live.ex:687 #, elixir-autogen, elixir-format msgid "Failed to process %{path}: %{reason}" msgstr "Impossibile elaborare %{path}: %{reason}" @@ -3249,3 +3247,157 @@ msgstr "Ripristina questo articolo come bozza" #, elixir-autogen, elixir-format msgid "Unarchive" msgstr "Ripristina" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:531 +#, elixir-autogen, elixir-format +msgid "Ahead" +msgstr "In avanti" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:532 +#, elixir-autogen, elixir-format +msgid "Behind" +msgstr "Indietro" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:550 +#, elixir-autogen, elixir-format +msgid "Changes" +msgstr "Modifiche" + +#: lib/bds/desktop/shell_live.ex:1055 +#: lib/bds/desktop/shell_live.ex:1071 +#: lib/bds/desktop/shell_live.ex:1077 +#: lib/bds/desktop/shell_live/sidebar_components.ex:556 +#, elixir-autogen, elixir-format +msgid "Commit" +msgstr "Commit" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:555 +#, elixir-autogen, elixir-format +msgid "Commit message" +msgstr "Messaggio di commit" + +#: lib/bds/desktop/shell_live.ex:1056 +#, elixir-autogen, elixir-format +msgid "Commit message is required" +msgstr "Il messaggio di commit è obbligatorio" + +#: lib/bds/desktop/shell_live.ex:1120 +#, elixir-autogen, elixir-format +msgid "Done" +msgstr "Fatto" + +#: lib/bds/desktop/shell_live.ex:1041 +#: lib/bds/desktop/shell_live/sidebar_components.ex:542 +#: lib/bds/desktop/shell_live/sidebar_components.ex:542 +#, elixir-autogen, elixir-format +msgid "Fetch" +msgstr "Recupera" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:586 +#, elixir-autogen, elixir-format +msgid "History" +msgstr "Cronologia" + +#: lib/bds/desktop/shell_live.ex:1091 +#: lib/bds/desktop/shell_live.ex:1099 +#: lib/bds/desktop/shell_live/sidebar_components.ex:513 +#, elixir-autogen, elixir-format +msgid "Initialize Git" +msgstr "Inizializza Git" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:536 +#, elixir-autogen, elixir-format +msgid "Local only" +msgstr "Solo locale" + +#: lib/bds/desktop/shell_live.ex:1127 +#, elixir-autogen, elixir-format +msgid "No active project" +msgstr "Nessun progetto attivo" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:580 +#, elixir-autogen, elixir-format +msgid "No changes" +msgstr "Nessuna modifica" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:616 +#, elixir-autogen, elixir-format +msgid "No commits yet" +msgstr "Nessun commit ancora" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:613 +#, elixir-autogen, elixir-format +msgid "Older history available" +msgstr "Cronologia precedente disponibile" + +#: lib/bds/desktop/shell_live.ex:1044 +#: lib/bds/desktop/shell_live/sidebar_components.ex:545 +#: lib/bds/desktop/shell_live/sidebar_components.ex:545 +#, elixir-autogen, elixir-format +msgid "Prune LFS" +msgstr "Pulisci LFS" + +#: lib/bds/desktop/shell_live.ex:1042 +#: lib/bds/desktop/shell_live/sidebar_components.ex:543 +#: lib/bds/desktop/shell_live/sidebar_components.ex:543 +#, elixir-autogen, elixir-format +msgid "Pull" +msgstr "Pull" + +#: lib/bds/desktop/shell_live.ex:1043 +#: lib/bds/desktop/shell_live/sidebar_components.ex:544 +#: lib/bds/desktop/shell_live/sidebar_components.ex:544 +#, elixir-autogen, elixir-format +msgid "Push" +msgstr "Push" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:509 +#, elixir-autogen, elixir-format +msgid "Remote URL (optional)" +msgstr "URL remota (opzionale)" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:537 +#, elixir-autogen, elixir-format +msgid "Remote only" +msgstr "Solo remoto" + +#: lib/bds/desktop/shell_live.ex:1092 +#, elixir-autogen, elixir-format +msgid "Repository initialized" +msgstr "Repository inizializzato" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:535 +#, elixir-autogen, elixir-format +msgid "Synced" +msgstr "Sincronizzato" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:504 +#, elixir-autogen, elixir-format +msgid "This project is not a Git repository yet." +msgstr "Questo progetto non è ancora un repository Git." + +#: lib/bds/ui/sidebar.ex:869 +#, elixir-autogen, elixir-format +msgid "added" +msgstr "aggiunto" + +#: lib/bds/ui/sidebar.ex:870 +#, elixir-autogen, elixir-format +msgid "deleted" +msgstr "eliminato" + +#: lib/bds/ui/sidebar.ex:871 +#: lib/bds/ui/sidebar.ex:874 +#, elixir-autogen, elixir-format +msgid "modified" +msgstr "modificato" + +#: lib/bds/ui/sidebar.ex:872 +#, elixir-autogen, elixir-format +msgid "renamed" +msgstr "rinominato" + +#: lib/bds/ui/sidebar.ex:873 +#, elixir-autogen, elixir-format +msgid "untracked" +msgstr "non tracciato" diff --git a/priv/gettext/ui.pot b/priv/gettext/ui.pot index 2b5f120..e36503f 100644 --- a/priv/gettext/ui.pot +++ b/priv/gettext/ui.pot @@ -270,7 +270,7 @@ msgid "Auto" msgstr "" #: lib/bds/desktop/shell_data.ex:98 -#: lib/bds/desktop/shell_live.ex:414 +#: lib/bds/desktop/shell_live.ex:430 #: lib/bds/desktop/shell_live/chat_editor.ex:231 #: lib/bds/desktop/shell_live/media_editor.ex:156 #: lib/bds/desktop/shell_live/media_editor.ex:349 @@ -417,7 +417,7 @@ msgstr "" msgid "Category name is required" msgstr "" -#: lib/bds/desktop/shell_live.ex:937 +#: lib/bds/desktop/shell_live.ex:953 #: lib/bds/desktop/shell_live/chat_editor.ex:87 #: lib/bds/desktop/shell_live/chat_editor.ex:230 #: lib/bds/desktop/shell_live/chat_editor.ex:318 @@ -649,12 +649,12 @@ msgstr "" #: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:166 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:116 #: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:16 -#: lib/bds/desktop/shell_live/sidebar_components.ex:515 -#: lib/bds/desktop/shell_live/sidebar_components.ex:518 -#: lib/bds/desktop/shell_live/sidebar_components.ex:521 -#: lib/bds/desktop/shell_live/sidebar_components.ex:524 -#: lib/bds/desktop/shell_live/sidebar_components.ex:527 -#: lib/bds/desktop/shell_live/sidebar_components.ex:529 +#: lib/bds/desktop/shell_live/sidebar_components.ex:651 +#: lib/bds/desktop/shell_live/sidebar_components.ex:654 +#: lib/bds/desktop/shell_live/sidebar_components.ex:657 +#: lib/bds/desktop/shell_live/sidebar_components.ex:660 +#: lib/bds/desktop/shell_live/sidebar_components.ex:663 +#: lib/bds/desktop/shell_live/sidebar_components.ex:665 #: lib/bds/desktop/shell_live/sidebar_delete.ex:72 #: lib/bds/desktop/shell_live/sidebar_delete.ex:174 #: lib/bds/desktop/shell_live/sidebar_delete.ex:175 @@ -678,7 +678,7 @@ msgstr "" msgid "Delete Translation" msgstr "" -#: lib/bds/desktop/shell_live/sidebar_components.ex:514 +#: lib/bds/desktop/shell_live/sidebar_components.ex:650 #: lib/bds/desktop/shell_live/sidebar_delete.ex:173 #, elixir-autogen, elixir-format msgid "Delete conversation" @@ -1004,8 +1004,8 @@ msgstr "" msgid "Generate Site" msgstr "" -#: lib/bds/desktop/shell_live.ex:938 -#: lib/bds/ui/sidebar.ex:784 +#: lib/bds/desktop/shell_live.ex:954 +#: lib/bds/ui/sidebar.ex:786 #, elixir-autogen, elixir-format msgid "Git" msgstr "" @@ -1017,7 +1017,7 @@ msgid "Git Diff" msgstr "" #: lib/bds/desktop/shell_data.ex:244 -#: lib/bds/desktop/shell_live.ex:934 +#: lib/bds/desktop/shell_live.ex:950 #: lib/bds/desktop/shell_live/panel_renderer.ex:171 #, elixir-autogen, elixir-format msgid "Git Log" @@ -1088,7 +1088,7 @@ msgstr "" #: lib/bds/desktop/shell_live/import_editor/taxonomy_editing.ex:127 #: lib/bds/desktop/shell_live/import_editor/taxonomy_editing.ex:137 #: lib/bds/desktop/shell_live/misc_editor_html/misc_editor.html.heex:182 -#: lib/bds/desktop/shell_live/sidebar_components.ex:527 +#: lib/bds/desktop/shell_live/sidebar_components.ex:663 #: lib/bds/desktop/shell_live/sidebar_delete.ex:181 #: lib/bds/ui/registry.ex:70 #: lib/bds/ui/registry.ex:105 @@ -1140,9 +1140,9 @@ msgstr "" msgid "Import failed: %{error}" msgstr "" -#: lib/bds/desktop/shell_live.ex:585 -#: lib/bds/desktop/shell_live.ex:975 -#: lib/bds/desktop/shell_live.ex:981 +#: lib/bds/desktop/shell_live.ex:601 +#: lib/bds/desktop/shell_live.ex:991 +#: lib/bds/desktop/shell_live.ex:997 #: lib/bds/desktop/shell_live/sidebar_create.ex:47 #, elixir-autogen, elixir-format msgid "Import media" @@ -1317,7 +1317,7 @@ msgstr "" #: lib/bds/desktop/shell_live/media_editor.ex:494 #: lib/bds/desktop/shell_live/misc_editor.ex:744 #: lib/bds/desktop/shell_live/misc_editor.ex:771 -#: lib/bds/desktop/shell_live/sidebar_components.ex:518 +#: lib/bds/desktop/shell_live/sidebar_components.ex:654 #: lib/bds/desktop/shell_live/sidebar_delete.ex:175 #: lib/bds/ui/registry.ex:30 #: lib/bds/ui/registry.ex:100 @@ -1466,12 +1466,12 @@ msgstr "" #: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:72 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:308 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:320 -#: lib/bds/desktop/shell_live/sidebar_components.ex:320 -#: lib/bds/desktop/shell_live/sidebar_components.ex:380 -#: lib/bds/desktop/shell_live/sidebar_components.ex:454 +#: lib/bds/desktop/shell_live/sidebar_components.ex:321 +#: lib/bds/desktop/shell_live/sidebar_components.ex:381 +#: lib/bds/desktop/shell_live/sidebar_components.ex:455 #: lib/bds/ui/sidebar.ex:198 -#: lib/bds/ui/sidebar.ex:787 -#: lib/bds/ui/sidebar.ex:805 +#: lib/bds/ui/sidebar.ex:789 +#: lib/bds/ui/sidebar.ex:896 #, elixir-autogen, elixir-format msgid "No items" msgstr "" @@ -1734,7 +1734,7 @@ msgstr "" msgid "Other (%{count})" msgstr "" -#: lib/bds/desktop/shell_live.ex:933 +#: lib/bds/desktop/shell_live.ex:949 #: lib/bds/desktop/shell_live/panel_renderer.ex:83 #, elixir-autogen, elixir-format msgid "Output" @@ -1809,7 +1809,7 @@ msgstr "" #: lib/bds/desktop/shell_live/post_editor.ex:604 #: lib/bds/desktop/shell_live/post_editor.ex:634 #: lib/bds/desktop/shell_live/post_editor.ex:637 -#: lib/bds/desktop/shell_live/sidebar_components.ex:515 +#: lib/bds/desktop/shell_live/sidebar_components.ex:651 #: lib/bds/desktop/shell_live/sidebar_delete.ex:174 #: lib/bds/ui/registry.ex:99 #, elixir-autogen, elixir-format @@ -2197,7 +2197,7 @@ msgid "Scanning entries..." msgstr "" #: lib/bds/desktop/shell_live/misc_editor.ex:746 -#: lib/bds/desktop/shell_live/sidebar_components.ex:521 +#: lib/bds/desktop/shell_live/sidebar_components.ex:657 #: lib/bds/desktop/shell_live/sidebar_delete.ex:176 #: lib/bds/ui/registry.ex:133 #, elixir-autogen, elixir-format @@ -2496,7 +2496,7 @@ msgstr "" msgid "Tags" msgstr "" -#: lib/bds/desktop/shell_live.ex:932 +#: lib/bds/desktop/shell_live.ex:948 #: lib/bds/desktop/shell_live/panel_renderer.ex:54 #, elixir-autogen, elixir-format msgid "Tasks" @@ -2510,7 +2510,7 @@ msgstr "" #: lib/bds/desktop/shell_live/misc_editor.ex:747 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:286 -#: lib/bds/desktop/shell_live/sidebar_components.ex:524 +#: lib/bds/desktop/shell_live/sidebar_components.ex:660 #: lib/bds/desktop/shell_live/sidebar_delete.ex:179 #: lib/bds/ui/registry.ex:134 #, elixir-autogen, elixir-format @@ -2748,7 +2748,7 @@ msgstr "" #: lib/bds/desktop/shell_live/import_editor.ex:867 #: lib/bds/desktop/shell_live/post_editor/post_metadata.ex:166 -#: lib/bds/ui/sidebar.ex:1014 +#: lib/bds/ui/sidebar.ex:1105 #, elixir-autogen, elixir-format msgid "Untitled" msgstr "" @@ -2842,14 +2842,12 @@ msgid "WYSIWYG" msgstr "" #: lib/bds/desktop/shell_live/tab_helpers.ex:191 -#: lib/bds/ui/sidebar.ex:791 #, elixir-autogen, elixir-format msgid "Working tree" msgstr "" #: lib/bds/desktop/shell_live/tab_helpers.ex:191 -#: lib/bds/ui/sidebar.ex:785 -#: lib/bds/ui/sidebar.ex:792 +#: lib/bds/ui/sidebar.ex:787 #, elixir-autogen, elixir-format msgid "Working tree and history" msgstr "" @@ -3192,12 +3190,12 @@ msgstr "" msgid "Comparing database and filesystem metadata" msgstr "" -#: lib/bds/desktop/shell_live.ex:655 +#: lib/bds/desktop/shell_live.ex:671 #, elixir-autogen, elixir-format msgid "Added %{count} images to post" msgstr "" -#: lib/bds/desktop/shell_live.ex:626 +#: lib/bds/desktop/shell_live.ex:642 #, elixir-autogen, elixir-format msgid "Added %{title}" msgstr "" @@ -3217,18 +3215,18 @@ msgstr "" msgid "Image Import Concurrency" msgstr "" -#: lib/bds/desktop/shell_live.ex:413 -#: lib/bds/desktop/shell_live.ex:426 -#: lib/bds/desktop/shell_live.ex:626 -#: lib/bds/desktop/shell_live.ex:654 -#: lib/bds/desktop/shell_live.ex:663 +#: lib/bds/desktop/shell_live.ex:429 +#: lib/bds/desktop/shell_live.ex:442 +#: lib/bds/desktop/shell_live.ex:642 #: lib/bds/desktop/shell_live.ex:670 +#: lib/bds/desktop/shell_live.ex:679 +#: lib/bds/desktop/shell_live.ex:686 #: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:407 #, elixir-autogen, elixir-format msgid "Add Gallery Images" msgstr "" -#: lib/bds/desktop/shell_live.ex:671 +#: lib/bds/desktop/shell_live.ex:687 #, elixir-autogen, elixir-format msgid "Failed to process %{path}: %{reason}" msgstr "" @@ -3262,3 +3260,157 @@ msgstr "" #, elixir-autogen, elixir-format msgid "Unarchive" msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:531 +#, elixir-autogen, elixir-format +msgid "Ahead" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:532 +#, elixir-autogen, elixir-format +msgid "Behind" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:550 +#, elixir-autogen, elixir-format +msgid "Changes" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1055 +#: lib/bds/desktop/shell_live.ex:1071 +#: lib/bds/desktop/shell_live.ex:1077 +#: lib/bds/desktop/shell_live/sidebar_components.ex:556 +#, elixir-autogen, elixir-format +msgid "Commit" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:555 +#, elixir-autogen, elixir-format +msgid "Commit message" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1056 +#, elixir-autogen, elixir-format +msgid "Commit message is required" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1120 +#, elixir-autogen, elixir-format +msgid "Done" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1041 +#: lib/bds/desktop/shell_live/sidebar_components.ex:542 +#: lib/bds/desktop/shell_live/sidebar_components.ex:542 +#, elixir-autogen, elixir-format +msgid "Fetch" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:586 +#, elixir-autogen, elixir-format +msgid "History" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1091 +#: lib/bds/desktop/shell_live.ex:1099 +#: lib/bds/desktop/shell_live/sidebar_components.ex:513 +#, elixir-autogen, elixir-format +msgid "Initialize Git" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:536 +#, elixir-autogen, elixir-format +msgid "Local only" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1127 +#, elixir-autogen, elixir-format +msgid "No active project" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:580 +#, elixir-autogen, elixir-format +msgid "No changes" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:616 +#, elixir-autogen, elixir-format +msgid "No commits yet" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:613 +#, elixir-autogen, elixir-format +msgid "Older history available" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1044 +#: lib/bds/desktop/shell_live/sidebar_components.ex:545 +#: lib/bds/desktop/shell_live/sidebar_components.ex:545 +#, elixir-autogen, elixir-format +msgid "Prune LFS" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1042 +#: lib/bds/desktop/shell_live/sidebar_components.ex:543 +#: lib/bds/desktop/shell_live/sidebar_components.ex:543 +#, elixir-autogen, elixir-format +msgid "Pull" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1043 +#: lib/bds/desktop/shell_live/sidebar_components.ex:544 +#: lib/bds/desktop/shell_live/sidebar_components.ex:544 +#, elixir-autogen, elixir-format +msgid "Push" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:509 +#, elixir-autogen, elixir-format +msgid "Remote URL (optional)" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:537 +#, elixir-autogen, elixir-format +msgid "Remote only" +msgstr "" + +#: lib/bds/desktop/shell_live.ex:1092 +#, elixir-autogen, elixir-format +msgid "Repository initialized" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:535 +#, elixir-autogen, elixir-format +msgid "Synced" +msgstr "" + +#: lib/bds/desktop/shell_live/sidebar_components.ex:504 +#, elixir-autogen, elixir-format +msgid "This project is not a Git repository yet." +msgstr "" + +#: lib/bds/ui/sidebar.ex:869 +#, elixir-autogen, elixir-format +msgid "added" +msgstr "" + +#: lib/bds/ui/sidebar.ex:870 +#, elixir-autogen, elixir-format +msgid "deleted" +msgstr "" + +#: lib/bds/ui/sidebar.ex:871 +#: lib/bds/ui/sidebar.ex:874 +#, elixir-autogen, elixir-format +msgid "modified" +msgstr "" + +#: lib/bds/ui/sidebar.ex:872 +#, elixir-autogen, elixir-format +msgid "renamed" +msgstr "" + +#: lib/bds/ui/sidebar.ex:873 +#, elixir-autogen, elixir-format +msgid "untracked" +msgstr "" diff --git a/test/bds/desktop/shell_live_test.exs b/test/bds/desktop/shell_live_test.exs index df99a6b..c81ed2a 100644 --- a/test/bds/desktop/shell_live_test.exs +++ b/test/bds/desktop/shell_live_test.exs @@ -284,17 +284,44 @@ defmodule BDS.Desktop.ShellLiveTest do @tag :phase3 test "phase 3 editors and shared surfaces render utility-owned layouts" do - post_html = render_component(&BDS.Desktop.ShellLive.PostEditor.render/1, phase3_post_editor_assigns()) - media_html = render_component(&BDS.Desktop.ShellLive.MediaEditor.render/1, phase3_media_editor_assigns()) - script_html = render_component(&BDS.Desktop.ShellLive.ScriptEditor.render/1, phase3_script_editor_assigns()) - template_html = render_component(&BDS.Desktop.ShellLive.TemplateEditor.render/1, phase3_template_editor_assigns()) - chat_html = render_component(&BDS.Desktop.ShellLive.ChatEditor.render/1, phase3_chat_editor_assigns()) - menu_html = render_component(&BDS.Desktop.ShellLive.MenuEditor.render/1, phase3_menu_editor_assigns()) - settings_html = render_component(&BDS.Desktop.ShellLive.SettingsEditor.render/1, phase3_settings_editor_assigns()) - tags_html = render_component(&BDS.Desktop.ShellLive.TagsEditor.render/1, phase3_tags_editor_assigns()) + post_html = + render_component(&BDS.Desktop.ShellLive.PostEditor.render/1, phase3_post_editor_assigns()) + + media_html = + render_component(&BDS.Desktop.ShellLive.MediaEditor.render/1, phase3_media_editor_assigns()) + + script_html = + render_component( + &BDS.Desktop.ShellLive.ScriptEditor.render/1, + phase3_script_editor_assigns() + ) + + template_html = + render_component( + &BDS.Desktop.ShellLive.TemplateEditor.render/1, + phase3_template_editor_assigns() + ) + + chat_html = + render_component(&BDS.Desktop.ShellLive.ChatEditor.render/1, phase3_chat_editor_assigns()) + + menu_html = + render_component(&BDS.Desktop.ShellLive.MenuEditor.render/1, phase3_menu_editor_assigns()) + + settings_html = + render_component( + &BDS.Desktop.ShellLive.SettingsEditor.render/1, + phase3_settings_editor_assigns() + ) + + tags_html = + render_component(&BDS.Desktop.ShellLive.TagsEditor.render/1, phase3_tags_editor_assigns()) assert post_html =~ "post-editor ui-editor-shell flex h-full min-h-0 flex-col" - assert post_html =~ "editor-header ui-editor-header flex shrink-0 items-start justify-between gap-3" + + assert post_html =~ + "editor-header ui-editor-header flex shrink-0 items-start justify-between gap-3" + assert post_html =~ "editor-field ui-field-stack flex flex-col gap-1.5" assert post_html =~ "editor-toolbar ui-toolbar flex items-center gap-3" @@ -313,7 +340,9 @@ defmodule BDS.Desktop.ShellLiveTest do assert menu_html =~ "menu-editor-view ui-editor-shell flex h-full min-h-0 flex-col p-4" assert menu_html =~ "menu-editor-toolbar ui-toolbar flex flex-wrap items-center gap-2" - assert settings_html =~ "settings-view-shell ui-editor-shell flex h-full min-h-0 flex-col overflow-hidden" + assert settings_html =~ + "settings-view-shell ui-editor-shell flex h-full min-h-0 flex-col overflow-hidden" + assert settings_html =~ "settings-header flex shrink-0 items-center justify-between gap-3" assert tags_html =~ "tags-view-shell flex h-full min-h-0 flex-col overflow-hidden" @@ -325,12 +354,32 @@ defmodule BDS.Desktop.ShellLiveTest do conn = Plug.Conn.put_private(build_conn(), :phoenix_endpoint, BDS.Desktop.Endpoint) {:ok, view, _shell_html} = live_isolated(conn, BDS.Desktop.ShellLive) - post_html = render_component(&BDS.Desktop.ShellLive.PostEditor.render/1, phase3_post_editor_assigns()) - media_html = render_component(&BDS.Desktop.ShellLive.MediaEditor.render/1, phase3_media_editor_assigns()) - script_html = render_component(&BDS.Desktop.ShellLive.ScriptEditor.render/1, phase3_script_editor_assigns()) - template_html = render_component(&BDS.Desktop.ShellLive.TemplateEditor.render/1, phase3_template_editor_assigns()) - settings_html = render_component(&BDS.Desktop.ShellLive.SettingsEditor.render/1, phase3_settings_editor_assigns()) - tags_html = render_component(&BDS.Desktop.ShellLive.TagsEditor.render/1, phase3_tags_editor_assigns()) + post_html = + render_component(&BDS.Desktop.ShellLive.PostEditor.render/1, phase3_post_editor_assigns()) + + media_html = + render_component(&BDS.Desktop.ShellLive.MediaEditor.render/1, phase3_media_editor_assigns()) + + script_html = + render_component( + &BDS.Desktop.ShellLive.ScriptEditor.render/1, + phase3_script_editor_assigns() + ) + + template_html = + render_component( + &BDS.Desktop.ShellLive.TemplateEditor.render/1, + phase3_template_editor_assigns() + ) + + settings_html = + render_component( + &BDS.Desktop.ShellLive.SettingsEditor.render/1, + phase3_settings_editor_assigns() + ) + + tags_html = + render_component(&BDS.Desktop.ShellLive.TagsEditor.render/1, phase3_tags_editor_assigns()) panel_html = render_component(&BDS.Desktop.ShellLive.PanelRenderer.render_panel_body/1, %{ @@ -355,7 +404,9 @@ defmodule BDS.Desktop.ShellLiveTest do assert script_html =~ ~s(class="status-badge ui-badge) assert script_html =~ ~s(class="ui-input") - assert template_html =~ ~s(class="secondary templates-save-button ui-button ui-button-secondary) + assert template_html =~ + ~s(class="secondary templates-save-button ui-button ui-button-secondary) + assert template_html =~ ~s(class="status-badge ui-badge) assert template_html =~ ~s(class="ui-input") @@ -383,27 +434,44 @@ defmodule BDS.Desktop.ShellLiveTest do conn = Plug.Conn.put_private(build_conn(), :phoenix_endpoint, BDS.Desktop.Endpoint) {:ok, _view, shell_html} = live_isolated(conn, BDS.Desktop.ShellLive) - media_html = render_component(&BDS.Desktop.ShellLive.MediaEditor.render/1, phase3_media_editor_assigns()) - chat_html = render_component(&BDS.Desktop.ShellLive.ChatEditor.render/1, phase3_chat_editor_assigns()) - menu_html = render_component(&BDS.Desktop.ShellLive.MenuEditor.render/1, phase3_menu_editor_assigns()) + media_html = + render_component(&BDS.Desktop.ShellLive.MediaEditor.render/1, phase3_media_editor_assigns()) + + chat_html = + render_component(&BDS.Desktop.ShellLive.ChatEditor.render/1, phase3_chat_editor_assigns()) + + menu_html = + render_component(&BDS.Desktop.ShellLive.MenuEditor.render/1, phase3_menu_editor_assigns()) assert shell_html =~ ~s(class="assistant-sidebar-context flex shrink-0 flex-col gap-2") assert shell_html =~ ~s(class="assistant-sidebar-prompt min-h-[8rem] w-full resize-y") assert shell_html =~ ~s(class="assistant-sidebar-start-button ui-button ui-button-primary") assert shell_html =~ ~s(class="assistant-sidebar-welcome min-h-0 flex-1 overflow-auto") - assert media_html =~ "class=\"editor-content media-editor grid min-h-0 flex-1 gap-4 overflow-auto p-4 xl:grid-cols-[minmax(320px,1fr)_minmax(0,1.2fr)]\"" + assert media_html =~ + "class=\"editor-content media-editor grid min-h-0 flex-1 gap-4 overflow-auto p-4 xl:grid-cols-[minmax(320px,1fr)_minmax(0,1.2fr)]\"" + assert media_html =~ "class=\"media-preview flex min-h-[16rem] items-center justify-center\"" assert media_html =~ ~s(class="media-details min-w-0") assert chat_html =~ ~s(class="chat-panel ui-editor-shell flex h-full min-h-0 flex-col") - assert chat_html =~ ~s(class="chat-model-selector-button chat-model-selector-inline ui-button ui-button-secondary inline-flex items-center gap-2") - assert chat_html =~ ~s(class="chat-input-container ui-field-stack flex shrink-0 flex-col gap-3") + + assert chat_html =~ + ~s(class="chat-model-selector-button chat-model-selector-inline ui-button ui-button-secondary inline-flex items-center gap-2") + + assert chat_html =~ + ~s(class="chat-input-container ui-field-stack flex shrink-0 flex-col gap-3") + assert chat_html =~ ~s(class="chat-input-wrapper flex items-end gap-2") - assert menu_html =~ ~s(class="menu-editor-view ui-editor-shell flex h-full min-h-0 flex-col p-4") - assert menu_html =~ ~s(class="menu-editor-toolbar ui-toolbar flex flex-wrap items-center gap-2") - assert menu_html =~ ~s(class="menu-editor-empty flex min-h-0 flex-1 items-center justify-center") + assert menu_html =~ + ~s(class="menu-editor-view ui-editor-shell flex h-full min-h-0 flex-col p-4") + + assert menu_html =~ + ~s(class="menu-editor-toolbar ui-toolbar flex flex-wrap items-center gap-2") + + assert menu_html =~ + ~s(class="menu-editor-empty flex min-h-0 flex-1 items-center justify-center") end alias BDS.Persistence @@ -1072,7 +1140,10 @@ defmodule BDS.Desktop.ShellLiveTest do assert html =~ ~s(data-testid="sidebar-shell") assert html =~ ~s(data-testid="status-bar") assert html =~ ~s(data-testid="status-task-button") - assert html =~ ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") + + assert html =~ + ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") + assert html =~ ~s(data-testid="activity-button") assert html =~ ~s(data-view="posts") assert html =~ ~s(data-view="media") @@ -1104,7 +1175,10 @@ defmodule BDS.Desktop.ShellLiveTest do |> render_click() assert html =~ ~s(data-region="panel") - refute html =~ ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") + + refute html =~ + ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") + assert html =~ ~s(data-testid="panel-close") html = @@ -1112,7 +1186,8 @@ defmodule BDS.Desktop.ShellLiveTest do |> element("[data-testid='panel-close']") |> render_click() - assert html =~ ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") + assert html =~ + ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") html = view @@ -2035,13 +2110,17 @@ defmodule BDS.Desktop.ShellLiveTest do {:ok, view, html} = live_isolated(build_conn(), BDS.Desktop.ShellLive) assert html =~ ~s(data-testid="sidebar-shell") - assert html =~ ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") + + assert html =~ + ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") html = render_keydown(view, "shortcut", %{key: "b", meta: true}) assert html =~ ~s(class="sidebar-shell flex min-w-0 shrink-0 overflow-hidden is-hidden") html = render_keydown(view, "shortcut", %{key: "j", meta: true}) - refute html =~ ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") + + refute html =~ + ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") html = render_keydown(view, "shortcut", %{key: "2", meta: true}) assert html =~ ~s(data-view="media") @@ -2276,14 +2355,17 @@ defmodule BDS.Desktop.ShellLiveTest do assert html =~ "Add published posts" html = render_click(view, "select_panel_tab", %{"tab" => "output"}) - refute html =~ ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") + + refute html =~ + ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") html = view |> element("[data-testid='status-task-button']") |> render_click() - refute html =~ ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") + refute html =~ + ~s(class="panel-shell flex min-h-0 shrink-0 flex-col overflow-hidden is-hidden") assert Regex.match?( ~r/<button class="panel-tab [^"]*ui-tab[^"]*active" type="button" phx-click="select_panel_tab" phx-value-tab="tasks">/, @@ -3385,13 +3467,22 @@ defmodule BDS.Desktop.ShellLiveTest do "subtitle" => "published" }) - assert published_script_html =~ ~s(class="scripts-view-shell ui-editor-shell flex h-full min-h-0 flex-col") + assert published_script_html =~ + ~s(class="scripts-view-shell ui-editor-shell flex h-full min-h-0 flex-col") + assert published_script_html =~ ~s(data-testid="script-editor") assert published_script_html =~ ~s(data-testid="script-status-badge") assert published_script_html =~ ~s(class="status-badge ui-badge status-published") - assert published_script_html =~ ~s(class="secondary scripts-save-button ui-button ui-button-secondary") - assert published_script_html =~ ~s(class="secondary scripts-run-button ui-button ui-button-secondary") - assert published_script_html =~ ~s(class="secondary scripts-check-button ui-button ui-button-secondary") + + assert published_script_html =~ + ~s(class="secondary scripts-save-button ui-button ui-button-secondary") + + assert published_script_html =~ + ~s(class="secondary scripts-run-button ui-button ui-button-secondary") + + assert published_script_html =~ + ~s(class="secondary scripts-check-button ui-button ui-button-secondary") + assert published_script_html =~ "published" assert published_script_html =~ "published script" @@ -3406,12 +3497,19 @@ defmodule BDS.Desktop.ShellLiveTest do "subtitle" => "published" }) - assert published_template_html =~ ~s(class="templates-view-shell ui-editor-shell flex h-full min-h-0 flex-col") + assert published_template_html =~ + ~s(class="templates-view-shell ui-editor-shell flex h-full min-h-0 flex-col") + assert published_template_html =~ ~s(data-testid="template-editor") assert published_template_html =~ ~s(data-testid="template-status-badge") assert published_template_html =~ ~s(class="status-badge ui-badge status-published") - assert published_template_html =~ ~s(class="secondary templates-save-button ui-button ui-button-secondary") - assert published_template_html =~ ~s(class="secondary templates-validate-button ui-button ui-button-secondary") + + assert published_template_html =~ + ~s(class="secondary templates-save-button ui-button ui-button-secondary") + + assert published_template_html =~ + ~s(class="secondary templates-validate-button ui-button ui-button-secondary") + assert published_template_html =~ "published" assert published_template_html =~ "published template" @@ -3600,7 +3698,8 @@ defmodule BDS.Desktop.ShellLiveTest do }) assert html =~ - "class=\"editor-content media-editor grid min-h-0 flex-1 gap-4 overflow-auto p-4 xl:grid-cols-[minmax(320px,1fr)_minmax(0,1.2fr)]\"" + "class=\"editor-content media-editor grid min-h-0 flex-1 gap-4 overflow-auto p-4 xl:grid-cols-[minmax(320px,1fr)_minmax(0,1.2fr)]\"" + assert html =~ ~s(class="quick-actions-wrapper relative") refute html =~ ~s(class="media-editor-form") @@ -3625,7 +3724,10 @@ defmodule BDS.Desktop.ShellLiveTest do |> render_click() assert html =~ ~s(class="translation-modal-backdrop") - assert html =~ ~s(class="translation-modal flex max-h-[80vh] w-full max-w-2xl flex-col overflow-hidden") + + assert html =~ + ~s(class="translation-modal flex max-h-[80vh] w-full max-w-2xl flex-col overflow-hidden") + assert html =~ ~s(name="media_translation[title]") assert html =~ ~s(name="media_translation[alt]") assert html =~ ~s(name="media_translation[caption]") @@ -3713,7 +3815,9 @@ defmodule BDS.Desktop.ShellLiveTest do "subtitle" => "Project settings" }) - assert settings_html =~ ~s(class="settings-view-shell ui-editor-shell flex h-full min-h-0 flex-col overflow-hidden") + assert settings_html =~ + ~s(class="settings-view-shell ui-editor-shell flex h-full min-h-0 flex-col overflow-hidden") + assert settings_html =~ ~s(class="setting-section ui-section-card") refute settings_html =~ "Desktop workbench content routed through the Elixir shell." @@ -3749,7 +3853,9 @@ defmodule BDS.Desktop.ShellLiveTest do "subtitle" => script.slug }) - assert script_html =~ ~s(class="scripts-view-shell ui-editor-shell flex h-full min-h-0 flex-col") + assert script_html =~ + ~s(class="scripts-view-shell ui-editor-shell flex h-full min-h-0 flex-col") + assert script_html =~ "scripts-monaco" assert script_html =~ ~s(data-monaco-language="lua") assert script_html =~ ~s(data-monaco-word-wrap="on") @@ -3764,7 +3870,9 @@ defmodule BDS.Desktop.ShellLiveTest do "subtitle" => template.slug }) - assert template_html =~ ~s(class="templates-view-shell ui-editor-shell flex h-full min-h-0 flex-col") + assert template_html =~ + ~s(class="templates-view-shell ui-editor-shell flex h-full min-h-0 flex-col") + assert template_html =~ "templates-monaco" assert template_html =~ ~s(data-monaco-language="liquid") assert template_html =~ ~s(data-monaco-word-wrap="on") @@ -3780,7 +3888,10 @@ defmodule BDS.Desktop.ShellLiveTest do }) assert chat_html =~ ~s(class="chat-panel ui-editor-shell flex h-full min-h-0 flex-col") - assert chat_html =~ ~s(class="chat-input-container ui-field-stack flex shrink-0 flex-col gap-3") + + assert chat_html =~ + ~s(class="chat-input-container ui-field-stack flex shrink-0 flex-col gap-3") + refute chat_html =~ "Desktop workbench content routed through the Elixir shell." end @@ -3800,7 +3911,10 @@ defmodule BDS.Desktop.ShellLiveTest do assert html =~ ~s(data-testid="chat-model-selector-button") assert html =~ ~s(class="chat-panel-title-main") assert html =~ ~s(class="chat-model-selector-wrap relative shrink-0") - assert html =~ ~s(class="chat-model-selector-button chat-model-selector-inline ui-button ui-button-secondary inline-flex items-center gap-2") + + assert html =~ + ~s(class="chat-model-selector-button chat-model-selector-inline ui-button ui-button-secondary inline-flex items-center gap-2") + refute html =~ ~s(class="chat-panel-header-actions") css = desktop_css_source() @@ -3848,7 +3962,9 @@ defmodule BDS.Desktop.ShellLiveTest do |> element("[data-testid='chat-model-selector-button']") |> render_click() - assert selector_html =~ ~s(class="chat-model-selector-menu ui-dropdown-menu absolute right-0 top-full z-10 mt-2 flex min-w-56 flex-col") + assert selector_html =~ + ~s(class="chat-model-selector-menu ui-dropdown-menu absolute right-0 top-full z-10 mt-2 flex min-w-56 flex-col") + assert selector_html =~ ~s(data-testid="chat-model-selector-option") assert selector_html =~ "llama-current" @@ -4700,7 +4816,9 @@ defmodule BDS.Desktop.ShellLiveTest do {user_index, _length} = :binary.match(html, "Newest question") assert assistant_index < user_index - assert html =~ ~r/<textarea[^>]*class="chat-input chat-surface-input ui-textarea"[^>]*disabled/ + + assert html =~ + ~r/<textarea[^>]*class="chat-input chat-surface-input ui-textarea"[^>]*disabled/ send_and_await(view, { :chat_tool_call, @@ -4920,6 +5038,74 @@ defmodule BDS.Desktop.ShellLiveTest do refute html =~ ~s(<pre><code>) end + test "git sidebar wires branch, changes, history, and action buttons to BDS.Git", %{ + temp_dir: temp_dir + } do + posts_dir = Path.join(temp_dir, "posts") + File.mkdir_p!(posts_dir) + + tracked = Path.join(posts_dir, "tracked.md") + File.write!(tracked, "Old content\n") + init_git_repo!(temp_dir, "seed commit") + File.write!(tracked, "New content\n") + + {:ok, view, _html} = live_isolated(build_conn(), BDS.Desktop.ShellLive) + + html = + view + |> element("[data-testid='activity-button'][data-view='git']") + |> render_click() + + assert html =~ ~s(class="git-sidebar") + assert html =~ ~s(data-testid="git-branch") + assert html =~ "master" + assert html =~ ~s(data-testid="git-status-file") + assert html =~ "posts/tracked.md" + assert html =~ ~s(data-testid="git-commit-form") + assert html =~ ~s(data-testid="git-action-fetch") + assert html =~ ~s(data-testid="git-action-pull") + assert html =~ ~s(data-testid="git-action-push") + assert html =~ ~s(data-testid="git-action-prune-lfs") + assert html =~ ~s(data-testid="git-history-entry") + assert html =~ "seed commit" + end + + test "git sidebar commit stages working tree and reloads to a clean state", %{ + project: project, + temp_dir: temp_dir + } do + posts_dir = Path.join(temp_dir, "posts") + File.mkdir_p!(posts_dir) + + File.write!(Path.join(posts_dir, "seed.md"), "Seed\n") + init_git_repo!(temp_dir, "seed commit") + File.write!(Path.join(posts_dir, "added.md"), "Brand new\n") + + {:ok, view, _html} = live_isolated(build_conn(), BDS.Desktop.ShellLive) + + view + |> element("[data-testid='activity-button'][data-view='git']") + |> render_click() + + html = render_submit(view, "git_commit", %{"git" => %{"message" => "Add new post"}}) + + refute html =~ "posts/added.md" + assert {:ok, %{commits: commits}} = BDS.Git.history(project.id, "master") + assert Enum.any?(commits, &(&1.subject == "Add new post")) + end + + test "git sidebar shows the initialize control when the project is not a repo" do + {:ok, view, _html} = live_isolated(build_conn(), BDS.Desktop.ShellLive) + + html = + view + |> element("[data-testid='activity-button'][data-view='git']") + |> render_click() + + assert html =~ ~s(class="git-sidebar") + assert html =~ ~s(data-testid="git-initialize") + end + test "settings sidebar categories render the full old-app section model and target the requested section" do {:ok, view, _html} = live_isolated(build_conn(), BDS.Desktop.ShellLive) diff --git a/test/bds/git_test.exs b/test/bds/git_test.exs index f18b5c0..490ea87 100644 --- a/test/bds/git_test.exs +++ b/test/bds/git_test.exs @@ -61,8 +61,8 @@ defmodule BDS.GitTest do "git", ["rev-parse", "--abbrev-ref", "HEAD"], _opts -> {"main\n", 0} - "git", ["log", "--format=%H%x09%s", "main"], _opts -> - {"a1\tLocal commit\nb2\tShared commit\n", 0} + "git", ["log", "--date=short", "--format=%H%x09%an%x09%ad%x09%s", "main"], _opts -> + {"a1\tAda\t2026-01-01\tLocal commit\nb2\tBabbage\t2026-01-02\tShared commit\n", 0} "git", ["log", "--format=%H", "origin/main"], _opts -> {"b2\nc3\n", 0} @@ -83,7 +83,11 @@ defmodule BDS.GitTest do assert diff.unstaged_diff == "unstaged diff" assert {:ok, history} = Git.history(project.id, "main", runner: runner) - assert Enum.find(history.commits, &(&1.hash == "a1")).sync_status.kind == :local_only + a1 = Enum.find(history.commits, &(&1.hash == "a1")) + assert a1.sync_status.kind == :local_only + assert a1.author == "Ada" + assert a1.date == "2026-01-01" + assert a1.subject == "Local commit" assert Enum.find(history.commits, &(&1.hash == "b2")).sync_status.kind == :both assert Enum.find(history.commits, &(&1.hash == "c3")).sync_status.kind == :remote_only