-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Translations export error [DomainException] Missed Phrase #6498
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
Comments
I'm getting 'Dictionary successfully processed.' on clean magento. Problem must be in your language pack. Try add '-vvv' option to see broken file. |
@sevos1984 thanks for the suggestion, I tried adding -vvv and this is the result
|
I've recreated your issue, it occurs when you have empty strings for translation (e.g 'note' => __('')). |
Ah, so perhaps somewhere in the template I have empty translation strings? There is a command to output the file containing empty strings? Thanks |
Yes, check your templates. No there is no such command. |
@sevos1984 thank you very much for the suggestion infact there was a missing translation that I found, now the export works correctly, I close this post as solved. |
Hello, I have the same issue. Where I can find "empty strings" ? No translations where done, so, from where those empty strings come? |
@gediminaskv Maybe you can modify setup/src/Magento/Setup/Module/I18n/Dictionary/Phrase.php file, and comment the DomainException in setPhrase() and setTranslation() methods like this:
And this will create .csv successfully, what's more, you can find the module of the "empty strings". |
__('0'); also fails. |
Magento should be able to handle empty phrases. I dont understand why do they not handle such small things. |
Agreed with @webspeaks tranlating is already a pain in M2, this makes it even worse. |
Err I did not unassign @sevos1984 ? |
There is no such command but there is a search that works Run this in your root folder to find all of the missing / empty strings
I have used this successfully several times. I also like to email the plugin providers to let them know when they have missed a couple. |
[Sidecar] Fixes for 2.4 (pr9)
Preconditions
Steps to reproduce
Expected result
Actual result
Unfortunately is really hard from the output to understand what file is blocking the export, I have also checked the log folder (var/log) but there is no trace of this error.
The text was updated successfully, but these errors were encountered: