fix: issue #35 validation expected unrendered .lang translation variant routes; main-language lists now render main-language translations

This commit is contained in:
2026-07-17 22:12:23 +02:00
parent dd53ca3fbc
commit 23f05b72f7
6 changed files with 180 additions and 129 deletions

View File

@@ -22,16 +22,6 @@ defmodule BDS.Generation.Outputs do
def route_post_output_path(post, ""), do: post_output_path(post)
def route_post_output_path(post, route_language), do: post_output_path(post, route_language)
@spec suppress_subtree_translation_variants([map()], [String.t()]) :: [map()]
def suppress_subtree_translation_variants(route_posts, additional_languages) do
subtree_languages = MapSet.new(additional_languages)
Enum.reject(route_posts, fn post ->
is_binary(Map.get(post, :translation_source_slug)) and
MapSet.member?(subtree_languages, to_string(post.language))
end)
end
@spec build_validation_route_paths(map(), [map()], [map()], map(), String.t() | nil) :: [
String.t()
]