-
Notifications
You must be signed in to change notification settings - Fork 79
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
Problems with LIB check in cli extractor #233
Comments
mojoaxel
added a commit
to fllstx/svelte-i18n
that referenced
this issue
Oct 1, 2023
…le import-lib check
mojoaxel
added a commit
to fllstx/svelte-i18n
that referenced
this issue
Oct 1, 2023
…le import-lib check
mojoaxel
added a commit
to fllstx/svelte-i18n
that referenced
this issue
Oct 1, 2023
I've created a pull-request to implement this: #234 |
mojoaxel
added a commit
to fllstx/svelte-i18n
that referenced
this issue
Sep 4, 2024
…le import-lib check
mojoaxel
added a commit
to fllstx/svelte-i18n
that referenced
this issue
Sep 4, 2024
…le import-lib check
mojoaxel
added a commit
to fllstx/svelte-i18n
that referenced
this issue
Sep 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
The cli extractor checks if the format method was imported from the hard-coded string 'svelte-i18n'.
This can cause multiple problems. In these cases the extractor does not work:
(e.g.
import { _ } from '../helpers/i18n
), maybe to hide the i18n implementation detail.Describe the solution you'd like
I propose to introduce a new cli parameter
unsave
to disable the library-check altogether.This could look like this:
svelte-i18n extract --unsave .
Describe alternatives you've considered
It would be possible to not use the hard coded lib-name but instead get the lib-name from the
package.json
. This would solve problem 1 but not 2 and 3.It also would be possible to introduce a cli parameter to provide the lib-name directly.
e.g.
svelte-i18n extract --lib-name "svelte-intl-precompile" .
This would solve problem 1 and 3 but not 2.
How important is this feature to you?
I'll provide a fix for this shortly. If this will not get merged within a few days I'll release my own fork.
The text was updated successfully, but these errors were encountered: