Chaosforge Forum

  • March 28, 2024, 10:14
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: 1 ... 3 4 [5]

Author Topic: DoomRL on different languages  (Read 32674 times)

SugarOrc

  • Private FC
  • *
  • Offline Offline
  • Posts: 6
  • Lost Soul
    • View Profile
Re: DoomRL on different languages
« Reply #60 on: May 09, 2012, 21:52 »

Доступа к репозиторию нет, но немного наговнокодил:

Code: [Select]
--[[
http://ru.wiktionary.org/wiki/Викисловарь:Использование_словаря_Зализняка

http://ru.wikipedia.org/wiki/Склонение_(лингвистика)
http://ru.wikipedia.org/wiki/Спряжение
http://ru.wikipedia.org/wiki/Одушевлённость_(грамматика)

http://ru.wiktionary.org/wiki/Категория:Шаблоны_словоизменений
http://ru.wiktionary.org/wiki/Категория:Шаблоны_словоизменений/Прилагательные
http://ru.wiktionary.org/wiki/Категория:Шаблоны_словоизменений/Существительные/Одушевлённые/Мужской_род
http://ru.wiktionary.org/wiki/Шаблон:прил_ru_3*a/b

]]

Dictionary={noun={}, adjective={}, pronoun={}, numeral={}} -- существительные, прилагательные, местоимения, числительные

Templates={}
Templates.adjective={


    ['4a'] = function(word, base, animacy) -- нет разных слов для одуш./неодуш.
return { type = 'adjective', word = word
, nominative = { -- именительный
singular = { masculine = base..'ий', neuter = base..'ее', feminine = base..'ая'}
, plural = base..'ие' }
, genitive = { -- родительный
singular = { masculine = base..'его', neuter = base..'его', feminine = base..'ей'}
, plural = base..'их' }
, dative = { -- дательный
singular = { masculine = base..'ему', neuter = base..'ему', feminine = base..'ей'}
, plural = base..'им' }
, accusative = { -- винительный
singular = { masculine = (animacy and base..'его' or base..'ий'), neuter = base..'ее', feminine = base..'ую'}
, plural = (animacy and base..'их' or base..'ие') }
, instrumental ={ -- творительный
singular = { masculine = base..'им', neuter = base..'им', feminine = base..'ей'}
, plural = base..'ими' }
, prepositional={ -- предложный
singular = { masculine = base..'ем', neuter = base..'ем', feminine = base..'ей'}
, plural = base..'их' }
}
    end
}


Templates.noun = {
['a 1a'] = function(word, base) -- http://ru.wiktionary.org/wiki/Шаблон:сущ_ru_m_a_1a  http://ru.wiktionary.org/wiki/Шаблон:сущ_ru_f_a_1a  http://ru.wiktionary.org/wiki/Шаблон:сущ_ru_n_a_1a
return { type = 'noun', word = word
, nominative = { singular = { masculine = base..'', neuter = base..'о', feminine = base..'а'}
, plural = { masculine = base..'ы', neuter = base..'а', feminine = base..'ы' } }
, genitive = { singular =  { masculine = base..'а', neuter = base..'а', feminine = base..'ы'}
, plural = { masculine = base..'ов', neuter = base..'', feminine = base..''} }
, dative = { singular =  { masculine = base..'у', neuter = base..'у', feminine = base..'е'}
, plural = { masculine = base..'ам', neuter = base..'ам', feminine = base..'ам'} }
, accusative = { singular =  { masculine = base..'а', neuter = base..'о', feminine = base..'у'}
, plural = { masculine = base..'ов', neuter = base..'', feminine = base..''} }
, instrumental = { singular =  { masculine = base..'ом', neuter = base..'ом', feminine = base..'ой'}
, plural = { masculine = base..'ами', neuter = base..'ами', feminine = base..'ами'} }
, prepositional = { singular =  { masculine = base..'е', neuter = base..'е', feminine = base..'е'}
, plural = { masculine = base..'ах', neuter = base..'ах', feminine = base..'ах'} }

}
end
}


-- verb - глаголы?

-- число, род, падеж
-- основа, основа1, основа2
-- краткая форма?
-- одушевленность (animacy) - винительный?

function adjective(word, dtype, base, animacy)
local a = Dictionary.adjective
-- добавляет (если не было) слово word в таблицу Dictionary.adjective и возвращает таблицу
-- dtype - тип склонения по классификации А. Зализняка (Dictionary.adjective.Templates)
-- base  - строка или таблица с основами
if not a[word] then
a[word] = Templates.adjective[dtype](word, base, animacy)
end
return a[word]
end

