Skip to content
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

Extracting default email strings should be improved #1221

Open
1v4n4 opened this issue Jul 5, 2023 · 1 comment
Open

Extracting default email strings should be improved #1221

1v4n4 opened this issue Jul 5, 2023 · 1 comment

Comments

@1v4n4
Copy link
Member

1v4n4 commented Jul 5, 2023

  1. Campaign flag (--campaign) in bin/template.js extract strings from the default email template to campaign configuration.
    At the moment it extracts whatever is in the default template, and not what is generated.

Example:
We have EN text in the default template and we are generating DE email. Strings in the campaign config will be from the default template (in EN) which is inconsistent with what we actually have in the generated email.

To do: extract strings from generated email, not from the default template.

  1. Strings in EN locales are not created if the widget language is different than EN.

Problem:
If we extract DE strings, they will not be displayed in the dashboard/translations.

To do: add empty strings in EN locales

  1. Subject is not extracted
@tttp
Copy link
Member

tttp commented Aug 7, 2023

Hi,

in normal use, any text in a template that has a i18n key is ignored and replaced to the text as set in src/locales/xx/server.json

the aim of the --campaign was to allow a specific campaign to overwrite these xx/server.json messages, the same way you can overwrite the common.json texts in a specific campaign.

so I think it's more logical to use the texts in src/locales/xx/server.json as the default for the campaign texts, as opposed to the texts in the templates, that are never used.

however, the improvement should be IMO:

  • check what are the languages defined in the campaign,
  • check all the i18n keys in the specific template (done)
  • copy these keys from src/locales/xx/server.json for all languages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants