-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fetch nightly translations during build #13724
Conversation
I'm not sure if we should run this automatically each develop build, maybe we should make a separate script command people can run to download the translations |
What are your concerns with having it be part of the build? Maybe I can address them. |
It is just an extra step to get your dev end working and extra work each time, that most people will not need during development I think? |
Yeah I get that. I was thinking the same, but come to the opposite conclusion. If the translations are removed from tracking, then everyone must execute the task at least once in order for builds to succeed. So if it's not part of the build, then we rely on new developers following more instructions, and maybe possible issues if my translations != your != the CI's? I also agree Obviously most developers won't need anything outside English, but they should still have an up to date If you didn't already see too, most times the task will exit without doing anything if you already have recent translations. |
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
There's a bug causing inconsistent failures (my favorite kind), so making this a draft until I figure that out. |
Backend translations are not needed right? I think we only have those to support old instances with We should just make the |
Okay I fixed the issue with awaiting the extraction so you can test again.
Now you've exceeded my HA knowledge. I assumed the core translations were necessary to successfully build the frontend. I wasn't even thinking about typing support yet.
That would be a big departure from the current build script behavior that uses all languages. I thought the goal was just to do the same thing with up to date files, and get rid of tracking them so there's no more accidental edits. Anyway you could accomplish what you're saying just by setting the |
Just for kicks I set the variable to skip and built with an empty translations directory. The build succeeds and you can fire up the UI, but there's lots of missing text or text that doesn't match up with the current version, so clearly the existing Or I'm completely misunderstanding and we're on totally different pages 🍎 🍏 |
I'll dive in a little deeper this weekend, but if I remember correctly, we always take the |
Yep, looks like that's what it does, but the gulp.task("build-merged-translations", () =>
gulp
.src([inFrontendDir + "/*.json", workDir + "/test.json"], {
allowEmpty: true,
}) So if that's empty, there's no output even for English. |
OK, so we should change that to use the |
Looking at the preceding Alright, so the default clone will be to build English only, and developers can flip an environment flag in Also need to decide:
|
Please keep in mind, that fetching the backend translations now only works because they are in this repo, by removing them from the repo, like you did in this PR, will make that they will also be removed from the nightly artefacts... They are not fetched from Lokalise |
Okay I didn't catch that. I can update that script to pull the core translations as well. |
Okay here's what I did:
Assuming you're good with that, do you think updating with each nightly is okay, or increase 24 to something less often? A good gauge would be how often things change in Lokalise, but I have no idea how to check that. |
Did you get a chance to examine the latest changes? No rush for beta here - just wanted to know if I should start adding a couple notes to the developer docs. |
👀 please so I don't have to fix any more conflicts |
Proposed change
From the discussion in #13381, integrates the nightly translations into the build process:
Type of change
Example configuration
Additional information
Checklist