diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..8536aa8 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/yext/gettext + +go 1.18 diff --git a/po/plural.go b/po/plural.go index 6344624..b246798 100644 --- a/po/plural.go +++ b/po/plural.go @@ -51,6 +51,9 @@ var langNames = map[string]string{ "is": "Icelandic", "id": "Indonesian", "bs": "Bosnian", + "sm": "Samoan", + "to": "Tongan", + "fil": "Filipino", } // TODO: Fall back to these if Plural-Forms is not specified. @@ -100,6 +103,9 @@ var pluralExprs = map[string]string{ "sl": "nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);", "ar": "nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 ? 4 : 5);", "is": "nplurals=2; plural=(n%10!=1 || n%100==11);", + "sm": "nplurals=2; plural=(n > 1);", + "to": "nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;", + "fil": "nplurals=2; plural=(n > 1);", } // pluralSelectors contains a lookup from space-stripped plural forms strings to