Ghost/ghost
Cathy Sarisky 1d429b8b09
🌐Added i18n for newsletter strings (#21433)
no issue

This PR adds the ability to translate the strings that appear in the
newsletter as boilerplate text, using i18next.

Variables are in single mustaches ( `{date}` ) in the translation
strings (rather than `{{date}}`), because these strings occur both the
email template.hbs and also .js files. That necessitated a separate
namespace.

This PR also includes changes to the newsletter button ("more like
this", "less like this", "comment") that were previously delivered on
desktop as images that included the text. @sanne-san provided a rework
that removed text-as-image from the desktop buttons, and allows more
shared code between the two layouts, along with making the buttons
translatable.

Example usage - handlebars
```
<h3 class="latest-posts-header">{{t 'Keep reading'}}</h3>

{{{t 'By {authors}' authors=post.authors }}} 
```
(NOTE: triple { required because of possible & )

Example usage - javascript
```
                getValue: (member) => {
                    if (member.status === 'comped') {
                        return t('complimentary');
                    }
                    if (this.isMemberTrialing(member)) {
                        return t('trialing');
                    }
                    // other possible statuses: t('free'), t('paid') //
                    return t(member.status);
                }
```

---------

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
Co-authored-by: Steve Larson <9larsons@gmail.com>
2024-10-31 08:41:39 -05:00
..
adapter-cache-memory-ttl Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
adapter-cache-redis Added an optional timeout parameter to AdapterCacheRedis (#20131) 2024-05-02 20:39:23 -07:00
adapter-manager Update TryGhost packages 2024-08-05 12:12:34 +02:00
admin Update Koenig packages (#21480) 2024-10-31 10:11:27 +00:00
announcement-bar-settings Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
api-framework Update TryGhost packages 2024-08-05 12:12:34 +02:00
api-version-compatibility-service Fixed handling requests with mismatching version and missing key 2024-05-02 13:03:26 +02:00
audience-feedback 🔒 Added uuid verification to member endpoints not requiring a session 2024-08-20 16:24:02 +02:00
bookshelf-repository 🐛 Fixed NQL filters for single letter slugs (#21340) 2024-10-17 15:35:26 +00:00
bootstrap-socket Update TryGhost packages 2024-08-05 12:12:34 +02:00
collections 🐛 Fixed NQL filters for single letter slugs (#21340) 2024-10-17 15:35:26 +00:00
constants Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
core 🌐Added i18n for newsletter strings (#21433) 2024-10-31 08:41:39 -05:00
custom-fonts Removed Prata font (#21478) 2024-10-31 05:43:39 +00:00
custom-theme-settings-service 🐛 Fixed NQL filters for single letter slugs (#21340) 2024-10-17 15:35:26 +00:00
data-generator Update TryGhost packages 2024-08-05 12:12:34 +02:00
domain-events Update TryGhost packages 2024-08-05 12:12:34 +02:00
donations Switched build and build:ts scripts 2024-09-02 15:20:03 +02:00
dynamic-routing-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-addresses Update dependency nodemailer to v6.9.16 2024-10-28 11:17:18 +00:00
email-analytics-provider-mailgun Reimplemented email analytics prioritizing email opens (#20914) 2024-09-05 08:10:07 -05:00
email-analytics-service Fixed Date.now() use in email analytics unit tests (#21188) 2024-10-02 17:54:48 +00:00
email-content-generator Lazyloaded several required dependencies 2024-07-26 09:52:26 +02:00
email-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-service 🌐Added i18n for newsletter strings (#21433) 2024-10-31 08:41:39 -05:00
email-suppression-list Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
express-dynamic-redirects Optimized loading dynamic redirects 2024-10-14 17:16:49 +02:00
external-media-inliner Add Lexical support to the external-media-inliner (#19149) 2023-11-29 17:56:03 +00:00
extract-api-key Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
ghost Update nest monorepo to v10.4.4 2024-10-15 12:44:37 +02:00
html-to-plaintext Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
i18n 🌐Added i18n for newsletter strings (#21433) 2024-10-31 08:41:39 -05:00
importer-handler-content-files Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
importer-revue Update Koenig packages 2024-08-14 15:34:44 +01:00
in-memory-repository 🐛 Fixed NQL filters for single letter slugs (#21340) 2024-10-17 15:35:26 +00:00
job-manager Update dependency @sinonjs/fake-timers to v11.3.1 2024-08-26 14:08:32 +02:00
link-redirects Updated documentation for LinkRedirects (#20378) 2024-06-12 23:27:15 +00:00
link-replacer Pinned dependencies (#20257) 2024-05-27 15:29:32 +00:00
link-tracking 🐛 Fixed NQL filters for single letter slugs (#21340) 2024-10-17 15:35:26 +00:00
magic-link Added Sentry message logging for generating magic links (#20789) 2024-08-20 08:38:12 +01:00
mail-events Switched build and build:ts scripts 2024-09-02 15:20:03 +02:00
mailgun-client Added configurable target delivery window for batch sending (#20719) 2024-09-05 22:28:40 -07:00
member-attribution Fixed extra arguments being supplied to function calls 2024-05-07 11:44:07 +02:00
member-events 🎨 Added staff notification when a sub is canceled due to failed payments (#20534) 2024-07-15 08:07:18 +02:00
members-api 🐛 Fixed malformed unsubscribe_url in members api response (#21437) 2024-10-28 15:36:05 -05:00
members-csv Update dependency pump to v3.0.2 2024-09-11 10:16:42 +00:00
members-events-service Added caching to LastSeenAtUpdater (#20964) 2024-09-13 00:54:43 -07:00
members-importer Update TryGhost packages 2024-08-05 12:12:34 +02:00
members-ssr Update TryGhost packages 2024-08-05 12:12:34 +02:00
mentions-email-report Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
metrics-server Update dependency express to v4.21.1 2024-10-08 21:53:17 +01:00
milestones Update TryGhost packages 2024-08-05 12:12:34 +02:00
minifier Update dependency terser to v5.36.0 2024-10-16 17:59:04 +00:00
model-to-domain-event-interceptor Switched build and build:ts scripts 2024-09-02 15:20:03 +02:00
mw-api-version-mismatch Update TryGhost packages 2024-08-05 12:12:34 +02:00
mw-cache-control Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-error-handler Update TryGhost packages 2024-08-05 12:12:34 +02:00
mw-session-from-token Update dependency express to v4.21.1 2024-10-08 21:53:17 +01:00
mw-update-user-last-seen Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-version-match Update TryGhost packages 2024-08-05 12:12:34 +02:00
mw-vhost Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
nql-filter-expansions Switched build and build:ts scripts 2024-09-02 15:20:03 +02:00
oembed-service Not storing icons and thumbnails in case of mention (#21424) 2024-10-28 05:29:49 +00:00
offers Update TryGhost packages 2024-08-05 12:12:34 +02:00
package-json Update TryGhost packages 2024-08-05 12:12:34 +02:00
payments 🐛 Fixed Tips & Donations checkout error for sites with long titles 2024-09-03 21:08:24 +01:00
post-events Added unschedule bulk action to posts (#20945) 2024-09-24 15:32:45 +08:00
post-revisions Switched build and build:ts scripts 2024-09-02 15:20:03 +02:00
posts-service 🐛 Fixed NQL filters for single letter slugs (#21340) 2024-10-17 15:35:26 +00:00
recommendations 🐛 Fixed missing incoming recommendations (#21317) 2024-10-16 11:14:58 +02:00
referrers Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
security Updated uuid to crypto.randomUUID() (#20821) 2024-09-12 09:09:30 +07:00
session-service Updated code for fetching location (#21368) 2024-10-23 06:43:42 +01:00
settings-path-manager Update TryGhost packages 2024-08-05 12:12:34 +02:00
slack-notifications Update TryGhost packages 2024-08-05 12:12:34 +02:00
staff-service Updated notification email mobile styles 2024-08-29 17:15:45 +01:00
stats-service Update dependency luxon to v3.5.0 2024-08-05 09:19:48 +02:00
stripe Lazyloaded dependencies 2024-10-10 13:38:56 +01:00
tiers Update TryGhost packages 2024-08-05 12:12:34 +02:00
tinybird Fix origin attribution in Tinybird analytics hits (#21187) 2024-10-02 17:27:43 +01:00
update-check-service Updated uuid to crypto.randomUUID() (#20821) 2024-09-12 09:09:30 +07:00
verification-trigger Update TryGhost packages 2024-08-05 12:12:34 +02:00
version-notifications-data-service Fixed handling requests with mismatching version and missing key 2024-05-02 13:03:26 +02:00
webmentions 🐛 Fixed missing incoming recommendations (#21317) 2024-10-16 11:14:58 +02:00
tsconfig.json Disabled TypeScript incremental building 2023-08-09 18:27:56 +02:00