rpg-engine 0.9.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/README.md +1 -1
  2. package/dist/adventures/placement.js +4 -0
  3. package/dist/adventures/source.js +6 -5
  4. package/dist/campaign/find-campaign.js +18 -0
  5. package/dist/campaign/host-files.js +8 -6
  6. package/dist/campaign/index.d.ts +1 -1
  7. package/dist/campaign/index.js +1 -1
  8. package/dist/campaign/settings.d.ts +2 -0
  9. package/dist/campaign/settings.js +12 -5
  10. package/dist/commands/advance.js +1 -1
  11. package/dist/commands/ask.js +1 -1
  12. package/dist/commands/config.js +21 -32
  13. package/dist/commands/import/import.js +1 -1
  14. package/dist/commands/instructions.js +1 -1
  15. package/dist/commands/mode.js +1 -1
  16. package/dist/commands/mood.js +2 -3
  17. package/dist/commands/move.js +1 -1
  18. package/dist/commands/package.d.ts +3 -3
  19. package/dist/commands/package.js +74 -37
  20. package/dist/commands/reveal.js +1 -1
  21. package/dist/commands/roll/roll.js +6 -12
  22. package/dist/commands/rules.js +0 -1
  23. package/dist/commands/scene.js +6 -8
  24. package/dist/commands/shared/adventures.js +21 -12
  25. package/dist/commands/shared/images.js +3 -1
  26. package/dist/commands/shared/knowledge.d.ts +8 -0
  27. package/dist/commands/shared/knowledge.js +41 -18
  28. package/dist/commands/shared/library.js +13 -5
  29. package/dist/commands/shared/mode.d.ts +7 -4
  30. package/dist/commands/shared/mode.js +28 -15
  31. package/dist/commands/shared/packages/catalog.d.ts +2 -0
  32. package/dist/commands/shared/packages/catalog.js +1 -0
  33. package/dist/commands/shared/packages/code.js +13 -2
  34. package/dist/commands/shared/page-words.d.ts +2 -0
  35. package/dist/commands/shared/page-words.js +13 -0
  36. package/dist/commands/shared/sheet.d.ts +3 -2
  37. package/dist/commands/shared/sheet.js +8 -5
  38. package/dist/commands/show.js +1 -1
  39. package/dist/commands/status.js +9 -5
  40. package/dist/commands/view/place.d.ts +2 -0
  41. package/dist/commands/view/place.js +17 -5
  42. package/dist/commands/write/write.js +4 -3
  43. package/dist/core/archive-paths.js +1 -1
  44. package/dist/core/context.d.ts +2 -0
  45. package/dist/core/package-api.d.ts +1 -1
  46. package/dist/core/package-declarations.d.ts +3 -3
  47. package/dist/core/package-declarations.js +3 -3
  48. package/dist/core/refusal.d.ts +12 -0
  49. package/dist/core/refusal.js +17 -0
  50. package/dist/core/store.d.ts +4 -0
  51. package/dist/core/store.js +20 -1
  52. package/dist/dashboard/api.js +37 -81
  53. package/dist/dashboard/app.js +10 -3
  54. package/dist/dashboard/asked.js +6 -3
  55. package/dist/dashboard/assets/master.svg +1 -2
  56. package/dist/dashboard/card.js +1 -1
  57. package/dist/dashboard/dice/load.js +6 -1
  58. package/dist/dashboard/dice/throw.js +5 -1
  59. package/dist/dashboard/dice/tray.js +5 -1
  60. package/dist/dashboard/footer.js +2 -2
  61. package/dist/dashboard/game-words.js +32 -32
  62. package/dist/dashboard/guide/ar.md +17 -17
  63. package/dist/dashboard/guide/cs.md +17 -17
  64. package/dist/dashboard/guide/da.md +16 -16
  65. package/dist/dashboard/guide/de.md +15 -15
  66. package/dist/dashboard/guide/el.md +19 -19
  67. package/dist/dashboard/guide/en.md +4 -4
  68. package/dist/dashboard/guide/es.md +17 -17
  69. package/dist/dashboard/guide/fi.md +19 -19
  70. package/dist/dashboard/guide/fr.md +16 -16
  71. package/dist/dashboard/guide/he.md +16 -16
  72. package/dist/dashboard/guide/hi.md +20 -20
  73. package/dist/dashboard/guide/hu.md +18 -18
  74. package/dist/dashboard/guide/is.md +16 -16
  75. package/dist/dashboard/guide/it.md +7 -7
  76. package/dist/dashboard/guide/ja.md +17 -17
  77. package/dist/dashboard/guide/ko.md +22 -22
  78. package/dist/dashboard/guide/nb.md +17 -17
  79. package/dist/dashboard/guide/nl.md +19 -19
  80. package/dist/dashboard/guide/pl.md +18 -18
  81. package/dist/dashboard/guide/pt.md +13 -13
  82. package/dist/dashboard/guide/ro.md +19 -19
  83. package/dist/dashboard/guide/ru.md +17 -17
  84. package/dist/dashboard/guide/sv.md +16 -16
  85. package/dist/dashboard/guide/tr.md +21 -21
  86. package/dist/dashboard/guide/uk.md +16 -16
  87. package/dist/dashboard/guide/zh.md +20 -20
  88. package/dist/dashboard/help/blocks.js +6 -0
  89. package/dist/dashboard/help/help.js +15 -3
  90. package/dist/dashboard/help/markdown.js +2 -1
  91. package/dist/dashboard/i18n/ar.json +54 -1
  92. package/dist/dashboard/i18n/cs.json +54 -1
  93. package/dist/dashboard/i18n/da.json +54 -1
  94. package/dist/dashboard/i18n/de.json +54 -1
  95. package/dist/dashboard/i18n/el.json +54 -1
  96. package/dist/dashboard/i18n/es.json +54 -1
  97. package/dist/dashboard/i18n/fi.json +54 -1
  98. package/dist/dashboard/i18n/fr.json +54 -1
  99. package/dist/dashboard/i18n/he.json +54 -1
  100. package/dist/dashboard/i18n/hi.json +54 -1
  101. package/dist/dashboard/i18n/hu.json +54 -1
  102. package/dist/dashboard/i18n/is.json +54 -1
  103. package/dist/dashboard/i18n/it.json +57 -4
  104. package/dist/dashboard/i18n/ja.json +54 -1
  105. package/dist/dashboard/i18n/ko.json +54 -1
  106. package/dist/dashboard/i18n/nb.json +54 -1
  107. package/dist/dashboard/i18n/nl.json +54 -1
  108. package/dist/dashboard/i18n/pl.json +54 -1
  109. package/dist/dashboard/i18n/pt.json +54 -1
  110. package/dist/dashboard/i18n/ro.json +54 -1
  111. package/dist/dashboard/i18n/ru.json +54 -1
  112. package/dist/dashboard/i18n/sv.json +54 -1
  113. package/dist/dashboard/i18n/tr.json +54 -1
  114. package/dist/dashboard/i18n/uk.json +54 -1
  115. package/dist/dashboard/i18n/zh.json +54 -1
  116. package/dist/dashboard/icons.js +2 -2
  117. package/dist/dashboard/journal.js +9 -4
  118. package/dist/dashboard/labels.js +5 -4
  119. package/dist/dashboard/language-choice.js +3 -3
  120. package/dist/dashboard/markdown.js +11 -4
  121. package/dist/dashboard/notes.js +4 -2
  122. package/dist/dashboard/notices.js +2 -2
  123. package/dist/dashboard/packages/ask-card.js +1 -1
  124. package/dist/dashboard/packages/packages.js +14 -10
  125. package/dist/dashboard/packages/page-code.js +11 -3
  126. package/dist/dashboard/packages/widgets.js +5 -5
  127. package/dist/dashboard/pages.js +3 -3
  128. package/dist/dashboard/place/map-sheet.js +4 -3
  129. package/dist/dashboard/place/map-view.js +17 -5
  130. package/dist/dashboard/refusals.js +61 -0
  131. package/dist/dashboard/rolls.js +3 -3
  132. package/dist/dashboard/settings.js +19 -5
  133. package/dist/dashboard/sheet.js +26 -7
  134. package/dist/dashboard/status.js +19 -13
  135. package/dist/dashboard/style.css +113 -16
  136. package/dist/dashboard/text.js +6 -2
  137. package/dist/dashboard/top.js +7 -9
  138. package/dist/dashboard/turns.js +7 -2
  139. package/dist/dashboard/world/lore.js +16 -15
  140. package/dist/dashboard/world/map.js +43 -1
  141. package/dist/dashboard/world/world.js +50 -15
  142. package/dist/dice/index.d.ts +1 -1
  143. package/dist/dice/oracle.d.ts +5 -3
  144. package/dist/dice/oracle.js +7 -6
  145. package/dist/extensions/extension.js +4 -1
  146. package/dist/helpers/codex.js +1 -1
  147. package/dist/packages/npm.js +17 -4
  148. package/dist/packages/tarball.js +8 -4
  149. package/dist/pages/index.d.ts +1 -1
  150. package/dist/pages/index.js +1 -1
  151. package/dist/pages/markdown.d.ts +2 -0
  152. package/dist/pages/markdown.js +21 -0
  153. package/dist/pages/world.js +4 -0
  154. package/dist/server/dashboard/index.js +8 -4
  155. package/dist/server/dashboard/writes.js +22 -13
  156. package/dist/server/mcp.d.ts +3 -1
  157. package/dist/server/mcp.js +20 -5
  158. package/dist/systems/game-system.d.ts +2 -0
  159. package/dist/systems/game-system.js +2 -0
  160. package/dist/systems/system-code.js +5 -0
  161. package/instructions/adventure.md +1 -1
  162. package/instructions/combat.md +1 -1
  163. package/instructions/core.md +2 -2
  164. package/instructions/import.md +1 -0
  165. package/instructions/session-zero.md +1 -1
  166. package/instructions/session.md +1 -1
  167. package/instructions/setup.md +1 -1
  168. package/package.json +2 -2
  169. package/systems/free/instructions/outcomes-rolled.md +1 -1
  170. package/systems/free/instructions/outcomes-tossed.md +1 -1
  171. package/systems/free/instructions/play.md +1 -2
@@ -23,6 +23,7 @@
23
23
  "{date}, {season}": "{date}, {season}",
24
24
  "{day} {month}": "{day} {month}",
25
25
  "{day} {month} {year}": "{day} {month} {year}",
26
+ "{day}, {time}": "{day}, {time}",
26
27
  "{days}d": "{days} д",
27
28
  "{dice}, free roll, not logged": "{dice}, вільний кидок, не записується",
28
29
  "{distance} {direction}": "{distance}, {direction}",
@@ -33,11 +34,40 @@
33
34
  "{length} across": "{length} упоперек",
34
35
  "{minutes}m": "{minutes} хв",
35
36
  "{month} {year}": "{month} {year}",
37
+ "{name} {version} needs a newer RPG Engine: update it in Installed.": "{name} {version} потребує новішої версії RPG Engine: онови її в розділі «Установлені».",
38
+ "{name} {version} was made for an older RPG Engine: look for a newer version of it.": "{name} {version} створено для старішої версії RPG Engine: пошукай новішу версію.",
39
+ "{name} cannot be used, and version {version} stays: {why}": "{name} не можна використовувати, тож лишається версія {version}: {why}",
40
+ "{name} cannot be used, and was taken off this computer: {why}": "{name} не можна використовувати, і його видалено з цього комп’ютера: {why}",
41
+ "{name} does not read: it is not a package's .zip or .tgz.": "{name} не читається: це не .zip і не .tgz пакета.",
36
42
  "{name} found out": "{name} дізнається",
43
+ "{name} has pages with names this campaign already uses: {names}": "У {name} є сторінки з назвами, які ця кампанія вже використовує: {names}",
44
+ "{name} has the name of the game system this campaign plays: it does not use it.": "{name} має назву ігрової системи цієї кампанії: вона його не використовує.",
45
+ "{name} holds {entry}, which is not a plain file: it is refused whole.": "{name} містить {entry}, що не є звичайним файлом: пакет відхилено повністю.",
46
+ "{name} holds {file}, which an adventure may not hold: it is refused whole.": "{name} містить {file}, чого не може містити пригода: її відхилено повністю.",
47
+ "{name} holds more than {count} documents: give the folder with this game's books.": "У {name} понад {count} документів: вкажи папку з книгами саме цієї гри.",
48
+ "{name} is a document, not a package: ask the master to import it.": "{name} — документ, а не пакет: попроси майстра імпортувати його.",
49
+ "{name} is a kind of package that is not added this way.": "{name} — це тип пакета, який так не додається.",
50
+ "{name} is for {system}, and this campaign has no game system yet.": "{name} призначено для {system}, а в цієї кампанії ще немає ігрової системи.",
51
+ "{name} is for {system}, and this campaign plays {plays}: it does not use it.": "{name} призначено для {system}, а ця кампанія грає в {plays}: вона його не використовує.",
52
+ "{name} is inside a campaign: your books stay outside every campaign.": "{name} лежить усередині кампанії: твої книги мають бути поза будь-якою кампанією.",
53
+ "{name} is neither a .zip nor a .tgz.": "{name} — не .zip і не .tgz.",
54
+ "{name} is no book RPG Engine reads: give a {kinds} file, or a folder of them.": "{name} — не книга, яку читає RPG Engine: вкажи файл {kinds} або папку з такими файлами.",
55
+ "{name} is no full path: write it from its drive or its root.": "{name} — не повний шлях: запиши його від диска або від кореня.",
56
+ "{name} is not a package for RPG Engine.": "{name} — не пакет для RPG Engine.",
57
+ "{name} is not an adventure: it has no adventure.yaml at its top. A document is imported by the master.": "{name} — не пригода: угорі немає adventure.yaml. Документ імпортує майстер.",
58
+ "{name} is not on this computer.": "{name} немає на цьому комп’ютері.",
59
+ "{name} is not the name of an npm package.": "{name} — не назва пакета npm.",
37
60
  "{name} is off this computer.": "{name} видалено з цього комп'ютера.",
38
61
  "{name} is out of the campaign: it stays on this computer.": "{name} прибрано з кампанії: він залишається на цьому комп'ютері.",
39
62
  "{name} is out of the campaign.": "{name} більше не в кампанії.",
63
+ "{name} is part of the story now: it stays.": "{name} тепер частина історії: воно лишається.",
40
64
  "{name} is updated.": "{name} оновлено.",
65
+ "{name} names files with accents in another encoding: make the zip again with 7-Zip.": "У {name} назви файлів з діакритиками в іншому кодуванні: створи zip знову через 7-Zip.",
66
+ "{name} needs {needs} {version} or later, and this campaign has {has}: update it first.": "{name} потребує {needs} {version} або новішої, а в цій кампанії є {has}: спершу онови.",
67
+ "{name} needs the extension {needs}: add it first.": "{name} потребує розширення {needs}: спершу додай його.",
68
+ "{name} says it is a language, but brings code: a language is texts only.": "{name} називається мовою, але містить код: мова — це лише тексти.",
69
+ "{name} unpacks to more than {size} MB, more than a package may.": "Після розпакування {name} займає понад {size} МБ — більше, ніж дозволено пакету.",
70
+ "{name} was installed, but it does not read as a game system: uninstall it.": "{name} було установлено, але його не розпізнано як ігрову систему: видали його.",
41
71
  "{name}, as drawn": "{name} на малюнку",
42
72
  "{name}: in use": "{name}: використовується",
43
73
  "{name}'s sheet": "аркуш персонажа {name}",
@@ -105,6 +135,7 @@
105
135
  "Add, e.g. torture": "Додай, наприклад, катування",
106
136
  "Add…": "Додати…",
107
137
  "Added once to this computer.": "Додаються на цей комп’ютер один раз.",
138
+ "Adding {name} stopped halfway: add it again first.": "Додавання {name} зупинилося на півдорозі: спершу додай його знову.",
108
139
  "Adding…": "Додаю…",
109
140
  "Adventure": "Пригода",
110
141
  "Adventures": "Пригоди",
@@ -329,6 +360,7 @@
329
360
  "Fold the question": "Згорнути запитання",
330
361
  "Follow {quest}": "Стежити за {quest}",
331
362
  "For {name}": "Для: {name}",
363
+ "for {system}: this campaign plays {campaign}": "для {system}: ця кампанія грає в {campaign}",
332
364
  "for a new campaign: this one stays in {system}": "для нової кампанії: ця залишається на {system}",
333
365
  "Ford": "Брід",
334
366
  "Forest": "Ліс",
@@ -583,8 +615,14 @@
583
615
  "Notice": "Оголошення",
584
616
  "Now": "Зараз",
585
617
  "Now acting": "Зараз діє",
618
+ "npm cannot be reached: update RPG Engine once this computer is online.": "npm недоступний: онови RPG Engine, коли комп’ютер буде в мережі.",
619
+ "npm could not install {name}: {why}": "npm не зміг установити {name}: {why}",
620
+ "npm could not take {name} off this computer: {why}": "npm не зміг видалити {name} з цього комп’ютера: {why}",
621
+ "npm could not update RPG Engine: {why}": "npm не зміг оновити RPG Engine: {why}",
622
+ "npm did not answer about {name}: {why}": "npm не відповів щодо {name}: {why}",
586
623
  "npm does not answer: a newer version cannot be checked now.": "npm не відповідає: зараз не можна перевірити, чи є новіша версія.",
587
624
  "npm does not answer.": "npm не відповідає.",
625
+ "npm has no package {name}: check its name.": "У npm немає пакета {name}: перевір назву.",
588
626
  "Obsidian": "Обсидіан",
589
627
  "Of the {die}, which count": "Які з {die} враховуються",
590
628
  "Off": "Вимкнено",
@@ -697,7 +735,10 @@
697
735
  "Round": "Раунд",
698
736
  "Round {round}": "Раунд {round}",
699
737
  "Rounded": "Округлені",
738
+ "RPG Engine {version} is installed already: it comes with a new chat.": "RPG Engine {version} уже установлено: він запуститься з новим чатом.",
700
739
  "RPG Engine {version} is installed.": "RPG Engine {version} встановлено.",
740
+ "RPG Engine {version} is the latest: there is nothing to update.": "RPG Engine {version} — остання версія: оновлювати нічого.",
741
+ "RPG Engine cannot use {name}, and took it off this computer again.": "RPG Engine не може використовувати {name} і знову видалив його з цього комп’ютера.",
701
742
  "RPG Engine was not updated.": "RPG Engine не оновлено.",
702
743
  "Ruby": "Рубін",
703
744
  "Ruin": "Руїни",
@@ -815,6 +856,7 @@
815
856
  "The author you wrote takes its place: this counts again once you clear the author.": "Замість нього діє вказаний тобою автор; цей варіант знову запрацює, щойно приберти автора.",
816
857
  "The campaign has {count} problems in its files: the master sees them and fixes them.": "У файлах кампанії проблем: {count}. Майстер бачить їх та виправляє.",
817
858
  "The campaign has a problem in its files: the master sees it and fixes it.": "У файлах кампанії є проблема: майстер бачить її та виправляє.",
859
+ "The campaign has been played and has no save of its start: keep it as a save of the whole game instead.": "У кампанію вже грали, і збереження її початку немає: краще зберегти її як збереження всієї гри.",
818
860
  "The campaign starts over, your character to make again.": "Кампанія починається знову, персонажа треба створити наново.",
819
861
  "The campaign starts over.": "Кампанія починається знову.",
820
862
  "The campaign's name": "Назва кампанії",
@@ -822,6 +864,7 @@
822
864
  "The catalog's adventures come from GitHub: a .zip or a link can be added all the same.": "Пригоди з каталогу беруться з GitHub, але .zip чи посилання все одно можна додати.",
823
865
  "The change did not reach the game: try again.": "Зміна не дійшла до гри: спробуй ще раз.",
824
866
  "The checks the master asks of you come here, and the master's rolls you may see.": "Тут з'являються перевірки, яких просить майстер, і кидки майстра, які ти можеш бачити.",
867
+ "The code of {name} does not work: {why}": "Код {name} не працює: {why}",
825
868
  "the colours, faces and pictures of {name}, from the game system": "кольори, шрифти й зображення {name} з ігрової системи",
826
869
  "the colours, faces and pictures of the game system": "кольори, шрифти й зображення ігрової системи",
827
870
  "the column": "колонка",
@@ -832,6 +875,8 @@
832
875
  "the dice decide": "вирішують кубики",
833
876
  "the engine rolls them": "кидає рушій",
834
877
  "The extension is in the campaign: it counts from now on.": "Розширення в кампанії: воно діє відтепер.",
878
+ "The file is more than {size} MB: no package is that big.": "Файл завеликий, понад {size} МБ: пакетів такого розміру не буває.",
879
+ "The folder {name} has characters npm cannot take: move it to another path.": "У назві папки {name} є символи, які npm не приймає: перемісти її в інше місце.",
835
880
  "The folder is on this computer and in this campaign: its books are read now, then the master searches them.": "Папка є на цьому комп’ютері й у цій кампанії: її книги зчитуються зараз, а потім майстер шукає в них.",
836
881
  "The game": "Гра",
837
882
  "The game follows these rules from the master's next move: the sheets are worked out with them, and the master reads them.": "З наступного ходу майстра гра йде за цими правилами: аркуші персонажів перераховуються за ними, і майстер їх читає.",
@@ -881,7 +926,6 @@
881
926
  "The note was not saved: the game is not connected.": "Нотатку не збережено: гру не підключено.",
882
927
  "The note was not saved: try again.": "Нотатку не збережено: спробуй ще раз.",
883
928
  "The note's title": "Заголовок нотатки",
884
- "The notes did not come ({status}): reload the page.": "Нотатки не надійшли ({status}): перезавантаж сторінку.",
885
929
  "The order of the turns": "Порядок ходів",
886
930
  "The page stays in English: Codex or Claude Code would translate it into {language} on this computer.": "Сторінка залишається англійською: Codex або Claude Code могли б перекласти її мовою «{language}» на цьому комп'ютері.",
887
931
  "The page's": "Сторінки",
@@ -902,6 +946,7 @@
902
946
  "The story starts on day {day}": "Історія починається в день {day}",
903
947
  "The story starts on day {day}, {time}": "Історія починається в день {day}, {time}",
904
948
  "The story starts with the first scene.": "Історія починається з першої сцени.",
949
+ "The text above lies behind the master's screen, forbidden to the players' eyes.": "Текст вище лежить за ширмою майстра, заборонений для очей гравців.",
905
950
  "The title of the note {title}": "Заголовок нотатки {title}",
906
951
  "the top bar": "верхня панель",
907
952
  "the units of the story": "одиниці виміру в історії",
@@ -909,8 +954,14 @@
909
954
  "The whole sheet": "Увесь аркуш персонажа",
910
955
  "The world as it was at the start, without the player characters: a .zip to give to others.": "Світ таким, яким він був на початку, без персонажів гравців: .zip, який можна передати іншим.",
911
956
  "Theme": "Тема",
957
+ "There is already a game system called {system} on this computer: {name} would take its name.": "На цьому комп’ютері вже є ігрова система {system}: {name} зайняв би її назву.",
958
+ "There is no {name} on this computer: give its full path.": "На цьому комп’ютері немає {name}: вкажи повний шлях.",
912
959
  "There is no player character yet: the map starts with one.": "Персонажа ще немає: мапа починається з нього.",
913
960
  "There is no player character yet: the sheet comes when the master writes one.": "Персонажа ще немає: аркуш персонажа з'явиться, коли майстер його напише.",
961
+ "This campaign does not use {name}.": "Ця кампанія не використовує {name}.",
962
+ "This campaign has {name} {version}, already in play: an adventure in play is not updated.": "У цій кампанії є {name} {version}, яка вже в грі: пригода в грі не оновлюється.",
963
+ "This campaign plays {name}: it stays on this computer.": "Ця кампанія грає в {name}: воно лишається на цьому комп’ютері.",
964
+ "This campaign uses {other}, with the same name as {name}: take it out first.": "Ця кампанія використовує {other} з такою самою назвою, як у {name}: спершу прибери його.",
914
965
  "This campaign, as an adventure": "Ця кампанія як пригода",
915
966
  "This chat does not hear it by itself: copy it, then paste it in the chat.": "Чат сам цього не почує: скопіюй і встав у чат.",
916
967
  "this computer does not let it be read: check who may open it.": "цей комп'ютер не дозволяє його прочитати: перевір, хто має право його відкривати.",
@@ -919,6 +970,8 @@
919
970
  "This page": "Ця сторінка",
920
971
  "This page could not be read now: try again in a moment.": "Цю сторінку зараз не вдалося прочитати: спробуй ще раз за хвилину.",
921
972
  "this roll: {count}": "у цьому кидку: {count}",
973
+ "This RPG Engine is a development link to {name}: update it there.": "Цей RPG Engine — посилання для розробки на {name}: оновлюй його там.",
974
+ "This RPG Engine runs from {name}: update it the way it was installed.": "Цей RPG Engine працює з {name}: онови його тим способом, яким його установлено.",
922
975
  "This turn": "Цей хід",
923
976
  "those you ask for": "ті, які попросиш",
924
977
  "Time is up": "Час вичерпано",
@@ -23,6 +23,7 @@
23
23
  "{date}, {season}": "{date},{season}",
24
24
  "{day} {month}": "{month}{day}日",
25
25
  "{day} {month} {year}": "{year}年{month}{day}日",
26
+ "{day}, {time}": "{day} {time}",
26
27
  "{days}d": "{days}天",
27
28
  "{dice}, free roll, not logged": "{dice},自由掷骰,不记录",
28
29
  "{distance} {direction}": "{direction}{distance}",
@@ -33,11 +34,40 @@
33
34
  "{length} across": "宽 {length}",
34
35
  "{minutes}m": "{minutes}分钟",
35
36
  "{month} {year}": "{year}年{month}",
37
+ "{name} {version} needs a newer RPG Engine: update it in Installed.": "{name} {version} 需要更新版本的 RPG Engine,请在“已安装”中更新。",
38
+ "{name} {version} was made for an older RPG Engine: look for a newer version of it.": "{name} {version} 是为旧版 RPG Engine 制作的,请找一个更新的版本。",
39
+ "{name} cannot be used, and version {version} stays: {why}": "{name} 无法使用,将保留 {version} 版:{why}",
40
+ "{name} cannot be used, and was taken off this computer: {why}": "{name} 无法使用,已从这台电脑上移除:{why}",
41
+ "{name} does not read: it is not a package's .zip or .tgz.": "无法读取 {name},它不是包的 .zip 或 .tgz 文件。",
36
42
  "{name} found out": "{name}发现了",
43
+ "{name} has pages with names this campaign already uses: {names}": "{name} 中有页面的名称已被这个战役使用:{names}",
44
+ "{name} has the name of the game system this campaign plays: it does not use it.": "{name} 与这个战役所玩的游戏系统同名,不会用到它。",
45
+ "{name} holds {entry}, which is not a plain file: it is refused whole.": "{name} 中含有 {entry},它不是普通文件,整个包都会被拒绝。",
46
+ "{name} holds {file}, which an adventure may not hold: it is refused whole.": "{name} 中含有 {file},冒险不能包含它,整个冒险都会被拒绝。",
47
+ "{name} holds more than {count} documents: give the folder with this game's books.": "{name} 中的文档超过 {count} 个,请提供存放这个游戏书籍的文件夹。",
48
+ "{name} is a document, not a package: ask the master to import it.": "{name} 是文档,不是包,请让主持人导入。",
49
+ "{name} is a kind of package that is not added this way.": "{name} 这类包不能这样添加。",
50
+ "{name} is for {system}, and this campaign has no game system yet.": "{name} 适用于 {system},而这个战役还没有游戏系统。",
51
+ "{name} is for {system}, and this campaign plays {plays}: it does not use it.": "{name} 适用于 {system},而这个战役玩的是 {plays},不会用到它。",
52
+ "{name} is inside a campaign: your books stay outside every campaign.": "{name} 位于某个战役内,你的书籍应放在所有战役之外。",
53
+ "{name} is neither a .zip nor a .tgz.": "{name} 既不是 .zip 也不是 .tgz 文件。",
54
+ "{name} is no book RPG Engine reads: give a {kinds} file, or a folder of them.": "RPG Engine 无法读取 {name},请提供 {kinds} 文件,或包含这些文件的文件夹。",
55
+ "{name} is no full path: write it from its drive or its root.": "{name} 不是完整路径,请从盘符或根目录开始写。",
56
+ "{name} is not a package for RPG Engine.": "{name} 不是 RPG Engine 的包。",
57
+ "{name} is not an adventure: it has no adventure.yaml at its top. A document is imported by the master.": "{name} 不是冒险:顶层没有 adventure.yaml。文档需要由主持人导入。",
58
+ "{name} is not on this computer.": "这台电脑上没有 {name}。",
59
+ "{name} is not the name of an npm package.": "{name} 不是有效的 npm 包名。",
37
60
  "{name} is off this computer.": "{name} 已从本机卸载。",
38
61
  "{name} is out of the campaign: it stays on this computer.": "{name} 已从战役中移除,仍保留在本机。",
39
62
  "{name} is out of the campaign.": "{name}已移出战役。",
63
+ "{name} is part of the story now: it stays.": "{name} 已成为故事的一部分,会保留。",
40
64
  "{name} is updated.": "{name} 已更新。",
65
+ "{name} names files with accents in another encoding: make the zip again with 7-Zip.": "{name} 中带重音符号的文件名使用了其他编码,请用 7-Zip 重新制作 zip。",
66
+ "{name} needs {needs} {version} or later, and this campaign has {has}: update it first.": "{name} 需要 {needs} {version} 或更高版本,而这个战役使用的是 {has},请先更新。",
67
+ "{name} needs the extension {needs}: add it first.": "{name} 需要扩展 {needs},请先添加。",
68
+ "{name} says it is a language, but brings code: a language is texts only.": "{name} 自称是语言包,却带有代码,而语言包只能包含文本。",
69
+ "{name} unpacks to more than {size} MB, more than a package may.": "{name} 解压后超过 {size} MB,超出了包的大小上限。",
70
+ "{name} was installed, but it does not read as a game system: uninstall it.": "{name} 已安装,但无法识别为游戏系统,请卸载它。",
41
71
  "{name}, as drawn": "{name}的画像",
42
72
  "{name}: in use": "{name}:使用中",
43
73
  "{name}'s sheet": "{name}的角色卡",
@@ -105,6 +135,7 @@
105
135
  "Add, e.g. torture": "添加,例如酷刑",
106
136
  "Add…": "添加…",
107
137
  "Added once to this computer.": "在这台电脑上只需添加一次。",
138
+ "Adding {name} stopped halfway: add it again first.": "添加 {name} 时中途停止了,请先重新添加。",
108
139
  "Adding…": "正在添加…",
109
140
  "Adventure": "冒险",
110
141
  "Adventures": "冒险",
@@ -329,6 +360,7 @@
329
360
  "Fold the question": "收起问题",
330
361
  "Follow {quest}": "追踪{quest}",
331
362
  "For {name}": "给{name}",
363
+ "for {system}: this campaign plays {campaign}": "适用于 {system}:本战役使用 {campaign}",
332
364
  "for a new campaign: this one stays in {system}": "用于新战役:当前战役仍使用 {system}",
333
365
  "Ford": "浅滩",
334
366
  "Forest": "森林",
@@ -583,8 +615,14 @@
583
615
  "Notice": "告示",
584
616
  "Now": "现在",
585
617
  "Now acting": "当前行动",
618
+ "npm cannot be reached: update RPG Engine once this computer is online.": "无法连接 npm,请在这台电脑联网后再更新 RPG Engine。",
619
+ "npm could not install {name}: {why}": "npm 无法安装 {name}:{why}",
620
+ "npm could not take {name} off this computer: {why}": "npm 无法从这台电脑上移除 {name}:{why}",
621
+ "npm could not update RPG Engine: {why}": "npm 无法更新 RPG Engine:{why}",
622
+ "npm did not answer about {name}: {why}": "npm 没有返回 {name} 的信息:{why}",
586
623
  "npm does not answer: a newer version cannot be checked now.": "npm 没有响应:现在无法检查是否有更新的版本。",
587
624
  "npm does not answer.": "npm 没有响应。",
625
+ "npm has no package {name}: check its name.": "npm 上没有名为 {name} 的包,请检查名称。",
588
626
  "Obsidian": "黑曜石",
589
627
  "Of the {die}, which count": "{die}中,哪些计入",
590
628
  "Off": "关闭",
@@ -697,7 +735,10 @@
697
735
  "Round": "轮",
698
736
  "Round {round}": "第{round}轮",
699
737
  "Rounded": "圆润",
738
+ "RPG Engine {version} is installed already: it comes with a new chat.": "RPG Engine {version} 已安装,新开聊天后生效。",
700
739
  "RPG Engine {version} is installed.": "RPG Engine {version} 已安装。",
740
+ "RPG Engine {version} is the latest: there is nothing to update.": "RPG Engine {version} 已是最新版本,无需更新。",
741
+ "RPG Engine cannot use {name}, and took it off this computer again.": "RPG Engine 无法使用 {name},已将它从这台电脑上移除。",
701
742
  "RPG Engine was not updated.": "RPG Engine 未更新。",
702
743
  "Ruby": "红宝石",
703
744
  "Ruin": "废墟",
@@ -815,6 +856,7 @@
815
856
  "The author you wrote takes its place: this counts again once you clear the author.": "已填写的作者优先生效;清除作者后,此项重新生效。",
816
857
  "The campaign has {count} problems in its files: the master sees them and fixes them.": "战役文件出了 {count} 个问题:主持人会发现并修复。",
817
858
  "The campaign has a problem in its files: the master sees it and fixes it.": "战役文件出了一个问题:主持人会发现并修复。",
859
+ "The campaign has been played and has no save of its start: keep it as a save of the whole game instead.": "这个战役已经玩过,且没有开头的存档,请改为保留成整局游戏的存档。",
818
860
  "The campaign starts over, your character to make again.": "战役重新开始,角色需要重新创建。",
819
861
  "The campaign starts over.": "战役重新开始。",
820
862
  "The campaign's name": "战役名称",
@@ -822,6 +864,7 @@
822
864
  "The catalog's adventures come from GitHub: a .zip or a link can be added all the same.": "目录中的冒险来自 GitHub;也可以通过 .zip 文件或链接添加。",
823
865
  "The change did not reach the game: try again.": "更改没有发送到游戏:请重试。",
824
866
  "The checks the master asks of you come here, and the master's rolls you may see.": "主持人要你做的检定会出现在这里,你能看到的主持人掷骰也在这里。",
867
+ "The code of {name} does not work: {why}": "{name} 的代码无法运行:{why}",
825
868
  "the colours, faces and pictures of {name}, from the game system": "{name}的颜色、字体和图片,来自游戏系统",
826
869
  "the colours, faces and pictures of the game system": "游戏系统的颜色、字体和图片",
827
870
  "the column": "侧栏",
@@ -832,6 +875,8 @@
832
875
  "the dice decide": "由骰子决定",
833
876
  "the engine rolls them": "由引擎掷骰",
834
877
  "The extension is in the campaign: it counts from now on.": "扩展已加入战役,从现在起生效。",
878
+ "The file is more than {size} MB: no package is that big.": "文件超过 {size} MB,没有哪个包会这么大。",
879
+ "The folder {name} has characters npm cannot take: move it to another path.": "文件夹 {name} 含有 npm 不支持的字符,请移到其他路径。",
835
880
  "The folder is on this computer and in this campaign: its books are read now, then the master searches them.": "文件夹位于这台电脑,并用于本战役:其中的书会先读取,之后由主持人查阅。",
836
881
  "The game": "游戏",
837
882
  "The game follows these rules from the master's next move: the sheets are worked out with them, and the master reads them.": "从主持人的下一步起,游戏遵循这些规则:角色卡按它们重新计算,主持人也会阅读它们。",
@@ -881,7 +926,6 @@
881
926
  "The note was not saved: the game is not connected.": "笔记没有保存:游戏未连接。",
882
927
  "The note was not saved: try again.": "笔记没有保存:请重试。",
883
928
  "The note's title": "笔记标题",
884
- "The notes did not come ({status}): reload the page.": "笔记没有加载出来({status}):请刷新页面。",
885
929
  "The order of the turns": "回合顺序",
886
930
  "The page stays in English: Codex or Claude Code would translate it into {language} on this computer.": "页面仍显示英文:可由这台电脑上的 Codex 或 Claude Code 将其翻译成{language}。",
887
931
  "The page's": "页面的",
@@ -902,6 +946,7 @@
902
946
  "The story starts on day {day}": "故事始于第{day}天",
903
947
  "The story starts on day {day}, {time}": "故事始于第{day}天{time}",
904
948
  "The story starts with the first scene.": "故事从第一个场景开始。",
949
+ "The text above lies behind the master's screen, forbidden to the players' eyes.": "以上文字位于主持人的屏风之后,玩家不得窥视。",
905
950
  "The title of the note {title}": "笔记“{title}”的标题",
906
951
  "the top bar": "顶栏",
907
952
  "the units of the story": "故事使用的单位",
@@ -909,8 +954,14 @@
909
954
  "The whole sheet": "完整角色卡",
910
955
  "The world as it was at the start, without the player characters: a .zip to give to others.": "开局时的世界,不含玩家角色:一个可分享给他人的 .zip 文件。",
911
956
  "Theme": "主题",
957
+ "There is already a game system called {system} on this computer: {name} would take its name.": "这台电脑上已有名为 {system} 的游戏系统,{name} 会占用它的名称。",
958
+ "There is no {name} on this computer: give its full path.": "这台电脑上没有 {name},请输入完整路径。",
912
959
  "There is no player character yet: the map starts with one.": "还没有角色:有了角色,地图才会开始。",
913
960
  "There is no player character yet: the sheet comes when the master writes one.": "还没有角色:主持人写好角色后,角色卡就会出现。",
961
+ "This campaign does not use {name}.": "这个战役没有使用 {name}。",
962
+ "This campaign has {name} {version}, already in play: an adventure in play is not updated.": "这个战役已有 {name} {version},并且正在进行,进行中的冒险不会更新。",
963
+ "This campaign plays {name}: it stays on this computer.": "这个战役玩的是 {name},它会保留在这台电脑上。",
964
+ "This campaign uses {other}, with the same name as {name}: take it out first.": "这个战役正在使用与 {name} 同名的 {other},请先将它移除。",
914
965
  "This campaign, as an adventure": "将本战役导出为冒险",
915
966
  "This chat does not hear it by itself: copy it, then paste it in the chat.": "聊天不会自动收到这句话:请复制后粘贴到聊天中。",
916
967
  "this computer does not let it be read: check who may open it.": "这台电脑不允许读取该文件:请检查打开权限。",
@@ -919,6 +970,8 @@
919
970
  "This page": "本页",
920
971
  "This page could not be read now: try again in a moment.": "现在无法读取此页,请稍后再试。",
921
972
  "this roll: {count}": "本次掷骰:{count}",
973
+ "This RPG Engine is a development link to {name}: update it there.": "这个 RPG Engine 是指向 {name} 的开发链接,请在那里更新。",
974
+ "This RPG Engine runs from {name}: update it the way it was installed.": "这个 RPG Engine 运行自 {name},请按安装时的方式更新。",
922
975
  "This turn": "本回合",
923
976
  "those you ask for": "只生成你要求的",
924
977
  "Time is up": "时间到了",
@@ -148,9 +148,9 @@ export function NotationIcons({ notation }) {
148
148
  const drawn = drawnDiceOf(notation);
149
149
  return drawn.sides.length === 0 ? null : (_jsxs("span", { class: "die-icons", "aria-hidden": "true", children: [drawn.sides.map((sides, index) => _jsx(DieIcon, { sides: sides, faded: drawn.faded === true && index === 1 }, index)), drawn.count !== undefined && _jsxs("span", { class: "die-more", children: ["\u00D7", drawn.count] })] }));
150
150
  }
151
- /** A picture's drawing, for a card's header. */
151
+ /** A picture's drawing, for a card's header: the game system theme's own where it draws one, as Icon does. */
152
152
  export function iconPath(name) {
153
- return iconPaths[name];
153
+ return themedIcon(name) ?? iconPaths[name];
154
154
  }
155
155
  /** Whether a name, as a text names it, is one of the page's pictures. */
156
156
  export function isIconName(name) {
@@ -126,7 +126,7 @@ function TrackedQuest({ quest, onUnfollow }) {
126
126
  const next = quest.goals.find((goal) => !goal.done);
127
127
  const id = `tracked-${quest.name.replace(/[^\p{L}\p{N}]+/gu, "-")}`;
128
128
  const kind = quest.main ? t("Main") : t("Side quest");
129
- return (_jsxs("li", { class: open ? "tracked open" : "tracked", children: [_jsx("span", { class: "tracked-mark", role: "img", "aria-label": kind, "data-tip": kind, children: _jsx("svg", { class: quest.main ? "main" : undefined, viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: questFlag }) }) }), _jsxs("button", { type: "button", class: "tracked-what", "aria-expanded": open, "aria-controls": id, onClick: toggle, children: [_jsx("span", { class: "followed-name", children: quest.name }), !open && next !== undefined && _jsx("span", { class: "followed-next", children: plainText(next.text) })] }), _jsxs("span", { class: "tracked-time", children: [quest.clock !== undefined && _jsx(ClockTip, { clock: quest.clock }), quest.deadline !== undefined && _jsx(Deadline, { deadline: quest.deadline })] }), open && (_jsxs("div", { class: "tracked-more", id: id, children: [_jsx(Goals, { quest: quest }), _jsx("button", { type: "button", class: "tracked-unfollow", onClick: onUnfollow, children: t("Stop following") })] }))] }));
129
+ return (_jsxs("li", { class: open ? "tracked open" : "tracked", children: [_jsx("span", { class: "tracked-mark", role: "img", "aria-label": kind, "data-tip": kind, children: _jsx("svg", { class: quest.main ? "main" : undefined, viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: questFlag }) }) }), _jsxs("button", { type: "button", class: "tracked-what", "aria-expanded": open, "aria-controls": id, onClick: toggle, children: [_jsx("span", { class: "followed-name", children: quest.name }), !open && next !== undefined && _jsx("span", { class: "followed-next", dir: "auto", children: plainText(next.text) })] }), _jsxs("span", { class: "tracked-time", children: [quest.clock !== undefined && _jsx(ClockTip, { clock: quest.clock }), quest.deadline !== undefined && _jsx(Deadline, { deadline: quest.deadline })] }), open && (_jsxs("div", { class: "tracked-more", id: id, children: [_jsx(Goals, { quest: quest }), _jsx("button", { type: "button", class: "tracked-unfollow", onClick: onUnfollow, children: t("Stop following") })] }))] }));
130
130
  }
131
131
  /** A quest's clock, small, with its name and count as its tooltip. */
132
132
  function ClockTip({ clock }) {
@@ -136,7 +136,7 @@ function ClockTip({ clock }) {
136
136
  /** One followed quest as a strip, on a narrow screen: its star, which stops following it, its picture, its name and next goal leading to the Journal, its clock and time left. */
137
137
  function FollowedStrip({ quest, onUnfollow }) {
138
138
  const next = quest.goals.find((goal) => !goal.done);
139
- return (_jsxs("div", { class: "followed", children: [_jsx("button", { type: "button", class: "followed-star on", "aria-label": t("Follow {quest}", { quest: quest.name }), "aria-pressed": true, onClick: onUnfollow, children: _jsx(Star, {}) }), _jsx(QuestFace, { quest: quest, small: true }), _jsxs("a", { class: "followed-what", href: sectionAddress("journal"), children: [_jsx("span", { class: "followed-name", children: quest.name }), next !== undefined && _jsx("span", { class: "followed-next", children: plainText(next.text) })] }), quest.clock !== undefined && _jsx(ClockFace, { clock: quest.clock, small: true }), quest.deadline !== undefined && _jsx(Deadline, { deadline: quest.deadline })] }));
139
+ return (_jsxs("div", { class: "followed", children: [_jsx("button", { type: "button", class: "followed-star on", "aria-label": t("Follow {quest}", { quest: quest.name }), "aria-pressed": true, onClick: onUnfollow, children: _jsx(Star, {}) }), _jsx(QuestFace, { quest: quest, small: true }), _jsxs("a", { class: "followed-what", href: sectionAddress("journal"), children: [_jsx("span", { class: "followed-name", children: quest.name }), next !== undefined && _jsx("span", { class: "followed-next", dir: "auto", children: plainText(next.text) })] }), quest.clock !== undefined && _jsx(ClockFace, { clock: quest.clock, small: true }), quest.deadline !== undefined && _jsx(Deadline, { deadline: quest.deadline })] }));
140
140
  }
141
141
  /** A quest's goals, done ones ticked; a failed quest's undone ones marked missed. */
142
142
  function Goals({ quest }) {
@@ -215,8 +215,8 @@ function Story({ chapters, now }) {
215
215
  return _jsx("p", { class: "journal-none", children: t("The story starts with the first scene.") });
216
216
  }
217
217
  return (_jsxs("ol", { class: "story", children: [_jsxs("li", { class: "eyebrow story-mark now", children: [_jsx("b", { children: t("Now") }), now !== undefined && _jsx("span", { children: phraseLabel(gameDateLabel(now)) })] }), chapters.map((chapter, index) => chapter.title === undefined
218
- ? _jsx(Between, { chapter: chapter }, index)
219
- : (_jsxs("li", { class: ["chapter", chapter.open ? "now" : "", chapter.picture === undefined && placeKinds[chapter.kind ?? ""] === undefined ? "bare" : ""].join(" ").trim(), "data-number": chapter.number, tabIndex: -1, children: [_jsx(ChapterPicture, { chapter: chapter }), _jsxs("div", { class: "chapter-body", children: [_jsxs("header", { class: "chapter-head", children: [chapter.number !== undefined && _jsx("span", { class: "eyebrow chapter-number", children: t("Chapter {number}", { number: chapter.number }) }), _jsx("h3", { children: chapter.title }), chapter.open && _jsx("span", { class: "chapter-now", children: t("Now") }), chapter.type !== undefined && _jsx("span", { class: "chapter-type", children: phraseLabel(sceneTypeLabel(chapter.type)) })] }), (chapter.place !== undefined || chapter.date !== undefined) && (_jsx("p", { class: "chapter-when", children: [chapter.place, chapter.date === undefined ? undefined : phraseLabel(gameDateLabel(chapter.date))].filter((part) => part !== undefined).join(" · ") })), chapter.summary !== undefined && _jsx("p", { class: "chapter-summary", children: chapter.summary }), chapter.facts.length > 0 && (_jsxs("details", { class: "chapter-facts", children: [_jsx("summary", { children: chapter.facts.length === 1 ? t("1 thing that happened") : t("{count} things that happened", { count: chapter.facts.length }) }), _jsx(Facts, { facts: chapter.facts })] }))] })] }, index))), _jsx("li", { class: "eyebrow story-mark start", children: _jsx("b", { children: t("The start") }) })] }));
218
+ ? _jsx(Between, { chapter: chapter }, chapterKey(chapters, index))
219
+ : (_jsxs("li", { class: ["chapter", chapter.open ? "now" : "", chapter.picture === undefined && placeKinds[chapter.kind ?? ""] === undefined ? "bare" : ""].join(" ").trim(), "data-number": chapter.number, tabIndex: -1, children: [_jsx(ChapterPicture, { chapter: chapter }), _jsxs("div", { class: "chapter-body", children: [_jsxs("header", { class: "chapter-head", children: [chapter.number !== undefined && _jsx("span", { class: "eyebrow chapter-number", children: t("Chapter {number}", { number: chapter.number }) }), _jsx("h3", { children: chapter.title }), chapter.open && _jsx("span", { class: "chapter-now", children: t("Now") }), chapter.type !== undefined && _jsx("span", { class: "chapter-type", children: phraseLabel(sceneTypeLabel(chapter.type)) })] }), (chapter.place !== undefined || chapter.date !== undefined) && (_jsx("p", { class: "chapter-when", children: [chapter.place, chapter.date === undefined ? undefined : phraseLabel(gameDateLabel(chapter.date))].filter((part) => part !== undefined).join(" · ") })), chapter.summary !== undefined && _jsx("p", { class: "chapter-summary", children: chapter.summary }), chapter.facts.length > 0 && (_jsxs("details", { class: "chapter-facts", children: [_jsx("summary", { children: chapter.facts.length === 1 ? t("1 thing that happened") : t("{count} things that happened", { count: chapter.facts.length }) }), _jsx(Facts, { facts: chapter.facts })] }))] })] }, chapterKey(chapters, index)))), _jsx("li", { class: "eyebrow story-mark start", children: _jsx("b", { children: t("The start") }) })] }));
220
220
  }
221
221
  /** The companions' diaries, the last line first, all of them or one companion's (D-497): each line with who wrote it and when, in their own words. */
222
222
  function Diaries({ thoughts }) {
@@ -340,3 +340,8 @@ function plainText(text) {
340
340
  function tabName(tab) {
341
341
  return tab === "quests" ? t("Quests") : tab === "story" ? t("Story") : tab === "companions" ? t("Companions") : t("Notes");
342
342
  }
343
+ /** A chapter's key as the story grows, newest first: its number; a stretch between scenes by the chapter after it, so that what is open stays with it. */
344
+ function chapterKey(chapters, index) {
345
+ const number = chapters[index].number;
346
+ return number !== undefined ? String(number) : `between ${chapters.slice(0, index).findLast((chapter) => chapter.number !== undefined)?.number ?? "now"}`;
347
+ }
@@ -1,5 +1,5 @@
1
1
  // Labels from the names of the fields, in English (D-273): "hit-dice-d8" reads "hit dice d8", "str-save" "STR save"; names in the campaign's language come later.
2
- import { isolated, numberText, systemWord, t, timeText } from "./text.js";
2
+ import { isolated, numberText, pageLocale, systemWord, t, timeText } from "./text.js";
3
3
  // The dice the page has a picture of: the d% as 100, the coin as 2.
4
4
  const drawnDice = [2, 4, 6, 8, 10, 12, 20, 100];
5
5
  /** A field's name as a label: its words apart, in capitals the short names, as ac, hp, or str which the system names Strength; age stays a word. */
@@ -152,14 +152,15 @@ export function realTimeLabel(at, now = new Date()) {
152
152
  if (Number.isNaN(date.getTime())) {
153
153
  return undefined;
154
154
  }
155
- const language = document.documentElement.lang || undefined;
156
- const time = new Intl.DateTimeFormat(undefined, { timeStyle: "short" }).format(date);
155
+ const language = pageLocale();
156
+ // The hour in the page's language too, as its date: ieri, 15:45 in Italian, whatever the browser's.
157
+ const time = new Intl.DateTimeFormat(language, { timeStyle: "short" }).format(date);
157
158
  const yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 1);
158
159
  const daysAgo = date.toDateString() === now.toDateString() ? 0 : date.toDateString() === yesterday.toDateString() ? -1 : undefined;
159
160
  const day = daysAgo === undefined
160
161
  ? new Intl.DateTimeFormat(language, { month: "short", day: "numeric", ...(date.getFullYear() === now.getFullYear() ? {} : { year: "numeric" }) }).format(date)
161
162
  : new Intl.RelativeTimeFormat(language, { numeric: "auto" }).format(daysAgo, "day");
162
- return { short: `${day}, ${time}`, full: new Intl.DateTimeFormat(language, { dateStyle: "full", timeStyle: "short" }).format(date) };
163
+ return { short: t("{day}, {time}", { day, time }), full: new Intl.DateTimeFormat(language, { dateStyle: "full", timeStyle: "short" }).format(date) };
163
164
  }
164
165
  /** The name the page writes for someone the character does not know (D-331): Creature B2 for "creature B2", Someone for "someone", in the page's language. */
165
166
  export function strangerLabel(name) {
@@ -3,9 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime";
3
3
  // not in the list can be written whole, as pt-PT. A choice is saved at once, as the other settings'.
4
4
  import { useEffect, useId, useMemo, useState } from "preact/hooks";
5
5
  import { languageName, languageOf, languages, matches } from "./languages.js";
6
- import { pageTranslation, t } from "./text.js";
6
+ import { pageLocale, pageTranslation, t } from "./text.js";
7
7
  export function LanguageChoice({ value, labelledBy, describedBy, onPick }) {
8
- const pageLanguage = document.documentElement.lang || "en";
8
+ const pageLanguage = pageLocale();
9
9
  const all = useMemo(() => languages(pageLanguage), [pageLanguage]);
10
10
  const chosen = value === undefined ? undefined : languageOf(value, pageLanguage);
11
11
  // What the player writes to look for one; undefined while the list is closed.
@@ -66,7 +66,7 @@ export function LanguageChoice({ value, labelledBy, describedBy, onPick }) {
66
66
  }
67
67
  /** What the chosen language means for the page: the master plays in it, and the page is in it too, or stays in English until it is translated. */
68
68
  export function languageLine(code) {
69
- const pageLanguage = document.documentElement.lang || "en";
69
+ const pageLanguage = pageLocale();
70
70
  const language = languageOf(code, pageLanguage);
71
71
  const name = languageName(code, pageLanguage) ?? code;
72
72
  const flying = pageTranslation();
@@ -16,23 +16,30 @@ export function InlineText({ text, link }) {
16
16
  export function knowersOf(knownBy) {
17
17
  return knownBy === undefined || knownBy.length === 0 ? undefined : (title) => knownBy.find((one) => foldedText(one.secret.trim()) === foldedText(title))?.who;
18
18
  }
19
- /** The first line of a page's text that is not a heading nor in a fenced block, as plain words: what a closed card shows of it. */
19
+ /**
20
+ * The first line of a page's text that is not a heading nor in a fenced block, as plain words: what a closed card shows of it. A line that opens a list with
21
+ * its colon goes on with the next.
22
+ */
20
23
  export function plainLine(text) {
21
24
  let fenced = false;
22
- const line = text.split("\n").find((candidate) => {
25
+ const lines = text.split("\n");
26
+ const at = lines.findIndex((candidate) => {
23
27
  if (fenced ? fenceEnd.test(candidate) : fenceStart.test(candidate)) {
24
28
  fenced = !fenced;
25
29
  return false;
26
30
  }
27
31
  return !fenced && candidate.trim() !== "" && !/^\s*#/.test(candidate);
28
32
  });
29
- if (line === undefined) {
33
+ if (at < 0) {
30
34
  return undefined;
31
35
  }
36
+ const line = lines[at];
32
37
  // A quote's words, a secret's with its word, as the text reads them.
33
38
  const quoted = quoteLine.exec(line)?.[1];
34
39
  const words = quoted === undefined ? line.replace(/^\s*[-*]\s+/, "") : quoted.replace(secretStart, (_, title) => (title.trim() === "" ? t("You found out") : t("You found out: {what}", { what: title.trim() })));
35
- return linkWords(words).replace(/[*_]/g, "").trim();
40
+ const plain = linkWords(words).replace(/[*_]/g, "").trim();
41
+ const next = plain.endsWith(":") ? plainLine(lines.slice(at + 1).join("\n")) : undefined;
42
+ return next === undefined ? plain : `${plain} ${next}`;
36
43
  }
37
44
  // A fenced block opens on a line of its own, with its language, and closes on a line of its own; one left open runs to the text's end.
38
45
  const fenceStart = /^\s*```\s*([\w-]*)\s*$/;
@@ -22,6 +22,7 @@ export function Notes({ version }) {
22
22
  void readNotes().then((read) => {
23
23
  setNotes((before) => before ?? read.notes);
24
24
  setPending(new Set(read.pending));
25
+ setProblem(undefined);
25
26
  }, (error) => setProblem(error instanceof Error ? error.message : String(error)));
26
27
  }, [version]);
27
28
  const add = () => {
@@ -126,9 +127,10 @@ function NoteCard({ note, pending, focus, onWritten, onPending, onRemoved }) {
126
127
  };
127
128
  const unshare = async () => {
128
129
  const problem = await sendNote({ unshare: note.id });
129
- setSaid(problem);
130
- onPending(false);
130
+ // Taken back only when the game heard it: until then the master may still read it.
131
+ setSaid(problem === undefined ? undefined : t("It did not reach the game: try again."));
131
132
  if (problem === undefined) {
133
+ onPending(false);
132
134
  setShared(undefined);
133
135
  }
134
136
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "preact/jsx-runtime";
2
2
  import { Icon } from "./icons.js";
3
3
  import { languageName } from "./languages.js";
4
- import { pageTranslation, t } from "./text.js";
4
+ import { pageLocale, pageTranslation, t } from "./text.js";
5
5
  export function Notices({ notices }) {
6
6
  return notices.length === 0 ? null : (_jsx("div", { class: "notices", children: notices.map((notice) => {
7
7
  // The role on the words alone, always the same node: a count beside them is read where it is, never heard at each step.
@@ -30,7 +30,7 @@ export function importNotices(importing) {
30
30
  /** What the page has to say of the game: the campaign's files that do not read, which the master fixes; the page being translated, or out of reach (D-406). */
31
31
  export function gameNotices(problems) {
32
32
  const translation = pageTranslation();
33
- const language = translation === undefined ? "" : languageName(translation.language, document.documentElement.lang || "en") ?? translation.language;
33
+ const language = translation === undefined ? "" : languageName(translation.language, pageLocale()) ?? translation.language;
34
34
  return [
35
35
  ...(problems === undefined || problems === 0
36
36
  ? []
@@ -124,7 +124,7 @@ export function AskCard({ card, name, widget, onAnswer, onWords, onClose }) {
124
124
  export function Choices({ buttons, sent, describedBy, onChoose }) {
125
125
  return (_jsx("div", { class: "ask-choices", children: buttons.map((button, index) => {
126
126
  const kind = button.dice !== undefined ? "ask-roll" : button.danger === true ? "button danger ask-leave" : "button ask-leave";
127
- return (_jsxs("button", { type: "button", class: sent === index ? `${kind} sent` : kind, "aria-disabled": sent === undefined ? undefined : "true", "aria-describedby": describedBy, onClick: () => onChoose(index), children: [button.dice !== undefined && _jsx(NotationIcons, { notation: button.dice }), _jsx("span", { class: "asked-check-name", children: button.name }), button.note !== undefined && _jsx("span", { class: "ask-note", children: button.note }), button.dice !== undefined && _jsx("span", { class: "visually-hidden", children: button.dice })] }, index));
127
+ return (_jsxs("button", { type: "button", class: sent === index ? `${kind} sent` : kind, "aria-disabled": sent === undefined ? undefined : "true", "aria-describedby": describedBy, onClick: () => onChoose(index), children: [button.dice !== undefined && _jsx(NotationIcons, { notation: button.dice }), _jsx("span", { class: "asked-check-name", children: button.name }), button.note !== undefined && _jsx("span", { class: "ask-note", children: ` ${button.note}` }), button.dice !== undefined && _jsx("span", { class: "visually-hidden", children: ` ${button.dice}` })] }, index));
128
128
  }) }));
129
129
  }
130
130
  /** The buttons of the dice of a rest as a card shows them (ASK-14): a die of each counter, in their order, then the one that ends it. */
@@ -5,13 +5,13 @@ import { addFile, addSource, changeLibrary, changePackage, exportCampaign, readC
5
5
  import { CardHead, useMedia } from "../card.js";
6
6
  import { gameDateLabel, sinceDateLabel } from "../game-words.js";
7
7
  import { Icon, iconPath } from "../icons.js";
8
- import { phraseLabel, systemTitleLabel } from "../labels.js";
8
+ import { phraseLabel, systemNameLabel, systemTitleLabel } from "../labels.js";
9
9
  import { languageName } from "../languages.js";
10
10
  import { PageHead } from "../pages.js";
11
11
  import { Confirm } from "../saves.js";
12
12
  import { Command } from "../settings.js";
13
13
  import { PageTabs } from "../tabs.js";
14
- import { arrowStep, foldedText, isolated, pageDirection, t } from "../text.js";
14
+ import { arrowStep, foldedText, isolated, pageDirection, pageLocale, t } from "../text.js";
15
15
  import { OwnPageLinks } from "./package-page.js";
16
16
  // The engine's own name, never translated.
17
17
  const engineName = "RPG Engine";
@@ -364,8 +364,8 @@ function AddField({ state, onAdd, onFile }) {
364
364
  }
365
365
  }, [state.said]);
366
366
  const submit = () => {
367
- // An address copied without its scheme, as github.com/someone/an-adventure, is taken as https.
368
- const given = source.trim().replace(/^(?=[\w-]+(?:\.[\w-]+)+\/)/, "https://");
367
+ // A path copied with its quotes, as the file manager copies it, without them; an address copied without its scheme, as github.com/someone/an-adventure, as https.
368
+ const given = source.trim().replace(/^"(.*)"$/, "$1").replace(/^(?=[\w-]+(?:\.[\w-]+)+\/)/, "https://");
369
369
  if (state.busy) {
370
370
  return;
371
371
  }
@@ -444,6 +444,8 @@ function CatalogAway({ failed, asking, onRetry }) {
444
444
  function CatalogRow({ entry, named, view, state, needs, onAdd, onUpdate }) {
445
445
  const here = hereState(entry, view);
446
446
  const asksYes = !entry.verified && entry.code;
447
+ // An extension made for another game system than the campaign's says so in the place of Add: it would be refused once downloaded (D-548).
448
+ const elsewhere = entry.kind === "extension" && entry.system !== undefined && view.system !== null && foldedText(entry.system) !== foldedText(view.system.name);
447
449
  const facts = [
448
450
  entry.author !== undefined && !entry.verified && !entry.code ? t("by {author}", { author: entry.author }) : "",
449
451
  entry.levels === undefined ? "" : levelsText(entry.levels),
@@ -451,7 +453,7 @@ function CatalogRow({ entry, named, view, state, needs, onAdd, onUpdate }) {
451
453
  entry.language === undefined ? "" : languageName(entry.language, pageLanguage()) ?? entry.language,
452
454
  entry.stars === undefined || entry.stars === 0 ? "" : `★ ${entry.stars}`,
453
455
  asksYes ? t("has code: asks your yes") : "",
454
- entry.kind === "system" && here === "none" && view.system !== null ? t("for a new campaign: this one stays in {system}", { system: view.system.name }) : "",
456
+ entry.kind === "system" && here === "none" && view.system !== null ? t("for a new campaign: this one stays in {system}", { system: systemNameLabel(view.system.name) }) : "",
455
457
  ].filter((fact) => fact !== "");
456
458
  const version = entry.update && entry.installed !== undefined && entry.version !== undefined
457
459
  ? (_jsxs("span", { class: "package-update", children: [_jsx(Icon, { name: "update" }), `${isolated(entry.installed)} ${pageDirection() === "rtl" ? "←" : "→"} ${isolated(entry.version)}`] }))
@@ -461,9 +463,11 @@ function CatalogRow({ entry, named, view, state, needs, onAdd, onUpdate }) {
461
463
  ? action(t("Update"), t("Update {name} to {version}", { name: entryTitle(entry), version: entry.version ?? "" }), "update", onUpdate, true)
462
464
  : here === "used" || (here === "here" && entry.kind !== "extension")
463
465
  ? (_jsxs("span", { class: "package-here", children: [_jsx(Icon, { name: "check" }), entry.kind === "adventure" || entry.kind === "extension" ? t("In the campaign") : t("On this computer")] }))
464
- : entry.kind === "system" && here === "none"
465
- ? action(t("Download"), t("Download {name}", { name: entryTitle(entry) }), "download", onAdd)
466
- : action(asksYes ? t("Add…") : t("Add"), t("Add {name}", { name: entryTitle(entry) }), "plus", onAdd), children: [_jsx(WorkNote, { work: state.work }), _jsx(SaidNote, { said: state.said, onSee: state.onSee })] }));
466
+ : elsewhere && here === "none"
467
+ ? (_jsxs("span", { class: "package-here", children: [_jsx(Icon, { name: "lock" }), t("for {system}: this campaign plays {campaign}", { system: entry.system ?? "", campaign: view.system === null ? "" : systemNameLabel(view.system.name) })] }))
468
+ : entry.kind === "system" && here === "none"
469
+ ? action(t("Download"), t("Download {name}", { name: entryTitle(entry) }), "download", onAdd)
470
+ : action(asksYes ? t("Add…") : t("Add"), t("Add {name}", { name: entryTitle(entry) }), "plus", onAdd), children: [_jsx(WorkNote, { work: state.work }), _jsx(SaidNote, { said: state.said, onSee: state.onSee })] }));
467
471
  }
468
472
  /**
469
473
  * RPG Engine itself (D-515 (3)), first among the installed: its version and npm's newer one, with Update when npm installed it globally; installed another way,
@@ -764,7 +768,7 @@ function failure(at, action, name, outcome) {
764
768
  return { at, problem: true, text: t("You said no: nothing changed.") };
765
769
  }
766
770
  if (outcome.code === "no-window") {
767
- const command = action === "library" ? `rpg config library --add "${name}"` : `rpg package install ${name}`;
771
+ const command = action === "library" ? `rpg config library --add "${name}"` : `rpg package install ${/\s/.test(name) ? `"${name}"` : name}`;
768
772
  return { at, problem: true, text: t("No window for your yes opens on this computer: add it from your terminal, in the campaign's folder."), command };
769
773
  }
770
774
  if (outcome.code === "busy") {
@@ -830,5 +834,5 @@ function entryTitle(entry) {
830
834
  }
831
835
  /** The language this page is written in. */
832
836
  function pageLanguage() {
833
- return document.documentElement.lang || "en";
837
+ return pageLocale();
834
838
  }