jvoisin
dcfe0a7d94
refactor(locale): simplify pluralForm
...
Instead of having a switch-case returning a function to be executed, it's
simpler/faster to have a single function containing a switch-case. It also
allows to group languages with identical plural form in a single
implementation, and remove the "default" guard value, as switch-case already
have a `default:` case.
2025-07-07 15:30:41 -07:00
Frédéric Guillot
6e3cecc57e
feat(locale): add Romanian translation
...
This contribution was sent outside GitHub. Credit to Laurentiu.
2025-03-28 11:11:20 -07:00
krvpb024
28b235595e
feat(locale): add Taiwanese POJ (nan-Latn-pehoeji) support
2025-02-13 17:29:13 -08:00
jvoisin
8c5f88ac62
Remove superfluous parenthesis
2025-01-23 19:20:13 -08:00
Frédéric Guillot
1b5edfc00a
Add unit test to ensure each translation has the correct number of plurals
2024-02-29 20:44:08 -08:00
jvoisin
48fa64f8ec
Use a switch-case construct in internal/locale/plural.go instead of an avalanche of if-if-if-if-if
...
Less lines or code and marginally greater readability, yay!
Oh and also preallocate a map in LoadCatalogMessages just because we can.
2024-02-28 19:36:38 -08:00
Frédéric Guillot
168a870c02
Move internal packages to an internal folder
...
For reference: https://go.dev/doc/go1.4#internalpackages
2023-08-10 20:29:34 -07:00