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
Scan translation keys from email themes #14719
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, waiting for @LouiseBonnard
Hi there, can you confirm it is too late to apply the changes requested here? Can I milestone it for 1.7.7? |
@@ -1163,17 +1163,17 @@ Comment: check if some ids are in list_skip_actions and forbid deletion</note> | |||
<trans-unit id="3452da55a90ccedd184c7ba264b2afd5"> | |||
<source>Due to memory limit restrictions, this image cannot be loaded. Please increase your memory_limit value via your server's configuration settings. </source> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the space at the end?
<note>Line: 537</note> | ||
</trans-unit> | ||
<trans-unit id="c7e728f436eee2692d6c6f756621a70e"> | ||
<source>An error occured, please check your zip file</source> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<source>An error occured, please check your zip file</source> | |
<source>An error occurred, please check your zip file</source> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I think that this shouldn't be in the catalog, it has been removed from Crowdin since 1.7.4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, all these keys from the Theme Custo module do not have to be here. I remember that it has been removed because after the 1.7.4 release because it came with its own translation. Anyway, as seen with @colinegin and @eternoendless lately, a small cleaning among the native modules needs to be done since there should not be all modules translatable via Crowdin.
984a908
7665de2
to
1e522d0
Compare
Alright this should be good, @LouiseBonnard @eternoendless if you can please check it one last time Thank you |
@@ -189,7 +189,7 @@ | |||
<tr> | |||
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> | |||
<div style="font-family:Open sans, arial, sans-serif;font-size:14px;line-height:25px;text-align:left;color:#363A41;"> | |||
{{ 'Replenish your inventory, go to the <span class="label">"Catalog" > "Stocks"</span> section of your back office to manage your stock.'|trans({}, 'Emails.Body', locale)|raw }} | |||
{{ 'Replenish your inventory, go to the <span class="label">"Catalog" > "Stocks"</span> section of your back office to manage your stock.'|trans({}, 'Emails.Body', locale)|raw }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{ 'Replenish your inventory, go to the <span class="label">"Catalog" > "Stocks"</span> section of your back office to manage your stock.'|trans({}, 'Emails.Body', locale)|raw }} | |
{{ 'Replenish your inventory, go to the <span class="label">Catalog > Stocks</span> section of your back office to manage your stock.'|trans({}, 'Emails.Body', locale)|raw }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be the same balises (I don't know the English word, aha) than before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the same tag (😉) <span class="label">
If you compare it with the classic theme where we use <span><strong>
then yes it is normal, the theme css and integration are different. I'm not a big fan of including html in the translation though because it means they are not compatible with other themes..
But this would require to split the message into three parts, or maybe include placeholders like this:
'Replenish your inventory, go to the [bold]Catalog > Stocks[\bold] section of your back office to manage your stock.'
@@ -255,7 +255,7 @@ | |||
<tr> | |||
<td align="left" style="font-size:0px;padding:10px 25px;padding-top:0;word-break:break-word;"> | |||
<div style="font-family:Open sans, arial, sans-serif;font-size:14px;line-height:25px;text-align:left;color:#363A41;"> | |||
{{ 'Replenish your inventory, go to the <span class="label">"Catalog" > "Stocks"</span> section of your back office to manage your stock.'|trans({}, 'Emails.Body', locale)|raw }} | |||
{{ 'Replenish your inventory, go to the <span class="label">"Catalog" > "Stocks"</span> section of your back office to manage your stock.'|trans({}, 'Emails.Body', locale)|raw }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
</file> | ||
<file original="modules/ps_emailsubscription/ps_emailsubscription.php" source-language="en-US" target-language="en" datatype="plaintext"> | ||
<body> | ||
<trans-unit id="2df860f82be52de57fc5e3f7ecac9431"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same than Theme Custo, the two following strings have been removed from the Crowdin catalog since the 1.7.4 version, perhaps because they already have their own translation. I can see three solutions:
- we can properly localize them and we put them in the Modules.Emailsubscription.Admin file, where they belong
- we keep them as-is because we cannot change domain at this point
- we delete them from the code here, but it could be risky
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new domain is managed in v2.4.0, but the one included in 176 is the 2.3.0
So we would need to update the included module, but I'm not sure we should do it in this version. I'm afraid we need to wait for the 177 version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh and this case is different from ps_themecusto which includes its own translations, this module has no translations embedded so we need to manage them in the core.
By the way even for ps_themecusto although it includes some translations, there are only three languages managed, but I guess it can be managed via the backoffice then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as with gamification here
@jolelievre the issue 14633 is not solved : For this issue 14337 Wording is ok for classic template but not for modern. |
<note>Line: 380</note> | ||
</trans-unit> | ||
</body> | ||
</file> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these wordings being deleted? We shouldn't delete any wording during the 1.7 lifecycle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe because the file was removed, but I'll revert this change so that nothing is removed
</file> | ||
<file original="modules/ps_emailsubscription/ps_emailsubscription.php" source-language="en-US" target-language="en" datatype="plaintext"> | ||
<body> | ||
<trans-unit id="2df860f82be52de57fc5e3f7ecac9431"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as with gamification here
@@ -27,7 +27,7 @@ | |||
{% endif %} | |||
<span> | |||
{{ '<span><strong>Warning:</strong></span> you have received a new log alert in your Back Office.'|trans({}, 'Emails.Body', locale)|raw }}<br/><br/> | |||
{{ 'You can check for it in the <span><strong>"Tools" > "Logs"</strong></span> section of your Back Office.'|trans({}, 'Emails.Body', locale)|raw }} | |||
{{ 'You can check for it in the <span><strong>Advanced Parameters > Logs</strong></span> section of your back office.'|trans({}, 'Emails.Body', locale)|raw }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this wording is being used raw, you need to keep the >
{{ 'You can check for it in the <span><strong>Advanced Parameters > Logs</strong></span> section of your back office.'|trans({}, 'Emails.Body', locale)|raw }} | |
{{ 'You can check for it in the <span><strong>Advanced Parameters > Logs</strong></span> section of your back office.'|trans({}, 'Emails.Body', locale)|raw }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be best to get rid of the html in the wording, don't you think?
{{ 'You can check for it in the <span><strong>Advanced Parameters > Logs</strong></span> section of your back office.'|trans({}, 'Emails.Body', locale)|raw }} | |
{{ 'You can check for it in the [1]Advanced Parameters > Logs[/1] section of your back office.'|trans({'[1]' => '<span><strong>', '[/1]' => '</strong></span>'}, 'Emails.Body', locale)|raw }} |
@@ -28,7 +28,7 @@ | |||
<span> | |||
{{ 'The remaining stock is now less than the specified minimum of'|trans({}, 'Emails.Body', locale)|raw }} <strong><span>{last_qty}.</span></strong><br/><br/> | |||
<strong><span>{{ 'Remaining stock:'|trans({}, 'Emails.Body', locale)|raw }}</span></strong> {qty}<br/><br/> | |||
{{ 'You are advised to open the product\'s admin Product Page in order to replenish your inventory.'|trans({}, 'Emails.Body', locale)|raw }} | |||
{{ 'Replenish your inventory, go to the <span><strong>Catalog > Stocks</span></strong> section of your back office to manage your stock.'|trans({}, 'Emails.Body', locale)|raw }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{ 'Replenish your inventory, go to the <span><strong>Catalog > Stocks</span></strong> section of your back office to manage your stock.'|trans({}, 'Emails.Body', locale)|raw }} | |
{{ 'Replenish your inventory, go to the <span><strong>Catalog > Stocks</span></strong> section of your back office to manage your stock.'|trans({}, 'Emails.Body', locale)|raw }} |
@@ -28,7 +28,7 @@ | |||
<span> | |||
{{ 'The remaining stock is now less than the specified minimum of'|trans({}, 'Emails.Body', locale)|raw }} <strong><span>{last_qty}.</span></strong><br/><br/> | |||
<strong><span>{{ 'Remaining stock:'|trans({}, 'Emails.Body', locale)|raw }}</span></strong> {qty}<br/><br/> | |||
{{ 'You are advised to open the product\'s admin Product Page in order to replenish your inventory.'|trans({}, 'Emails.Body', locale)|raw }} | |||
{{ 'Replenish your inventory, go to the <span><strong>Catalog > Stocks</span></strong> section of your back office to manage your stock.'|trans({}, 'Emails.Body', locale)|raw }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{ 'Replenish your inventory, go to the <span><strong>Catalog > Stocks</span></strong> section of your back office to manage your stock.'|trans({}, 'Emails.Body', locale)|raw }} | |
{{ 'Replenish your inventory, go to the <span><strong>Catalog > Stocks</span></strong> section of your back office to manage your stock.'|trans({}, 'Emails.Body', locale)|raw }} |
<tr> | ||
<td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> | ||
<div style="font-family:Open sans, arial, sans-serif;font-size:14px;line-height:25px;text-align:left;color:#363A41;"> | ||
{{ 'Go to your customer account to learn more about it.'|trans({}, 'Emails.Body', locale)|raw }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no HTML in this one, so why the raw
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, removed!
<td | ||
class="" width="604px" | ||
> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this removal is wanted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes a text was moved inside inside a border, so the generated template was modified
e8a5bfd
to
3c9afb1
Compare
…ng keys for emails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Is it ready for QA ? I see no answer to this comment: #14719 (comment) |
@marionf the PR is ready, although it's not simple to test because it mainly contains catalog updates, which then need to be sent to crowdin and translated so that the translation is effective. You can test it manually for a few keys though, you need to copy a translation block from the default catalog, copy it in your fr-FR catalog - for example - and then modify the Thus for the comment you mentioned you can copy this: <file original="mails/themes/modern/core/order_conf.html.twig" source-language="en-US" target-language="en" datatype="plaintext">
<body>
<trans-unit id="fb077ecba55e5552916bde26d8b9e794">
<source>Order confirmation</source>
<target>Order confirmation</target>
<note>Line: 3</note>
</trans-unit>
<trans-unit id="ca102bf009d3e0d62a4fc6918b20110e">
<source>Thank you for shopping on [1]{shop_name}[/1]!</source>
<target>Merci pour votre achat sur [1]{shop_name}[/1]!</target>
<note>Line: 53</note>
</trans-unit>
</body>
</file> inside your BUT on the other side the modif for this issue #14337 should be easier to test |
By the way @eternoendless I just tested to translate manually a key containing |
This should be investigated later, tracked by PrestaShop/TranslationToolsBundle#66 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The catalogue must be re-exported again.
e14a8ea
to
3d26fb6
Compare
Hi @jolelievre, This ticket: #14337 is fixed except his issue: #14719 (comment) <file original="mails/themes/modern/core/order_conf.html.twig" source-language="en-US" target-language="en" datatype="plaintext">
<body>
<trans-unit id="fb077ecba55e5552916bde26d8b9e794">
<source>Order confirmation</source>
<target>Order confirmation</target>
<note>Line: 3</note>
</trans-unit>
<trans-unit id="ca102bf009d3e0d62a4fc6918b20110e">
<source>Thank you for shopping on [1]{shop_name}[/1]!</source>
<target>Merci pour votre achat sur [1]{shop_name}[/1]!</target>
<note>Line: 53</note>
</trans-unit>
</body>
</file>
I tried to launch new installation, but I have this error:
Thanks! |
Hi @khouloudbelguith , you don't need to reinstall the shop, once you updated the xlf catalogue, you can see the change either in the Email theme preview page, or you can regenerate the emails for the french language and check the static files in |
About the error you get in the install process, it seems like a permission error on your cache folder during the install but I don't think it is linked to this issue nor the modif from this PR |
@jolelievre, thanks! Thanks! |
@jolelievre, In fact, in the BO => International => translation => Type of translation => Email translations I tried to change the translations for the order_conf => successfully updated. Thanks! |
This change is