KotobaStrings型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The names of the strings. Each is one line or one block of text.
インポート
import type { KotobaStrings } from "@johnmorrisdotca/kotoba";
定義
type KotobaStrings = {
listEn: string;
listFr: string;
listDe: string;
listJa: string;
letters: string;
kana: string;
loading: string;
ready: string;
readyKana: string;
notWord: string;
tooShort: string;
won: string;
lost: string;
enter: string;
back: string;
small: string;
mark: string;
legendLetters: string;
legendKana: string;
markHit: string;
markNear: string;
markMiss: string;
markKin: string;
arrowSize: string;
arrowTone: string;
empty: string;
row: string;
cliUsage: string;
cliUnknown: string;
cliNeeds: string;
cliTryHelp: string;
cliLangBad: string;
cliNoCommand: string;
cliCommandBad: string;
cliWordsBad: string;
cliSizeBad: string;
cliTierBad: string;
cliDayBad: string;
cliZoneBad: string;
cliNoWord: string;
cliNoMarkWords: string;
cliLengthsDiffer: string;
cliNotLetters: string;
cliNoList: string;
cliCheckHead: string;
cliMayGuess: string;
cliMayHide: string;
cliIsEasy: string;
cliYes: string;
cliNo: string;
cliDaily: string;
cliListsHead: string;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
listEn | string | The lists, by their names for themselves. |
listFr | string | |
listDe | string | |
listJa | string | |
letters | string | |
kana | string | |
loading | string | The game's words. |
ready | string | |
readyKana | string | |
notWord | string | |
tooShort | string | |
won | string | |
lost | string | |
enter | string | |
back | string | |
small | string | |
mark | string | |
legendLetters | string | |
legendKana | string | |
markHit | string | |
markNear | string | |
markMiss | string | |
markKin | string | |
arrowSize | string | |
arrowTone | string | |
empty | string | |
row | string | |
cliUsage | string | The command line's help, whole, and its words. |
cliUnknown | string | |
cliNeeds | string | |
cliTryHelp | string | |
cliLangBad | string | |
cliNoCommand | string | |
cliCommandBad | string | |
cliWordsBad | string | |
cliSizeBad | string | |
cliTierBad | string | |
cliDayBad | string | |
cliZoneBad | string | |
cliNoWord | string | |
cliNoMarkWords | string | |
cliLengthsDiffer | string | |
cliNotLetters | string | |
cliNoList | string | |
cliCheckHead | string | |
cliMayGuess | string | |
cliMayHide | string | |
cliIsEasy | string | |
cliYes | string | |
cliNo | string | |
cliDaily | string | |
cliListsHead | string |
例
import type { KotobaStrings } from "@johnmorrisdotca/kotoba";
import { KOTOBA_STRINGS } from "@johnmorrisdotca/kotoba";
const value: KotobaStrings = KOTOBA_STRINGS.en;
console.log(value);{
listEn: 'English',
listFr: 'Français',
listDe: 'Deutsch',
listJa: 'かな',
letters: '{n} letters',
kana: '{n} kana',
loading: 'Loading the words…',
ready: 'Guess the {n}-letter word. Type, then press Enter.',
readyKana: 'Guess the {n}-kana word. Type it in romaji, then press Enter.',
notWord: 'That is not in the word list.',
tooShort: 'Not enough letters.',
won: 'Found it in {n}! {score} points.',
lost: 'Out of guesses. The word was {word}. {score} points.',
enter: 'Enter',
back: 'Delete',
small: '小',
mark: '゛゜',
legendLetters: 'Green: right place. Orange: in the word, elsewhere. Grey: not in the word.',
legendKana: 'Green: right place (an arrow if its size or mark is wrong). Orange: elsewhere. Yellow: the same row of the kana table. Grey: none of these.',
markHit: 'right place',
markNear: 'elsewhere in the word',
markMiss: 'not in the word',
markKin: 'same row of the kana table',
arrowSize: 'wrong size',
arrowTone: 'wrong mark',
empty: 'empty',
row: 'Guess {n}',
cliUsage: 'Usage: kotoba <command> [options]\n' +
'\n' +
'Word lists and the rules of word games: English, French, German and Japanese kana.\n' +
'\n' +
' kotoba check crane is it a word, and may it be the hidden one?\n' +
' kotoba check さくら the same for a word in kana\n' +
' kotoba list --words fr --size 5 the words of a list, one to a line\n' +
' kotoba list --size 5 --tier easy only the easy answers\n' +
' kotoba mark crane react mark a guess against the hidden word\n' +
' kotoba daily --words en --size 5 the word of the day, the same for everybody\n' +
' kotoba lists every list, and how many words it holds\n' +
'\n' +
'Options:\n' +
' --words <en|fr|de|ja> the list: English, French, German or Japanese kana (en unless said)\n' +
' --size <n> letters or kana in a word: 4 to 6, or 3 to 5 for ja (5, or 4 for ja, unless said)\n' +
' --tier <easy|answers|allowed>\n' +
' list, daily: which words: the easy answers, every answer, or every word\n' +
' that may be guessed (answers unless said; daily takes easy or answers)\n' +
' --date <YYYY-MM-DD> daily: the day (today, in UTC, unless said)\n' +
" --zone <zone> daily: today by an IANA time zone's midnight\n" +
' -j, --json print JSON (format 1)\n' +
" --lang <en|ja> English or Japanese (default: your system's)\n" +
' -h, --help this help\n' +
' -v, --version the version\n' +
'\n' +
'check reads the list from the word itself (kana make it ja) and the size from its length.\n' +
'Exit codes: 0 done, 1 what was asked for is not so or could not be done (a word that is not in\n' +
'the list), 2 the command was wrong.\n',
cliUnknown: 'unknown option {part}',
cliNeeds: '{part} needs a value',
cliTryHelp: 'Try `kotoba --help`.',
cliLangBad: '--lang takes en or ja',
cliNoCommand: 'say what to do: check, list, mark, daily or lists',
cliCommandBad: '“{part}” is not a command: check, list, mark, daily or lists',
cliWordsBad: '--words takes en, fr, de or ja',
cliSizeBad: '--size takes a whole number: {sizes}',
cliTierBad: '--tier takes {tiers}',
cliDayBad: '--date takes a day written YYYY-MM-DD',
cliZoneBad: '“{part}” is not a time zone this system knows',
cliNoWord: 'give the word to check',
cliNoMarkWords: 'give the guess and then the hidden word',
cliLengthsDiffer: 'the guess has {guess} letters and the hidden word {hidden}',
cliNotLetters: "“{part}” is not made of letters of one language's alphabet",
cliNoList: 'there is no list of {size} in {words}: {sizes}',
cliCheckHead: '{word} {words}, {size}',
cliMayGuess: 'may be guessed',
cliMayHide: 'may be the hidden word',
cliIsEasy: 'an easy word',
cliYes: 'yes',
cliNo: 'no',
cliDaily: '{day} {word}',
cliListsHead: 'List,Size,Easy,Answers,Allowed'
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。