function noun(word, dtype, base)
local n = Dictionary.noun
if not n[word] then
n[word] = Templates.noun[dtype](word, base)
end
return n[word]
end

Monsters = {
former_sergeant={
name = {
adjective('бывший', '4a', 'бывш', true) -- http://ru.wiktionary.org/wiki/бывший
, noun('сержант','a 1a','сержант', true) -- http://ru.wiktionary.org/wiki/сержант
}, gender = 'masculine'
}
}


function declension(monster, case, number)
local tbl = {}
for k, v in ipairs(monster.name) do
local tmp = Dictionary[v.type][v.word][case][number]
if type(tmp) == 'table' then tmp = tmp[monster.gender] end
table.insert(tbl, tmp)
end
return table.concat(tbl,' ')
end

local mfs = Monsters.former_sergeant
print( 'именительный', declension(mfs, 'nominative', 'singular'), declension(mfs, 'nominative', 'plural') )
print( 'родительный ', declension(mfs, 'genitive', 'singular'), declension(mfs, 'genitive', 'plural') )
print( 'дательный   ', declension(mfs, 'dative', 'singular'), declension(mfs, 'dative', 'plural') )
print( 'винительный ', declension(mfs, 'accusative', 'singular'), declension(mfs, 'accusative', 'plural') )
print( 'творительный', declension(mfs, 'instrumental', 'singular'), declension(mfs, 'instrumental', 'plural') )
print( 'предложный  ', declension(mfs, 'prepositional', 'singular'),declension(mfs, 'prepositional', 'plural') )

Code: [Select]
>lua test.lua
именительный    бывший сержант  бывшие сержанты
родительный     бывшего сержанта        бывших сержантов
дательный       бывшему сержанту        бывшим сержантам
винительный     бывшего сержанта        бывших сержантов
творительный    бывшим сержантом        бывшими сержантами
предложный      бывшем сержанте бывших сержантах
Logged

ckopo

  • Private FC
  • *
  • Offline Offline
  • Posts: 16
  • Sir Ckopo Robocat
    • View Profile
DoomRL Russian translation
« Reply #61 on: January 12, 2013, 00:01 »

First, I should write some words for non-Russian people.

This is a branch of the "DoomRL on different languages" thread for Russian translation. I had to start it because:
1. The original thread is locked, so I (and other people too, I think) can't continue it anymore.
2. The Russian translation is nearly to be done. We just need to recheck it and start working with developers.

So, words below are to Russian users of this forum.

Соотечественники!

Год назад в теме под началом bardysya был начат перевод DoomRL на русский язык. Сейчас перевод заброшен, тема закрыта...
Ваш покорный слуга, участвовавший в работе на переводом, сохранил в сети документ с текстами перевода.
Они почти готовы для дальнейшего использования. Единственное, что осталось сделать - вычитать перевод и "окультурить" переведенный текст.

Тексты лежат на моем гуглдиске в виде таблицы (пруф), ссылку на которую выложу, если замечу хоть какую-то активность.

Засим:
1. Я ищу людей-добровольцев, хорошо знающих английский язык и желающих сделать вычитку и довести перевод до идеала.
Пока что отозвались: Rajhin, e^cha, singalen.
2. Прошу вернуться к делу тех, кто участвовал в переводе (особенно you и bardysya) и его обсуждении.

Вопросы, советы и заявки приветствуются.
Пора закончить перевод и заставить батьку Корнелия выпустить новый релиз! :3
« Last Edit: January 31, 2013, 23:13 by ckopo »
Logged
"This life is just a game with bad gameplay and godlike graphics" - an unknown Russian DooMer
DoomRL Russian Translation?!

LuckyDee

  • Sound Wizard
  • Grand Inquisitor
  • General
  • *
  • *
  • Offline Offline
  • Posts: 1516
  • High Caliber Consecrator
    • View Profile
    • LuckyDeeIndustries
Re: DoomRL Russian translation
« Reply #62 on: January 12, 2013, 00:41 »

See this thread as well. Sounds really great, but at the moment not much is happening I guess....
Logged
[0.9.9.7G] Current: Hell Knight 1st Lieutenant [20/12/4/0/0/0]
High: Arch-Vile Lt. Colonel [25/21/12/2/1/0]

Rajhin

  • Sergeant
  • *
  • Offline Offline
  • Posts: 67
  • Lost Soul
    • View Profile
Re: DoomRL Russian translation
« Reply #63 on: January 12, 2013, 04:56 »

Я всегда не против помочь с переводом, но у меня возникают вопросы:
Как к этому относится разработчик? В прошлом треде он покрутился, написал пост о том как всё сложно, помянул китайский и свалил по-тихому.
У нас есть собственно сам полный текст для перевода?
Какое там у нас состояние с техническими проблемами, с теми же падежами?
Что переводить будем, .996? Обещан как бы релиз .997, причём обещан "на новый (уж не 2014-й ли) год".
Logged
20/26 4/17
33/50

ckopo

  • Private FC
  • *
  • Offline Offline
  • Posts: 16
  • Sir Ckopo Robocat
    • View Profile
Re: DoomRL Russian translation
« Reply #64 on: January 12, 2013, 05:20 »

See this thread as well. Sounds really great, but at the moment not much is happening I guess....

Read my post again, but more closely.

1. The original thread is locked, so I (and other people too, I think) can't continue it anymore.
Or is it just for me?

Как к этому относится разработчик? В прошлом треде он покрутился, написал пост о том как всё сложно, помянул китайский и свалил по-тихому.
У нас есть собственно сам полный текст для перевода?
Какое там у нас состояние с техническими проблемами, с теми же падежами?
Что переводить будем, .996? Обещан как бы релиз .997, причём обещан "на новый (уж не 2014-й ли) год".

В том треде было упомянуто, что это рогалечная библиотека, на которой написана игра, поддерживает вывод текста на китайском.
С разработчиком тогда you вроде говорила, собственно поэтому нам и предоставили полные тексты из исходников.
Да, сам полный текст.
Технические проблемы еще обсудим, тут кроме падежей (у меня сохранен рабочий lua-скрипт для склонения, написанный SugarOrc) есть неприятность с кодировками - мортемы наверняка будут выходить под DOS-кодировкой...
Да, перевод будет пока под .996, но в текстах найдены реплики для не знакомых мне как игроку локаций. Похоже, для нового релиза. Если что, перевод можно и дописать.

Еще вопросы? :3
Logged
"This life is just a game with bad gameplay and godlike graphics" - an unknown Russian DooMer
DoomRL Russian Translation?!

Rajhin

  • Sergeant
  • *
  • Offline Offline
  • Posts: 67
  • Lost Soul
    • View Profile
Re: DoomRL Russian translation
« Reply #65 on: January 12, 2013, 05:40 »

Еще вопросы? :3
Предварительных - никаких, как будете координироваться и устанавливать связь - зовите.
Logged
20/26 4/17
33/50

LuckyDee

  • Sound Wizard
  • Grand Inquisitor
  • General
  • *
  • *
  • Offline Offline
  • Posts: 1516
  • High Caliber Consecrator
    • View Profile
    • LuckyDeeIndustries
Re: DoomRL Russian translation
« Reply #66 on: January 12, 2013, 06:39 »

Read my post again, but more closely.

My bad, guess I wasn't far enough into my first coffee yet. It is locked indeed, which explains why there's not much going on. Did you do the Russian translation by yourself?
Logged
[0.9.9.7G] Current: Hell Knight 1st Lieutenant [20/12/4/0/0/0]
High: Arch-Vile Lt. Colonel [25/21/12/2/1/0]

ckopo

  • Private FC
  • *
  • Offline Offline
  • Posts: 16
  • Sir Ckopo Robocat
    • View Profile
Re: DoomRL Russian translation
« Reply #67 on: January 12, 2013, 07:10 »

My bad, guess I wasn't far enough into my first coffee yet. It is locked indeed, which explains why there's not much going on. Did you do the Russian translation by yourself?

It's OK, it happens to everybody. :)

Yep. All we need now is some time and patience. And more bumps. Soon people will catch this thread.

Errm... At all, no, the translation was being created by as total 13 restless human souls, counting 'you' (not you, her :3), bardysya and me.
But initial kick was made by bardysya and me (we started to translate the text [by information of Wiki ><]), and 'you' (yep, not you again), who ripped all string data of the DoomRL.
Logged
"This life is just a game with bad gameplay and godlike graphics" - an unknown Russian DooMer
DoomRL Russian Translation?!

Equality

  • Second Lieutenant
  • *
  • Offline Offline
  • Posts: 174
  • Lost Soul
    • View Profile
Re: DoomRL Russian translation
« Reply #68 on: January 12, 2013, 08:25 »

соотечественник, перевод и вычитка - это самое небольшое, что нужно сделать. Я извиняюсь, но любой может написать текст.
Возможно даже с приколами, а не дословно. "Как только вы появились, раздался демонический глас: "Вот и свежее мясо для игр! Ты либо идиот, либо храбрец - в любом случае, для тебя отступать уже поздно. Но если сможешь победить всех врагов, то получишь награду!" Со всех сторон вы слышите выкрики: "Кровь! Кровушка! КРОВИЩА!"...

  Для начала попробуйте перевести пару строчек в отдельном модуле. Лично у меня после этого игра вылетает с ошибкой при сохранении в юникоде и UTF-8. А в ANSI получаем вот такое:

То есть надо а) добавить в игру поддержку юникода. б) выделить текстовые строки в отдельный файл, не упаковывая в wad. в) сделать возможность выбора нужного файла с текстами, хотя бы в конфиге.

So, for multilingual support author must:
a) add a unicode support in game
b) all text strings must be in separate file(s), not packed into wad.
c) make a possibility for choosing proper language file(s). At least in config file, if not in GUI

then translation will be a simple task
Logged
Once advanced DoomRL player
Find mysterious sword Dragonslayer
Say "Best thing ever found!" and start jumping around...
But he can't get the sword from the ground

thelaptop

  • Chaos Fanatic!
  • Grand Inquisitor
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 2530
    • View Profile
Re: DoomRL Russian translation
« Reply #69 on: January 12, 2013, 12:42 »

Eh, you could have PM-ed a mod to help unlock it.  Threads lock automatically when there's no activity after some fixed period of time (can't remember exactly the time period).

Would you like me to unlock and merge the two topics?
Logged
I computed, therefore I was.

Cora

  • Private FC
  • *
  • Offline Offline
  • Posts: 15
    • View Profile
Re: DoomRL Russian translation
« Reply #70 on: January 12, 2013, 13:47 »

Can help too.
Logged

thelaptop

  • Chaos Fanatic!
  • Grand Inquisitor
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 2530
    • View Profile
Re: DoomRL on different languages
« Reply #71 on: January 12, 2013, 16:12 »

Unlocking this thread.
Logged
I computed, therefore I was.

ckopo

  • Private FC
  • *
  • Offline Offline
  • Posts: 16
  • Sir Ckopo Robocat
    • View Profile
Re: DoomRL Russian translation
« Reply #72 on: January 12, 2013, 20:28 »

Я извиняюсь, но любой может написать текст. Возможно даже с приколами, а не дословно.

Да, в этом ты прав. Это перевод текст - это малое, лишь первый этап. Но без него дальше не продвинуться, понимаешь.
Кстати, именно в этом наша задача: сделать перевод как можно более литературным и со своими отсылками.

То есть надо:
а) добавить в игру поддержку юникода.
б) выделить текстовые строки в отдельный файл, не упаковывая в wad.
в) сделать возможность выбора нужного файла с текстами, хотя бы в конфиге.

А вот это дико плюсую.
Можно даже немного перефразировать:

а) Вшить в игру юникод и шрифт не должно быть трудным. Но наверняка придется перекроить код.
Да и командная строка Windows не поддерживает юникод, заметь. Только DOS-кодировка.
Это затруднит вывод текста в консоль. Можно, правда, написать конвертер из юникода в DOS.
В Линуксе и графическом режиме вроде таких проблем вроде не ожидается.

б) Пришить игре функцию считывания строк из одного файла со всем переводом текста.
   Достоинства - легкая работа над переводом, легко подключить к игре...
   Недостатки - некое неудобство реализации, текст оголяется, больше проблем со склонением, спойлеры и прочее.
 
  И, ах да, 'you' говорит, что текст вшит еще в exeшник, а не только в *.wad.

в) Возможность выбора файла перевода, но это выливается в б).

Со склонением еще разберемся, SugarOrc выше писал функцию для этого.
Logged
"This life is just a game with bad gameplay and godlike graphics" - an unknown Russian DooMer
DoomRL Russian Translation?!

singalen

  • Supporter
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 182
  • Lost Soul
    • View Profile
Re: DoomRL on different languages
« Reply #73 on: January 31, 2013, 05:54 »

Plug me in for Russian, please. I had some experience with "Battle for Weesnoth", for instance.
« Last Edit: January 31, 2013, 05:56 by singalen »
Logged

Fanta Hege

  • Elder
  • Lieutenant Colonel
  • *
  • *
  • Offline Offline
  • Posts: 414
  • Will it work? I HAVE NO IDEA
    • View Profile
Re: DoomRL on different languages
« Reply #74 on: February 08, 2013, 09:43 »

If you guys plan on making different language versions some more, I am capable of helping with Finnish.
Though I don't think it'd be the most biggest priority in the list.
Logged
i dont even know anymore
Pages: 1 ... 3 4 [5]