Terms with blank translations filled on export
9 years 2 months ago #1057
by JAC
Terms with blank translations filled on export was created by JAC
In 2.6.0 (I tried in both f1 and f2) when I export to Google Sheets, any terms that are blank for all languages get filled in with the key name for all languages. It's understandable if you use the default "original value of the term" as the key name, but this is a bug for us.
Often our designers want to have a key for a term and leave it blank most of the time (like sale banner text). This worked fine before the otherwise neat auto-translate fill was added, but now sale banners are getting filled with our ugly_lower_snake_case key names after an export and import.
If this is intentional it'd be nice to be able to disable it easily.
Often our designers want to have a key for a term and leave it blank most of the time (like sale banner text). This worked fine before the otherwise neat auto-translate fill was added, but now sale banners are getting filled with our ugly_lower_snake_case key names after an export and import.
If this is intentional it'd be nice to be able to disable it easily.
Please Log in or Create an account to join the conversation.
9 years 2 months ago #1059
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Terms with blank translations filled on export
Hi,
Yes, that's the intended behavior.
Version 2.6.0 added auto-translate for empty cells. Given that normally you will be adding terms and languages and even though the plugin has a TranslateAll button to translate a term to all languages, having to manually click the button for each of the terms, it's a pain.
And doing a query for each term to be translated was too slow with the current implementation (I'm adding code to the webservice to make that possible). That's why I added the autotranslate empty cells feature.
As soon as you export to google and import back, every empty translation is set to the correct translation. That's like a TranslateAllTermsToAllLanguages button!
But I see that feature does affect you. I will add a checkbox for disabling this feature in the next version.
In the meantime, I modified the code to export a minus sign whenever the cell is empty, and then when importing, the minus sign is replaced with empty again. That will disable the autotranslate feature on the webservice.
I have attached the modified scripts. Just replaced yours with these ones.
Hope that helps,
Frank
Yes, that's the intended behavior.
Version 2.6.0 added auto-translate for empty cells. Given that normally you will be adding terms and languages and even though the plugin has a TranslateAll button to translate a term to all languages, having to manually click the button for each of the terms, it's a pain.
And doing a query for each term to be translated was too slow with the current implementation (I'm adding code to the webservice to make that possible). That's why I added the autotranslate empty cells feature.
As soon as you export to google and import back, every empty translation is set to the correct translation. That's like a TranslateAllTermsToAllLanguages button!
But I see that feature does affect you. I will add a checkbox for disabling this feature in the next version.
In the meantime, I modified the code to export a minus sign whenever the cell is empty, and then when importing, the minus sign is replaced with empty again. That will disable the autotranslate feature on the webservice.
I have attached the modified scripts. Just replaced yours with these ones.
Hope that helps,
Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
To get the betas as soon as they are ready,
check this out
Please Log in or Create an account to join the conversation.
9 years 1 week ago #1190
by andrest
Replied by andrest on topic Terms with blank translations filled on export
Hello,
Thanks for the amazing plugin! I used the same approach described above to avoid getting empty cells filled with auto-translation (using the scripts above) . I've just updated to the latest version in the Asset Store (2.6.2 f1), though, and scripts above no longer work. I'm getting 3 exceptions:
Assets/I2/Localization/Scripts/Google/LanguageSource_Import_CSV.cs(124,50): error CS0029: Cannot implicitly convert type `int[]' to `byte[]'
Assets/I2/Localization/Scripts/Google/LanguageSource_Import_CSV.cs(157,87): error CS0031: Constant value `-3' cannot be converted to a `byte'
Assets/I2/Localization/Scripts/Google/LanguageSource_Import_CSV.cs(163,87): error CS0031: Constant value `-2' cannot be converted to a `byte'
Is there an easy fix? At the moment I'm getting dashes in all places where there should be an empty field
Many thanks
Andres
Thanks for the amazing plugin! I used the same approach described above to avoid getting empty cells filled with auto-translation (using the scripts above) . I've just updated to the latest version in the Asset Store (2.6.2 f1), though, and scripts above no longer work. I'm getting 3 exceptions:
Assets/I2/Localization/Scripts/Google/LanguageSource_Import_CSV.cs(124,50): error CS0029: Cannot implicitly convert type `int[]' to `byte[]'
Assets/I2/Localization/Scripts/Google/LanguageSource_Import_CSV.cs(157,87): error CS0031: Constant value `-3' cannot be converted to a `byte'
Assets/I2/Localization/Scripts/Google/LanguageSource_Import_CSV.cs(163,87): error CS0031: Constant value `-2' cannot be converted to a `byte'
Is there an easy fix? At the moment I'm getting dashes in all places where there should be an empty field
Many thanks
Andres
Please Log in or Create an account to join the conversation.
9 years 1 week ago #1192
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Terms with blank translations filled on export
Hi,
Attached you can find the updated files, use this instead of the previous ones.
As a side note, I have scheduled to support empty translation, but the solution I'm going to implement depends on finishing the updated Translate All feature.
My plan its to completely remove the feature that turns all empty texts into its translation once you export and import from google. Instead of having that, I will make a general [Translate All] button that will query the translation of each empty term, allowing you to select just a few and filter them.
That way, you just click that button, everything gets translated, then you make empty the terms you don't need and they will not be re-translated again.
The problem, its that the current Translate All button its too slow to use for all terms/translations at the same time, because it contacts google for each translation. Instead, I'm writing a better alternative that batches the queries and contacts google only once.
That new code its almost done and I hope I be able to release it in one of the next two versions of the plugin.
Hope that helps,
Frank
Attached you can find the updated files, use this instead of the previous ones.
As a side note, I have scheduled to support empty translation, but the solution I'm going to implement depends on finishing the updated Translate All feature.
My plan its to completely remove the feature that turns all empty texts into its translation once you export and import from google. Instead of having that, I will make a general [Translate All] button that will query the translation of each empty term, allowing you to select just a few and filter them.
That way, you just click that button, everything gets translated, then you make empty the terms you don't need and they will not be re-translated again.
The problem, its that the current Translate All button its too slow to use for all terms/translations at the same time, because it contacts google for each translation. Instead, I'm writing a better alternative that batches the queries and contacts google only once.
That new code its almost done and I hope I be able to release it in one of the next two versions of the plugin.
Hope that helps,
Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
To get the betas as soon as they are ready,
check this out
Please Log in or Create an account to join the conversation.
9 years 6 days ago #1195
by andrest
Replied by andrest on topic Terms with blank translations filled on export
Hi Frank,
Works perfectly, that's exactly what I needed. Thank you so much for the quick response!
The new way you are implementing the 'Translate All' solution sounds very neat. I'm not sure we'll be using it ourselves on most instances, because we are trying to get professional translations for all the texts, but it can be helpful as a back-up option in an emergency.
Thank you again, and please keep up the good work!
Andres
Works perfectly, that's exactly what I needed. Thank you so much for the quick response!
The new way you are implementing the 'Translate All' solution sounds very neat. I'm not sure we'll be using it ourselves on most instances, because we are trying to get professional translations for all the texts, but it can be helpful as a back-up option in an emergency.
Thank you again, and please keep up the good work!
Andres
Please Log in or Create an account to join the conversation.
Time to create page: 0.192 seconds