Compare commits

...

6 Commits

20 changed files with 1520 additions and 1011 deletions

2
.gitignore vendored
View File

@@ -9,4 +9,4 @@
/priv/data/*.db
/priv/data/*.db-shm
/priv/data/*.db-wal
*.ez
*.eztmp/

1
CLAUDE.md Normal file
View File

@@ -0,0 +1 @@
@AGENTS.md

View File

@@ -10,10 +10,10 @@ Gap categories: **SC** = spec correct, fix code | **CS** = code correct, update
| ID | Gap | Spec | Code | Path |
|---|---|---|---|---|
| A1-1 | No `archived→draft` or `archived→published` transition | post.allium:121-122 | No code path to unarchive | Fix code: implement unarchive transitions |
| A1-2 | `DeletePost` must delete translations + translation files | post.allium:209-212 | `delete_post/1` skips translation cleanup | Fix code: delete PostTranslation rows + files |
| A1-3 | Publish must delete old file when path changes | engine_side_effects.allium:73-74 | `publish_post` does not delete old file | Fix code: add old file deletion on path change |
| A1-4 | `doNotTranslate: false` written to frontmatter despite "only when true" | frontmatter.allium:398 | `lib/bds/frontmatter.ex:38-39` writes false | Fix code: omit `doNotTranslate` when false |
| A1-1 | ~~No `archived→draft` or `archived→published` transition~~ | post.allium:121-122 | `unarchive_post/1` implemented, `publish_post` already handled archived→published | **Resolved:** `unarchive_post/1` in posts.ex restores content from disk, UI wired via quick actions, 4 tests added |
| A1-2 | ~~`DeletePost` must delete translations + translation files~~ | post.allium:209-212 | `delete_post/1` now fetches translations before cascade-delete and removes their files from disk | **Resolved:** translation file cleanup added to `delete_post/1` in posts.ex, test added |
| A1-3 | ~~Publish must delete old file when path changes~~ | engine_side_effects.allium:73-74 | `publish_post` now deletes old file when `file_path` changes | **Resolved:** old file deletion added to `publish_post/1` in posts.ex, test added |
| A1-4 | ~~`doNotTranslate: false` written to frontmatter despite "only when true"~~ | frontmatter.allium:398 | `file_sync.ex:78` now converts false→nil so serializer omits the key | **Resolved:** doNotTranslate omitted from frontmatter when false, test added |
| A1-5 | Auto-save after 3000ms idle | editor_post.allium:183-188 | No auto-save timer | Fix code: implement auto-save on idle + unmount + tab switch |
| A1-6 | On-demand rendering in preview server | preview.allium:53-93 | Server serves static pre-generated files | Fix code: implement on-demand template rendering for post/archive/language routes |
| A1-7 | Template lookup must use all 4 levels (post→tag→category→default) | template_context.allium:267-277 | Only levels 1 and 4 implemented; tag/category fallback unused | Fix code: implement levels 2-3 in template_selection.ex |

View File

@@ -204,6 +204,14 @@ defmodule BDS.Desktop.ShellLive.PostEditor do
{:noreply, do_delete(socket)}
end
def handle_event("archive_post_editor", _params, socket) do
{:noreply, do_archive(socket)}
end
def handle_event("unarchive_post_editor", _params, socket) do
{:noreply, do_unarchive(socket)}
end
def handle_event("set_post_editor_mode", %{"mode" => mode}, socket) do
normalized_mode = normalize_mode(mode)
@@ -370,6 +378,8 @@ defmodule BDS.Desktop.ShellLive.PostEditor do
editing_canonical_language?(translations, active_language, canonical_language),
can_publish?: post.status == :draft,
can_delete?: post.status == :published,
can_archive?: post.status in [:draft, :published],
can_unarchive?: post.status == :archived,
has_published_version?: has_published_version?(post),
discard_label: discard_label(post),
discard_title: discard_title(post),
@@ -559,6 +569,72 @@ defmodule BDS.Desktop.ShellLive.PostEditor do
end
end
defp do_archive(socket) do
case socket.assigns.post do
nil ->
socket
%Post{} = post ->
case Posts.archive_post(post.id) do
{:ok, archived_post} ->
socket =
socket
|> assign(:post, archived_post)
|> assign(:drafts, %{})
|> assign(:dirty?, false)
|> assign(:quick_actions_open?, false)
|> build_data()
Notify.tab_meta(
:post,
post.id,
archived_post.title || archived_post.slug || archived_post.id,
"archived"
)
Notify.dirty(:post, post.id, false)
notify_output(socket, dgettext("ui", "Post"), dgettext("ui", "Post archived"))
{:error, reason} ->
notify_output(socket, dgettext("ui", "Post"), inspect(reason), "error")
|> build_data()
end
end
end
defp do_unarchive(socket) do
case socket.assigns.post do
nil ->
socket
%Post{} = post ->
case Posts.unarchive_post(post.id) do
{:ok, unarchived_post} ->
socket =
socket
|> assign(:post, unarchived_post)
|> assign(:drafts, %{})
|> assign(:dirty?, false)
|> assign(:quick_actions_open?, false)
|> build_data()
Notify.tab_meta(
:post,
post.id,
unarchived_post.title || unarchived_post.slug || unarchived_post.id,
"draft"
)
Notify.dirty(:post, post.id, false)
notify_output(socket, dgettext("ui", "Post"), dgettext("ui", "Post unarchived"))
{:error, reason} ->
notify_output(socket, dgettext("ui", "Post"), inspect(reason), "error")
|> build_data()
end
end
end
defp do_detect_language(socket) do
if Map.get(socket.assigns, :offline_mode, true) do
notify_output(

View File

@@ -61,6 +61,42 @@
<small><%= dgettext("ui", "Select a target language for this post") %></small>
</span>
</button>
<%= if @post_editor.can_archive? or @post_editor.can_unarchive? do %>
<div class="quick-actions-divider"></div>
<%= if @post_editor.can_archive? do %>
<button
class="quick-action-item ui-dropdown-item flex items-start gap-3 text-left"
data-testid="post-archive-button"
type="button"
phx-click="archive_post_editor"
phx-target={@myself}
>
<span class="quick-action-icon">📦</span>
<span class="quick-action-text flex min-w-0 flex-1 flex-col">
<strong><%= dgettext("ui", "Archive") %></strong>
<small><%= dgettext("ui", "Move this post to the archive") %></small>
</span>
</button>
<% end %>
<%= if @post_editor.can_unarchive? do %>
<button
class="quick-action-item ui-dropdown-item flex items-start gap-3 text-left"
data-testid="post-unarchive-button"
type="button"
phx-click="unarchive_post_editor"
phx-target={@myself}
>
<span class="quick-action-icon">📤</span>
<span class="quick-action-text flex min-w-0 flex-1 flex-col">
<strong><%= dgettext("ui", "Unarchive") %></strong>
<small><%= dgettext("ui", "Restore this post to draft") %></small>
</span>
</button>
<% end %>
<% end %>
</div>
<% end %>
</div>

View File

@@ -171,6 +171,10 @@ defmodule BDS.Posts do
serialize_post_file(%{post | updated_at: updated_at, content: body}, published_at)
)
if post.file_path != "" and post.file_path != relative_path do
delete_post_file(post)
end
post
|> Post.changeset(%{
status: :published,
@@ -309,8 +313,11 @@ defmodule BDS.Posts do
select: pm.media_id
)
{:ok, translations} = Translations.list_post_translations(post.id)
case Repo.delete(post) do
{:ok, deleted_post} ->
Enum.each(translations, &FileSync.delete_translation_file/1)
delete_post_file(deleted_post)
Embeddings.remove_post(deleted_post.id)
PostLinks.delete_post_links(deleted_post.id)
@@ -352,6 +359,36 @@ defmodule BDS.Posts do
end
end
@spec unarchive_post(String.t()) ::
{:ok, Post.t()} | {:error, :not_found | Ecto.Changeset.t()}
def unarchive_post(post_id) do
case Repo.get(Post, post_id) do
nil ->
{:error, :not_found}
%Post{status: :archived} = post ->
content = restore_content_for_unarchive(post)
post
|> Post.changeset(%{status: :draft, content: content, updated_at: Persistence.now_ms()})
|> Repo.update()
|> case do
{:ok, updated_post} ->
:ok = Search.sync_post(updated_post)
{:ok, updated_post}
error ->
error
end
%Post{} = post ->
{:error,
post
|> Post.changeset(%{})
|> Ecto.Changeset.add_error(:status, "cannot unarchive non-archived post")}
end
end
@spec get_post!(String.t()) :: Post.t()
@spec get_post(String.t()) :: Post.t() | nil
def get_post(post_id), do: Repo.get(Post, post_id)
@@ -581,6 +618,17 @@ defmodule BDS.Posts do
)
end
defp restore_content_for_unarchive(%Post{content: content}) when is_binary(content), do: content
defp restore_content_for_unarchive(%Post{file_path: file_path} = post)
when file_path not in [nil, ""] do
project = Projects.get_project!(post.project_id)
full_path = Path.join(Projects.project_data_dir(project), file_path)
read_markdown_body(full_path)
end
defp restore_content_for_unarchive(_post), do: ""
defp normalize_title(nil), do: ""
defp normalize_title(title), do: title

View File

@@ -75,7 +75,7 @@ defmodule BDS.Posts.FileSync do
{"status", :published},
{"author", post.author},
{"language", post.language},
{"doNotTranslate", post.do_not_translate},
{"doNotTranslate", post.do_not_translate || nil},
{"templateSlug", post.template_slug},
{"createdAt", post.created_at},
{"updatedAt", post.updated_at},

File diff suppressed because it is too large Load Diff

View File

@@ -79,7 +79,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:42
#: lib/bds/desktop/shell_live/overlay_manager.ex:72
#: lib/bds/desktop/shell_live/post_editor.ex:700
#: lib/bds/desktop/shell_live/post_editor.ex:776
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:43
#, elixir-autogen, elixir-format
msgid "AI Suggestions"
@@ -142,12 +142,12 @@ msgstr ""
msgid "Add Submenu"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:223
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:259
#, elixir-autogen, elixir-format
msgid "Add category"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:138
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:174
#, elixir-autogen, elixir-format
msgid "Add tag"
msgstr ""
@@ -246,7 +246,7 @@ msgid "Assistant"
msgstr ""
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:166
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:166
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:202
#, elixir-autogen, elixir-format
msgid "Author"
msgstr ""
@@ -263,8 +263,8 @@ msgstr ""
#: lib/bds/desktop/shell_live/media_editor.ex:349
#: lib/bds/desktop/shell_live/media_editor.ex:538
#: lib/bds/desktop/shell_live/overlay_manager.ex:73
#: lib/bds/desktop/shell_live/post_editor.ex:567
#: lib/bds/desktop/shell_live/post_editor.ex:616
#: lib/bds/desktop/shell_live/post_editor.ex:643
#: lib/bds/desktop/shell_live/post_editor.ex:692
#, elixir-autogen, elixir-format
msgid "Automatic AI actions stay gated by airplane mode."
msgstr ""
@@ -283,7 +283,7 @@ msgid "Available languages"
msgstr ""
#: lib/bds/desktop/shell_live/panel_renderer.ex:124
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:264
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:300
#, elixir-autogen, elixir-format
msgid "Backlinks"
msgstr ""
@@ -367,7 +367,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/index.html.heex:336
#: lib/bds/desktop/shell_live/misc_editor.ex:750
#: lib/bds/desktop/shell_live/misc_editor.ex:751
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:207
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:243
#: lib/bds/desktop/shell_live/settings_editor/managed_categories.ex:59
#: lib/bds/desktop/shell_live/settings_editor/managed_categories.ex:75
#: lib/bds/desktop/shell_live/settings_editor/managed_categories.ex:107
@@ -499,7 +499,7 @@ msgstr ""
msgid "Confirm"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:326
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:362
#: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:34
#: lib/bds/desktop/shell_live/template_editor_html/template_editor.html.heex:32
#: lib/bds/ui/sidebar.ex:761
@@ -548,17 +548,17 @@ msgstr ""
msgid "Create / Edit"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:239
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:275
#, elixir-autogen, elixir-format
msgid "Create category"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:157
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:193
#, elixir-autogen, elixir-format
msgid "Create tag"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:417
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:453
#: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:48
#: lib/bds/desktop/shell_live/template_editor_html/template_editor.html.heex:46
#, elixir-autogen, elixir-format
@@ -609,7 +609,7 @@ msgstr ""
msgid "Date Distribution"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:252
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:288
#: lib/bds/desktop/shell_live/settings_editor_html/settings_editor.html.heex:174
#: lib/bds/desktop/shell_live/settings_editor_html/settings_editor.html.heex:182
#, elixir-autogen, elixir-format
@@ -634,7 +634,7 @@ msgstr ""
#: lib/bds/desktop/menu_bar.ex:162
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:98
#: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:166
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:80
#: 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
@@ -696,7 +696,7 @@ msgstr ""
msgid "Desktop Runtime"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:187
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:223
#, elixir-autogen, elixir-format
msgid "Detect"
msgstr ""
@@ -706,9 +706,9 @@ msgstr ""
#: lib/bds/desktop/shell_live/media_editor.ex:199
#: lib/bds/desktop/shell_live/media_editor.ex:205
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:59
#: lib/bds/desktop/shell_live/post_editor.ex:566
#: lib/bds/desktop/shell_live/post_editor.ex:595
#: lib/bds/desktop/shell_live/post_editor.ex:601
#: lib/bds/desktop/shell_live/post_editor.ex:642
#: lib/bds/desktop/shell_live/post_editor.ex:671
#: lib/bds/desktop/shell_live/post_editor.ex:677
#, elixir-autogen, elixir-format
msgid "Detect Language"
msgstr ""
@@ -774,7 +774,7 @@ msgstr ""
msgid "Display Text"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:196
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:232
#, elixir-autogen, elixir-format
msgid "Do Not Translate"
msgstr ""
@@ -896,8 +896,8 @@ msgstr ""
msgid "Exact Match"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:313
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:318
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:349
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:354
#, elixir-autogen, elixir-format
msgid "Excerpt"
msgstr ""
@@ -981,7 +981,7 @@ msgid "Force Reload"
msgstr ""
#: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:194
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:383
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:419
#, elixir-autogen, elixir-format
msgid "Gallery"
msgstr ""
@@ -1033,7 +1033,7 @@ msgstr ""
#: lib/bds/desktop/shell_data.ex:116
#: lib/bds/desktop/shell_live/index.html.heex:666
#: lib/bds/desktop/shell_live/media_editor.ex:703
#: lib/bds/desktop/shell_live/post_editor.ex:818
#: lib/bds/desktop/shell_live/post_editor.ex:894
#, elixir-autogen, elixir-format
msgid "Idle"
msgstr ""
@@ -1175,12 +1175,12 @@ msgstr ""
msgid "Insert"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:354
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:390
#, elixir-autogen, elixir-format
msgid "Insert Link"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:363
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:399
#, elixir-autogen, elixir-format
msgid "Insert Media"
msgstr ""
@@ -1198,13 +1198,13 @@ msgstr ""
#: lib/bds/desktop/shell_live/import_editor.ex:874
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:171
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:171
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:207
#, elixir-autogen, elixir-format
msgid "Language"
msgstr ""
#: lib/bds/desktop/shell_live/media_editor.ex:206
#: lib/bds/desktop/shell_live/post_editor.ex:602
#: lib/bds/desktop/shell_live/post_editor.ex:678
#, elixir-autogen, elixir-format
msgid "Language detection failed."
msgstr ""
@@ -1220,7 +1220,7 @@ msgstr ""
msgid "Link to Post"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:293
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:329
#, elixir-autogen, elixir-format
msgid "Linked Media"
msgstr ""
@@ -1231,7 +1231,7 @@ msgid "Linked Posts"
msgstr ""
#: lib/bds/desktop/shell_live/panel_renderer.ex:142
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:276
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:312
#, elixir-autogen, elixir-format
msgid "Links To"
msgstr ""
@@ -1288,7 +1288,7 @@ msgstr ""
msgid "Mapped"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:821
#: lib/bds/desktop/shell_live/post_editor.ex:897
#: lib/bds/desktop/shell_live/settings_editor_html/settings_editor.html.heex:120
#, elixir-autogen, elixir-format
msgid "Markdown"
@@ -1339,7 +1339,7 @@ msgstr ""
msgid "Merge Tags"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:90
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:126
#, elixir-autogen, elixir-format
msgid "Metadata"
msgstr ""
@@ -1451,8 +1451,8 @@ msgstr ""
#: lib/bds/desktop/shell_live/misc_editor.ex:468
#: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:72
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:272
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:284
#: 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
@@ -1463,7 +1463,7 @@ msgstr ""
msgid "No items"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:306
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:342
#, elixir-autogen, elixir-format
msgid "No linked media"
msgstr ""
@@ -1700,7 +1700,7 @@ msgstr ""
msgid "OpenAI-compatible endpoints, model routing, airplane mode, and system prompt"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:301
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:337
#, elixir-autogen, elixir-format
msgid "Order"
msgstr ""
@@ -1786,12 +1786,16 @@ msgid "Persist the detected language for this media item"
msgstr ""
#: lib/bds/desktop/shell_live/misc_editor.ex:742
#: lib/bds/desktop/shell_live/post_editor.ex:464
#: lib/bds/desktop/shell_live/post_editor.ex:468
#: lib/bds/desktop/shell_live/post_editor.ex:503
#: lib/bds/desktop/shell_live/post_editor.ex:507
#: lib/bds/desktop/shell_live/post_editor.ex:542
#: lib/bds/desktop/shell_live/post_editor.ex:557
#: lib/bds/desktop/shell_live/post_editor.ex:474
#: lib/bds/desktop/shell_live/post_editor.ex:478
#: lib/bds/desktop/shell_live/post_editor.ex:513
#: lib/bds/desktop/shell_live/post_editor.ex:517
#: lib/bds/desktop/shell_live/post_editor.ex:552
#: lib/bds/desktop/shell_live/post_editor.ex:567
#: lib/bds/desktop/shell_live/post_editor.ex:596
#: lib/bds/desktop/shell_live/post_editor.ex:599
#: lib/bds/desktop/shell_live/post_editor.ex:629
#: lib/bds/desktop/shell_live/post_editor.ex:632
#: lib/bds/desktop/shell_live/sidebar_components.ex:515
#: lib/bds/desktop/shell_live/sidebar_delete.ex:174
#: lib/bds/ui/registry.ex:99
@@ -1801,7 +1805,7 @@ msgstr ""
#: lib/bds/desktop/shell_data.ex:247
#: lib/bds/desktop/shell_live/panel_renderer.ex:118
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:261
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:297
#, elixir-autogen, elixir-format
msgid "Post Links"
msgstr ""
@@ -1821,12 +1825,12 @@ msgstr ""
msgid "Post is marked as do-not-translate but has translations"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:503
#: lib/bds/desktop/shell_live/post_editor.ex:513
#, elixir-autogen, elixir-format
msgid "Post published"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:464
#: lib/bds/desktop/shell_live/post_editor.ex:474
#, elixir-autogen, elixir-format
msgid "Post saved"
msgstr ""
@@ -1850,7 +1854,7 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:822
#: lib/bds/desktop/shell_live/post_editor.ex:898
#: lib/bds/desktop/shell_live/settings_editor_html/settings_editor.html.heex:121
#, elixir-autogen, elixir-format
msgid "Preview"
@@ -1866,7 +1870,7 @@ msgstr ""
msgid "Preview Post"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:394
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:430
#, elixir-autogen, elixir-format
msgid "Preview unavailable"
msgstr ""
@@ -1906,7 +1910,7 @@ msgstr ""
msgid "Public URL"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:70
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:106
#: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:11
#: lib/bds/desktop/shell_live/template_editor_html/template_editor.html.heex:11
#, elixir-autogen, elixir-format
@@ -1919,8 +1923,8 @@ msgid "Publish Selected"
msgstr ""
#: lib/bds/desktop/shell_data.ex:181
#: lib/bds/desktop/shell_live/post_editor.ex:816
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:420
#: lib/bds/desktop/shell_live/post_editor.ex:892
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:456
#: lib/bds/ui/sidebar.ex:320
#, elixir-autogen, elixir-format
msgid "Published"
@@ -2055,12 +2059,12 @@ msgstr ""
msgid "Remove"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:214
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:250
#, elixir-autogen, elixir-format
msgid "Remove category"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:129
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:165
#, elixir-autogen, elixir-format
msgid "Remove tag"
msgstr ""
@@ -2117,7 +2121,7 @@ msgstr ""
msgid "Result"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:817
#: lib/bds/desktop/shell_live/post_editor.ex:893
#, elixir-autogen, elixir-format
msgid "Reverted"
msgstr ""
@@ -2169,7 +2173,7 @@ msgid "Save Translation"
msgstr ""
#: lib/bds/desktop/shell_live/media_editor.ex:702
#: lib/bds/desktop/shell_live/post_editor.ex:815
#: lib/bds/desktop/shell_live/post_editor.ex:891
#, elixir-autogen, elixir-format
msgid "Saved"
msgstr ""
@@ -2369,7 +2373,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/import_editor.ex:1126
#: lib/bds/desktop/shell_live/import_editor.ex:1183
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:202
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:238
#: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:24
#: lib/bds/desktop/shell_live/template_editor_html/template_editor.html.heex:23
#, elixir-autogen, elixir-format
@@ -2463,7 +2467,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/index.html.heex:297
#: lib/bds/desktop/shell_live/index.html.heex:325
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:161
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:122
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:158
#: lib/bds/desktop/shell_live/tags_editor.ex:94
#: lib/bds/desktop/shell_live/tags_editor.ex:136
#: lib/bds/desktop/shell_live/tags_editor.ex:189
@@ -2492,7 +2496,7 @@ msgid "Technology"
msgstr ""
#: lib/bds/desktop/shell_live/misc_editor.ex:747
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:250
#: 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_delete.ex:179
#: lib/bds/ui/registry.ex:134
@@ -2571,7 +2575,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/import_editor.ex:1182
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:146
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:285
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:117
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:153
#: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:23
#: lib/bds/desktop/shell_live/settings_editor_html/settings_editor.html.heex:155
#: lib/bds/desktop/shell_live/template_editor_html/template_editor.html.heex:22
@@ -2644,9 +2648,9 @@ msgstr ""
#: lib/bds/desktop/shell_live/media_editor.ex:558
#: lib/bds/desktop/shell_live/media_editor.ex:563
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:76
#: lib/bds/desktop/shell_live/post_editor.ex:615
#: lib/bds/desktop/shell_live/post_editor.ex:644
#: lib/bds/desktop/shell_live/post_editor.ex:649
#: lib/bds/desktop/shell_live/post_editor.ex:691
#: lib/bds/desktop/shell_live/post_editor.ex:720
#: lib/bds/desktop/shell_live/post_editor.ex:725
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:60
#, elixir-autogen, elixir-format
msgid "Translate"
@@ -2672,7 +2676,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:183
#: lib/bds/desktop/shell_live/misc_editor.ex:743
#: lib/bds/desktop/shell_live/misc_editor.ex:745
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:93
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:129
#: lib/bds/ui/registry.ex:131
#, elixir-autogen, elixir-format
msgid "Translations"
@@ -2723,7 +2727,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/media_editor.ex:701
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:10
#: lib/bds/desktop/shell_live/post_editor.ex:814
#: lib/bds/desktop/shell_live/post_editor.ex:890
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:7
#, elixir-autogen, elixir-format
msgid "Unsaved"
@@ -2743,7 +2747,7 @@ msgstr ""
msgid "Untitled Import"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:418
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:454
#: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:48
#: lib/bds/desktop/shell_live/template_editor_html/template_editor.html.heex:46
#, elixir-autogen, elixir-format
@@ -3206,7 +3210,7 @@ msgstr "Image Import Concurrency"
#: lib/bds/desktop/shell_live.ex:649
#: lib/bds/desktop/shell_live.ex:658
#: lib/bds/desktop/shell_live.ex:665
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:371
#: 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"
@@ -3215,3 +3219,33 @@ msgstr "Add Gallery Images"
#, elixir-autogen, elixir-format
msgid "Failed to process %{path}: %{reason}"
msgstr "Failed to process %{path}: %{reason}"
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:78
#, elixir-autogen, elixir-format, fuzzy
msgid "Archive"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:79
#, elixir-autogen, elixir-format
msgid "Move this post to the archive"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:596
#, elixir-autogen, elixir-format, fuzzy
msgid "Post archived"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:629
#, elixir-autogen, elixir-format, fuzzy
msgid "Post unarchived"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:95
#, elixir-autogen, elixir-format
msgid "Restore this post to draft"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:94
#, elixir-autogen, elixir-format, fuzzy
msgid "Unarchive"
msgstr ""

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -92,7 +92,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:42
#: lib/bds/desktop/shell_live/overlay_manager.ex:72
#: lib/bds/desktop/shell_live/post_editor.ex:700
#: lib/bds/desktop/shell_live/post_editor.ex:776
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:43
#, elixir-autogen, elixir-format
msgid "AI Suggestions"
@@ -155,12 +155,12 @@ msgstr ""
msgid "Add Submenu"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:223
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:259
#, elixir-autogen, elixir-format
msgid "Add category"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:138
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:174
#, elixir-autogen, elixir-format
msgid "Add tag"
msgstr ""
@@ -259,7 +259,7 @@ msgid "Assistant"
msgstr ""
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:166
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:166
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:202
#, elixir-autogen, elixir-format
msgid "Author"
msgstr ""
@@ -276,8 +276,8 @@ msgstr ""
#: lib/bds/desktop/shell_live/media_editor.ex:349
#: lib/bds/desktop/shell_live/media_editor.ex:538
#: lib/bds/desktop/shell_live/overlay_manager.ex:73
#: lib/bds/desktop/shell_live/post_editor.ex:567
#: lib/bds/desktop/shell_live/post_editor.ex:616
#: lib/bds/desktop/shell_live/post_editor.ex:643
#: lib/bds/desktop/shell_live/post_editor.ex:692
#, elixir-autogen, elixir-format
msgid "Automatic AI actions stay gated by airplane mode."
msgstr ""
@@ -296,7 +296,7 @@ msgid "Available languages"
msgstr ""
#: lib/bds/desktop/shell_live/panel_renderer.ex:124
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:264
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:300
#, elixir-autogen, elixir-format
msgid "Backlinks"
msgstr ""
@@ -380,7 +380,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/index.html.heex:336
#: lib/bds/desktop/shell_live/misc_editor.ex:750
#: lib/bds/desktop/shell_live/misc_editor.ex:751
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:207
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:243
#: lib/bds/desktop/shell_live/settings_editor/managed_categories.ex:59
#: lib/bds/desktop/shell_live/settings_editor/managed_categories.ex:75
#: lib/bds/desktop/shell_live/settings_editor/managed_categories.ex:107
@@ -512,7 +512,7 @@ msgstr ""
msgid "Confirm"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:326
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:362
#: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:34
#: lib/bds/desktop/shell_live/template_editor_html/template_editor.html.heex:32
#: lib/bds/ui/sidebar.ex:761
@@ -561,17 +561,17 @@ msgstr ""
msgid "Create / Edit"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:239
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:275
#, elixir-autogen, elixir-format
msgid "Create category"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:157
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:193
#, elixir-autogen, elixir-format
msgid "Create tag"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:417
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:453
#: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:48
#: lib/bds/desktop/shell_live/template_editor_html/template_editor.html.heex:46
#, elixir-autogen, elixir-format
@@ -622,7 +622,7 @@ msgstr ""
msgid "Date Distribution"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:252
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:288
#: lib/bds/desktop/shell_live/settings_editor_html/settings_editor.html.heex:174
#: lib/bds/desktop/shell_live/settings_editor_html/settings_editor.html.heex:182
#, elixir-autogen, elixir-format
@@ -647,7 +647,7 @@ msgstr ""
#: lib/bds/desktop/menu_bar.ex:162
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:98
#: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:166
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:80
#: 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
@@ -709,7 +709,7 @@ msgstr ""
msgid "Desktop Runtime"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:187
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:223
#, elixir-autogen, elixir-format
msgid "Detect"
msgstr ""
@@ -719,9 +719,9 @@ msgstr ""
#: lib/bds/desktop/shell_live/media_editor.ex:199
#: lib/bds/desktop/shell_live/media_editor.ex:205
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:59
#: lib/bds/desktop/shell_live/post_editor.ex:566
#: lib/bds/desktop/shell_live/post_editor.ex:595
#: lib/bds/desktop/shell_live/post_editor.ex:601
#: lib/bds/desktop/shell_live/post_editor.ex:642
#: lib/bds/desktop/shell_live/post_editor.ex:671
#: lib/bds/desktop/shell_live/post_editor.ex:677
#, elixir-autogen, elixir-format
msgid "Detect Language"
msgstr ""
@@ -787,7 +787,7 @@ msgstr ""
msgid "Display Text"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:196
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:232
#, elixir-autogen, elixir-format
msgid "Do Not Translate"
msgstr ""
@@ -909,8 +909,8 @@ msgstr ""
msgid "Exact Match"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:313
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:318
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:349
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:354
#, elixir-autogen, elixir-format
msgid "Excerpt"
msgstr ""
@@ -994,7 +994,7 @@ msgid "Force Reload"
msgstr ""
#: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:194
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:383
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:419
#, elixir-autogen, elixir-format
msgid "Gallery"
msgstr ""
@@ -1046,7 +1046,7 @@ msgstr ""
#: lib/bds/desktop/shell_data.ex:116
#: lib/bds/desktop/shell_live/index.html.heex:666
#: lib/bds/desktop/shell_live/media_editor.ex:703
#: lib/bds/desktop/shell_live/post_editor.ex:818
#: lib/bds/desktop/shell_live/post_editor.ex:894
#, elixir-autogen, elixir-format
msgid "Idle"
msgstr ""
@@ -1188,12 +1188,12 @@ msgstr ""
msgid "Insert"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:354
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:390
#, elixir-autogen, elixir-format
msgid "Insert Link"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:363
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:399
#, elixir-autogen, elixir-format
msgid "Insert Media"
msgstr ""
@@ -1211,13 +1211,13 @@ msgstr ""
#: lib/bds/desktop/shell_live/import_editor.ex:874
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:171
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:171
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:207
#, elixir-autogen, elixir-format
msgid "Language"
msgstr ""
#: lib/bds/desktop/shell_live/media_editor.ex:206
#: lib/bds/desktop/shell_live/post_editor.ex:602
#: lib/bds/desktop/shell_live/post_editor.ex:678
#, elixir-autogen, elixir-format
msgid "Language detection failed."
msgstr ""
@@ -1233,7 +1233,7 @@ msgstr ""
msgid "Link to Post"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:293
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:329
#, elixir-autogen, elixir-format
msgid "Linked Media"
msgstr ""
@@ -1244,7 +1244,7 @@ msgid "Linked Posts"
msgstr ""
#: lib/bds/desktop/shell_live/panel_renderer.ex:142
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:276
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:312
#, elixir-autogen, elixir-format
msgid "Links To"
msgstr ""
@@ -1301,7 +1301,7 @@ msgstr ""
msgid "Mapped"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:821
#: lib/bds/desktop/shell_live/post_editor.ex:897
#: lib/bds/desktop/shell_live/settings_editor_html/settings_editor.html.heex:120
#, elixir-autogen, elixir-format
msgid "Markdown"
@@ -1352,7 +1352,7 @@ msgstr ""
msgid "Merge Tags"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:90
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:126
#, elixir-autogen, elixir-format
msgid "Metadata"
msgstr ""
@@ -1464,8 +1464,8 @@ msgstr ""
#: lib/bds/desktop/shell_live/misc_editor.ex:468
#: lib/bds/desktop/shell_live/overlay_html/shell_overlay.html.heex:72
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:272
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:284
#: 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
@@ -1476,7 +1476,7 @@ msgstr ""
msgid "No items"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:306
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:342
#, elixir-autogen, elixir-format
msgid "No linked media"
msgstr ""
@@ -1713,7 +1713,7 @@ msgstr ""
msgid "OpenAI-compatible endpoints, model routing, airplane mode, and system prompt"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:301
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:337
#, elixir-autogen, elixir-format
msgid "Order"
msgstr ""
@@ -1799,12 +1799,16 @@ msgid "Persist the detected language for this media item"
msgstr ""
#: lib/bds/desktop/shell_live/misc_editor.ex:742
#: lib/bds/desktop/shell_live/post_editor.ex:464
#: lib/bds/desktop/shell_live/post_editor.ex:468
#: lib/bds/desktop/shell_live/post_editor.ex:503
#: lib/bds/desktop/shell_live/post_editor.ex:507
#: lib/bds/desktop/shell_live/post_editor.ex:542
#: lib/bds/desktop/shell_live/post_editor.ex:557
#: lib/bds/desktop/shell_live/post_editor.ex:474
#: lib/bds/desktop/shell_live/post_editor.ex:478
#: lib/bds/desktop/shell_live/post_editor.ex:513
#: lib/bds/desktop/shell_live/post_editor.ex:517
#: lib/bds/desktop/shell_live/post_editor.ex:552
#: lib/bds/desktop/shell_live/post_editor.ex:567
#: lib/bds/desktop/shell_live/post_editor.ex:596
#: lib/bds/desktop/shell_live/post_editor.ex:599
#: lib/bds/desktop/shell_live/post_editor.ex:629
#: lib/bds/desktop/shell_live/post_editor.ex:632
#: lib/bds/desktop/shell_live/sidebar_components.ex:515
#: lib/bds/desktop/shell_live/sidebar_delete.ex:174
#: lib/bds/ui/registry.ex:99
@@ -1814,7 +1818,7 @@ msgstr ""
#: lib/bds/desktop/shell_data.ex:247
#: lib/bds/desktop/shell_live/panel_renderer.ex:118
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:261
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:297
#, elixir-autogen, elixir-format
msgid "Post Links"
msgstr ""
@@ -1834,12 +1838,12 @@ msgstr ""
msgid "Post is marked as do-not-translate but has translations"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:503
#: lib/bds/desktop/shell_live/post_editor.ex:513
#, elixir-autogen, elixir-format
msgid "Post published"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:464
#: lib/bds/desktop/shell_live/post_editor.ex:474
#, elixir-autogen, elixir-format
msgid "Post saved"
msgstr ""
@@ -1863,7 +1867,7 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:822
#: lib/bds/desktop/shell_live/post_editor.ex:898
#: lib/bds/desktop/shell_live/settings_editor_html/settings_editor.html.heex:121
#, elixir-autogen, elixir-format
msgid "Preview"
@@ -1879,7 +1883,7 @@ msgstr ""
msgid "Preview Post"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:394
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:430
#, elixir-autogen, elixir-format
msgid "Preview unavailable"
msgstr ""
@@ -1919,7 +1923,7 @@ msgstr ""
msgid "Public URL"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:70
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:106
#: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:11
#: lib/bds/desktop/shell_live/template_editor_html/template_editor.html.heex:11
#, elixir-autogen, elixir-format
@@ -1932,8 +1936,8 @@ msgid "Publish Selected"
msgstr ""
#: lib/bds/desktop/shell_data.ex:181
#: lib/bds/desktop/shell_live/post_editor.ex:816
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:420
#: lib/bds/desktop/shell_live/post_editor.ex:892
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:456
#: lib/bds/ui/sidebar.ex:320
#, elixir-autogen, elixir-format
msgid "Published"
@@ -2068,12 +2072,12 @@ msgstr ""
msgid "Remove"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:214
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:250
#, elixir-autogen, elixir-format
msgid "Remove category"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:129
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:165
#, elixir-autogen, elixir-format
msgid "Remove tag"
msgstr ""
@@ -2130,7 +2134,7 @@ msgstr ""
msgid "Result"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:817
#: lib/bds/desktop/shell_live/post_editor.ex:893
#, elixir-autogen, elixir-format
msgid "Reverted"
msgstr ""
@@ -2182,7 +2186,7 @@ msgid "Save Translation"
msgstr ""
#: lib/bds/desktop/shell_live/media_editor.ex:702
#: lib/bds/desktop/shell_live/post_editor.ex:815
#: lib/bds/desktop/shell_live/post_editor.ex:891
#, elixir-autogen, elixir-format
msgid "Saved"
msgstr ""
@@ -2382,7 +2386,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/import_editor.ex:1126
#: lib/bds/desktop/shell_live/import_editor.ex:1183
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:202
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:238
#: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:24
#: lib/bds/desktop/shell_live/template_editor_html/template_editor.html.heex:23
#, elixir-autogen, elixir-format
@@ -2476,7 +2480,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/index.html.heex:297
#: lib/bds/desktop/shell_live/index.html.heex:325
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:161
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:122
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:158
#: lib/bds/desktop/shell_live/tags_editor.ex:94
#: lib/bds/desktop/shell_live/tags_editor.ex:136
#: lib/bds/desktop/shell_live/tags_editor.ex:189
@@ -2505,7 +2509,7 @@ msgid "Technology"
msgstr ""
#: lib/bds/desktop/shell_live/misc_editor.ex:747
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:250
#: 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_delete.ex:179
#: lib/bds/ui/registry.ex:134
@@ -2584,7 +2588,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/import_editor.ex:1182
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:146
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:285
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:117
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:153
#: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:23
#: lib/bds/desktop/shell_live/settings_editor_html/settings_editor.html.heex:155
#: lib/bds/desktop/shell_live/template_editor_html/template_editor.html.heex:22
@@ -2657,9 +2661,9 @@ msgstr ""
#: lib/bds/desktop/shell_live/media_editor.ex:558
#: lib/bds/desktop/shell_live/media_editor.ex:563
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:76
#: lib/bds/desktop/shell_live/post_editor.ex:615
#: lib/bds/desktop/shell_live/post_editor.ex:644
#: lib/bds/desktop/shell_live/post_editor.ex:649
#: lib/bds/desktop/shell_live/post_editor.ex:691
#: lib/bds/desktop/shell_live/post_editor.ex:720
#: lib/bds/desktop/shell_live/post_editor.ex:725
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:60
#, elixir-autogen, elixir-format
msgid "Translate"
@@ -2685,7 +2689,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:183
#: lib/bds/desktop/shell_live/misc_editor.ex:743
#: lib/bds/desktop/shell_live/misc_editor.ex:745
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:93
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:129
#: lib/bds/ui/registry.ex:131
#, elixir-autogen, elixir-format
msgid "Translations"
@@ -2736,7 +2740,7 @@ msgstr ""
#: lib/bds/desktop/shell_live/media_editor.ex:701
#: lib/bds/desktop/shell_live/media_editor_html/media_editor.html.heex:10
#: lib/bds/desktop/shell_live/post_editor.ex:814
#: lib/bds/desktop/shell_live/post_editor.ex:890
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:7
#, elixir-autogen, elixir-format
msgid "Unsaved"
@@ -2756,7 +2760,7 @@ msgstr ""
msgid "Untitled Import"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:418
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:454
#: lib/bds/desktop/shell_live/script_editor_html/script_editor.html.heex:48
#: lib/bds/desktop/shell_live/template_editor_html/template_editor.html.heex:46
#, elixir-autogen, elixir-format
@@ -3219,7 +3223,7 @@ msgstr ""
#: lib/bds/desktop/shell_live.ex:649
#: lib/bds/desktop/shell_live.ex:658
#: lib/bds/desktop/shell_live.ex:665
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:371
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:407
#, elixir-autogen, elixir-format
msgid "Add Gallery Images"
msgstr ""
@@ -3228,3 +3232,33 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "Failed to process %{path}: %{reason}"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:78
#, elixir-autogen, elixir-format
msgid "Archive"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:79
#, elixir-autogen, elixir-format
msgid "Move this post to the archive"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:596
#, elixir-autogen, elixir-format
msgid "Post archived"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor.ex:629
#, elixir-autogen, elixir-format
msgid "Post unarchived"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:95
#, elixir-autogen, elixir-format
msgid "Restore this post to draft"
msgstr ""
#: lib/bds/desktop/shell_live/post_editor_html/post_editor.html.heex:94
#, elixir-autogen, elixir-format
msgid "Unarchive"
msgstr ""

View File

@@ -188,6 +188,59 @@ defmodule BDS.PostsTest do
refute File.exists?(full_path <> ".tmp")
end
test "publish_post omits doNotTranslate from frontmatter when false", %{
project: project,
temp_dir: temp_dir
} do
assert {:ok, post} =
BDS.Posts.create_post(%{
project_id: project.id,
title: "Normal Post",
content: "body"
})
assert post.do_not_translate == false
assert {:ok, published} = BDS.Posts.publish_post(post.id)
full_path = Path.join(temp_dir, published.file_path)
file_contents = File.read!(full_path)
refute file_contents =~ "doNotTranslate"
end
test "publish_post deletes old file when file path changes", %{
project: project,
temp_dir: temp_dir
} do
assert {:ok, post} =
BDS.Posts.create_post(%{
project_id: project.id,
title: "Moving Post",
content: "Body"
})
assert {:ok, published} = BDS.Posts.publish_post(post.id)
new_path = Path.join(temp_dir, published.file_path)
assert File.exists?(new_path)
old_relative = "posts/1999/01/moving-post.md"
old_full = Path.join(temp_dir, old_relative)
File.mkdir_p!(Path.dirname(old_full))
File.write!(old_full, "stale content")
import Ecto.Query
BDS.Repo.update_all(
from(p in BDS.Posts.Post, where: p.id == ^published.id),
set: [file_path: old_relative, content: "edited body"]
)
assert {:ok, republished} = BDS.Posts.publish_post(published.id)
assert republished.file_path == published.file_path
assert File.exists?(Path.join(temp_dir, republished.file_path))
refute File.exists?(old_full)
end
test "delete_post removes the database row and published markdown file when present" do
temp_dir =
Path.join(System.tmp_dir!(), "bds-post-delete-#{System.unique_integer([:positive])}")
@@ -228,6 +281,43 @@ defmodule BDS.PostsTest do
assert {:error, :not_found} = BDS.Posts.delete_post(post.id)
end
test "delete_post deletes translation records and their files from disk" do
temp_dir =
Path.join(System.tmp_dir!(), "bds-post-del-trans-#{System.unique_integer([:positive])}")
File.mkdir_p!(temp_dir)
on_exit(fn -> File.rm_rf(temp_dir) end)
assert {:ok, project} =
BDS.Projects.create_project(%{name: "DelTrans", data_path: temp_dir})
assert {:ok, post} =
BDS.Posts.create_post(%{
project_id: project.id,
title: "Parent Post",
content: "Body"
})
assert {:ok, translation} =
BDS.Posts.upsert_post_translation(post.id, "de", %{
title: "Elternbeitrag",
content: "Inhalt"
})
assert {:ok, _published} = BDS.Posts.publish_post(post.id)
published_translation = BDS.Posts.get_post_translation!(translation.id)
translation_path = Path.join(temp_dir, published_translation.file_path)
assert File.exists?(translation_path)
assert {:ok, :deleted} = BDS.Posts.delete_post(post.id)
assert BDS.Repo.get(BDS.Posts.Post, post.id) == nil
assert {:ok, []} = BDS.Posts.list_post_translations(post.id)
refute File.exists?(translation_path)
end
test "delete_post returns not_found for nonexistent post" do
assert {:error, :not_found} = BDS.Posts.delete_post(Ecto.UUID.generate())
end
@@ -296,6 +386,65 @@ defmodule BDS.PostsTest do
assert contents =~ "\n---\nBody\n"
end
test "unarchive_post transitions archived draft back to draft", %{project: project} do
assert {:ok, post} =
BDS.Posts.create_post(%{
project_id: project.id,
title: "Archive Then Unarchive",
content: "Draft body"
})
assert {:ok, archived} = BDS.Posts.archive_post(post.id)
assert archived.status == :archived
assert {:ok, unarchived} = BDS.Posts.unarchive_post(archived.id)
assert unarchived.status == :draft
assert unarchived.content == "Draft body"
end
test "unarchive_post restores content from disk for previously published posts" do
temp_dir =
Path.join(System.tmp_dir!(), "bds-post-unarchive-#{System.unique_integer([:positive])}")
File.mkdir_p!(temp_dir)
on_exit(fn -> File.rm_rf(temp_dir) end)
assert {:ok, project} =
BDS.Projects.create_project(%{name: "Unarchive Pub", data_path: temp_dir})
assert {:ok, post} =
BDS.Posts.create_post(%{
project_id: project.id,
title: "Publish Then Archive",
content: "Published body"
})
assert {:ok, published} = BDS.Posts.publish_post(post.id)
assert published.content == nil
assert {:ok, archived} = BDS.Posts.archive_post(published.id)
assert archived.status == :archived
assert archived.content == nil
assert {:ok, unarchived} = BDS.Posts.unarchive_post(archived.id)
assert unarchived.status == :draft
assert unarchived.content == "Published body"
end
test "unarchive_post rejects non-archived posts", %{project: project} do
assert {:ok, post} =
BDS.Posts.create_post(%{
project_id: project.id,
title: "Still Draft",
content: "Body"
})
assert {:error, %Ecto.Changeset{}} = BDS.Posts.unarchive_post(post.id)
end
test "unarchive_post returns not_found for nonexistent post" do
assert {:error, :not_found} = BDS.Posts.unarchive_post(Ecto.UUID.generate())
end
test "rebuild_posts_from_files recreates published posts from disk" do
temp_dir =
Path.join(System.tmp_dir!(), "bds-post-rebuild-#{System.unique_integer([:positive])}")

View File

@@ -20,16 +20,16 @@ defmodule BDS.TranslationCompletenessTest do
expected = %{
"de/default.po" => 0,
"de/render.po" => 0,
"de/ui.po" => 153,
"de/ui.po" => 0,
"fr/default.po" => 0,
"fr/render.po" => 0,
"fr/ui.po" => 153,
"fr/ui.po" => 0,
"it/default.po" => 0,
"it/render.po" => 0,
"it/ui.po" => 153,
"it/ui.po" => 0,
"es/default.po" => 0,
"es/render.po" => 0,
"es/ui.po" => 153
"es/ui.po" => 0
}
actual =