Index: src/wp-includes/l10n.php
===================================================================
--- src/wp-includes/l10n.php	(revision 47432)
+++ src/wp-includes/l10n.php	(working copy)
@@ -165,6 +165,7 @@
  * *Note:* Don't use translate() directly, use __() or related functions.
  *
  * @since 2.2.0
+ * @since 5.5.0 Introduced gettext-{$domain} filter.
  *
  * @param string $text   Text to translate.
  * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
@@ -175,6 +176,7 @@
 	$translations = get_translations_for_domain( $domain );
 	$translation  = $translations->translate( $text );
 
+
 	/**
 	 * Filters text with its translation.
 	 *
@@ -184,7 +186,17 @@
 	 * @param string $text         Text to translate.
 	 * @param string $domain       Text domain. Unique identifier for retrieving translated strings.
 	 */
-	return apply_filters( 'gettext', $translation, $text, $domain );
+	$translation = apply_filters( 'gettext', $translation, $text, $domain );
+
+	/**
+	 * Filters text with its translation for a domain.
+	 *
+	 * @since 5.5.0
+	 *
+	 * @param string $translation  Translated text.
+	 * @param string $text         Text to translate.
+	 */
+	return apply_filters( 'gettext-' . $domain, $translation, $text );
 }
 
 /**
@@ -215,6 +227,7 @@
  * *Note:* Don't use translate_with_gettext_context() directly, use _x() or related functions.
  *
  * @since 2.8.0
+ * @since 5.5.0 Introduced gettext_with_context-{$domain} filter.
  *
  * @param string $text    Text to translate.
  * @param string $context Context information for the translators.
@@ -225,6 +238,7 @@
 function translate_with_gettext_context( $text, $context, $domain = 'default' ) {
 	$translations = get_translations_for_domain( $domain );
 	$translation  = $translations->translate( $text, $context );
+
 	/**
 	 * Filters text with its translation based on context information.
 	 *
@@ -235,7 +249,18 @@
 	 * @param string $context      Context information for the translators.
 	 * @param string $domain       Text domain. Unique identifier for retrieving translated strings.
 	 */
-	return apply_filters( 'gettext_with_context', $translation, $text, $context, $domain );
+	$translation = apply_filters( 'gettext_with_context', $translation, $text, $context, $domain );
+
+	/**
+	 * Filters text with its translation based on context information for a domain.
+	 *
+	 * @since 5.5.0
+	 *
+	 * @param string $translation  Translated text.
+	 * @param string $text         Text to translate.
+	 * @param string $context      Context information for the translators.
+	 */
+	return apply_filters( 'gettext_with_context-' . $domain, $translation, $text, $context );
 }
 
 /**
@@ -419,6 +444,7 @@
  *     printf( _n( '%s person', '%s people', $count, 'text-domain' ), number_format_i18n( $count ) );
  *
  * @since 2.8.0
+ * @since 5.5.0 Introduced ngettext-{$domain} filter.
  *
  * @param string $single The text to be used if the number is singular.
  * @param string $plural The text to be used if the number is plural.
@@ -442,7 +468,19 @@
 	 * @param string $number      The number to compare against to use either the singular or plural form.
 	 * @param string $domain      Text domain. Unique identifier for retrieving translated strings.
 	 */
-	return apply_filters( 'ngettext', $translation, $single, $plural, $number, $domain );
+	$translation = apply_filters( 'ngettext', $translation, $single, $plural, $number, $domain );
+
+	/**
+	 * Filters the singular or plural form of a string for a domain.
+	 *
+	 * @since 5.5.0
+	 *
+	 * @param string $translation Translated text.
+	 * @param string $single      The text to be used if the number is singular.
+	 * @param string $plural      The text to be used if the number is plural.
+	 * @param string $number      The number to compare against to use either the singular or plural form.
+	 */
+	return apply_filters( 'ngettext-' . $domain, $translation, $single, $plural, $number );
 }
 
 /**
@@ -459,6 +497,7 @@
  *     printf( _nx( '%s group', '%s groups', $animals, 'group of animals', 'text-domain' ), number_format_i18n( $animals ) );
  *
  * @since 2.8.0
+ * @since 5.5.0 Introduced ngettext_with_context-{$domain} filter.
  *
  * @param string $single  The text to be used if the number is singular.
  * @param string $plural  The text to be used if the number is plural.
@@ -484,7 +523,20 @@
 	 * @param string $context     Context information for the translators.
 	 * @param string $domain      Text domain. Unique identifier for retrieving translated strings.
 	 */
-	return apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, $domain );
+	$translation = apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, $domain );
+
+	/**
+	 * Filters the singular or plural form of a string with gettext context for a domain.
+	 *
+	 * @since 5.5.0
+	 *
+	 * @param string $translation Translated text.
+	 * @param string $single      The text to be used if the number is singular.
+	 * @param string $plural      The text to be used if the number is plural.
+	 * @param string $number      The number to compare against to use either the singular or plural form.
+	 * @param string $context     Context information for the translators.
+	 */
+	return apply_filters( 'ngettext_with_context-' . $domain, $translation, $single, $plural, $number, $context );
 }
 
 /**
