-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
Tolgee doesn't parse ruby yaml correctly for some cases #2574
Comments
Hi! Thank you for the report. When importing translations to tolgee, all strings are converted to ICU format by default (can be disabled). As part of this conversion, all characters with a special meaning in the ICU format have to be escaped, which is what you see now. You can read more here. You can try to export your translations immediately after importing them. The resulting exported file should look the same as the imported one since all your strings will be converted to the selected format. When needed, you can disable ICU conversion for the whole project (more info here), but this will also disable support for variables and other ICU features for that project. |
@cccccroge Feel free to reopen the issue if there is something I've missed. |
@Anty0 But after I disable the ICU conversion, when I import via interface it works! And the problem occur when I use cli (see step 2. in the issue description for detail command). Could you check on cli? |
Interesting. I'll try to reproduce it locally. |
@cccccroge Thank you for the clarification! I was able to reproduce the issue, and it should be fixed once #2629 gets released. |
Describe the bug
In our Rails project, some of the values result in extra single quote (
'
) when I check on Tolgee admin.Here's the cases we found:
key: value 'value'
to tolgee result invalue 'value''
(there's an extra single quote in the end)key: value'%{variable}'
to tolgee result invalue''<variable>''
(there are two single quotes around variable, which should be one)key: value{{variable}}value
to tolgee result invalue'{{'variable'}}'value
(two single quotes around {{ and }} shouldn't exist)key: "{variable} value"
to tolgee result in'{'file'}' value
(two single quotes around { and } shouldn't exist)To Reproduce
Steps to reproduce the behavior:
e.g.
Expected behavior
I expect tolgee don't transform value that is not interpolated string (
%{xxx}
) as they are valid yaml values. e.g. single quote ('
) and curly braces ({
,}
,{{
,}}
) should not be escaped.Screenshots
see above
Versions and environment
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: