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

Belongs to label does not follow the Internationalisation #1681

Closed
huylocit14054 opened this issue Jun 22, 2020 · 9 comments
Closed

Belongs to label does not follow the Internationalisation #1681

huylocit14054 opened this issue Jun 22, 2020 · 9 comments
Labels
bug breakages in functionality that is implemented i18n translations and language support

Comments

@huylocit14054
Copy link

This issue will be a bit similar to the issue #451 . As HasMany field which already been resolve, belongs to does not use the label in Internationalisation file.

Here is some of my code:
Screen Shot 2020-06-22 at 14 36 38
Screen Shot 2020-06-22 at 14 36 46

Screen Shot 2020-06-22 at 14 36 12

@pablobm pablobm added the i18n translations and language support label Jun 25, 2020
@nickcharlton nickcharlton added the bug breakages in functionality that is implemented label Jun 26, 2020
@nickcharlton
Copy link
Member

Ah, nice catch. Do you think you'd be able to open a PR for this?

@huylocit14054
Copy link
Author

@nickcharlton sr I am currently busy with another project

@KOlofinmoyin
Copy link
Contributor

Hiya @huylocit14054 ,

  1. Is the app where you observed the behaviour public? Or would you be able to share an example app?

  2. Otherwise, how best would you suggest we reproduce the behaviour against a generic app?
    cheers

@huylocit14054
Copy link
Author

Hi @KOlofinmoyin , sr for my late response. Unfortunately, I cannot share that code here but I will show you how to re-produce it.
You just need to create a belongs_to field in your dashboard. Then, you change its label in the en.yml file. The expected behavior is that the label will be the string you edited in the en.yml, however, it will be the class name of the field instead.

For my picture above, has a model named sub_function which belongs to function. I want to change its name to practice coverage. But as you can see, it does not change when I go to the edit function.

@SeedyROM
Copy link

Going to try to look into this, let's see how it goes?

@SeedyROM
Copy link

Can't replicate this locally, actually. Turns out I had a typo in my locale YAML, @huylocit14054 Maybe you could share a truncated version of your locale?

@huylocit14054
Copy link
Author

I don't know if the newest version already fixes my problem. Mine was 0.13.0.
I do not have access to the repo anymore but as I remember it is something like this:

A sub_function has many recruiter and vise versa. This bug will happen when I create a sub_function_recruiter relationship record. In the create screen, the label is not correct.
My en.yml has already changed the sub_function into Practice but it still shows as sub_function

@SeedyROM sr if this is not clear for u :(

@SeedyROM
Copy link

Here's what worked for me, I'm using 0.16.0:

en:
  helpers:
    label:
      work: # Name of the model
        organizer: "Seller" # Name of the field

@huylocit14054
Copy link
Author

Yeah I think newer version have already fixed this issue. I will close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug breakages in functionality that is implemented i18n translations and language support
Projects
None yet
Development

No branches or pull requests

5 participants