Repository navigation
Sync the recorded values and name the editors in the commit - #126
Merged
Merged
Conversation
- Send the sync update version when fetching a sync, so CI writes what that update recorded - Add an 'Edited on Localhero.ai by ...' line to the sync commit when the server names editors
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CLI side of auto sync (localheroai/localhero-ai#710, #882). Two small changes to sync mode.
Change
getSyncTranslationssends theversionthe CLI already holds (LOCALHERO_SYNC_VERSIONorsyncUpdateVersioninlocalhero.json) on every page. The server then serves the values that update recorded when it was created, not whatever is live when CI fetches. Before, an edit saved while CI was starting went out early, and the web app still showed it as waiting. Now it waits for the next sync.edited_by(up to five names, ordered by how much each person changed) andedited_by_others, the commit gets a line such asEdited on Localhero.ai by Anna Svensson, Erik Berg and 3 others.Names only, never email addresses: many people who edit translations have no GitHub account, and an email in the commit would publish it in the customer's history.Both are backwards compatible. Against a server without the change, the extra query parameter is ignored and the commit message is unchanged.
Server side
The matching server change is on
feature/auto-sync-pr-pagein localhero-ai, not pushed yet. It adds theversionhandling andedited_by/edited_by_otherstoGET /api/v1/translation_syncs/:id.Verified
npm test: 82 suites, 1499 tests pass after rebasing on main (Wait up to 10 minutes for a translation job, not 60 polls #125).tsc --noEmitand lint are clean.