Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apps/mobile/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2190,7 +2190,7 @@
"discardDraftMessage": "Your prompt will be lost.",
"discardWithUploadsMessage": "Your prompt and any unclaimed uploads will be deleted.",
"discardFailed": "Could not discard the draft. Please try again.",
"remoteHint": "Run `kilo remote` on your computer, or `/remote` in a running CLI session, to control a local kilo process.",
"remoteHint": "Run kilo remote on your computer, or /remote in a running CLI session, to control a local kilo process.",
"continueFrom": "Continuing {{title}}",
"importingSession": "Importing session",
"cliCannotContinue": "This CLI cannot continue a session. Pick Cloud Agent or another CLI.",
Expand Down Expand Up @@ -2247,7 +2247,7 @@
"cloudAgent": "Cloud Agent",
"cloudAgentDescription": "Run on Kilo's cloud sandbox",
"noCliInstances": "No CLI instances connected",
"noCliInstancesDescription": "Run `kilo remote` in a project on your computer, or update Kilo CLI if one is already running.",
"noCliInstancesDescription": "Run kilo remote in a project on your computer, or update Kilo CLI if one is already running.",
"instanceOnProject": "{{name}} on {{project}}",
"instanceOnProjectSuffix": "{{name}} on {{project}} ({{suffix}})",
"runOnCloudAgent": "Run on Cloud Agent"
Expand Down Expand Up @@ -3176,14 +3176,14 @@
"cloudOptionTitle": "$t(agentChat.instancePicker.cloudAgent)",
"cloudOptionBody": "Run Kilo in a sandboxed cloud environment with nothing to install.",
"remoteOptionTitle": "Your computer",
"remoteOptionBody": "Run Kilo on your own machine through the `kilo remote` CLI.",
"remoteOptionBody": "Run Kilo on your own machine through the kilo remote CLI.",
"skip": "Skip tour",
"tutorialLabel": "Tutorial",
"remoteTitle": "Start your first remote session",
"remoteBody": "Connect your computer, then choose it below to start a new session.",
"remoteRunHint": "$t(agentChat.newSession.remoteHint)",
"remoteEmptyTitle": "No computer connected yet",
"remoteEmptyBody": "Run `kilo remote` on your computer to connect it.",
"remoteEmptyBody": "Run kilo remote on your computer to connect it.",
"remoteFound": "Computer connected",
"checkAgain": "Check again",
"networkError": "$t(authErrors.networkError)"
Expand Down
70 changes: 70 additions & 0 deletions apps/mobile/src/i18n/plain-text-copy.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import { describe, expect, it } from 'vitest';

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

/**
* Catalog copy reaches the screen through plain `<Text>` (or the mono variant):
* the app has no inline-markdown renderer, so a markdown backtick in a value is
* shown to the reader literally. The tour's "Your computer" card rendered
* `` `kilo remote` `` with its backticks, so English — the source of truth for
* the other catalogs — must stay free of them.
*/
const RUN_COPY = [
{
key: 'tour.remoteOptionBody',
value: 'Run Kilo on your own machine through the kilo remote CLI.',
},
{
key: 'tour.remoteEmptyBody',
value: 'Run kilo remote on your computer to connect it.',
},
{
key: 'agentChat.newSession.remoteHint',
value:
'Run kilo remote on your computer, or /remote in a running CLI session, to control a local kilo process.',
},
{
key: 'agentChat.instancePicker.noCliInstancesDescription',
value:
'Run kilo remote in a project on your computer, or update Kilo CLI if one is already running.',
},
] as const;

function lookup(path: string): unknown {
let node: unknown = en;
for (const part of path.split('.')) {
if (!node || typeof node !== 'object' || !(part in node)) {
return undefined;
}
node = (node as Record<string, unknown>)[part];
}
return node;
}

describe('plain-text copy', () => {
it.each(RUN_COPY)('keeps $key free of markdown backticks', ({ key, value }) => {
expect(lookup(key)).toBe(value);
expect(value).not.toContain('`');
Comment thread
iscekic marked this conversation as resolved.
});

it('has no markdown backticks anywhere in the English catalog', () => {
const offenders: string[] = [];
const walk = (node: unknown, path: string): void => {
if (typeof node === 'string') {
if (node.includes('`')) {
offenders.push(`${path}: ${node}`);
}
return;
}
if (node && typeof node === 'object') {
for (const [key, child] of Object.entries(node)) {
walk(child, path ? `${path}.${key}` : key);
}
}
};

walk(en, '');

expect(offenders).toEqual([]);
});
});
Loading