-
Notifications
You must be signed in to change notification settings - Fork 37
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
Feature request: A property to set the asset path #129
Comments
# [1.0.0-beta.19](v1.0.0-beta.18...v1.0.0-beta.19) (2023-03-05) ### Bug Fixes * add levels to relative path in script tag ([1203d42](1203d42)), closes [#129](#129) * use unjs/pathe to resolve generated localized files paths across OS ([da80a8d](da80a8d)), closes [#135](#135) ### Reverts * **i18next-peer:** reset i18next as package dependency ([7906e19](7906e19)), closes [#131](#131)
🎉 This issue has been resolved in version 1.0.0-beta.19 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I noticed it still doesn't work after 1.0.0-beta.19, so I took a look at this commit (1203d42) and it looks like a small "typo". Instead of Can you fix this @yassinedoghri? Thanks for your work! |
@flaviotoribio Good catch, I'll fix it. |
# [1.0.0-beta.20](v1.0.0-beta.19...v1.0.0-beta.20) (2023-03-09) ### Bug Fixes * add missing `script` to regex in resolveRelativePathsLevel ([9288efe](9288efe)), closes [#129](#129) * get astro pages' full paths using fdir's withFullPaths instead of withRelativePaths ([92a5178](92a5178)), closes [#135](#135) ### Features * make base path for i18next resources configurable ([4e4b057](4e4b057))
🎉 This issue has been resolved in version 1.0.0-beta.20 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [1.0.0-beta.19](yassinedoghri/astro-i18next@v1.0.0-beta.18...v1.0.0-beta.19) (2023-03-05) ### Bug Fixes * add levels to relative path in script tag ([1203d42](yassinedoghri/astro-i18next@1203d42)), closes [#129](yassinedoghri/astro-i18next#129) * use unjs/pathe to resolve generated localized files paths across OS ([da80a8d](yassinedoghri/astro-i18next@da80a8d)), closes [#135](yassinedoghri/astro-i18next#135) ### Reverts * **i18next-peer:** reset i18next as package dependency ([7906e19](yassinedoghri/astro-i18next@7906e19)), closes [#131](yassinedoghri/astro-i18next#131)
# [1.0.0-beta.20](yassinedoghri/astro-i18next@v1.0.0-beta.19...v1.0.0-beta.20) (2023-03-09) ### Bug Fixes * add missing `script` to regex in resolveRelativePathsLevel ([9288efe](yassinedoghri/astro-i18next@9288efe)), closes [#129](yassinedoghri/astro-i18next#129) * get astro pages' full paths using fdir's withFullPaths instead of withRelativePaths ([92a5178](yassinedoghri/astro-i18next@92a5178)), closes [#135](yassinedoghri/astro-i18next#135) ### Features * make base path for i18next resources configurable ([4e4b057](yassinedoghri/astro-i18next@4e4b057))
Is your feature request related to a problem? Please describe.
When generating translations the source path to a file won't change and I'll have to change it manually.
For example:
<script src="../path/to/file"></script>
Won't result in:
<script src="../../path/to/file"></script>
But remains the same. Therefore I'll have to manually change the path or I need to define the path inside the translations.
Describe the solution you'd like
I would like to see a property in the
astro-i18next.config
to set the path to the asset folder.Then when translating it would resolve the path by this property.
Here is an example of what it would look like:
<script src={(assetPath("/js/index.js"))}></script>
Describe alternatives you've considered
An alternative would be to set the asset folder path in the translation file.
The text was updated successfully, but these errors were encountered: