Skip to content

Commit

Permalink
refactor: de-duplication translation string directives
Browse files Browse the repository at this point in the history
  • Loading branch information
pmelab committed Feb 17, 2025
1 parent 1f081a4 commit 1c4d974
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 73 deletions.
4 changes: 0 additions & 4 deletions packages/drupal/custom/custom.services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ services:
custom.menus:
class: Drupal\custom\Menus

custom.translatables:
class: Drupal\custom\Translatables
arguments: ['@language_manager', '@locale.storage', '@database']

custom.entity_language_redirect_subscriber:
class: Drupal\custom\EventSubscriber\EntityLanguageRedirectSubscriber
arguments: ['@language_manager', '@current_route_match']
Expand Down
63 changes: 0 additions & 63 deletions packages/drupal/custom/src/Translatables.php

This file was deleted.

7 changes: 1 addition & 6 deletions packages/schema/src/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ implementation(drupal): \Drupal\custom\FocalPoint::getFocalPoint
"""
directive @focalPoint on FIELD_DEFINITION

"""
implementation(drupal): custom.translatables::all
"""
directive @translatables(context: String!) on FIELD_DEFINITION

"""
implementation(drupal): custom.webform::url
"""
Expand Down Expand Up @@ -372,7 +367,7 @@ type Query {
@lang(code: "$locale")
@drupalView(id: "content_hub:default", args: "$args")

stringTranslations: [TranslatableString!] @translatables(context: "gatsby")
stringTranslations: [TranslatableString!] @drupalTranslatedStrings

campaignUrlRedirects(args: String): CampaignUrlRedirectsResult
@drupalView(id: "campaign_urls:frontend_redirects", args: "$args")
Expand Down

0 comments on commit 1c4d974

Please sign in to comment.