Commit Graph

20976 Commits

Author SHA1 Message Date
Sparsh
b1a75833a1
🌐 Added Nepali locale for newsletter.json (#21635)
no ref

- Added all field translations from English to Nepali for
`newsletter.json` file.

"Thank you for creating Ghost and making it open source.": "Ghost
सिर्जना गरेर यसलाई ओपन सोर्स बनाउनु भएकोमा धन्यवाद।"
2024-11-19 08:31:57 -06:00
Princi Vershwal
d17f52df9d
🐛 Fixed words breaking to new line in emails on mobile (#21652)
fixes https://linear.app/ghost/issue/DES-977/word-breaks-to-new-line-on-mobile-for-new-member-sign-up-email

- word-break is not required in the text "You can also copy & paste this URL into your browser:", so removed it
- word-break should be used in case of urls. No change in this
- Observed this patter across multiple email templates. Fixed all.
2024-11-19 10:43:32 +00:00
Aileen Booker
b177c7af43 Allowed transistion to settings when in forceUpgrade is active 2024-11-19 05:28:46 -05:00
Kevin Ansfield
2163fd5db3 Fixed missing in_reply_to_snippet for replies
ref https://linear.app/ghost/issue/PLG-230

- the `inReplyTo` relationship was not being loaded for replies which meant the mapper never hit the code which adds `in_reply_to_snippet`
- moved all `in_reply_to` code behind the `commentImprovements` labs flag
- updated tests to correctly disable/enable the flag
- added test for browsing comments with replies-to-replies so `in_reply_to_snippet` is captured in the snapshot
2024-11-18 21:35:40 +00:00
Princi Vershwal
527fb05a29
Fixed staff member login when 2FA is ON (#21647)
Fixes
https://linear.app/ghost/issue/ENG-1775/staff-users-are-not-able-to-verify-session-if-2fa-flag-is-on
2024-11-18 18:43:23 +00:00
Ghost CI
6eae395b24 Merged v5.101.2 into main 2024-11-18 18:14:43 +00:00
Ghost CI
d41ccdde8d v5.101.2 2024-11-18 18:14:42 +00:00
Steve Larson
34d267decc Reverted custom fonts flag (#21645)
ref https://ghost.slack.com/archives/C025584CA/p1731950126867179

- moved custom fonts functionality back to a labs flag
- reverted gscan version to 4.45 which doesn't include the custom fonts
checks/warnings
2024-11-18 11:53:29 -06:00
Steve Larson
2447f37a14
Reverted custom fonts flag (#21645)
ref https://ghost.slack.com/archives/C025584CA/p1731950126867179

- moved custom fonts functionality back to a labs flag
- reverted gscan version to 4.45 which doesn't include the custom fonts
checks/warnings
2024-11-18 17:45:03 +00:00
Princi Vershwal
f2444b08f3
Added e2e test for sending invite to a staff member and user signing up using the invite link (#21637)
Fixes
https://linear.app/ghost/issue/ENG-1702/add-e2e-browser-test-for-staff-invite-and-accept-flow
2024-11-18 15:30:03 +00:00
Ghost CI
254acb3b86 v5.101.1 2024-11-15 19:32:06 +00:00
Mostafa Elsayed Hussin
5c969dcf21 🌐 Added Arabic locale (#21590)
no ref

Arabic locale done for search, comments, newsletter . once pulled I'll start translating the portal.

This translation is a part of ACLSS efforts to translate more open source projects to Arabic.
2024-11-15 13:17:42 -06:00
Oren Cohen
ea05d1d8c7 🌐 Added Hebrew translations (#17056)
no ref

Added most no-brainer Hebrew translations but left the more complicated ones to people better equipped to translate them. Better something than nothing at all.

Also, Hebrew is an RTL language, so exclamation points and dots at the end of a sentence should appear at the leftmost part, but the translation files are LTR, as all JSON files are. Just putting it out there. This should be considered when using an RTL language translation.

---------

Co-authored-by: Steve Larson <9larsons@gmail.com>
2024-11-15 13:17:42 -06:00
Duy
8746de04b7 🌐 Updated Vietnamese translations (#21581)
no ref

- Changed _"Gói theo dõi"_ to _"Gói thành viên"_ for a better match to
the grammar and correct usage in Vietnamese
- Clarified the definition of **Subscription plan** (_"Gói thành viên"_
instead of _"Gói"_)
- Removed plural **emails** because it is not logical in Vietnamese
- Added _"Sort by"_ in comment.json
- Added _"Sorry, no recommendations are available right now."_ in
portal.json
- Changed placeholder text "and" to "&" for shorter and show full
sentence (mobile) in search.json
2024-11-15 13:17:42 -06:00
Steve Larson
842adcdc80 Added metrics for job queue and email analytics (#21626)
no ref

Added Prometheus metrics for the job queue throughput and email analytics throughput. We'll likely keep these around as good metrics to keep an eye on, though for the moment their primary function is to establish a baseline for users w/o the job queue enabled so we can observe the full impact once switching it on.
2024-11-15 13:17:42 -06:00
Lukas Kocourek
e079ebb3de 🌐 Added Czech translations for newsletter & search (#21516)
no issue
2024-11-15 13:17:42 -06:00
Sparsh
c292a5a110 🌐 Added Nepali locale for Ghost (#21552)
no ref

- [x] Created a new folder `ne` based on locale code for Nepali locale
inside `ghost/i18n/locales/`
- [x] Cloned 6 new JSON files pertaining to `en` folder from English
locale.
- [x] Added all field translations from English to Nepali for
`ghost.json` file.
- [x] Added all field translations from English to Nepali for
`search.json` file.
- [x] Added all field translations from English to Nepali for
`signup-form.json` file.
- [ ] TODO: Remaining 3 other files viz. `comments`, `newsletter`, and
`portal`.


"Thank you for creating Ghost and making it open source.": "Ghost
सिर्जना गरेर यसलाई ओपन सोर्स बनाउनु भएकोमा धन्यवाद।"
2024-11-15 13:17:42 -06:00
Fernanda Thiesen
cec25e7b4a 🌐 Added pt-BR translations (#21612)
no ref

Suggestion to update the translation for 'A label for the thumbs-up response in member feedback at the bottom of emails' to 'I like it' and 'I don't like it,' as this phrasing sounds better and is more appropriate in Brazilian Portuguese. Thank you.
2024-11-15 13:17:42 -06:00
Ghost CI
0f64ec9dad v5.101.0 2024-11-15 15:05:41 +00:00
Ghost CI
12b0cd269f 🎨 Updated Source to v1.4.0 2024-11-15 15:05:41 +00:00
Ghost CI
e77e2190bf 🎨 Updated Casper to v5.8.0 2024-11-15 15:05:41 +00:00
Chris Raible
431719080e
Added prometheus metric for time to acquire connection (#21628)
ref
https://linear.app/ghost/issue/ENG-1769/improve-pool-utilization-metric

- Currently the connection pool metrics are all point in time metrics,
and with a scrape interval of 15s this doesn't tell us a whole lot about
what's happening in the pool.
- This commit adds a Summary metric to track the elapsed time each
transaction has to wait to acquire a connection from the pool, which
should be a good indication of contention in the pool.
- Also moved the call to `prometheusClient.instrumentKnex` to after `initCore` in the boot process, because the metric depends on event listeners on `knex.client.pool`, and the pool gets destroyed and recreated in `initCore`, which removes the listeners
2024-11-14 21:14:40 -08:00
Chris Raible
015b881bc1
Removed the metrics server from Ghost (#21629)
no issue

- Since we decided to use the pushgateway instead of running a metrics
server, this removes the metrics server and its e2e tests
- We may reintroduce it later, but for now this is a simpler setup
2024-11-15 03:39:12 +00:00
Chris Raible
3728a4eaea
Refactored prometheus metrics instrumentKnex method (#21627)
no issue

- The `instrumentKnex` method was directly accessing the `promClient`
instance to create custom metrics, and keeping track of them manually in
a `customMetrics` map. This isn't necessary, since the metrics are all
tracked within the `promClient` instance's registry. This method now
uses the `prometheusClient.register...()` methods to create the metrics,
and retrieves them with the `getMetric()` method to reduce duplication
of work and manual bookkeeping
- This also removes the query count metric, as there is a count already
included in the query duration Summary metric
2024-11-14 16:57:55 -08:00
renovate[bot]
0aae3bb1fc
Update dependency gscan to v4.46.0 (#21617) 2024-11-14 20:10:03 +08:00
Sodbileg Gansukh
462fe9c12b
Updated the valid theme fixture (#21619)
no issues

- with gscan v4.46.0, we introduced a new rule for the custom fonts
feature
- this updates the valid theme zip file to make the theme tests work
with the new rules
2024-11-14 19:43:27 +08:00
Chris Raible
5a3b1d6cf8
Ensured prometheusClient is not initialized unless enabled via config (#21615)
no issue

- Currently the prometheus client is only initialized on boot if enabled
via config, but if it's required in other files (i.e. to create a custom
metric) it will be initialized then
- This commit explicitly checks if the prometheus client is enabled via
config before initializing it, thus preventing it from being initialized
when disabled
2024-11-13 18:34:36 -08:00
Chris Raible
6d9ea91634
Added utilities for creating custom prometheus metrics (#21614)
ref
https://linear.app/ghost/issue/ENG-1771/add-utility-functions-to-easily-create-custom-metrics

- Currently adding custom metrics to our prometheus client requires you
to directly access the `prometheusClient.client` to create the metrics
- This isn't super convenient, as you then have to either keep the
metric in a local variable, or manually get it from the
`prometheusClient.client.register`
- This commit exposes some utility functions for registering metrics on
the `prometheusClient` class, and for retrieving metrics that have
already been registered
2024-11-13 16:21:49 -08:00
Steve Larson
9da4aa3bce
Updated donations tests to try to handle Stripe changes (#21607)
no ref

Stripe made changes (again) that causes our donation tests to fail. This
round we use an if statement to try to make it more inclusive of cases,
as I've seen them use an accordion button, card button, and no button
all in the past 12h.
2024-11-13 13:26:47 +00:00
renovate[bot]
ead408ed20
Updated Koenig packages (#21606)
ref https://linear.app/ghost/issue/ENG-1751

- changelog: 9ed048c5ff
2024-11-13 15:09:35 +08:00
Ronald Langeveld
06f6483aa7
Fixed broken Stripe donations browser tests (#21605)
no issue

Stripe recently updated their checkout page to use React with Framer
Motion for animations, causing our Playwright tests to intermittently
fail when attempting to click the “Card” payment button. The standard
Playwright `.click()` method was unable to interact with the button
reliably due to animation-related delays, where the button was present
in the DOM but not fully interactable according to Playwright’s strict
visibility checks.

Switching to `dispatchEvent('click')` directly fires the click event on
the button, bypassing Playwright’s visibility and interactability
checks. This ensures the test can proceed without waiting for animations
to fully complete, resolving the issue with the Stripe checkout flow.
2024-11-13 06:20:21 +00:00
Princi Vershwal
01120c9e2f
Added 2fa to re-authenticate flow inside the editor (#21599)
Ref
https://linear.app/ghost/issue/ENG-1625/re-authenticate-flow-inside-the-editor-doesnt-support-2fa
2024-11-13 04:26:49 +00:00
Steve Larson
38f6bdaa72
Fixed flaky batch sending tests (#21604)
ref https://linear.app/ghost/issue/ENG-1749

Batch sending tests were failing with MySQL fairly regularly. It appears
to be a race condition where the listener for the batch sending job
having completed is returning too early, causing the subsequent
Bookshelf data model refresh to happen too soon.

This is a fundamental flaw in the JobManager awaitCompletion handler
(and how the batch sending system interacts with it) as there's no way
to identify one batch from another - they all use the same name, and we
don't pass along any metadata.
2024-11-12 16:15:43 -06:00
Kevin Ansfield
a25e79f041 Updated email golden-post snapshot to match modified bookmark rendering
ref https://github.com/TryGhost/Koenig/pull/1388

- includes new truncation of bookmark card content
2024-11-12 13:26:04 +00:00
renovate[bot]
a7a4b96aff Update Koenig packages 2024-11-12 13:26:04 +00:00
matsbst
a2a3b4eacf
🌐 Translated newsletter.json to Norwegian (#21595)
Complete translation of newsletter to Norwegian 🇳🇴
2024-11-12 18:18:26 +08:00
Sunghyun Kim
7c70c0630e
🌐 Added Korean i18n translations (#21577)
ref ONC-557
2024-11-12 16:24:13 +08:00
jubi-git
c845d2e1f6
🌐 Added Dutch (nl) locale to newsletter.json (#21588)
ref ONC-565
2024-11-12 15:52:33 +08:00
Christian Schou
23a4ba93f8
🌐 Updated Danish (dk) Translations (#21593)
Updated the translations with missing Danish translations for comments,
newsletter, portal, and search.
2024-11-12 15:50:13 +08:00
Sam Lord
07afa6500d
Changed SSO adapter to automatically verify sessions (#21388)
ref ENG-1680

SSO is a different flow that wouldn't need the extra email verification
flow
2024-11-11 22:26:40 +00:00
Sodbileg Gansukh
177e604501
Added custom fonts (#21564)
ref DES-949

This adds custom fonts feature allowing users to select heading and body fonts for their themes from a curated list. This allows publishers to have more control over their brand, and allows themes to have a wider range of styles to appeal to different audiences. 

Without custom fonts support, themes will continue to work as normal, but users won't be able to customize their typography. As for the official themes, all of them will support custom fonts.

---------

Co-authored-by: Aileen Booker <AileenCGN@gmail.com>
2024-11-11 18:38:02 +08:00
Ronald Langeveld
c349b9bf26
Added new hidden comments API implementation (#21444)
ref PLG-227

- Behind flags
- Changed Comments API for members and guests to not return hidden or
removed comments - with the only exception being if a hidden or removed
comment have published replies, in which case it will be greyed out as
per the previous version on the UI.
- Wired up a new admin API endpoint for comment to receive all comments.
It's on par with the members / guests endpoint, with the difference
being that it it shows hidden comment's content, where previously the
html property was nullified.
2024-11-11 15:00:59 +08:00
Bastien
c336d46352
🌐 Improved French translations (#21570)
ref https://ghost.org/changelog/internationalization/

- I've changed "email" to "e-mail", which is more correct in French. The
official term is "courriel" but it sounds a bit old-fashioned.
- Apart from that, I've made a few harmonisations and small corrections to
ensure consistency between the files.
2024-11-11 10:08:18 +08:00
Chris Raible
85408d10b7
Added connection pool metrics to prometheus client (#21576)
ref
https://linear.app/ghost/issue/ENG-1592/start-monitoring-connection-pool-utilization-in-ghost

- This commit adds prometheus metrics to the connection pool so we can
start to track connection pool utilization, number of pending acquires,
and also adds some basic SQL query summary metrics like queries per
minute and query duration percentiles.
- The connection pool has now been theorized to be a main constraint of
Ghost for some time, but it's been challenging to get actual visibility
into the state of the connection pool. With this change, we should be
able to directly observe, monitor and alert on the connection pool.
- Updated grafana version to fix a bug in the query editor that was
fixed in 8.3, even though this is a couple versions ahead of production
2024-11-07 23:01:34 -08:00
Ghost CI
08fe08a0a2 Merged v5.100.1 into main 2024-11-07 23:24:07 +00:00
Ghost CI
d3625537e0 v5.100.1 2024-11-07 23:24:04 +00:00
Hannah Wolfe
5229fd44ab Moved newsletter date localisation behind labs flag (#21575)
ref https://github.com/TryGhost/Ghost/pull/21573

- We discussed this, and figured we should get this behind the flag for
now, even though it's pulled
- This gives us the ability to do a fast revert if we have to later,
which is the point of having the labs "GA FEATURES" array
- Note this removes the labsEnabled variable in the tests to make it
clearer if the flag is off or on (it was off!)
2024-11-07 16:47:24 -06:00
Hannah Wolfe
cdb92f1528
Moved newsletter date localisation behind labs flag (#21575)
ref https://github.com/TryGhost/Ghost/pull/21573

- We discussed this, and figured we should get this behind the flag for
now, even though it's pulled
- This gives us the ability to do a fast revert if we have to later,
which is the point of having the labs "GA FEATURES" array
- Note this removes the labsEnabled variable in the tests to make it
clearer if the flag is off or on (it was off!)
2024-11-07 22:46:30 +00:00
Hannah Wolfe
3dc3d7e433 🐛 Fixed newsletter not sending if locale is invalid (#21573)
ref https://github.com/moment/luxon/blob/master/docs/intl.md

- We noticed the following error trace: RangeError: Incorrect locale
information provided
at BatchSendingService.retryDb
(/home/ghost/node_modules/@tryghost/email-service/lib/BatchSendingService.js:639:32)
    at new DateTimeFormat (<anonymous>)
at getCachedDTF
(/home/ghost/node_modules/luxon/build/node/luxon.js:621:11)
at new PolyDateFormatter
(/home/ghost/node_modules/luxon/build/node/luxon.js:842:16)
at Locale.dtFormatter
(/home/ghost/node_modules/luxon/build/node/luxon.js:1066:12)
at Formatter.dtFormatter
(/home/ghost/node_modules/luxon/build/node/luxon.js:2274:21)
at Formatter.formatDateTime
(/home/ghost/node_modules/luxon/build/node/luxon.js:2280:17)
at DateTime.toLocaleString
(/home/ghost/node_modules/luxon/build/node/luxon.js:6893:78)
at formatDateLong
(/home/ghost/node_modules/@tryghost/email-service/lib/EmailRenderer.js:45:74)
at Object.getValue
(/home/ghost/node_modules/@tryghost/email-service/lib/EmailRenderer.js:683:47)
at
/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:158:36
    at Array.map (<anonymous>)
at
/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:154:54
    at Array.map (<anonymous>)
at SendingService.buildRecipients
(/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:151:24)
at SendingService.send
(/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:127:33)
at response.retryDb
(/home/ghost/node_modules/@tryghost/email-service/lib/BatchSendingService.js:451:51)
- This is due to the locale being user-input - it can be set to any
string.
- In our email sending code we pass the string to luxon to format dates,
which errors if the locale is not valid according it Intl.
- This fix ensures that the locale is valid before passing it to luxon,
falling back to en-gb if the locale is not valid
2024-11-07 16:18:09 -06:00
Hannah Wolfe
d3cda0d39d
🐛 Fixed newsletter not sending if locale is invalid (#21573)
ref https://github.com/moment/luxon/blob/master/docs/intl.md

- We noticed the following error trace: RangeError: Incorrect locale
information provided
at BatchSendingService.retryDb
(/home/ghost/node_modules/@tryghost/email-service/lib/BatchSendingService.js:639:32)
    at new DateTimeFormat (<anonymous>)
at getCachedDTF
(/home/ghost/node_modules/luxon/build/node/luxon.js:621:11)
at new PolyDateFormatter
(/home/ghost/node_modules/luxon/build/node/luxon.js:842:16)
at Locale.dtFormatter
(/home/ghost/node_modules/luxon/build/node/luxon.js:1066:12)
at Formatter.dtFormatter
(/home/ghost/node_modules/luxon/build/node/luxon.js:2274:21)
at Formatter.formatDateTime
(/home/ghost/node_modules/luxon/build/node/luxon.js:2280:17)
at DateTime.toLocaleString
(/home/ghost/node_modules/luxon/build/node/luxon.js:6893:78)
at formatDateLong
(/home/ghost/node_modules/@tryghost/email-service/lib/EmailRenderer.js:45:74)
at Object.getValue
(/home/ghost/node_modules/@tryghost/email-service/lib/EmailRenderer.js:683:47)
at
/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:158:36
    at Array.map (<anonymous>)
at
/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:154:54
    at Array.map (<anonymous>)
at SendingService.buildRecipients
(/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:151:24)
at SendingService.send
(/home/ghost/node_modules/@tryghost/email-service/lib/SendingService.js:127:33)
at response.retryDb
(/home/ghost/node_modules/@tryghost/email-service/lib/BatchSendingService.js:451:51)
- This is due to the locale being user-input - it can be set to any
string.
- In our email sending code we pass the string to luxon to format dates,
which errors if the locale is not valid according it Intl.
- This fix ensures that the locale is valid before passing it to luxon,
falling back to en-gb if the locale is not valid
2024-11-07 21:55:20 +00:00