Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: inflections in translations (specific distance_of_time...) #908

Open
fwolfst opened this issue Sep 28, 2020 · 0 comments
Open

feature: inflections in translations (specific distance_of_time...) #908

fwolfst opened this issue Sep 28, 2020 · 0 comments

Comments

@fwolfst
Copy link

fwolfst commented Sep 28, 2020

Hi
Probably related to #885 and #825 , in German you'd apply different cases for

Age: 3 hours
Alter: 3 Stunde

and

Created 3 hours ago
Vor 3 StundeN angelegt

The capitalized N is for illustrative purposes only.

distance_of_time_in_words and the related functions accept a translation-scope. If the rails-i18n gem would support 'cased' (inflected) translations and a convention for it, I could PR the German translations.

One candidate could be:

datetime:
    distance_in_words: # 'original'
      about_x_hours:
        one: etwa eine Stunde
        other: etwa %{count} Stunden
      inflected:
        dativ: # German case name
          about_x_hours:
            one: etwa einer Stunde # eineR
            other: etwa %{count} Stunden

or, more general, a variant scope with custom additions (apparently in hungarian you might want a past and future variant).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant