Skip to content

Commit

Permalink
Support he-x-NoNikud in Golang per hebcal/hebcal#275
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Aug 12, 2024
1 parent e35fdb9 commit 1f06326
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions po2golang.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import "strings"
// AllLocales is an array of all supported locale names.
var AllLocales = []string{
\t"en",
\t"he-x-NoNikud",
`);
for (const langName of langs.values()) {
outstream.write(`\t"${langName}",\n`);
Expand All @@ -49,6 +50,12 @@ func LookupTranslation(key string, locale string) (string, bool) {
\tswitch lang {
\tcase "", "en", "sephardic":
\t\treturn key, true
\tcase "he-x-nonikud":
\t\tv, ok := Lookup_he(key)
\t\tif ok {
\t\t\treturn HebrewStripNikkud(v), true
\t\t}
\t\treturn v, ok
`);
for (const langName of langs.values()) {
outstream.write(`\tcase "${langName}":\n`);
Expand Down

0 comments on commit 1f06326

Please sign in to comment.