You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first of all, thanks for this nice framework and sorry for the wall of text.
I have looked at this specifically with a focus on Shopware 6 entities and have a few questions/remarks.
There are problems with null-values when using the "shopware6" format . However, these can always occur, e.g. if a product only have minimal data yet. From my point of view, this is a bug, or am I missing something?
Fatal error: Uncaught TypeError: PHPUnuhi\Bundles\Storage\Shopware6\Service\TranslationLoader::isBinary(): Argument #1 ($str) must be of type string, null given, called in /app/vendor/boxblinkracer/phpunuhi/src/Bundles/Storage/Shopware6/Service/TranslationLoader.php on line 167 and defined in /app/vendor/boxblinkracer/phpunuhi/src/Traits/BinaryTrait.php:38
I haven't tested it extensively yet, but it seems to be sufficient to convert null values to empty strings at this point.
If the "translate" command is called with the option "--source", an attempt is still made to translate missing translations of the source language itself. However, this will always fail in this case as $existingData = $set->findAnyExistingTranslation($currentID, $sourceLocale); will throw a TranslationNotFoundException.
If the source language is not skipped in the loop, if a text is missing you get an error message for each of the other languages plus additionally for the source language. I think this is unnecessary and the source language could be skipped in this case.
My intended use is mainly related to the translation of missing texts from Shopware entities. In my opinion, however, the logic here should be able to deviate from the usual snippets.
Using the product entity as an example:
Based on the table structure, there are already fixed fields that Shopware supplies, but it may be that some of them are not needed in a project. Others could be optional and only be filled for some products.
As long as something is not available in the main language of the shop, it should not be considered "missing" in my case.
I would like the following behavior for shopware entities when the "translate" command is executed with option "--source":
If a value is missing in the "--source" language e.g. "description" skip it.
Otherwise try to translate if for all other languages where a translation is missing.
As far as I could tell after trying around a bit, this does not seem to be possible at the moment, as the processing is always independent of the source (storage) and this special case for Shopware entities can therefore not be implemented without further ado.
The framework could certainly be extended in this regard, but I am unsure whether its a good idea to bend the framework in this direction, so I wanted to ask whats your opinion is about this use-case.
The text was updated successfully, but these errors were encountered:
Hi there,
first of all, thanks for this nice framework and sorry for the wall of text.
I have looked at this specifically with a focus on Shopware 6 entities and have a few questions/remarks.
There are problems with null-values when using the "shopware6" format . However, these can always occur, e.g. if a product only have minimal data yet. From my point of view, this is a bug, or am I missing something?
I haven't tested it extensively yet, but it seems to be sufficient to convert null values to empty strings at this point.
If the "translate" command is called with the option "--source", an attempt is still made to translate missing translations of the source language itself. However, this will always fail in this case as
$existingData = $set->findAnyExistingTranslation($currentID, $sourceLocale);
will throw aTranslationNotFoundException
.If the source language is not skipped in the loop, if a text is missing you get an error message for each of the other languages plus additionally for the source language. I think this is unnecessary and the source language could be skipped in this case.
My intended use is mainly related to the translation of missing texts from Shopware entities. In my opinion, however, the logic here should be able to deviate from the usual snippets.
Using the product entity as an example:
Based on the table structure, there are already fixed fields that Shopware supplies, but it may be that some of them are not needed in a project. Others could be optional and only be filled for some products.
As long as something is not available in the main language of the shop, it should not be considered "missing" in my case.
I would like the following behavior for shopware entities when the "translate" command is executed with option "--source":
If a value is missing in the "--source" language e.g. "description" skip it.
Otherwise try to translate if for all other languages where a translation is missing.
As far as I could tell after trying around a bit, this does not seem to be possible at the moment, as the processing is always independent of the source (storage) and this special case for Shopware entities can therefore not be implemented without further ado.
The framework could certainly be extended in this regard, but I am unsure whether its a good idea to bend the framework in this direction, so I wanted to ask whats your opinion is about this use-case.
The text was updated successfully, but these errors were encountered: