-
Notifications
You must be signed in to change notification settings - Fork 264
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
Recursively translating yaml's with lists does not work #456
Comments
FWIW, I also tried with various en:
test:
one: Will this translate?
two: {
title: How about this?,
body: Or this?
}
three:
four: {
title: How about this level?,
body: And this?
}
five:
six: This translates
seven:
eight: And this does as well
nine: [
{
title: The title,
body: A body,
},
{
title: Another title,
body: Another body,
},
] to de:
test:
one: Wird das übersetzt?
two:
body: Oder dieses?
title: Wie wäre es damit?
three:
four:
body: Und das?
title: Wie wäre es mit diesem Niveau?
five:
seven:
eight: Und dies auch
nine:
- title: The title
body: A body
- title: Another title
body: Another body
six: Dies übersetzt Which is obviously closer, but still can't handle multiple list items. |
And after even further testing, the following does work: en:
test:
- Translate this
- Then this
- And after, this Properly translates to: de:
test:
- Übersetze das
- Dann das
- Und danach das So naturally, I tried: en:
test:
- {
item: The first item,
title: The first title
}
- {
item: the second thing,
title: the second title
} And got 😩 de:
test:
- item: The first item
title: The first title
- item: the second thing
title: the second title |
The translator only handles arrays and strings at the moment If you'd like to attempt a fix by adding Hash support, the code is here i18n-tasks/lib/i18n/tasks/translators/base_translator.rb Lines 64 to 94 in a2adc31
|
With reference to ticket glebm#456, this change now allows you to translate lists of hashes with DeepL and other translators.
With reference to ticket glebm#456, this change now allows you to translate lists of hashes with DeepL and other translators.
With reference to ticket #456, this change now allows you to translate lists of hashes with DeepL and other translators.
What an incredibly useful gem! Thank you for building/maintaining it! 👏
I have a somewhat complex translation yaml schema, which includes lists/sequences. Consider the following simple example:
Then, when running
i18n-tasks translate-missing
, I receive this (alphabetized for simplicity):Is there a mechanism for auto-translating all these keys, including those with a
-
dash prefix? Am I missing something? Can I force the gem to recognize this structure?Thanks for all you do!
The text was updated successfully, but these errors were encountered: