Russian i18n

This commit is contained in:
Alexander Yakovlev 2017-07-22 12:42:14 +07:00
parent 3c8e084408
commit cf7c4ea91b
6 changed files with 98 additions and 81 deletions

View File

@ -116,7 +116,7 @@ updateverb = (unit, verb) ->
pruneVerbs = () ->
for verb in document.querySelectorAll(".verb")
text = verb.innerHTML.toLowerCase()
text = $(verb).data("verb")
if $("##{text}list").html() == ""
verb.style.cssText = "visibility: hidden"
else
@ -187,9 +187,9 @@ croom = (name, spec) ->
sysroom "inventory",
text: () ->
if salet.character.inventory.length == 0
text = "You are carrying nothing."
text = "inventory_empty".l()
else
text = "You are carrying:\n\n"
text = "inventory_contains".l()+"\n\n"
for thing in salet.character.inventory
text += "* #{salet.character.listinv(thing.name)}\n"

View File

@ -22,6 +22,7 @@ cloak = unit "cloak",
salet.character.drop('cloak')
salet.here().take(cloak)
return "hang_cloak".l()
invl: () -> "cloak_invl".l()
wear: () ->
if (salet.here().has('cloak'))
cloak = null
@ -68,16 +69,18 @@ hook = unit "hook",
list = ""
for thing in salet.here().units
if thing.name == "cloak"
list += "a " + thing.display().toLowerCase()
return "hook".l() + " " + "hook_full".l({
list += thing.invl()
return "hook".l() + "hook_full".l({
"list": list
})
else
return "hook".l() + " " + "hook_empty".l()
return "hook".l() + "hook_empty".l()
hook.put("cloakroom")
croom "entrance",
title: () -> "entrance_title".l()
ways: ["foyer"]
dsc: () -> "entrance".l()
croom "bar",
before: () ->
@ -97,7 +100,12 @@ croom "bar",
wear: () ->
"wear_darkness".l()
]
this.actions = {}
else
this.actions = {
message: () ->
salet.view.write salet.here().units[0].act()
}
this.dsc = "bar".l()
this.units = [
unit "message",
@ -112,13 +120,7 @@ croom "bar",
else
return "message_ruined".l()
examine: () ->
$(".sidebar").hide()
$("#content").toggleClass("narrow")
$(".ways").hide()
if salet.here().chaos == 0
return "message_x".l()
else
return "message_ruined".l()
salet.here().units[0].act()
]
return ""
title: () -> "bar_title".l()

View File

@ -44,7 +44,7 @@ bar: """
"""
message_disp: "Message"
message: """
There seems to be some sort of {{message}} scrawled in the sawdust on the floor.
There seems to be some sort of [message](./message) scrawled in the sawdust on the floor.
"""
message_x: """
The message, neatly marked in the sawdust, reads...
@ -62,10 +62,11 @@ cloak: """
Its blackness is so deep that it almost seems to suck light from the room.
"""
cloak_disp: "Cloak"
cloak_invl: "a cloak"
hook: "It's just a small brass hook,"
hook_disp: "Small hook"
hook_empty: "screwed to the wall."
hook_full: "with {list} hanging on it."
hook_empty: " screwed to the wall."
hook_full: " with {list} hanging on it."
bar_dark: "The room completely submerged in darkness."
darkness: "Darkness"
wear_darkness: "You are already wearing it, in a way."
@ -76,4 +77,8 @@ wear_cloak: "You take the cloak from the hook and wear it."
take_cloak: "You take the cloak from the hook."
night: "Night mode"
multiplayer: "Multiplayer mode"
showall: "Filter list of objects"
entrance: """
Oops. How did you get here? Are you a wizard or something?
"""
inventory_empty: "You are carrying nothing."
inventory_contains: "You are carrying:"

View File

@ -1,19 +1,19 @@
foyer_title: "Foyer of the Opera House"
foyer_title: "Фойе Оперного Театра"
start: """
Hurrying through the rainswept November night, you're glad to see the bright
lights of the Opera House.
It's surprising that there aren't more people about but, hey, what do you
expect in a cheap demo game...?
Торопливо пробираясь сквозь дождливую и холодную ноябрьскую ночь,
Вы радостно заметили неподалеку ярко горящие огни Оперного театра.
Конечно, очень странно, что рядом не заметно ни одной живой души...
но стоит ли ждать слишком много от простенькой демонстрационной игры?..
### Плащ Тьмы
#### Базовая демонстрация IF
##### Roger Firth, пер. Андрея Гранкина, версия на Salet - Александр Яковлев
##### Roger Firth, версия на Salet - Александр Яковлев
"""
foyer: """
You are standing in a spacious hall, splendidly decorated in red
and gold, with glittering chandeliers overhead.
The entrance from the street is to the [north,](entrance) and there are doorways
[south](bar) and [west.](cloakroom)
Вы стоите в центре просторного холла, роскошно декорированного
красным и золотым.
Массивные люстры ярко сияют под потолком.
Вход с улицы смотрит на [север](entrance), две другие двери ведут в [южном](bar) и [западном](cloakroom) направлении.
"""
credits: """
Игра использует эти иконки с сайта [game-icons.net](http://www.game-icons.net):
@ -27,56 +27,63 @@ credits: """
Опять же, [оригинальная игра](http://www.firthworks.com/roger/cloak/) была
написана Роджером Фиртом.
Данная версия опирается на перевод Андрея Гранкина.
Данная версия опирается на перевод Дениса Гаева.
Исходный код этой версии доступен [здесь.](https://gitlab.com/Oreolek/cloak-salet)
"""
entrance: """
You've only just arrived, and besides, the weather outside seems to be getting worse.
Вы только пришли сюда. К тому же, погода снаружи заметно ухудшается.
"""
cloakroom: """
The walls of this small room were clearly once lined with hooks,
though now [only one](./verb_examine_hook) remains. The exit is a door to the [east.](foyer)
Когда-то на стенах этой комнаты было множество крючков, предназначенных для одежды,
но сохранился [только один.](./verb_examine_hook)
Единственный выход отсюда [восточная дверь.](foyer)
"""
cloakroom_title: "Cloakroom"
entrance_title: "Street entrance"
bar_title: "Foyer bar"
cloakroom_title: "Гардероб"
entrance_title: "Выход на улицу"
bar_title: "Буфет"
bar: """
The bar, much rougher than you'd have guessed after the opulence
of the foyer to the north, is completely empty.
Театральный буфет (намного более скромный, чем можно было предположить после роскоши фойе, расположенного к северу отсюда) совершенно пуст.
"""
message_disp: "Message"
message_disp: "Сообщение"
message: """
There seems to be some sort of {{message}} scrawled in the sawdust on the floor.
Но похоже, что в пыли на полу написано [что-то важное.](./message)
"""
message_x: """
The message, neatly marked in the sawdust, reads...
Начертанная в пыли надпись сообщает Вам, что...
### You have won
### Вы выиграли
"""
message_ruined: """
The message has been carelessly trampled, making it difficult to read.
You can just distinguish the words...
Полустертую надпись разобрать очень трудно.
С трудом можно различить такие слова...
### You have lost
### Вы проиграли
"""
cloak: """
A handsome cloak, of velvet trimmed with satin, and slightly spattered with raindrops.
Its blackness is so deep that it almost seems to suck light from the room.
Хороший плащ (из черного бархата с атласной прокладкой), немного промокший от дождя.
Его чернота настолько глубока, что возникает ощущение, словно он втягивает в себя
весь свет из окружающего мира.
"""
cloak_disp: "Cloak"
hook: "It's just a small brass hook,"
hook_disp: "Small hook"
hook_empty: "screwed to the wall."
hook_full: "with {list} hanging on it."
bar_dark: "The room completely submerged in darkness."
darkness: "Darkness"
wear_darkness: "You are already wearing it, in a way."
dark: "Blundering around in the dark isn't a good idea!"
drop_cloak: "This isn't the best place to leave a smart cloak lying around."
hang_cloak: "There's a hook here, so you hang the cloak on it."
cloak_disp: "Плащ"
cloak_invl: "плащ"
hook: "Всего лишь маленький бронзовый крючок для одежды"
hook_disp: "Крючок"
hook_empty: ", привинченный к стене."
hook_full: ", с которого свисает {list}."
bar_dark: "Комната полностью заполнена темнотой."
darkness: "Темнота"
wear_darkness: "Это уже надето на вас, между прочим."
dark: "Слоняться в кромешной тьме не самая лучшая идея."
drop_cloak: "Это не самое лучшее место, чтобы оставлять на полу особенный плащ."
hang_cloak: "Вы оставляете свой вельветовый плащ на крючке."
wear_cloak: "You take the cloak from the hook and wear it."
take_cloak: "You take the cloak from the hook."
night: "Night mode"
multiplayer: "Multiplayer mode"
showall: "Filter list of objects"
take_cloak: "Вы берёте плащ с крючка."
night: "Ночной режим"
multiplayer: "Режим мультиплеера"
erase_message: "Вы точно хотите стереть сохранение и начать игру заново?"
inventory_empty: "Вы ничего не носите с собой."
inventory_contains: "Вы носите с собой:"
entrance: """
Ой. Как вы сюда попали? Вы какой-то маг или волшебник?
"""

View File

@ -33,16 +33,16 @@
</a>
</div>
<div class="action">
<div class="verb">Examine</div>
<div class="verb" data-verb="examine">Examine</div>
<ul class="objects" id="examinelist" data-verb="examine">
</ul>
<div class="verb">Take</div>
<div class="verb" data-verb="take">Take</div>
<ul class="objects" id="takelist" data-verb="take">
</ul>
<div class="verb">Drop</div>
<div class="verb" data-verb="drop">Drop</div>
<ul class="objects" id="droplist" data-verb="drop">
</ul>
<div class="verb">Wear</div>
<div class="verb" data-verb="wear">Wear</div>
<ul class="objects" id="wearlist" data-verb="wear">
</ul>
</div>

View File

@ -2,7 +2,7 @@
<html lang="ru">
<head>
<meta charset="utf-8">
<title>Инженер</title>
<title>Плащ Тьмы</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='https://fonts.googleapis.com/css?family=PT+Sans:400,400italic|PT+Sans+Caption' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/main.css">
@ -13,9 +13,6 @@
<div class="row">
<div class='ways'>
<ul class="nav nav-pills" id="ways">
<li class='nav-item'><a class='nav-link' href="djsd">Жестиана</a></li>
<li class='nav-item'><a class='nav-link' href="fff">Дом на окраине</a></li>
<li class='nav-item'><a class='nav-link' href="33">Заброшенный дом</a></li>
</ul>
</div>
</div> <!-- End of div.tools_wrapper -->
@ -26,9 +23,9 @@
<div class="sidebar">
<div class="ui">
<a href="#" id="storytab" class="tab active">
<img src="img/white-book.png"> Повествование
<img src="img/white-book.png"> Игра
</a>
<a href="character" id="chartab" class="tab">
<a href="inventory" id="chartab" class="tab">
<img src="img/light-backpack.png"> Инвентарь
</a>
<a href="map" id="maptab" class="tab">
@ -36,10 +33,17 @@
</a>
</div>
<div class="action">
<div class="verb">ГОВОРИТЬ</div>
<ul>
<li><a href="talk-npc1">NPC 1</a></li>
<li><a href="talk-npc2">NPC 2</a></li>
<div class="verb" data-verb="examine">Осмотреть</div>
<ul class="objects" id="examinelist" data-verb="examine">
</ul>
<div class="verb" data-verb="take">Взять</div>
<ul class="objects" id="takelist" data-verb="take">
</ul>
<div class="verb" data-verb="drop">Оставить</div>
<ul class="objects" id="droplist" data-verb="drop">
</ul>
<div class="verb" data-verb="wear">Надеть</div>
<ul class="objects" id="wearlist" data-verb="wear">
</ul>
</div>
</div>
@ -47,19 +51,18 @@
</div>
<div class="row">
<div class="footer">
<a href="settings">
<button class="btn btn-outline-primary">Настройки</button>
</a>
<button id="erase" class="btn btn-outline-danger">Заново</button>
<a href="settings" class="btn btn-outline-primary">Настройки</a>
<a id="erase" class="btn btn-outline-danger">Заново</a>
</div>
</div>
</div> <!-- End of div.page -->
<!-- CDN JS Libraries -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.5/marked.min.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.5/marked.min.js" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.1.1.min.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sigma.js/1.2.0/sigma.min.js" integrity="sha256-SRRubnX77KKxTl1/uluP1zGweVqx3pTO7aEaTecZB4g=" crossorigin="anonymous"></script>
<script src="game/salet.min.js"></script>
<script src="https://togetherjs.com/togetherjs-min.js"></script>
<script type="text/javascript" src="game/salet.min.js"></script>
<script type="text/javascript" defer="defer" src="game/main.js"></script>
</body>