Skip to content

feat: Add i18n-context-service to inject custom contexts#383

Draft
jurienhamaker wants to merge 3 commits intotoonvanstrijp:mainfrom
jurienhamaker:feature/custom-context
Draft

feat: Add i18n-context-service to inject custom contexts#383
jurienhamaker wants to merge 3 commits intotoonvanstrijp:mainfrom
jurienhamaker:feature/custom-context

Conversation

@jurienhamaker
Copy link

Currently I am working on a project that has a custom request scope.
Similair how this package provides rpc, graphql & http out of the box. This will allow the user to add custom contexts and functions to get the context of said custom context.

I do need some help with the I18nLang decorator, since I have no clue how I could inject the service into a paramDecorator.

Same for the tests, any suggestions are welcome.

@jurienhamaker
Copy link
Author

@toonvanstrijp Have you had any time to look at this yet?

@toonvanstrijp
Copy link
Owner

@jurienhamaker I'll take a look at it right now ;)

@coveralls
Copy link

coveralls commented Sep 2, 2022

Coverage Status

Coverage decreased (-0.8%) to 90.755% when pulling ec910c9 on jurienhamaker:feature/custom-context into 8b998ab on toonvanstrijp:main.

@toonvanstrijp
Copy link
Owner

@jurienhamaker looks good so far, the only thing that I'm not sure about yet is how to make the I18nLang decorator work.

@toonvanstrijp
Copy link
Owner

@jurienhamaker @jurienhamaker alright I have a potential solution. In the i18n-language.interceptor.ts we get the context object and put the i18nService and i18nLang on there. But we can also set things on the nestjs context so: context.i18nCustomContexts (not the ctx one). Then inside the parameterDecorator we can access them by doing context.i18nCustomContexts.

@SocketSomeone
Copy link

@toonvanstrijp Any updates?

@rubiin rubiin added enhancement New feature or request help wanted Extra attention is needed labels Jun 27, 2023
@rubiin
Copy link
Collaborator

rubiin commented Aug 18, 2023

#489 #479 related

@rubiin
Copy link
Collaborator

rubiin commented Aug 21, 2023

@toonvanstrijp can you look on this one on your free time. Since this is older and almost mergeable I would like your input. This will help close few issue

@sawa-ko
Copy link

sawa-ko commented Jan 20, 2024

Hey @toonvanstrijp, can you check this pull request please!? 🙏

@sawa-ko
Copy link

sawa-ko commented Jan 20, 2024

Or you @rubiin?

@rubiin
Copy link
Collaborator

rubiin commented Jan 20, 2024

plz fix the merge conflicts

@rubiin rubiin marked this pull request as draft January 24, 2024 08:15
@BARTlab
Copy link

BARTlab commented Mar 6, 2024

can you fix the conflicts and accept the changes to update the version? or can I do this in your pr?

@rubiin
Copy link
Collaborator

rubiin commented Mar 6, 2024

@BARTlab go ahead

@SocketSomeone
Copy link

@jurienhamaker you're welcome!

@sgerodes
Copy link

sgerodes commented Jan 31, 2025

I would be interested in these changes as well. It seems to be a feature that can level up this framework to new level. Any plans on merging?

@AlexInCube
Copy link

this library is abandoned?

@toonvanstrijp
Copy link
Owner

@jurienhamaker apologies for the late reply, would you be able to add tests?

@sawa-ko
Copy link

sawa-ko commented Nov 22, 2025

The reply was just a little late, just a little....

@toonvanstrijp
Copy link
Owner

Beter late than never… right? 🤓

@rubiin rubiin self-requested a review November 22, 2025 15:01
@rubiin
Copy link
Collaborator

rubiin commented Nov 22, 2025

Last time I checked the tests were the only thing keeping from merge, looks like merge conflicts resolution is also needed

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

Labels

enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants