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

Adds command to translate a pattern of keys #585

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidwessman
Copy link
Collaborator

args: [:locale, :locale_to_translate_from, arg(:data_format).from(1), :translation_backend]

def translate(opts = {})
forest = i18n.tree(opts[:from])
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glebm Do you have a suggestion for creating a tree with all keys from opts[:from] locale to send into the translate_forest method? I have tried a few ways but cannot figure out the correct format.

Copy link
Owner

@glebm glebm Jun 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The forest root nodes should be the locales to translate to (the target locales).

For example, {"en": {"key": "..."}}

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

Successfully merging this pull request may close these issues.

2 participants