Make source comments and build tools self-contained
This commit is contained in:
1 parent
4a2f1c120c
commit
5df305e2f9
106 files changed
+152
-183
No files matched your search
@@ -1,8 +1,7 @@
|
||||
import type { TFunction } from 'i18next';
|
||||
|
||||
/**
|
||||
* The player-facing name of a feature tag from a patch definition (a feature inventory row such
|
||||
* as "K-侦察"). Tags without a translation are shown as they are.
|
||||
* Resolves the display name of a patch feature tag. An untranslated tag serves as its own label.
|
||||
*/
|
||||
export function featureName(t: TFunction, tag: string): string {
|
||||
// Tags hold spaces and slashes but never the key separator, so they work as keys as they are.
|
||||
|
||||
@@ -5,7 +5,7 @@ import { missingFeatures } from '../copies/missing-features.ts';
|
||||
|
||||
/**
|
||||
* The bottom bar outside the wizard: install before the first installation, launch after it.
|
||||
* Launching (local verification) is not built yet, so the button stays disabled and the detail says so.
|
||||
* The launch action is disabled until the launcher can start a copy.
|
||||
*/
|
||||
export function homeBar(record: InstallRecord | null, t: TFunction, onInstall: () => void): BarModel {
|
||||
if (!record) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { TFunction } from 'i18next';
|
||||
import type { BackgroundPicture } from '@shared/schemas/background.ts';
|
||||
|
||||
/** "Website · ztz 96b" for a wallpaper, the nation for a picture of the game copy. */
|
||||
/** Uses the website label for wallpapers and the nation name for local game art. */
|
||||
export function backgroundLabel(t: TFunction, picture: BackgroundPicture): string {
|
||||
if (picture.source === 'official') return t('background.officialItem', { name: picture.label });
|
||||
return t(`background.nations.${picture.label}`, { defaultValue: picture.label });
|
||||
|
||||
@@ -53,7 +53,7 @@ export type UnavailablePatch = z.output<typeof UnavailablePatchSchema>;
|
||||
|
||||
/** A feature inventory row the patches cover, with the patches behind it. */
|
||||
export const PatchFeatureSchema = z.object({
|
||||
/** The feature tag, e.g. "K-侦察"; the letter before the dash is the inventory section. */
|
||||
/** Feature tag with a prefix identifying its feature group. */
|
||||
tag: z.string(),
|
||||
/** A copy cannot run, or cannot stay apart from the online game, without it. */
|
||||
essential: z.boolean(),
|
||||
|
||||
Reference in new issue
Block a user