Table of Contents

Internationalization Source Code

Where the web client's five locales are built: the i18n module and its bundles, the boot file, the lint scripts that gate the build, the components and utilities that render, sort and take text in the app's language, and the server and engine code behind the language preference and the text the server composes. How they work is Internationalization and Internationalization: the Server Half and the Build Gate.

Source Code Path

See HiNC App Anatomy for git repository links.

Web Application

HiNC-2025-webservice (Quasar CLI SPA):

  • wwwroot-src/src/i18n/index.ts — the vue-i18n instance and its fallback chain, SUPPORTED_LOCALES, normalizeLocale, LOCALE_LOADERS (each locale's bundle and Quasar pack, the vi and ja packs' replaced texts), loadLocale and its four-second cap, applyLocale with its sequence number, its fallback to the locale shown and its late apply of a slow chunk, the shared collator, the storage key and the re-title registration.
  • wwwroot-src/src/i18n/schema.ts — the English bundle as MessageSchema.
  • wwwroot-src/src/i18n/schema.d.ts — the ambient augmentation that registers that shape as vue-i18n's global message schema.
  • wwwroot-src/src/i18n/en/index.ts — the English bundle: the namespaces assembled into one object.
  • wwwroot-src/src/i18n/zh-Hant/index.ts, wwwroot-src/src/i18n/zh-Hans/index.ts, wwwroot-src/src/i18n/vi/index.ts and wwwroot-src/src/i18n/ja/index.ts — the same assembly, each annotated with MessageSchema and each loaded on demand as a chunk of its own.
  • wwwroot-src/src/i18n/en/engineMessages.ts — the engine-notification renderings keyed by structured id; its English values are the eligibility gate for every swap.
  • wwwroot-src/src/i18n/en/routes.ts — the strings the routes' meta.title keys resolve to.
  • wwwroot-src/src/i18n/en/widgets.ts — the shared-widget namespace.
  • wwwroot-src/src/i18n/README.md — the invariants written beside the bundles: the fallback rule, the on-demand loading, the never-translate list, the number rules (the percent rule among them) and the sorting rule, keyboard input through an IME, the vocabulary table and the Vietnamese and Japanese rules.
  • wwwroot-src/src/i18n/glossary.yaml — the term list: Chinese values harvested, the step-field entries and the Vietnamese and Japanese values kept by hand; imported by nothing, and the source of the step-field catalogs.
  • .ai/harvest-i18n.py — the retired harvest of the Chinese values and its adjudication tables, and --present-catalog, which writes the step-field catalogs from the glossary.
  • wwwroot-src/src/boot/i18n.ts — the plugin installation, the cached-locale path that holds mount for that locale's chunk and then fires an unawaited reconcile, the awaited race on a cache miss, and the guards around every locale step.
  • wwwroot-src/quasar.config.ts — the boot list whose order places i18n after the authentication fetch patch and the product module's boot file last.
  • wwwroot-src/src/product/boot.ts — the web service's own product boot file, which adds nothing.
  • wwwroot-src/index.html — the static shell whose lang attribute is corrected at mount.
  • wwwroot-src/package.json — build as the i18n scripts followed by quasar build, and vue-tsc as a separate script.
  • scripts/lint-glossary.mjs — the locale list read from SUPPORTED_LOCALES, the five bundle checks and the adjudication tables they read, the step-field catalog check, and the product module's bundles, locale wiring and namespace check under HINC_PRODUCT_SPA.
  • scripts/census.mjs — the raw display-string extraction, the allowlist subtraction and the per-file ratchet.
  • scripts/lint-engine-messages.mjs — the English engine-message entries checked against the emit-site catalog the engine ships.
  • scripts/lint-api-error-codes.mjs — the server's code = "…" literals checked against API_ERROR_KEYS, the comment-blanking C# lexer, and OWN_TEXT, the codes the client reads another way, each with its reason.
  • scripts/i18n-allowlist.json — the classified exemptions, each with its reason.
  • scripts/i18n-baseline.json — the per-file residual ceiling the census compares against.
  • wwwroot-src/src/stores/appState.ts — the language reference, the available-code list, and the action that POSTs before applying the locale, awaits its load, and rolls back on failure.
  • wwwroot-src/src/api/preference.ts — the typed wrappers over the language endpoints and the ?lang=-bearing step-present key request.
  • wwwroot-src/src/api/http.ts — currentLang(), the coded-error map API_ERROR_KEYS, labelledArgs, and codedErrorText, the app-locale rendering that leaves English to the server's message except for the codes of EN_FROM_BUNDLE; ReadFailure and readFailureText, a coded reason a successful reply carries.
  • wwwroot-src/src/api/namedRoots.ts — the File Explorer roots' title keys, which labelledArgs shows a coded error's root by.
  • wwwroot-src/src/i18n/en/apiErrors.ts — the coded errors' sentences; the fileExplorer* values, projectDirectoryMoved and projectGenerationMoved are the English the screen shows for the codes of EN_FROM_BUNDLE.
  • wwwroot-src/src/api/sessionMessages.ts — the engine-notification localizer, its template-equality gate and the repeat-fold wrapper.
  • wwwroot-src/src/components/controlTree/itemTypes.ts — the node's label, labelKey and labelParams fields and the nodeDisplayLabel and nodeDisplayInfo resolvers.
  • wwwroot-src/src/components/controlTree/useControlTreeHost.ts — the rendered-tree computed that calls the resolver, and the locale watcher that re-pulls the server-composed mission command titles without rebuilding the branch.
  • wwwroot-src/src/components/controlTree/missionItemTypes.ts — the kind display names and their tree.mission.kind.* key twin, and the rule that drops the key whenever the entry carries a title.
  • wwwroot-src/src/components/widgets/NumericInput.vue — the shared numeric field: blur-and-Enter commit, and the four validation messages it reads from the widgets.numericInput keys.
  • wwwroot-src/src/components/execution/charts/BaseStripChart.vue, wwwroot-src/src/components/execution/charts/BaseCycleLineChart.vue, wwwroot-src/src/components/CsvStripPane.vue, wwwroot-src/src/components/controlTree/toolhouse/HolderSectionPanel.vue and the contour prompt in wwwroot-src/src/composables/useSpindleCapability.ts — the native number fields that take a decimal, each carrying lang="en".
  • wwwroot-src/src/components/AppMenuBar.vue — the language submenu, its hard-coded self-name map, the action it calls and the toasts that report whether the pick was saved and its texts loaded.
  • wwwroot-src/src/components/explorerSort.ts — the only code that compares through the shared collator, reading collator.value at compare time so a switch is picked up.
  • wwwroot-src/src/components/FileExplorer.vue — watches the collator and re-sorts the loaded tree in place on a switch.
  • wwwroot-src/src/components/execution/charts/UplotChart.vue — the toFixed defaults for every axis and series without a caller's formatter, and yMinTickStep, a percent axis' least step.
  • wwwroot-src/src/utils/stripFormat.ts — percentText, the client's one text of a ratio or a percent, and percentAxisText, a percent axis' tick; wwwroot-src/src/utils/unitScale.ts — shownInUnit and storedFromUnit, an input's number in percent and the ratio it is sent as.
  • wwwroot-src/src/utils/searchFold.ts — foldForSearch, the key both sides of a type-to-filter match are folded to.
  • wwwroot-src/src/utils/imeKey.ts — isImeComposing and isCommitEnter, the keydown tests the client's own Enter commits and list-driving key handlers go through (Quasar's prompt dialogs and QSelect's new values keep Quasar's own).
  • wwwroot-src/src/utils/numberText.ts — asciiNumberText, a number field's text in ASCII before Number().
  • wwwroot-src/src/router/index.ts — the key-valued meta.title resolution and the hook the locale switch calls to re-title a parked tab.
  • Environments/PreferenceController.cs — the language endpoints, the supported-code list in menu order and the 400 on an unlisted code.
  • Environments/UserConfig.cs — the persisted language code, its English default and its XML round-trip.
  • Environments/PresentCatalogService.cs — the per-request language resolution chain, the tag normalizer onto its closed set and the shipped catalog overlay.
  • Missions/MissionController.cs — the per-request UI culture taken from the same chain and injected into command title composition.
  • Execution/SessionSinkDtos.cs — SessionSinkDtoMapper.Template, a templated message's arguments as the wire carries them.
  • Common/ApiError.cs — the factories of the most frequent coded error bodies, and the rule for which refusals carry a code.
  • Common/FileRefusals.cs — the File Explorer page's five coded refusals, their paths scrubbed.
  • Common/ReadFailure.cs — the reason a successful reply carries for a read that met an exception, { message, code, args }, and the one reason it codes.

HiAPI Engine

  • HiMech/Geom/UnitUtils/PercentText.cs — PercentText.Of and OfRatio, the server's one text of a percent, which Step Properties, the Breakage Probability tab, a step variable's preview and the colour scale bar print through.

See Also