-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
I18N: Attributes labels translation issue #625
Comments
@michaelkl I ran into this problem. So far, what I've done to avoid duplicated translations is this: common: &commons
patient:
address: 'Direccion'
weight: 'Peso (kg)'
height: 'Altura (cm)'
allergies: 'Alergias'
patient_antecedents: 'Antecedentes del paciente' And then, include &commons in es:
activerecord:
models:
attributes:
<<: *commons Hope it helps |
@FerPerales Good workaround until the issue will have been fixed! Thank you! |
Any update on this? Thanks :) |
I'm closing this as the original issue is quite old and the translations have changed quite a bit since this was opened, please open another if this is still an issue. |
This issue still exists! |
Yup; I can reproduce. I agree this is odd. I wonder what the original intent was, using Hm, thinking a bit more, I can see an edge case. In forms, fields will tend to match ActiveRecord attributes. On the other hand, in lists/shows there's a higher chance of showing other things, such as constructed attributes (eg: A potential idea would be to use a helper that tries for Does anyone have experience with these? /cc @nickcharlton |
@pablobm i think it's fixed on index page right? |
Indeed, I think it was fixed by https://github.com/thoughtbot/administrate/pull/1064/files 🙂 Thank you for the heads up, @jubilee2. If anyone still sees this problem, please let us know and we'll reopen. |
hi there! Examples that fails to apply the correct translation inf en:
attributes:
user: "Some translation for user belongs_to#1" en:
activerecord:
attributes:
post:
user: "Some translation for user belongs_to#2" |
Hey @lubieniebieski, do you think you'd be able to contribute a PR for fixing the forms part of it? |
hi @nickcharlton, I gave it a try in #2590 :) |
Hello.
First of all, here's my
locale/ru.yml
:Now in my User dashboard on new/edit page (one which got the edit form) labels of attributes are displayed using thier translation from locale/ru.yml, but on index and show pages they are don't!
I've dived in sources and found out that on index page the translation is taken from
helper.label
section, not from theactiverecord.attributes
one.I think translation sources should be unified all over Administrate pages and using
activerecord.attribues
section looks more straightforward to me.Thank you.
The text was updated successfully, but these errors were encountered: