Skip to content

Commit

Permalink
Add fallthrough to devanagari for lang2script
Browse files Browse the repository at this point in the history
  • Loading branch information
rtshkmr committed Aug 18, 2024
1 parent bceda5b commit 9352e74
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/vyasa/written.ex
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,13 @@ defmodule Vyasa.Written do
Source.mutate_changeset(source, attrs)
end

#Sanskrit
# Sanskrit
defp lang2script(%Source{lang: "sa"} = s), do: %{s | script: "dn"}
#Awadhi
# Awadhi
defp lang2script(%Source{lang: "awadi"} = s), do: %{s | script: "dn"}
#Tamil
# Tamil
defp lang2script(%Source{lang: "ta"} = s), do: %{s | script: "ta"}

# fallthrough to devanagari
defp lang2script(%Source{} = s), do: %{s | script: "dn"}
end

0 comments on commit 9352e74

Please sign in to comment.