fix: issue #35 validation expected unrendered .lang translation variant routes; main-language lists now render main-language translations
This commit is contained in:
@@ -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()
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user