Skip to the content

Gunjin軍人

Play five hidden-rank games, keep setups private, share redacted views and replay, and pass one device between players.

Gunjin is the Japanese word 軍人 for a soldier. About the name

Contents

Reference · Views, replay and player

roleNamefunction

Returns a localized piece label, with a readable fallback for unknown roles.

Import it

import { roleName } from "@johnmorrisdotca/gunjin";

Definition

function roleName(language: Language, role: string): string

Parameters

NameTypeDescription
languageLanguage

The native English or Japanese display language.

rolestring

The native role identifier to label.

Returns

string

Returns a localized piece label, with a readable fallback for unknown roles.

Examples

import { roleName } from "@johnmorrisdotca/gunjin";

console.log(roleName("ja","leader"));
指揮官

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/gunjin 0.2.1.