Files
orca/config/scripts/locale-translation-policy.es-pr.test.mjs
T
NeilandOrca c86418eaad rm git shim (#14141)
* rm git shim

Drops the terminal git/gh PATH wrapper and its settings toggle. Renames the no-marker shell-ready launch config after what it does.

Co-authored-by: Orca <help@stably.ai>

* rm git shim: clear stale state from older installs

Deletes the orphaned wrapper dir and scrubs inherited env/PATH, so a daemon that outlives the upgrade cannot keep seeding it. Drops a now-unread spawn option.

Co-authored-by: Orca <help@stably.ai>

* rm git shim: cover the daemon and headless paths

Scrub after the PATH prepends (they re-read process.env on the sparse daemon env) and run the cleanup above the serve branch so remote hosts get it too. Retry a locked removal; match PATH case-insensitively.

Co-authored-by: Orca <help@stably.ai>

* rm git shim: keep the scrub final

Refuse to re-prepend a legacy entry during agent-teams PATH promotion, which runs after the scrub. Cover the removal guard.

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Orca <help@stably.ai>
2026-08-12 18:53:17 -07:00

55 lines
2.1 KiB
JavaScript

import { describe, expect, it } from 'vitest'
import { repairTranslatedValue } from './locale-translation-policy.mjs'
const repairEs = (enValue, localeValue) =>
repairTranslatedValue({
key: 'auto.components.test.pr-glossary',
enValue,
localeValue,
locale: 'es'
})
describe('locale-translation-policy es PR glossary', () => {
it('rewrites the "relaciones públicas" mistranslation of PR back to PR', () => {
expect(repairEs('PR', 'relaciones públicas')).toBe('PR')
expect(repairEs('PRs', 'relaciones públicas')).toBe('PR')
expect(repairEs('Reopen PR', 'Reabrir relaciones públicas')).toBe('Reabrir PR')
expect(repairEs('Create PR', 'Crear relaciones públicas')).toBe('Crear PR')
expect(repairEs('Open PR checks', 'Abrir cheques de relaciones públicas')).toBe(
'Abrir cheques de PR'
)
expect(repairEs('unlink PR', 'desvincular relaciones públicas')).toBe('desvincular PR')
})
it('rewrites PR inside longer sentences', () => {
expect(
repairEs(
'Split a large change into smaller PRs',
'Dividir un cambio grande en relaciones públicas más pequeños'
)
).toBe('Dividir un cambio grande en PR más pequeños')
expect(
repairEs(
'Open the PR details to view current reviewers.',
'Abra los detalles de relaciones públicas para ver los revisores actuales.'
)
).toBe('Abra los detalles de PR para ver los revisores actuales.')
})
it('leaves an already correct PR translation untouched', () => {
expect(repairEs('Reopen PR', 'Reabrir PR')).toBe('Reabrir PR')
})
it('does not fire when the English has a "pr" substring but no PR token', () => {
// "approve"/"public" contain the substring "pr" but not the PR token, so a genuine
// "public relations" string must be left alone.
expect(repairEs('Approve public relations', 'Aprobar relaciones públicas')).toBe(
'Aprobar relaciones públicas'
)
expect(repairEs('Compress the preview', 'Comprimir las relaciones públicas')).toBe(
'Comprimir las relaciones públicas'
)
})
})