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

fix: Svelte regex wrong first capturing group (#1003) #1013

Merged
merged 1 commit into from
Sep 23, 2023
Merged

fix: Svelte regex wrong first capturing group (#1003) #1013

merged 1 commit into from
Sep 23, 2023

Conversation

ZerdoX-x
Copy link
Contributor

Fixes #1003

According to https://github.com/lokalise/i18n-ally/wiki/Custom-Framework ({key}) in regex should be first capturing group. I did not know about this when proposed #826, #1001

I guess it would be really nice to have tests for regular expressions as it's in the core of i18n-ally.

Maybe at least we can add this info in the comment above this one?

// for visualize the regex, you can use https://regexper.com/

Knowing that you must capture ({key}) as the first group is much more useful than knowing how to visualize regex. If you don't mind, I would like to open another PR which will add comments about this in every framework file, because the only place where I found this is wiki/Custom-Framework

@henrikvilhelmberglund
Copy link

Is there any way I can use this before this is merged? The extension is broken for me right now.

@ZerdoX-x
Copy link
Contributor Author

@henrikvilhelmberglund I guess you have 2 options:

  1. compile either 2.10.0 version or patch-2 branch from my repo, then install extension locally from vscode, disable regular one.
  2. redefine default regex used for svelte-i18n using https://github.com/lokalise/i18n-ally/wiki/Custom-Framework (i have never done this and not sure if this is possible). see pr's diff to get new regex

@henrikvilhelmberglund
Copy link

henrikvilhelmberglund commented Sep 12, 2023

@henrikvilhelmberglund I guess you have 2 options:

  1. compile either 2.10.0 version or patch-2 branch from my repo, then install extension locally from vscode, disable regular one.
  2. redefine default regex used for svelte-i18n using https://github.com/lokalise/i18n-ally/wiki/Custom-Framework (i have never done this and not sure if this is possible). see pr's diff to get new regex

I installed an older version (2.10.0) of the extension for now. You can do that by clicking the arrow next to Uninstall and choosing Install another version.... Thanks for responding. Hopefully this can be merged soon!

@ZerdoX-x
Copy link
Contributor Author

@terales there was an issue in both of previous PR's, could you please take a look at this?

@terales terales merged commit a29bee8 into lokalise:main Sep 23, 2023
3 checks passed
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.

Token detection broken in 2.11.*
3 participants