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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.0] Add Starlight i18n VS Code extension recommendation in translating guide #1776

Open
dklassic opened this issue Dec 27, 2023 · 3 comments
Labels
enhancement Does it add or improve content? good first issue Is it good for beginners to take up?
Milestone

Comments

@dklassic
Copy link
Contributor

馃搵 Explain your issue

So after @lorenzolewis mentioned the existence of Starlight i18n VS Code extension a while ago, I took a look at it and it does work as intended and would surely help a lot for contributors.

Only catch is that by default it tries to find locale setting directly inside Astro config and cannot reference to our locales.json. So the question would be should we change our config so that Starlight i18n would work by default, or should we try to open an upstream issue at HiDeoo/starlight-i18n for overriding and also maybe try to fix it ourselves? 馃憖

@lorenzolewis
Copy link
Member

I think the only reason it's outside of that is because it's used here:

import locales from '../../locales.json';

It might be possible to just import it from the Astro config inside of the i18n-tracker package but I haven't given it a shot yet.

Nonetheless, I think an upstream feature request would be beneficial here because I've seen other projects have to access the i18n data via things like a CI pipeline and keeping it as a JSON file like this could be the easiest way to get access to it with things like GitHub runners.

I've also been keeping an eye on https://github.com/Yan-Thomas/lunaria which is essentially the code that i18n-tracker is but properly split out into a proper project. That looks like it would also expect the locales in https://lunaria.dev/manual-installation#3-configure-the-package.

@dklassic
Copy link
Contributor Author

dklassic commented Jan 3, 2024

Tried filing an upstream feature request here:

@dklassic
Copy link
Contributor Author

dklassic commented Jan 4, 2024

Good news, Starlight-i18n will be adding support for reading external locale json without any extra setup on next release, so now that we won鈥檛 be needing changes from our end, I鈥檓 updating the issue title to reflect it better.

@dklassic dklassic changed the title [2.0] Astro config has to be updated to accommodate Starlight i18n VS Code extension behavior? [2.0] Add Starlight i18n VS Code extension recommendation in translation.md Jan 4, 2024
@dklassic dklassic changed the title [2.0] Add Starlight i18n VS Code extension recommendation in translation.md [2.0] Add Starlight i18n VS Code extension recommendation in translating guide Jan 4, 2024
@simonhyll simonhyll modified the milestones: Version 2.0, Version 2.x Feb 26, 2024
@simonhyll simonhyll added enhancement Does it add or improve content? good first issue Is it good for beginners to take up? labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Does it add or improve content? good first issue Is it good for beginners to take up?
Projects
Status: 馃挭 Ready
Development

No branches or pull requests

3 participants