Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(transloco): 🎸 add option to not change the casing of the provided scope #794

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

maartentibau
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Currently the scope is being altered by the toCamelCase helper method. This creates the issue that if you provide a scope where you would like to have the first character not to be changed OR just the casing in general you can only do this by providing an alias.

e.g { scope: 'FOOBAR', alias: 'FOOBAR' }

Issue Number: N/A

What is the new behavior?

This feature enabled the possibility to only provide the scope and the casing of it will not be altered, so you can just use this: { scope: 'FOOBAR' } or { scope: 'F-OO-BaR' } --> will be transformed to { scope: 'FOOBaR' }`

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@maartentibau maartentibau changed the title feat(transloco): add option to ignore scope casing feat(transloco): 🎸 add option to ignore scope casing Sep 12, 2024
Copy link
Collaborator

@shaharkazaz shaharkazaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, nice feature! left a couple of comments 🙂

docs/docs/getting-started/config-options.mdx Outdated Show resolved Hide resolved
docs/docs/getting-started/config-options.mdx Outdated Show resolved Hide resolved
libs/transloco/src/lib/helpers.ts Outdated Show resolved Hide resolved
libs/transloco/src/lib/scope-resolver.ts Outdated Show resolved Hide resolved
libs/transloco/src/lib/scope-resolver.ts Outdated Show resolved Hide resolved
@maartentibau
Copy link
Contributor Author

I will squash all the commits once we get to a point where the PR Is final, but I now left them there so you can see changes a bit more easy.

docs/docs/getting-started/config-options.mdx Outdated Show resolved Hide resolved
docs/docs/lazy-load/scope-configuration.mdx Outdated Show resolved Hide resolved
libs/transloco/src/lib/tests/scope-resolver.spec.ts Outdated Show resolved Hide resolved
libs/transloco/src/lib/transloco.service.ts Outdated Show resolved Hide resolved
@maartentibau maartentibau changed the title feat(transloco): 🎸 add option to ignore scope casing feat(transloco): 🎸 add option to not change the casing of the provided scope Sep 17, 2024
@maartentibau
Copy link
Contributor Author

@shaharkazaz I think we're good to go.
Squashed all the commits

@shaharkazaz
Copy link
Collaborator

@maartentibau Can you please update from master?

@maartentibau
Copy link
Contributor Author

@maartentibau Can you please update from master?

Done 🚀

@maartentibau maartentibau force-pushed the feat/ignore-scope-casing branch 2 times, most recently from 2efec71 to 9a4e36b Compare September 17, 2024 05:53
@shaharkazaz shaharkazaz merged commit fdcf536 into jsverse:master Sep 17, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants