Skip to content

i18n: Added new translation key#2356

Open
claycuy wants to merge 6 commits into
Acode-Foundation:mainfrom
claycuy:strings/id-lang
Open

i18n: Added new translation key#2356
claycuy wants to merge 6 commits into
Acode-Foundation:mainfrom
claycuy:strings/id-lang

Conversation

@claycuy

@claycuy claycuy commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Added new translation key

  • Cursor Style Options:
    • terminal:block
    • terminal:underline
    • terminal:bar
  • Cursor Inactive Style Options:
    • terminal:inactive block
    • terminal:inactive underline
    • terminal:inactive bar
    • terminal:inactive none
  • Font Weight Options:
    • terminal:normal
    • terminal:bold

note: For languages other than id-id.json I fallback to English

@github-actions github-actions Bot added the translations Anything related to Translations Whether a Issue or PR label Jun 21, 2026
@claycuy claycuy marked this pull request as ready for review June 21, 2026 04:25
@greptile-apps

greptile-apps Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds 10 new i18n translation keys for terminal cursor style (block, underline, bar), cursor inactive style (outline, block, bar, underline, none), and font weight (normal, bold) options, and wires them into the terminalSettings.js select menus using the [value, displayLabel] tuple format supported by select.js.

  • All 10 keys are added consistently to all 33 locale files, with native Indonesian translations in id-id.json and English fallbacks elsewhere; index.d.ts is kept in sync.
  • terminalSettings.js converts the cursorStyle, cursorInactiveStyle, and the normal/bold entries of fontWeight from bare strings to [value, translatedLabel] tuples, so the selection dialog now shows human-readable labels while the persisted value (e.g., "block") remains unchanged.

Confidence Score: 5/5

Safe to merge — adds only translation keys and wires them into existing select menus with no logic changes.

All 10 new i18n keys are consistently present across every locale file and in index.d.ts. The [value, label] tuple format is correctly handled by select.js (lines 79–93), and the raw persisted values (e.g., "block") are unchanged. The fontWeight mixed-format array (tuples for normal/bold, plain strings for numeric weights) is also handled correctly by the same branching logic.

No files require special attention.

Important Files Changed

Filename Overview
src/settings/terminalSettings.js Converts cursorStyle, cursorInactiveStyle, and fontWeight "normal"/"bold" selects from bare strings to [value, label] tuples using new i18n keys; persisted values are unchanged.
src/lang/en-us.json Adds 10 new terminal-related translation keys at the end of the file; all match what is referenced in terminalSettings.js.
src/lang/index.d.ts Adds matching TypeScript declarations for all 10 new keys, kept in sync with en-us.json.
src/lang/id-id.json Only locale with native translations for the 10 new keys (Indonesian); all other locales use English fallbacks.
src/lang/fr-fr.json Representative non-id-id locale; adds all 10 keys with English fallback values, consistent with the rest of the unchanged locales.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["terminalSettings.js\nBuilds settings items"] -->|"cursorStyle select\n[value, label] tuples"| B["select.js dialog\nDisplays translated labels"]
    A -->|"cursorInactiveStyle select\n[value, label] tuples"| B
    A -->|"fontWeight select\nnormal/bold as tuples\n100-900 as plain strings"| B
    B -->|"User picks option\nreturns item[0] (raw value)"| C["appSettings.update()\nPersists raw value: 'block', 'bar', etc."]
    D["strings object\n(LangStrings)"] -->|"terminal:block, terminal:bar,\nterminal:underline,\nterminal:inactive *,\nterminal:normal, terminal:bold"| A
    E["en-us.json + all locale files\n10 new keys added"] --> D
    F["index.d.ts\n10 new type declarations"] -.->|"type-checks"| D
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["terminalSettings.js\nBuilds settings items"] -->|"cursorStyle select\n[value, label] tuples"| B["select.js dialog\nDisplays translated labels"]
    A -->|"cursorInactiveStyle select\n[value, label] tuples"| B
    A -->|"fontWeight select\nnormal/bold as tuples\n100-900 as plain strings"| B
    B -->|"User picks option\nreturns item[0] (raw value)"| C["appSettings.update()\nPersists raw value: 'block', 'bar', etc."]
    D["strings object\n(LangStrings)"] -->|"terminal:block, terminal:bar,\nterminal:underline,\nterminal:inactive *,\nterminal:normal, terminal:bold"| A
    E["en-us.json + all locale files\n10 new keys added"] --> D
    F["index.d.ts\n10 new type declarations"] -.->|"type-checks"| D
Loading

Reviews (4): Last reviewed commit: "fix linting" | Re-trigger Greptile

Comment thread src/lang/en-us.json Outdated
Comment thread src/lang/fr-fr.json Outdated
@claycuy

claycuy commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

@greptile

@claycuy claycuy marked this pull request as draft June 21, 2026 04:45
@claycuy

claycuy commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

@greptile

@claycuy claycuy marked this pull request as ready for review June 21, 2026 12:44
@claycuy claycuy changed the title i18n: Add new translation entry i18n: Added new translation key Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

translations Anything related to Translations Whether a Issue or PR

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant