Skip to content

REST: Add missing text domain and fix typos in REST API controller strings #643

Open

Description

@devmuhib009

Description

In the REST API controllers (includes/restapi/):

  • None of the __( '...' ) translation calls pass the plugin's text domain ('wp-feature-notifications'). This prevents those strings from being properly localized according to WordPress i18n standards.
  • Several error messages and schema descriptions contain grammatical errors, missing words, and extra punctuation:
    • includes/restapi/class-channel-controller.php:
      • __( 'Sorry, you must be logged to view channels.' ) → missing "in".
      • __( 'The default view context the notification channel.' ) → missing "of".
    • includes/restapi/class-notification-controller.php:
      • __( 'Sorry, you must be logged check notifications.' ) → missing "in to".
      • __( 'The URL of the accept action..' ) → trailing double period.
      • __( 'The view context the notification.' ) → missing "of".
      • __( 'The identifier of user the notification is belongs to.' ) → missing "the" and erroneous "is".
    • includes/restapi/class-subscription-controller.php:
      • __( 'The identifier of user the subscription is belongs to.' ) → missing "the" and erroneous "is".

Step-by-step reproduction instructions

  1. Inspect includes/restapi/class-channel-controller.php, class-notification-controller.php, and class-subscription-controller.php.
  2. Notice all __( ... ) calls omit the text domain argument.

Proposed solution

Add 'wp-feature-notifications' text domain to all translation calls in includes/restapi/ and fix the grammatical issues in the strings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions