-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add invite to create the first record when the list is empty #4113
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This needs rebase though.
6957ccd
to
3d102f8
Compare
PR rebased |
sorry, a recent PR merge modified the List doc and requires a new rebase for this PR |
ddf4037
to
fd1176c
Compare
Ready! |
@@ -40,6 +40,8 @@ module.exports = { | |||
loading: 'Chargement', | |||
not_found: 'Page manquante', | |||
show: '%{name} #%{id}', | |||
empty: 'Pas encore de %{name}.', | |||
invite: 'Voulez-vous en créer un ?', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will cause bad wording when the resource name is feminine (ex: promotion). But I don't see an easy way to fix that, so we'll go with that translation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could leave to user to override the empty text, by looking for a resources.foobar.empty
key. If there's no such key we use the default one ra.page.empty
.
The invite key could also be customizable, like resources.foobar.invite
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea. Would you mind adding that feature to your PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll work on it
aeb26d7
to
aab6cb8
Compare
Closes #2639