railslove / rcvr-app

recover provides localities a privacy-compliant, safe, and easy way for their guests to check in. See https://www.recoverapp.de/ for more details.
https://recoverapp.de
GNU Affero General Public License v3.0
41 stars 6 forks source link

improve formals and plurals in locales #301

Open stringparser opened 3 years ago

stringparser commented 3 years ago

To be done after #259 is merged. see _Original post by @bitboxer in https://github.com/railslove/rcvr-app/pull/259#discussion_r694842773_

For formal the translate function in usePageLocales can take account of it since is build dependent (we know it from the start).

We can also add an option like { formal: false} to this translate function so we can override the default.

To improve counts for plurals we can pass count as a second argument and then this can be used by the translation function.