Files
orca/src/shared/source-control-dropdown-remote-copy.ts
T
EvgeniiandOrcaWin 16547ff203 fix(i18n): localize the rest of the source control dropdown (#34145)
* fix(i18n): localize the rest of the source control dropdown

The Commit & Push, Push, Force Push, Pull, Fast-forward, Sync, Publish,
abort and Push-before-PR rows and their tooltips were English literals
next to rows that already go through translate(). Route them through
translate(), reusing the primary button's and the conflict card's keys
where the words match, and add 42 keys to the English catalog.

Commit blockers stay English inside eligibility, which compares them,
and are translated only when the dropdown shows them.

* test(i18n): pin the other two commit blockers under the pseudo-locale

The pseudo-locale test only reached the stage-file blocker, so an English
return for the conflict or commit-message blocker still passed. The new
case checks both in the Commit, Commit & Push and Commit & Sync titles.

* i18n: translate source control dropdown keys; trim duplicate pseudo-locale test

Add zh/ko/ja/es/fr/pt translations for the 42 dropdown keys this PR adds to en.json,
matching each catalog's existing source-control glossary. Drop the second pseudo-locale
test; the first already covers commit-blocker titles through the active locale.

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-27 17:03:13 -07:00

102 lines
4.3 KiB
TypeScript

// Desktop localizes these strings; other clients pass their own copy.
export type RemoteDropdownCopy = {
push: string
forcePush: string
pull: string
fastForward: string
sync: string
publishBranch: string
publishPrStatus: string
publishLinkedReview: string
publishNoBranch: string
checkingBranchStatus: string
checkingPrStatus: string
prAlreadyMerged: string
linkedReviewTargetUnavailable: string
checkOutBranchToPush: string
pushAndSetUpstream: string
pushToLinkedReview: string
tryRegularPush: string
pushMayNeedSync: string
nothingToPushTo: (upstreamName: string) => string
nothingToPush: string
checkOutBranchToForcePush: string
nothingToForcePushTo: (upstreamName: string) => string
nothingToForcePush: string
checkOutBranchToPull: string
publishBranchFirstToPull: string
nothingNewToPull: string
nothingToPull: string
checkOutBranchToFastForward: string
publishBranchFirstToFastForward: string
nothingNewToFastForward: string
nothingToFastForward: string
tryFastForwardPull: string
checkOutBranchToSync: string
publishBranchFirstToSync: string
useForcePushToSync: string
branchUpToDate: string
rebaseFromNamedBase: (baseRef: string) => string
rebaseFromBase: string
rebaseChooseRemoteBase: string
rebaseDirtyHint: string
rebaseWithLatestFrom: (baseRef: string) => string
fetch: string
fetchTitle: string
linkedReviewBranchExists: string
checkOutBranchToPublish: string
branchAlreadyPublished: string
publishToOrigin: string
}
export const ENGLISH_REMOTE_DROPDOWN_COPY: RemoteDropdownCopy = {
push: 'Push',
forcePush: 'Force Push',
pull: 'Pull',
fastForward: 'Fast-forward',
sync: 'Sync',
publishBranch: 'Publish Branch',
publishPrStatus: 'PR Status',
publishLinkedReview: 'Linked Review',
publishNoBranch: 'No Branch',
checkingBranchStatus: 'Checking branch status…',
checkingPrStatus: 'Checking PR status…',
prAlreadyMerged: 'PR is already merged',
linkedReviewTargetUnavailable: 'Linked review branch target is unavailable',
checkOutBranchToPush: 'Check out a branch before pushing commits',
pushAndSetUpstream: 'Push this branch and set an upstream if needed',
pushToLinkedReview: 'Push updates to the linked review branch',
tryRegularPush: 'Try a regular push; git may require force push',
pushMayNeedSync: 'Push local commits; git may require syncing first',
nothingToPushTo: (upstreamName) => `Nothing to push to ${upstreamName}`,
nothingToPush: 'Nothing to push',
checkOutBranchToForcePush: 'Check out a branch before force pushing commits',
nothingToForcePushTo: (upstreamName) => `Nothing to force push to ${upstreamName}`,
nothingToForcePush: 'Nothing to force push',
checkOutBranchToPull: 'Check out a branch before pulling commits',
publishBranchFirstToPull: 'Publish the branch first to pull commits',
nothingNewToPull: 'Nothing new to pull — remote only has older copies of local commits',
nothingToPull: 'Nothing to pull',
checkOutBranchToFastForward: 'Check out a branch before fast-forwarding',
publishBranchFirstToFastForward: 'Publish the branch first to fast-forward',
nothingNewToFastForward:
'Nothing new to fast-forward — remote only has older copies of local commits',
nothingToFastForward: 'Nothing to fast-forward',
tryFastForwardPull: 'Try a fast-forward pull; git may reject local commits',
checkOutBranchToSync: 'Check out a branch before syncing commits',
publishBranchFirstToSync: 'Publish the branch first to sync commits',
useForcePushToSync: 'Use Force Push — remote only has older copies of local commits',
branchUpToDate: 'Branch is up to date',
rebaseFromNamedBase: (baseRef) => `Rebase from ${baseRef}`,
rebaseFromBase: 'Rebase from Base',
rebaseChooseRemoteBase: 'Choose a remote base branch to rebase from',
rebaseDirtyHint: 'Try rebasing; git may require committing or stashing local changes first',
rebaseWithLatestFrom: (baseRef) => `Rebase current branch with latest commits from ${baseRef}`,
fetch: 'Fetch',
fetchTitle: 'Fetch from remote without merging',
linkedReviewBranchExists: 'Linked review branch already exists',
checkOutBranchToPublish: 'Check out a branch before publishing commits',
branchAlreadyPublished: 'Branch is already published',
publishToOrigin: 'Publish this branch to origin'
}