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: Adding new scopeRangeRegex config to the custom framework o… #926

Merged
merged 2 commits into from
Aug 27, 2023

Conversation

aranard
Copy link
Contributor

@aranard aranard commented May 12, 2023

This adds new functionality to the custom framework to allow specifying a regex that can prefix scope to the key detector (in getScopeRange()). An example of usage is included.

After merging, this documentation can be added to the Custom Framework wiki page:

# A RegEx to set a custom scope range. This scope will be used as a prefix when detecting keys
# and works like how the i18next framework identifies the namespace scope from the
# useTranslation() hook.
# You should unescape RegEx strings in order to fit in the YAML file
# To help with this, you can use https://www.freeformatter.com/json-escape.html
scopeRangeRegex: "useTranslation\\(\\s*\\[?\\s*['\"`](.*?)['\"`]"

@aranard
Copy link
Contributor Author

aranard commented Jun 5, 2023

Hi @terales just wanted to check in to see if anyone will be able to review this soon. Thank you!

@aranard
Copy link
Contributor Author

aranard commented Jul 21, 2023

Hi @terales @kibertoad @anilkk just checking in on the status of having this reviewed. Let me know if there's anything I can do to help get this merged, it would really help my team to have added as an official feature. Thanks!

@chazeah
Copy link

chazeah commented Aug 8, 2023

Would love to see this merged!

@terales terales merged commit ff7417c into lokalise:main Aug 27, 2023
3 checks passed
huacnlee pushed a commit to huacnlee/i18n-ally that referenced this pull request Aug 28, 2023
…kalise#926)

* Feat: Adding new namespaceMatchRegex config to the custom framework options

* Empty commit to trigger CI

---------

Co-authored-by: Amanda Ranard <amanda.ranard@thetradedesk.com>
Co-authored-by: Alex Terehov <terales@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants