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 Request: i18n Option copy #120

Open
samtrion opened this issue Mar 13, 2024 · 6 comments
Open

Feature Request: i18n Option copy #120

samtrion opened this issue Mar 13, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@samtrion
Copy link

Right now, we have the following options for the field property i18n.

@property {boolean | 'translate' | 'duplicate'} [i18n] I18n configuration.

A function copywould wonderfully complement this, as seen with image selection. When I choose an image on the primary page, it's automatically placed in the secondary language, but I can still edit it. This is useful, for example, if I have language-specific images.

@kyoshino kyoshino self-assigned this Mar 13, 2024
@kyoshino kyoshino added the enhancement New feature or request label Mar 13, 2024
@kyoshino
Copy link
Member

Good idea. It would copy the value

  • only from the primary language to secondary languages (and not vice versa)
  • only when the value is empty

@samtrion
Copy link
Author

samtrion commented Mar 13, 2024

  • only from the primary language to secondary languages (and not vice versa)

Why not vica versa? When I start with my native language, which is the configured secondary language. Why not copy to the primary language, if the value of the primary is empty.

@kyoshino
Copy link
Member

Because duplicate only copies from primary to secondary, and also, if there are multiple secondary languages, the two-way copy would be a problem. (One of my clients has 4 locales.)

@samtrion
Copy link
Author

Ok, good point.

@kyoshino
Copy link
Member

kyoshino commented Mar 16, 2024

only when the value is empty

It’s a bit difficult to do this, so for now, the difference between duplicate and copy would be simply read-only and read-write.

@kyoshino
Copy link
Member

Sorry for the long wait. I’m working on a client website and there are some cases where the copy option is needed, e.g. a banner image with text that’s not yet localized.

It’s hard to implement this for the Object and List widgets due to the complexity, but primitive value fields could benefit from this. Will work on this next month.

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

No branches or pull requests

2 participants