Commit 6141258ff762432407ef1220e16382f41bc3a3fb

Authored by DarkGod
2 parents bc0ad97e eeb46fa6

Merge branch 'i18n' into 'master'

Update Korean Translation



See merge request !719
... ... @@ -104,7 +104,7 @@ newPackage{ id = "korean", name = "Korean", weight = 100,
104 104 bold = {font="/data/font/ko_KR/JejuGothic.ttf", normal=15, small=13, big=17},
105 105 mono = {font="/data/font/ko_KR/D2Coding.ttf", normal=16, small=12, big=16},
106 106 mono_small = {font="/data/font/ko_KR/D2Coding.ttf", normal=14, small=10, big=16},
107   - flyer = {font="/data/font/ko_KR/songgang-gasa-regular.ttf", normal=14, small=12, big=16},
  107 + flyer = {font="/data/font/ko_KR/JejuGothic.ttf", normal=14, small=12, big=16},
108 108 bignews = {font="/data/font/ko_KR/JejuGothic.ttf", normal=30},
109 109 resources_normal = {font="/data/font/ko_KR/JejuGothic.ttf", normal=15},
110 110 resources_small = {font="/data/font/ko_KR/JejuGothic.ttf", normal=13},
... ...
... ... @@ -275,78 +275,78 @@ t("Hotkey 9", "단축키 9", "_t")
275 275 t("Hotkey 10", "단축키 10", "_t")
276 276 t("Hotkey 11", "단축키 11", "_t")
277 277 t("Hotkey 12", "단축키 12", "_t")
278   -t("Secondary Hotkey 1", "두번째 단축키 1", "_t")
279   -t("Secondary Hotkey 2", "두번째 단축키 2", "_t")
280   -t("Secondary Hotkey 3", "두번째 단축키 3", "_t")
281   -t("Secondary Hotkey 4", "두번째 단축키 4", "_t")
282   -t("Secondary Hotkey 5", "두번째 단축키 5", "_t")
283   -t("Secondary Hotkey 6", "두번째 단축키 6", "_t")
284   -t("Secondary Hotkey 7", "두번째 단축키 7", "_t")
285   -t("Secondary Hotkey 8", "두번째 단축키 8", "_t")
286   -t("Secondary Hotkey 9", "두번째 단축키 9", "_t")
287   -t("Secondary Hotkey 10", "두번째 단축키 10", "_t")
288   -t("Secondary Hotkey 11", "두번째 단축키 11", "_t")
289   -t("Secondary Hotkey 12", "두번째 단축키 12", "_t")
290   -t("Third Hotkey 1", "세번째 단축키 1", "_t")
291   -t("Third Hotkey 2", "세번째 단축키 2", "_t")
292   -t("Third Hotkey 3", "세번째 단축키 3", "_t")
293   -t("Third Hotkey 4", "세번째 단축키 4", "_t")
294   -t("Third Hotkey 5", "세번째 단축키 5", "_t")
295   -t("Third Hotkey 6", "세번째 단축키 6", "_t")
296   -t("Third Hotkey 7", "세번째 단축키 7", "_t")
297   -t("Third Hotkey 8", "세번째 단축키 8", "_t")
298   -t("Third Hotkey 9", "세번째 단축키 9", "_t")
299   -t("Third Hotkey 10", "세번째 단축키 10", "_t")
300   -t("Third Hotkey 11", "세번째 단축키 11", "_t")
301   -t("Third Hotkey 12", "세번째 단축키 12", "_t")
302   -t("Fourth Hotkey 1", "네번째 단축키 1", "_t")
303   -t("Fourth Hotkey 2", "네번째 단축키 2", "_t")
304   -t("Fourth Hotkey 3", "네번째 단축키 3", "_t")
305   -t("Fourth Hotkey 4", "네번째 단축키 4", "_t")
306   -t("Fourth Hotkey 5", "네번째 단축키 5", "_t")
307   -t("Fourth Hotkey 6", "네번째 단축키 6", "_t")
308   -t("Fourth Hotkey 7", "네번째 단축키 7", "_t")
309   -t("Fourth Hotkey 8", "네번째 단축키 8", "_t")
310   -t("Fourth Hotkey 9", "네번째 단축키 9", "_t")
311   -t("Fourth Hotkey 10", "네번째 단축키 10", "_t")
312   -t("Fourth Hotkey 11", "네번째 단축키 11", "_t")
313   -t("Fourth Hotkey 12", "네번째 단축키 12", "_t")
314   -t("Fifth Hotkey 1", "다섯번째 단축키 1", "_t")
315   -t("Fifth Hotkey 2", "다섯번째 단축키 2", "_t")
316   -t("Fifth Hotkey 3", "다섯번째 단축키 3", "_t")
317   -t("Fifth Hotkey 4", "다섯번째 단축키 4", "_t")
318   -t("Fifth Hotkey 5", "다섯번째 단축키 5", "_t")
319   -t("Fifth Hotkey 6", "다섯번째 단축키 6", "_t")
320   -t("Fifth Hotkey 7", "다섯번째 단축키 7", "_t")
321   -t("Fifth Hotkey 8", "다섯번째 단축키 8", "_t")
322   -t("Fifth Hotkey 9", "다섯번째 단축키 9", "_t")
323   -t("Fifth Hotkey 10", "다섯번째 단축키 10", "_t")
324   -t("Fifth Hotkey 11", "다섯번째 단축키 11", "_t")
325   -t("Fifth Hotkey 12", "다섯번째 단축키 12", "_t")
326   -t("Six Hotkey 1", "여섯번째 단축키 1", "_t")
327   -t("Six Hotkey 2", "여섯번째 단축키 2", "_t")
328   -t("Six Hotkey 3", "여섯번째 단축키 3", "_t")
329   -t("Six Hotkey 4", "여섯번째 단축키 4", "_t")
330   -t("Six Hotkey 5", "여섯번째 단축키 5", "_t")
331   -t("Six Hotkey 6", "여섯번째 단축키 6", "_t")
332   -t("Six Hotkey 7", "여섯번째 단축키 7", "_t")
333   -t("Six Hotkey 8", "여섯번째 단축키 8", "_t")
334   -t("Six Hotkey 9", "여섯번째 단축키 9", "_t")
335   -t("Six Hotkey 10", "여섯번째 단축키 10", "_t")
336   -t("Six Hotkey 11", "여섯번째 단축키 11", "_t")
337   -t("Six Hotkey 12", "여섯번째 단축키 12", "_t")
338   -t("Seven Hotkey 1", "일곱번째 단축키 1", "_t")
339   -t("Seven Hotkey 2", "일곱번째 단축키 2", "_t")
340   -t("Seven Hotkey 3", "일곱번째 단축키 3", "_t")
341   -t("Seven Hotkey 4", "일곱번째 단축키 4", "_t")
342   -t("Seven Hotkey 5", "일곱번째 단축키 5", "_t")
343   -t("Seven Hotkey 6", "일곱번째 단축키 6", "_t")
344   -t("Seven Hotkey 7", "일곱번째 단축키 7", "_t")
345   -t("Seven Hotkey 8", "일곱번째 단축키 8", "_t")
346   -t("Seven Hotkey 9", "일곱번째 단축키 9", "_t")
347   -t("Seven Hotkey 10", "일곱번째 단축키 10", "_t")
348   -t("Seven Hotkey 11", "일곱번째 단축키 11", "_t")
349   -t("Seven Hotkey 12", "일곱번째 단축키 12", "_t")
  278 +t("Secondary Hotkey 1", "두 번째 단축키 1", "_t")
  279 +t("Secondary Hotkey 2", "두 번째 단축키 2", "_t")
  280 +t("Secondary Hotkey 3", "두 번째 단축키 3", "_t")
  281 +t("Secondary Hotkey 4", "두 번째 단축키 4", "_t")
  282 +t("Secondary Hotkey 5", "두 번째 단축키 5", "_t")
  283 +t("Secondary Hotkey 6", "두 번째 단축키 6", "_t")
  284 +t("Secondary Hotkey 7", "두 번째 단축키 7", "_t")
  285 +t("Secondary Hotkey 8", "두 번째 단축키 8", "_t")
  286 +t("Secondary Hotkey 9", "두 번째 단축키 9", "_t")
  287 +t("Secondary Hotkey 10", "두 번째 단축키 10", "_t")
  288 +t("Secondary Hotkey 11", "두 번째 단축키 11", "_t")
  289 +t("Secondary Hotkey 12", "두 번째 단축키 12", "_t")
  290 +t("Third Hotkey 1", "세 번째 단축키 1", "_t")
  291 +t("Third Hotkey 2", "세 번째 단축키 2", "_t")
  292 +t("Third Hotkey 3", "세 번째 단축키 3", "_t")
  293 +t("Third Hotkey 4", "세 번째 단축키 4", "_t")
  294 +t("Third Hotkey 5", "세 번째 단축키 5", "_t")
  295 +t("Third Hotkey 6", "세 번째 단축키 6", "_t")
  296 +t("Third Hotkey 7", "세 번째 단축키 7", "_t")
  297 +t("Third Hotkey 8", "세 번째 단축키 8", "_t")
  298 +t("Third Hotkey 9", "세 번째 단축키 9", "_t")
  299 +t("Third Hotkey 10", "세 번째 단축키 10", "_t")
  300 +t("Third Hotkey 11", "세 번째 단축키 11", "_t")
  301 +t("Third Hotkey 12", "세 번째 단축키 12", "_t")
  302 +t("Fourth Hotkey 1", "네 번째 단축키 1", "_t")
  303 +t("Fourth Hotkey 2", "네 번째 단축키 2", "_t")
  304 +t("Fourth Hotkey 3", "네 번째 단축키 3", "_t")
  305 +t("Fourth Hotkey 4", "네 번째 단축키 4", "_t")
  306 +t("Fourth Hotkey 5", "네 번째 단축키 5", "_t")
  307 +t("Fourth Hotkey 6", "네 번째 단축키 6", "_t")
  308 +t("Fourth Hotkey 7", "네 번째 단축키 7", "_t")
  309 +t("Fourth Hotkey 8", "네 번째 단축키 8", "_t")
  310 +t("Fourth Hotkey 9", "네 번째 단축키 9", "_t")
  311 +t("Fourth Hotkey 10", "네 번째 단축키 10", "_t")
  312 +t("Fourth Hotkey 11", "네 번째 단축키 11", "_t")
  313 +t("Fourth Hotkey 12", "네 번째 단축키 12", "_t")
  314 +t("Fifth Hotkey 1", "다섯 번째 단축키 1", "_t")
  315 +t("Fifth Hotkey 2", "다섯 번째 단축키 2", "_t")
  316 +t("Fifth Hotkey 3", "다섯 번째 단축키 3", "_t")
  317 +t("Fifth Hotkey 4", "다섯 번째 단축키 4", "_t")
  318 +t("Fifth Hotkey 5", "다섯 번째 단축키 5", "_t")
  319 +t("Fifth Hotkey 6", "다섯 번째 단축키 6", "_t")
  320 +t("Fifth Hotkey 7", "다섯 번째 단축키 7", "_t")
  321 +t("Fifth Hotkey 8", "다섯 번째 단축키 8", "_t")
  322 +t("Fifth Hotkey 9", "다섯 번째 단축키 9", "_t")
  323 +t("Fifth Hotkey 10", "다섯 번째 단축키 10", "_t")
  324 +t("Fifth Hotkey 11", "다섯 번째 단축키 11", "_t")
  325 +t("Fifth Hotkey 12", "다섯 번째 단축키 12", "_t")
  326 +t("Six Hotkey 1", "여섯 번째 단축키 1", "_t")
  327 +t("Six Hotkey 2", "여섯 번째 단축키 2", "_t")
  328 +t("Six Hotkey 3", "여섯 번째 단축키 3", "_t")
  329 +t("Six Hotkey 4", "여섯 번째 단축키 4", "_t")
  330 +t("Six Hotkey 5", "여섯 번째 단축키 5", "_t")
  331 +t("Six Hotkey 6", "여섯 번째 단축키 6", "_t")
  332 +t("Six Hotkey 7", "여섯 번째 단축키 7", "_t")
  333 +t("Six Hotkey 8", "여섯 번째 단축키 8", "_t")
  334 +t("Six Hotkey 9", "여섯 번째 단축키 9", "_t")
  335 +t("Six Hotkey 10", "여섯 번째 단축키 10", "_t")
  336 +t("Six Hotkey 11", "여섯 번째 단축키 11", "_t")
  337 +t("Six Hotkey 12", "여섯 번째 단축키 12", "_t")
  338 +t("Seven Hotkey 1", "일곱 번째 단축키 1", "_t")
  339 +t("Seven Hotkey 2", "일곱 번째 단축키 2", "_t")
  340 +t("Seven Hotkey 3", "일곱 번째 단축키 3", "_t")
  341 +t("Seven Hotkey 4", "일곱 번째 단축키 4", "_t")
  342 +t("Seven Hotkey 5", "일곱 번째 단축키 5", "_t")
  343 +t("Seven Hotkey 6", "일곱 번째 단축키 6", "_t")
  344 +t("Seven Hotkey 7", "일곱 번째 단축키 7", "_t")
  345 +t("Seven Hotkey 8", "일곱 번째 단축키 8", "_t")
  346 +t("Seven Hotkey 9", "일곱 번째 단축키 9", "_t")
  347 +t("Seven Hotkey 10", "일곱 번째 단축키 10", "_t")
  348 +t("Seven Hotkey 11", "일곱 번째 단축키 11", "_t")
  349 +t("Seven Hotkey 12", "일곱 번째 단축키 12", "_t")
350 350 t("Previous Hotkey Page", "이전 단축키 페이지", "_t")
351 351 t("Next Hotkey Page", "다음 단축키 페이지", "_t")
352 352 t("Quick switch to Hotkey Page 2", "2번 단축키 페이지로 빠른 전환", "_t")
... ... @@ -1696,13 +1696,13 @@ section "engine/modules/boot/data/general/npcs/troll.lua"
1696 1696 t("giant", "거인", "entity type")
1697 1697 t("troll", "트롤", "entity subtype")
1698 1698 t("forest troll", "숲 트롤", "entity name")
1699   -t("Green-skinned and ugly, this massive humanoid glares at you, clenching wart-covered green fists.", "녹색 피부를 가진 거대하고 못생긴 이족 보행체가 사마귀투성이인 녹색 주먹을 꽉 쥐며 당신을 응시한다.", "_t")
  1699 +t("Green-skinned and ugly, this massive humanoid glares at you, clenching wart-covered green fists.", "못생기고 피부가 초록색인, 거대한 인간형 생물이 사마귀로 덮인 녹색 주먹을 움켜쥐고 당신을 노려보고 있습니다.", "_t")
1700 1700 t("stone troll", "바위 트롤", "entity name")
1701   -t("A giant troll with scabrous black skin. With a shudder, you notice the belt of dwarf skulls around his massive waist.", "우둘투둘한 검은 거죽을 가진 자이언트 트롤입니다. 당신은 전율하면서 그의 거대한 허리춤에 달린 허리띠가 드워프 해골로 만들어졌다는 것을 알아차립니다.", "_t")
  1701 +t("A giant troll with scabrous black skin. With a shudder, you notice the belt of dwarf skulls around his massive waist.", "우둘투둘한 검은 가죽을 가진 거대한 트롤입니다. 당신은 그의 거대한 허리춤에 둘러진 허리띠가 드워프 해골로 장식되어 있다는 걸 알아차리고 전율합니다.", "_t")
1702 1702 t("cave troll", "동굴 트롤", "entity name")
1703   -t("This huge troll wields a massive spear and has a disturbingly intelligent look in its piggy eyes.", "이 거대한 트롤은 거대한 창을 휘두르며, 이상하게도 그 살찐 눈에 총명한 표정을 짓습니다.", "_t")
  1703 +t("This huge troll wields a massive spear and has a disturbingly intelligent look in its piggy eyes.", "이 거대한 트롤은 거대한 창을 휘두르며, 이상하게도 그 돼지 같은 눈동자에서 총명한 빛이 엿보입니다.", "_t")
1704 1704 t("mountain troll", "산 트롤", "entity name")
1705   -t("A large and athletic troll with an extremely tough and warty hide.", "아주 질기고 사마귀 투성이 거죽을 지닌 크고 건강한 트롤입니다.", "_t")
  1705 +t("A large and athletic troll with an extremely tough and warty hide.", "거대하고 튼튼한 트롤입니다. 가죽이 아주 질기고 사마귀 투성이입니다.", "_t")
1706 1706 t("mountain troll thunderer", "산 트롤 번개 부르미", "entity name")
1707 1707
1708 1708 ------------------------------------------------
... ... @@ -1921,8 +1921,8 @@ t([[#{bold}##GOLD#Forgotten Cults - Expansion#LAST##{normal}#
1921 1921 #LIGHT_UMBER#Sick of your own head:#WHITE# Replace it with a nice cozy horror!
1922 1922 #LIGHT_UMBER#A ton#WHITE# of artifacts, lore, events...
1923 1923
1924   -]], [[#{bold}##GOLD#금지된 교단 - 확장팩#LAST##{normal}#
1925   -#{italic}##ANTIQUE_WHITE#모든 모험가들이 부를 쫓는 것은 아니며, 세상을 지키는 모든 이들이 선행을 염두에 두고 있는 것도 아니다. 최근들어 공포의 목격 건수가 엄청나게 늘어나고 있습니다. 길에서 벗어난 이들이 몇 년 후에 공포스럽게 변이되고, 부분적으로 미쳐 있는 상태로 발견됩니다. 마즈'에이알 밑 깊은곳에서 뭔가가 준동하고 있음이 명백해지고 있습니다. 그게 바로 당신입니다.#{normal}##LAST#
  1924 +]], [[#{bold}##GOLD#금단의 교단 - 확장팩#LAST##{normal}#
  1925 +#{italic}##ANTIQUE_WHITE#모험가들이라고 모두 행운을 찾고 있는 건 아니고, 세상을 지키고 있다고 모두 선행을 염두에 두고 있는 것도 아닙니다. 최근에 공포체들을 목격하는 빈도가 엄청하게 증가했습니다. 익숙한 길에서 벗어나버린 사람들은 몇 년 뒤에야 발견될 것이고, 그들은 무시무시하게 변이되어 있고, 또 약간 미친 상태일 겁니다. 물론 발견이 된다면 말이지요. 마즈'에이알 지하 깊은 곳에 무언가가 있다는 게 확실해지고 있습니다. 그 무언가가 바로 당신입니다.#{normal}##LAST#
1926 1926
1927 1927 #{bold}#특징#{normal}#:
1928 1928 #LIGHT_UMBER#새로운 직업:#WHITE# 뒤틀린 자. 타락한 힘에 무릎 꿇은 이들로, 스스로를 서서히 공포로 변화시키고, 자신의 뜻에 따라 공포들을 소환 합니다. 피부를 벗어버리고, 얼굴을 녹여내 적들을 공격합니다. 이미 촉수로 변한 팔을 갖고 있는데, 어떤 이가 당신을 막을 수 있을까요?
... ... @@ -1972,7 +1972,7 @@ t("Overwrite character?", "캐릭터를 덮어씌우시겠습니까?", "_t")
1972 1972 t("There is already a character with this name, do you want to overwrite it?", "이미 존재하는 캐릭터의 이름입니다만, 덮어씌우시겠습니까?", "_t")
1973 1973 t("No", "아니요", "_t")
1974 1974 t("Yes", "네", "_t")
1975   -t("This game is not compatible with your version of T-Engine, you can still try it but it might break.", "이 게임은 현재 T-Engint 버전과 호환되지 않으므로, 실행 시 심각한 오류를 발생시킬 수 있습니다.", "_t")
  1975 +t("This game is not compatible with your version of T-Engine, you can still try it but it might break.", "이 게임은 현재 T-Engine 버전과 호환되지 않기에 실행 시 심각한 오류가 발생할 수도 있습니다.", "_t")
1976 1976
1977 1977 ------------------------------------------------
1978 1978 section "engine/modules/boot/dialogs/Profile.lua"
... ...
... ... @@ -190,13 +190,13 @@ section "mod-boot/data/general/npcs/troll.lua"
190 190 t("giant", "거인", "entity type")
191 191 t("troll", "트롤", "entity subtype")
192 192 t("forest troll", "숲 트롤", "entity name")
193   -t("Green-skinned and ugly, this massive humanoid glares at you, clenching wart-covered green fists.", "녹색 피부를 가진 거대하고 못생긴 이족 보행체가 사마귀투성이인 녹색 주먹을 꽉 쥐며 당신을 응시한다.", "_t")
  193 +t("Green-skinned and ugly, this massive humanoid glares at you, clenching wart-covered green fists.", "못생기고 피부가 초록색인, 거대한 인간형 생물이 사마귀로 덮인 녹색 주먹을 움켜쥐고 당신을 노려보고 있습니다.", "_t")
194 194 t("stone troll", "바위 트롤", "entity name")
195   -t("A giant troll with scabrous black skin. With a shudder, you notice the belt of dwarf skulls around his massive waist.", "우둘투둘한 검은 거죽을 가진 자이언트 트롤입니다. 당신은 전율하면서 그의 거대한 허리춤에 달린 허리띠가 드워프 해골로 만들어졌다는 것을 알아차립니다.", "_t")
  195 +t("A giant troll with scabrous black skin. With a shudder, you notice the belt of dwarf skulls around his massive waist.", "우둘투둘한 검은 가죽을 가진 거대한 트롤입니다. 당신은 그의 거대한 허리춤에 둘러진 허리띠가 드워프 해골로 장식되어 있다는 걸 알아차리고 전율합니다.", "_t")
196 196 t("cave troll", "동굴 트롤", "entity name")
197   -t("This huge troll wields a massive spear and has a disturbingly intelligent look in its piggy eyes.", "이 거대한 트롤은 거대한 창을 휘두르며, 이상하게도 그 살찐 눈에 총명한 표정을 짓습니다.", "_t")
  197 +t("This huge troll wields a massive spear and has a disturbingly intelligent look in its piggy eyes.", "이 거대한 트롤은 거대한 창을 휘두르며, 이상하게도 그 돼지 같은 눈동자에서 총명한 빛이 엿보입니다.", "_t")
198 198 t("mountain troll", "산 트롤", "entity name")
199   -t("A large and athletic troll with an extremely tough and warty hide.", "아주 질기고 사마귀 투성이 거죽을 지닌 크고 건강한 트롤입니다.", "_t")
  199 +t("A large and athletic troll with an extremely tough and warty hide.", "거대하고 튼튼한 트롤입니다. 가죽이 아주 질기고 사마귀 투성이입니다.", "_t")
200 200 t("mountain troll thunderer", "산 트롤 번개 부르미", "entity name")
201 201
202 202 ------------------------------------------------
... ... @@ -415,8 +415,8 @@ t([[#{bold}##GOLD#Forgotten Cults - Expansion#LAST##{normal}#
415 415 #LIGHT_UMBER#Sick of your own head:#WHITE# Replace it with a nice cozy horror!
416 416 #LIGHT_UMBER#A ton#WHITE# of artifacts, lore, events...
417 417
418   -]], [[#{bold}##GOLD#금지된 교단 - 확장팩#LAST##{normal}#
419   -#{italic}##ANTIQUE_WHITE#모든 모험가들이 부를 쫓는 것은 아니며, 세상을 지키는 모든 이들이 선행을 염두에 두고 있는 것도 아니다. 최근들어 공포의 목격 건수가 엄청나게 늘어나고 있습니다. 길에서 벗어난 이들이 몇 년 후에 공포스럽게 변이되고, 부분적으로 미쳐 있는 상태로 발견됩니다. 마즈'에이알 밑 깊은곳에서 뭔가가 준동하고 있음이 명백해지고 있습니다. 그게 바로 당신입니다.#{normal}##LAST#
  418 +]], [[#{bold}##GOLD#금단의 교단 - 확장팩#LAST##{normal}#
  419 +#{italic}##ANTIQUE_WHITE#모험가들이라고 모두 행운을 찾고 있는 건 아니고, 세상을 지키고 있다고 모두 선행을 염두에 두고 있는 것도 아닙니다. 최근에 공포체들을 목격하는 빈도가 엄청하게 증가했습니다. 익숙한 길에서 벗어나버린 사람들은 몇 년 뒤에야 발견될 것이고, 그들은 무시무시하게 변이되어 있고, 또 약간 미친 상태일 겁니다. 물론 발견이 된다면 말이지요. 마즈'에이알 지하 깊은 곳에 무언가가 있다는 게 확실해지고 있습니다. 그 무언가가 바로 당신입니다.#{normal}##LAST#
420 420
421 421 #{bold}#특징#{normal}#:
422 422 #LIGHT_UMBER#새로운 직업:#WHITE# 뒤틀린 자. 타락한 힘에 무릎 꿇은 이들로, 스스로를 서서히 공포로 변화시키고, 자신의 뜻에 따라 공포들을 소환 합니다. 피부를 벗어버리고, 얼굴을 녹여내 적들을 공격합니다. 이미 촉수로 변한 팔을 갖고 있는데, 어떤 이가 당신을 막을 수 있을까요?
... ... @@ -466,7 +466,7 @@ t("Overwrite character?", "캐릭터를 덮어씌우시겠습니까?", "_t")
466 466 t("There is already a character with this name, do you want to overwrite it?", "이미 존재하는 캐릭터의 이름입니다만, 덮어씌우시겠습니까?", "_t")
467 467 t("No", "아니요", "_t")
468 468 t("Yes", "네", "_t")
469   -t("This game is not compatible with your version of T-Engine, you can still try it but it might break.", "이 게임은 현재 T-Engint 버전과 호환되지 않으므로, 실행 시 심각한 오류를 발생시킬 수 있습니다.", "_t")
  469 +t("This game is not compatible with your version of T-Engine, you can still try it but it might break.", "이 게임은 현재 T-Engine 버전과 호환되지 않기에 실행 시 심각한 오류가 발생할 수도 있습니다.", "_t")
470 470
471 471 ------------------------------------------------
472 472 section "mod-boot/dialogs/Profile.lua"
... ...
This diff could not be displayed because it is too large.
1   -outputs
2   -tmp.log
3   -merge_translation.*
4   -output_translation.*
5   -untranslated.*
6   -i18n_list.lua
1   --- ansicolors.lua v1.0.2 (2012-08)
2   -
3   --- Copyright (c) 2009 Rob Hoelz <rob@hoelzro.net>
4   --- Copyright (c) 2011 Enrique García Cota <enrique.garcia.cota@gmail.com>
5   ---
6   --- Permission is hereby granted, free of charge, to any person obtaining a copy
7   --- of this software and associated documentation files (the "Software"), to deal
8   --- in the Software without restriction, including without limitation the rights
9   --- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10   --- copies of the Software, and to permit persons to whom the Software is
11   --- furnished to do so, subject to the following conditions:
12   ---
13   --- The above copyright notice and this permission notice shall be included in
14   --- all copies or substantial portions of the Software.
15   ---
16   --- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17   --- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18   --- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19   --- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20   --- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21   --- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22   --- THE SOFTWARE.
23   -
24   -
25   --- support detection
26   -local function isWindows()
27   - return type(package) == 'table' and type(package.config) == 'string' and package.config:sub(1,1) == '\\'
28   -end
29   -
30   -local supported = not isWindows()
31   -if isWindows() then supported = os.getenv("ANSICON") end
32   -
33   -local keys = {
34   - -- reset
35   - reset = 0,
36   -
37   - -- misc
38   - bright = 1,
39   - dim = 2,
40   - underline = 4,
41   - blink = 5,
42   - reverse = 7,
43   - hidden = 8,
44   -
45   - -- foreground colors
46   - black = 30,
47   - red = 31,
48   - green = 32,
49   - yellow = 33,
50   - blue = 34,
51   - magenta = 35,
52   - cyan = 36,
53   - white = 37,
54   -
55   - -- background colors
56   - blackbg = 40,
57   - redbg = 41,
58   - greenbg = 42,
59   - yellowbg = 43,
60   - bluebg = 44,
61   - magentabg = 45,
62   - cyanbg = 46,
63   - whitebg = 47
64   -}
65   -
66   -local escapeString = string.char(27) .. '[%dm'
67   -local function escapeNumber(number)
68   - return escapeString:format(number)
69   -end
70   -
71   -local function escapeKeys(str)
72   -
73   - if not supported then return "" end
74   -
75   - local buffer = {}
76   - local number
77   - for word in str:gmatch("%w+") do
78   - number = keys[word]
79   - assert(number, "Unknown key: " .. word)
80   - table.insert(buffer, escapeNumber(number) )
81   - end
82   -
83   - return table.concat(buffer)
84   -end
85   -
86   -local function replaceCodes(str)
87   - str = string.gsub(str,"(%%{(.-)})", function(_, str) return escapeKeys(str) end )
88   - return str
89   -end
90   -
91   --- public
92   -
93   -local function ansicolors( str )
94   - str = tostring(str or '')
95   -
96   - return replaceCodes('%{reset}' .. str .. '%{reset}')
97   -end
98   -
1   ---COPY
2   -forceFontPackage("chinese")
3   -setFlag("break_text_all_character", true)
1   --- COPY
2   -forceFontPackage("chinese")
3   -local function findJosaType(str)
4   - local length = str:len()
5   -
6   - local c1, c2
7   - local c3 = str:lower():byte(length)
8   -
9   - local last = 0
10   - if ( length < 3 ) or ( c3 < 128 ) then
11   - --@ 여기오면 일단 한글은 아님
12   -
13   - --@ 여기에 숫자나 알파벳인지 검사해서 아니면 마지막 글자 빼고 재귀호출하는 코드 삽입 필요
14   -
15   - if ( c3 == '1' or c3 == '7' or c3 == '8' or c3 == 'l' or c3 == 'r' ) then
16   - last = 8 --@ 한글이 아니고, josa2를 사용하지만 '로'가 맞는 경우
17   - elseif ( c3 == '3' or c3 == '6' or c3 == '0' or c3 == 'm' or c3 == 'n' ) then
18   - last = 100 --@ 한글이 아니고, josa2를 사용하는 경우
19   - end
20   - else --@ 한글로 추정 (정확히는 더 검사가 필요하지만..)
21   - c1 = str:byte(length-2)
22   - c2 = str:byte(length-1)
23   -
24   - last = ( (c1-234)*4096 + (c2-128)*64 + (c3-128) - 3072 )%28
25   - end
26   -
27   - return last
28   -end
29   -
30   -local function addJosa(str, temp)
31   - local josa1, josa2, index
32   -
33   - if temp == 1 or temp == "가" or temp == "이" then
34   - josa1 = "가"
35   - josa2 = "이"
36   - index = 1
37   - elseif temp == 2 or temp == "는" or temp == "은" then
38   - josa1 = "는"
39   - josa2 = "은"
40   - index = 2
41   - elseif temp == 3 or temp == "를" or temp == "을" then
42   - josa1 = "를"
43   - josa2 = "을"
44   - index = 3
45   - elseif temp == 4 or temp == "로" or temp == "으로" then
46   - josa1 = "로"
47   - josa2 = "으로"
48   - index = 4
49   - elseif temp == 5 or temp == "다" or temp == "이다" then
50   - josa1 = "다"
51   - josa2 = "이다"
52   - index = 5
53   - elseif temp == 6 or temp == "와" or temp == "과" then
54   - josa1 = "와"
55   - josa2 = "과"
56   - index = 6
57   - elseif temp == 7 then
58   - josa1 = ""
59   - josa2 = "이"
60   - index = 7
61   - else
62   - if type(temp) == string then return str .. temp
63   - else return str end
64   - end
65   -
66   - local type = findJosaType(str)
67   -
68   - if type == 0 or ( index == 4 and type == 8 ) then
69   - return str .. josa1
70   - else
71   - return str .. josa2
72   - end
73   -end
74   -
75   -setFlag("noun_target_sub", function(str, type, noun)
76   - if type == "#Source#" then
77   - return str:gsub("#Source#", noun):gsub("#Source1#", addJosa(noun, "가")):gsub("#Source2#", addJosa(noun, "는")):gsub("#Source3#", addJosa(noun, "를")):gsub("#Source4#", addJosa(noun, "로")):gsub("#Source5#", addJosa(noun, "다")):gsub("#Source6#", addJosa(noun, "과")):gsub("#Source7#", addJosa(noun, 7))
78   - elseif type == "#source#" then
79   - return str:gsub("#source#", noun):gsub("#source#", addJosa(noun, "가")):gsub("#source2#", addJosa(noun, "는")):gsub("#source3#", addJosa(noun, "를")):gsub("#source4#", addJosa(noun, "로")):gsub("#source5#", addJosa(noun, "다")):gsub("#source6#", addJosa(noun, "과")):gsub("#source7#", addJosa(noun, 7))
80   - elseif type == "#Target#" then
81   - return str:gsub("#Target#", noun):gsub("#Target1#", addJosa(noun, "가")):gsub("#Target2#", addJosa(noun, "는")):gsub("#Target3#", addJosa(noun, "를")):gsub("#Target4#", addJosa(noun, "로")):gsub("#Target5#", addJosa(noun, "다")):gsub("#Target6#", addJosa(noun, "과")):gsub("#Target7#", addJosa(noun, 7))
82   - elseif type == "#target#" then
83   - return str:gsub("#target#", noun):gsub("#target#", addJosa(noun, "가")):gsub("#target2#", addJosa(noun, "는")):gsub("#target3#", addJosa(noun, "를")):gsub("#target4#", addJosa(noun, "로")):gsub("#target5#", addJosa(noun, "다")):gsub("#target6#", addJosa(noun, "과")):gsub("#target7#", addJosa(noun, 7))
84   - elseif type == "@Source@" then
85   - return str:gsub("@Source@", noun):gsub("@Source@", addJosa(noun, "가")):gsub("@Source2@", addJosa(noun, "는")):gsub("@Source3@", addJosa(noun, "를")):gsub("@Source4@", addJosa(noun, "로")):gsub("@Source5@", addJosa(noun, "다")):gsub("@Source6@", addJosa(noun, "과")):gsub("@Source7@", addJosa(noun, 7))
86   - elseif type == "@source@" then
87   - return str:gsub("@source@", noun):gsub("@source@", addJosa(noun, "가")):gsub("@source2@", addJosa(noun, "는")):gsub("@source3@", addJosa(noun, "를")):gsub("@source4@", addJosa(noun, "로")):gsub("@source5@", addJosa(noun, "다")):gsub("@source6@", addJosa(noun, "과")):gsub("@source7@", addJosa(noun, 7))
88   - elseif type == "@Target@" then
89   - return str:gsub("@Target@", noun):gsub("@Target@", addJosa(noun, "가")):gsub("@Target2@", addJosa(noun, "는")):gsub("@Target3@", addJosa(noun, "를")):gsub("@Target4@", addJosa(noun, "로")):gsub("@Target5@", addJosa(noun, "다")):gsub("@Target6@", addJosa(noun, "과")):gsub("@Target7@", addJosa(noun, 7))
90   - elseif type == "@target@" then
91   - return str:gsub("@target@", noun):gsub("@target@", addJosa(noun, "가")):gsub("@target2@", addJosa(noun, "는")):gsub("@target3@", addJosa(noun, "를")):gsub("@target4@", addJosa(noun, "로")):gsub("@target5@", addJosa(noun, "다")):gsub("@target6@", addJosa(noun, "과")):gsub("@target7@", addJosa(noun, 7))
92   - elseif str == "@playername@" then
93   - return str:gsub("@playername@", noun):gsub("@playername@", addJosa(noun, "가")):gsub("@playername2@", addJosa(noun, "는")):gsub("@playername3@", addJosa(noun, "를")):gsub("@playername4@", addJosa(noun, "로")):gsub("@playername5@", addJosa(noun, "다")):gsub("@playername6@", addJosa(noun, "과")):gsub("@playername7@", addJosa(noun, 7))
94   - elseif type == "@npcname@" then
95   - return str:gsub("@npcname@", noun):gsub("@npcname@", addJosa(noun, "가")):gsub("@npcname2@", addJosa(noun, "는")):gsub("@npcname3@", addJosa(noun, "를")):gsub("@npcname4@", addJosa(noun, "로")):gsub("@npcname5@", addJosa(noun, "다")):gsub("@npcname6@", addJosa(noun, "과")):gsub("@npcname7@", addJosa(noun, 7))
96   - else
97   - return str:gsub(type, noun)
98   - end
99   -end)
100   -
101   -setFlag("tformat_special", function(s, tag, locales_args, special, ...)
102   - local args
103   - if locales_args then
104   - local sargs = {...}
105   - args = {}
106   - for sidx, didx in pairs(locales_args) do
107   - args[sidx] = sargs[didx]
108   - end
109   - else
110   - args = {...}
111   - end
112   - s = _t(s, tag)
113   - for k, v in pairs(special) do
114   - args[k] = addJosa(args[k], v)
115   - end
116   - return s:format(unpack(args))
117   -end)
1   --- COPY
2   -forceFontPackage("chinese")
3   -setFlag("break_text_all_character", true)
1   --- COPY
2   -forceFontPackage("chinese")
3   -setFlag("break_text_all_character", true)
1   -local lfs = require 'lfs'
2   -local colors = require 'ansicolors'
3   -local Parser = require 'luafish.parser'
4   -local p = Parser()
5   -
6   -local locales = {}
7   -function string.capitalize(str)
8   - if #str > 1 then
9   - return string.upper(str:sub(1, 1))..str:sub(2)
10   - elseif #str == 1 then
11   - return str:upper()
12   - else
13   - return str
14   - end
15   -end
16   -
17   -function table.keys(t)
18   - local tt = {}
19   - for k, e in pairs(t) do tt[#tt+1] = k end
20   - return tt
21   -end
22   -
23   -function table.print(src, offset, ret)
24   - if type(src) ~= "table" then print("table.print has no table:", src) return end
25   - offset = offset or ""
26   - for k, e in pairs(src) do
27   - -- Deep copy subtables, but not objects!
28   - if type(e) == "table" and not e.__ATOMIC and not e.__CLASSNAME then
29   - print(("%s[%s] = {"):format(offset, tostring(k)))
30   - table.print(e, offset.."\t")
31   - print(("%s}"):format(offset))
32   - else
33   - print(("%s[%s] = %s"):format(offset, tostring(k), tostring(e)))
34   - end
35   - end
36   -end
37   -
38   -local log_alias = {
39   - log = {1},
40   - logSeen = {2, 3},
41   - logCombat = {2, 3},
42   - logPlayer = {2},
43   - logMessage = {5},
44   - delayedLogMessage = {4},
45   - say = {2},
46   - saySimple = {2},
47   - easing = {3},
48   - easingSimple = {3},
49   -}
50   -local newTalent_alias = {
51   - newTalent = true,
52   - newInscription = true,
53   - uberTalent = true,
54   -}
55   -local function explore(file, ast)
56   - --table.print(ast)
57   - for i, e in ipairs(ast) do
58   - if type(e) == "table" then
59   - if e.tag == "Id" and e[1] == "_t" then
60   - local en = ast[i+1]
61   - if en and type(en) == "table" and en.tag == "ExpList" and type(en[1]) == "table" and en[1].tag == "String" then
62   - local tag = "_t"
63   - if en[2] and type(en[2]) == "table" and en[2].tag == "String" then
64   - tag = en[2][1]
65   - end
66   - print(colors("%{bright cyan}_t"), en[1][1])
67   - locales[file] = locales[file] or {}
68   - locales[file][en[1][1]] = {line=en[1].nline, type=tag}
69   - end
70   - elseif e.tag == "String" and e[1] == "tformat" and i == 2 then
71   - local en = ast[i-1]
72   - if en and type(en) == "table" and en.tag == "Paren" and type(en[1]) == "table" then
73   - local sn = en[1]
74   - if sn.tag == "String" and sn[1] then
75   - print(colors("%{bright yellow}tformat"), sn[1])
76   - locales[file] = locales[file] or {}
77   - locales[file][sn[1]] = {line=sn.nline, type="tformat"}
78   - end
79   - end
80   - elseif e.tag == "Id" and newTalent_alias[e[1]] then
81   - local en = ast[i+1]
82   - if en then for j, p in ipairs(en[1]) do
83   - if p[1] and p[2] and p.tag == "Field" and p[1][1] == "name" then
84   - print(colors("%{bright green}".. e[1]), p[2][1])
85   - locales[file] = locales[file] or {}
86   - locales[file][p[2][1]] = {line=p[2].nline, type="talent name"}
87   - end
88   - end end
89   - elseif e.tag == "Id" and e[1] == "newTalentType" then
90   - local en = ast[i+1]
91   - if en then for j, p in ipairs(en[1]) do
92   - if p[1] and p[2] and p.tag == "Field" and p[1][1] == "type" then
93   - local cat = p[2][1]:gsub("/.*", "")
94   - print(colors("%{bright green}newTalentType"), cat)
95   - locales[file] = locales[file] or {}
96   - locales[file][cat] = {line=p[2].nline, type="talent category"}
97   - end
98   - end end
99   - elseif e.tag == "Id" and e[1] == "newEntity" then
100   - local en = ast[i+1]
101   - if en then for j, p in ipairs(en[1]) do
102   - if p[1] and p[2] and p.tag == "Field" and p[1][1] == "name" then
103   - print(colors("%{green}newEntity"), p[2][1])
104   - locales[file] = locales[file] or {}
105   - locales[file][p[2][1]] = {line=p[2].nline, type="entity name"}
106   - elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "short_name" then
107   - print(colors("%{green}newEntity"), p[2][1])
108   - locales[file] = locales[file] or {}
109   - locales[file][p[2][1]] = {line=p[2].nline, type="entity short_name"}
110   - elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "type" then
111   - print(colors("%{green}newEntity"), p[2][1])
112   - locales[file] = locales[file] or {}
113   - locales[file][p[2][1]] = {line=p[2].nline, type="entity type"}
114   - elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "subtype" then
115   - print(colors("%{green}newEntity"), p[2][1])
116   - locales[file] = locales[file] or {}
117   - locales[file][p[2][1]] = {line=p[2].nline, type="entity subtype"}
118   - elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "keywords" then
119   - for _, q in ipairs(p[2]) do
120   - if q[1].tag == "String" then
121   - print(colors("%{green}newEntity"), q[1][1])
122   - locales[file] = locales[file] or {}
123   - locales[file][q[1][1]] = {line=p[2].nline, type="entity keyword"}
124   - end
125   - end
126   - elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "combat" then
127   - for _, q in ipairs(p[2]) do
128   - if q.tag == "Field" and q[1].tag == "String" and q[1][1] == "talented" then
129   - print(colors("%{green}newEntity"), q[2][1])
130   - locales[file] = locales[file] or {}
131   - locales[file][q[2][1]] = {line=p[2].nline, type="entity combat talented"}
132   - end
133   - end
134   - elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "on_slot" then
135   - if(p[2].tag == "String") then
136   - print(colors("%{green}newEntity"), p[2][1])
137   - locales[file] = locales[file] or {}
138   - locales[file][p[2][1]] = {line=p[2].nline, type="entity on slot"}
139   - end
140   - end
141   - end end
142   - elseif e.tag == "Id" and e[1] == "newIngredient" then
143   - local en = ast[i+1]
144   - if en then for j, p in ipairs(en[1]) do
145   - if p[1] and p[2] and p.tag == "Field" and p[1][1] == "name" then
146   - print(colors("%{green}newIngredient"), p[2][1])
147   - locales[file] = locales[file] or {}
148   - locales[file][p[2][1]] = {line=p[2].nline, type="ingredient name"}
149   - elseif p[1] and p[2] and p.tag == "Field" and p[1][1] == "type" then
150   - print(colors("%{green}newIngredient"), p[2][1])
151   - locales[file] = locales[file] or {}
152   - locales[file][p[2][1]] = {line=p[2].nline, type="ingredient type"}
153   - end
154   - end end
155   - elseif e.tag == "Id" and e[1] == "newAchievement" then
156   - local en = ast[i+1]
157   - if en then for j, p in ipairs(en[1]) do
158   - if p[1] and p[2] and p.tag == "Field" and p[1][1] == "name" then
159   - print(colors("%{bright red}newAchievement"), p[2][1])
160   - locales[file] = locales[file] or {}
161   - locales[file][p[2][1]] = {line=p[2].nline, type="achievement name"}
162   - end
163   - end end
164   - elseif e.tag == "Id" and e[1] == "newBirthDescriptor" then
165   - local en = ast[i+1]
166   - local dname, name = nil, nil
167   - if en then for j, p in ipairs(en[1]) do
168   - if p[1] and p[2] and p.tag == "Field" and p[1][1] == "name" then
169   - name = p[2]
170   - end
171   - if p[1] and p[2] and p.tag == "Field" and p[1][1] == "display_name" then
172   - dname = p[2]
173   - end
174   - if p[1] and p[2] and p.tag == "Field" and p[1][1] == "cosmetic_options" then
175   - for _, q in ipairs(p[2]) do
176   - if q[1].tag == "String" then
177   - local name = q[1][1]:gsub("_", " "):capitalize()
178   - print(colors("%{bright cyan}newBirthDescriptor"), name)
179   - locales[file] = locales[file] or {}
180   - locales[file][name] = {line=p[2].nline, type="birth facial category"}
181   - end
182   - end
183   - end
184   - end end
185   - if dname then
186   - print(colors("%{bright cyan}newBirthDescriptor"), dname[1])
187   - locales[file] = locales[file] or {}
188   - locales[file][dname[1]] = {line=dname.nline, type="birth descriptor name"}
189   - elseif name then
190   - print(colors("%{bright cyan}newBirthDescriptor"), name[1])
191   - locales[file] = locales[file] or {}
192   - locales[file][name[1]] = {line=name.nline, type="birth descriptor name"}
193   - end
194   - elseif e.tag == "Id" and e[1] == "newGem" then
195   - local en = ast[i+1]
196   - if en[1].tag == "String" then
197   - local name = en[1][1]:lower()
198   - local a_name = "alchemist "..en[1][1]:lower()
199   - local subtype = en[5][1]
200   - locales[file] = locales[file] or {}
201   - print(colors("%{cyan}newGem"), name)
202   - locales[file][name] = {line=en.nline, type="gem name"}
203   - print(colors("%{cyan}newGem"), a_name)
204   - locales[file][a_name] = {line=en.nline, type="alchemist gem"}
205   - print(colors("%{cyan}newGem"), subtype)
206   - locales[file][subtype] = {line=en.nline, type="gem subtype"}
207   - end
208   - elseif e.tag == "Id" and e[1] == "newEffect" then
209   - local en = ast[i+1]
210   - if en then for j, p in ipairs(en[1]) do
211   - if p[1] and p[2] and p.tag == "Field" and p[1][1] == "subtype" then
212   - for _, q in ipairs(p[2]) do
213   - if q[1].tag == "String" then
214   - print(colors("%{yellow}newEffect"), q[1][1])
215   - locales[file] = locales[file] or {}
216   - locales[file][q[1][1]] = {line=p[2].nline, type="effect subtype"}
217   - end
218   - end
219   - end
220   - end end
221   - elseif e.tag == "Id" and e[1] == "floorEffect" then
222   - local en = ast[i+1]
223   - if en then for j, p in ipairs(en[1]) do
224   - if p[1] and p[2] and p.tag == "Field" and p[1][1] == "desc" then
225   - print(colors("%{yellow}floorEffect"), p[2][1])
226   - locales[file] = locales[file] or {}
227   - locales[file][p[2][1]] = {line=p[2].nline, type="floorEffect desc"}
228   - end
229   - end end
230   - elseif e.tag == "Id" and e[1] == "newLore" then
231   - local en = ast[i+1]
232   - if en then for j, p in ipairs(en[1]) do
233   - if p[1] and p[2] and p.tag == "Field" and p[1][1] == "category" then
234   - print(colors("%{red}newLore"), p[2][1])
235   - locales[file] = locales[file] or {}
236   - locales[file][p[2][1]] = {line=p[2].nline, type="newLore category"}
237   - end
238   - end end
239   - elseif e.tag == "VarList" and e[1].tag == "Id" and e[1][1] == "load_tips" then
240   - if file:find("init.lua$") then
241   - local en = ast[i+1][1]
242   - if en then for _, v in ipairs(en) do
243   - for _, p in ipairs(v[2]) do if p.tag == "Field" and p[1][1]=="text" then
244   - local text = p[2][1]
245   - print(colors("%{bright red}load_tips"), text)
246   - locales[file] = locales[file] or {}
247   - locales[file][text] = {line=p[2].nline, type="init.lua load_tips"}
248   - end end
249   - end end
250   - end
251   - elseif e.tag == "VarList" and e[1].tag == "Id" and e[1][1] == "description" then
252   - if file:find("init.lua$") then
253   - local en = ast[i+1][1]
254   - local text = en[1]
255   - print(colors("%{bright red}init.lua description"), text)
256   - locales[file] = locales[file] or {}
257   - locales[file][text] = {line=en.nline, type="init.lua description"}
258   - end
259   - elseif e.tag == "VarList" and e[1].tag == "Id" and e[1][1] == "long_name" then
260   - if file:find("init.lua$") then
261   - local en = ast[i+1][1]
262   - local text = en[1]
263   - print(colors("%{bright red}init.lua long_name"), text)
264   - locales[file] = locales[file] or {}
265   - locales[file][text] = {line=en.nline, type="init.lua long_name"}
266   - end
267   - elseif e.tag == "Invoke" and e[1].tag == "Id" and e[1][1] == "ActorStats" and e[2].tag == "String" and e[2][1] == "defineStat" then
268   - local en = e[3]
269   - if en and type(en) == "table" and en.tag == "ExpList" and en[1].tag == "String" and en[2].tag == "String" then
270   - print(colors("%{blue}defineStat"), en[1][1])
271   - locales[file] = locales[file] or {}
272   - locales[file][en[1][1]] = {line=e.nline, type="stat name"}
273   - print(colors("%{blue}defineStat"), en[2][1])
274   - locales[file] = locales[file] or {}
275   - locales[file][en[2][1]] = {line=e.nline, type="stat short_name"}
276   - end
277   - elseif e.tag == "Invoke" and log_alias[e[2][1] ] then
278   - local en = e[3]
279   - local log_type = e[2][1]
280   - local orders = log_alias[log_type]
281   - for _, order in ipairs(orders) do
282   - if en and type(en) == "table" and en.tag == "ExpList" and type(en[order]) == "table" and en[order].tag == "String" then
283   - print(colors("%{bright blue}"..log_type), en[order][1])
284   - locales[file] = locales[file] or {}
285   - locales[file][en[order][1]] = {line=en[order].nline, type=log_type}
286   - end
287   - end
288   - elseif e.tag == "Call" and e[1][2] and log_alias[e[1][2][1] ] then
289   - local en = e[2]
290   - local log_type = e[1][2][1]
291   - local orders = log_alias[log_type]
292   - for _, order in ipairs(orders) do
293   - if en and type(en) == "table" and en.tag == "ExpList" and type(en[order]) == "table" and en[order].tag == "String" then
294   - print(colors("%{bright blue}"..log_type), en[order][1])
295   - locales[file] = locales[file] or {}
296   - locales[file][en[order][1]] = {line=en[order].nline, type=log_type}
297   - end
298   - end
299   - elseif e.tag == "Invoke" and
300   - e[1] and e[1].tag == "Index" and e[1][1] and e[1][1][1] == "engine" and e[1][1].tag == "Id" and e[1][2][1] == "Faction" and e[1][2].tag == "String" and
301   - e[2] and e[2].tag == "String" and e[2][1] == "add" then
302   - local en = e[3]
303   - if en then for j, p in ipairs(en[1]) do
304   - if p[1] and p[2] and p.tag == "Field" and p[1][1] == "name" then
305   - print(colors("%{blue}newFaction"), p[2][1])
306   - locales[file] = locales[file] or {}
307   - locales[file][p[2][1]] = {line=p[2].nline, type="faction name"}
308   - end
309   - end end
310   - end
311   - explore(file, e)
312   - end
313   - end
314   -end
315   -
316   -local function dofolder(dir)
317   - local function handle_file(file)
318   - if file:find("/locales/") then
319   - return
320   - end
321   - print(colors("%{bright}-------------------------------------"))
322   - print(colors("%{bright}-- "..file))
323   - print(colors("%{bright}-------------------------------------"))
324   - local function err(x)
325   - io.stderr:write("In file ".. file .. ":\n")
326   - io.stderr:write(x .. "\n")
327   - end
328   - local function parsefunc()
329   - return p:parse{file}
330   - end
331   - local ok, parsed = xpcall(parsefunc, err)
332   - if ok then
333   - explore(file:gsub("%.%./", ""), parsed)
334   - else
335   - print()
336   - end
337   - end
338   -
339   - if lfs.attributes(dir, "mode") == "file" then
340   - handle_file(dir)
341   - return
342   - end
343   -
344   - for sfile in lfs.dir(dir) do
345   - local file = dir.."/"..sfile
346   - if lfs.attributes(file, "mode") == "directory" and sfile ~= ".." and sfile ~= "." then
347   - dofolder(file)
348   - elseif sfile:find("%.lua$") then
349   - handle_file(file)
350   - end
351   - end
352   -end
353   -
354   -for _, dir in ipairs{...} do
355   - dofolder(dir)
356   -end
357   -
358   -local f = io.open("i18n_list.lua", "w")
359   -local slist = table.keys(locales)
360   -table.sort(slist)
361   -for _, section in ipairs(slist) do
362   - f:write('------------------------------------------------\n')
363   - f:write(('section %q\n\n'):format(section))
364   -
365   - local list = {}
366   - for k, v in pairs(locales[section]) do
367   - if type(k) == "string" then
368   - list[#list+1] = {text=k, line=v.line, type=v.type}
369   - end
370   - end
371   - table.sort(list, function(a,b)
372   - if a.line ~= b.line then
373   - return a.line < b.line
374   - else
375   - return a.text < b.text
376   - end
377   - end)
378   -
379   - -- local list = table.keys(locales[section])
380   - -- table.sort(list)
381   -
382   - for _, s in ipairs(list) do
383   - -- f:write(('t(%q, %q, %q) -- \n'):format(s.text, s.text, s.type))
384   - f:write(('tDef(%s, %q, %q) -- \n'):format(s.line, s.text, s.type))
385   - end
386   - f:write('\n\n')
387   -end
388   -f:close()
1   -local lfs = require 'lfs'
2   -local locales_trans = {}
3   -local locales_args = {}
4   -local locales_special = {}
5   -local locales_sections ={}
6   -local sections = {}
7   -local current_section = ""
8   -local tcs = {}
9   -local locale = "zh_hans"
10   -local function runfile(file, env)
11   - -- Base loader
12   - local prev, err = loadfile(file)
13   - if err then error(err) end
14   - setfenv(prev, env)
15   - print("running "..file)
16   - prev()
17   - return
18   -end
19   -local function count_string(str, pattern)
20   - count = 0
21   - for i in string.gfind(str, pattern) do
22   - count = count + 1
23   - end
24   - return count
25   -end
26   -
27   -local function suitable_string(string)
28   - if string == nil or string == "nil" then
29   - return "nil"
30   - end
31   - if string:find("\n") and string:sub(1, 1) ~= "\n" then
32   - return "[[" .. string .. "]]"
33   - else
34   - return ("%q"):format(string)
35   - end
36   -end
37   -
38   -local function rev_kv(a)
39   - local aa = {}
40   - for k, v in pairs(a) do
41   - if v ~= nil then
42   - aa[v] = k
43   - end
44   - end
45   - return aa
46   -end
47   -function table.val_to_str ( v )
48   - if "string" == type( v ) then
49   - v = string.gsub( v, "\n", "\\n" )
50   - if string.match( string.gsub(v,"[^'\"]",""), '^"+$' ) then
51   - return "'" .. v .. "'"
52   - end
53   - return '"' .. string.gsub(v,'"', '\\"' ) .. '"'
54   - else
55   - return "table" == type( v ) and table.tostring( v ) or
56   - tostring( v )
57   - end
58   - end
59   -
60   - function table.key_to_str ( k )
61   - if "string" == type( k ) and string.match( k, "^[_%a][_%a%d]*$" ) then
62   - return k
63   - else
64   - return "[" .. table.val_to_str( k ) .. "]"
65   - end
66   - end
67   -
68   -function table.tostring( tbl )
69   - local result, done = {}, {}
70   - for k, v in ipairs( tbl ) do
71   - table.insert( result, table.val_to_str( v ) )
72   - done[ k ] = true
73   - end
74   - for k, v in pairs( tbl ) do
75   - if not done[ k ] then
76   - table.insert( result,
77   - table.key_to_str( k ) .. "=" .. table.val_to_str( v ) )
78   - end
79   - end
80   - return "{" .. table.concat( result, "," ) .. "}"
81   -end
82   -
83   -local function get(table, key, tag, value)
84   - tag = tag or "nil"
85   - table["nil"] = table["nil"] or {}
86   - table[tag] = table[tag] or {}
87   - if value == nil then
88   - if table[tag][key] then
89   - return table[tag][key]
90   - else
91   - return table["nil"][key]
92   - end
93   - else
94   - table[tag][key] = value
95   - table["nil"][key] = value
96   - end
97   -end
98   -
99   -local function introduce_file(file_in)
100   - local env = setmetatable({
101   - locale = function(s) end,
102   - section = function(s)
103   - current_section = s
104   - sections[#sections+1] = current_section
105   - locales_sections[current_section] = locales_sections[current_section] or {}
106   - end,
107   - tDef = function(line, src, tag)
108   - locales_sections[current_section][src] = {
109   - line = line,
110   - src = src,
111   - tag = tag,
112   - }
113   - end,
114   - }, {__index=getfenv(2)})
115   - runfile(file_in, env)
116   -end
117   -
118   -local function check_src_dst(src, dst, args_order)
119   - local rex = require 'rex_pcre'
120   - local pattern = [[(%[+-]?\d*(\.\d*)?[dsfi])]]
121   - local src_s = {}
122   - local dst_s = {}
123   - for k in (rex.gmatch(src, pattern)) do
124   - src_s[#src_s+1] = k
125   - end
126   - for k in (rex.gmatch(dst, pattern)) do
127   - dst_s[#dst_s+1] = k
128   - end
129   - local checked = true
130   - if args_order then
131   - for k, v in ipairs(dst_s) do
132   - if src_s[args_order[k]] ~= v then
133   - checked = false
134   - end
135   - end
136   - else
137   - for k, v in ipairs(dst_s) do
138   - if src_s[k] ~= v then
139   - checked = false
140   - end
141   - end
142   - end
143   - if #src_s ~= #dst_s then
144   - checked = false
145   - end
146   - if not checked then
147   - print("% MISMATCH:")
148   - print(src)
149   - print(table.tostring(src_s))
150   - print(dst)
151   - print(table.tostring(dst_s))
152   - end
153   -end
154   -local function merge_file_t(src, dst, tag, args_order, special)
155   - if not dst or dst == "" then
156   - return
157   - end
158   - if tcs[src:lower()] then
159   - dst = tcs[src:lower()]
160   - end
161   - if src == dst and current_section ~= "always_merge" then
162   - return
163   - end
164   - -- check_src_dst(src, dst, args_order)
165   - if false and count_string(src, "#") ~= count_string(dst, "#") then
166   - print("# MISMATCH:")
167   - print(src)
168   - print(dst)
169   - end
170   - if not locales_sections[current_section][src] then
171   - locales_sections[current_section][src] = {
172   - line = 999,
173   - src = src,
174   - bogus = true,
175   - tag = tag,
176   - }
177   - end
178   - get(locales_trans, src, tag, dst)
179   - get(locales_args, src, tag, args_order)
180   - get(locales_special, src, tag, special)
181   -end
182   -local function merge_file_tt(src, dst, args_order, special)
183   - return merge_file_t(src, dst, nil, args_order, special)
184   -end
185   -local function merge_file(file_merge)
186   - local env = setmetatable({
187   - locale = function(s) end,
188   - section = function(s)
189   - current_section = s
190   - if not locales_sections[current_section] then
191   - sections[#sections+1] = current_section
192   - locales_sections[current_section] = locales_sections[current_section] or {}
193   - end
194   - end,
195   - t = merge_file_t,
196   - t_old = merge_file_t,
197   - tc = function(src, dst)
198   - tcs[src] = dst
199   - end,
200   - }, {__index=getfenv(2)})
201   - runfile(file_merge, env)
202   -end
203   -local merged_src = {}
204   -local translated = 0
205   -local all_entry = 0
206   -local not_merged = 0
207   -local function write_section(f, f2, section)
208   - local result = ""
209   - local f2_count = 0
210   - t = locales_sections[section]
211   - f:write("------------------------------------------------\n")
212   - f:write(('section "%s"\n\n'):format(section))
213   - result = result .. "------------------------------------------------\n"
214   - result = result .. ('section "%s"\n\n'):format(section)
215   - local f2_text = ""
216   - local list = {}
217   - for _, e in pairs(t) do
218   - list[#list+1] = e
219   - end
220   - if section ~= "not_merged" then
221   - table.sort(list, function(a, b)
222   - if a.line ~= b.line then
223   - return a.line < b.line
224   - else
225   - return a.src < b.src
226   - end
227   - end)
228   - else
229   - table.sort(list, function(a, b) return a.src < b.src end)
230   - end
231   - for _, e in ipairs(list) do
232   - local src = e.src
233   - local tag = e.tag or nil
234   -
235   - if section ~= "not_merged" then
236   - merged_src[src] = true
237   - end
238   -
239   - local print_str = ""
240   - local locale_tran = get(locales_trans, src, tag)
241   - if locale_tran then
242   - if section ~= "always_merge" and e.bogus then
243   - print_str = "t_old"
244   - else
245   - print_str = "t"
246   - end
247   - print_str = print_str .. "(" .. suitable_string(src) .. ", " .. suitable_string(locale_tran) .. ", " .. suitable_string(tag)
248   - local locale_special = get(locales_special, src, tag)
249   - local locale_arg = get(locales_args, src, tag)
250   - if locale_special then
251   - if locale_arg then
252   - print_str = print_str .. ", " .. table.tostring(locale_arg)
253   - else
254   - print_str = print_str .. ", nil"
255   - end
256   - print_str = print_str .. ", " .. table.tostring(locale_special) .. ")"
257   - elseif locale_arg then
258   - print_str = print_str .. ", " .. table.tostring(locale_arg) .. ")"
259   - else
260   - print_str = print_str .. ")"
261   - end
262   - if not (section ~= "always_merge" and e.bogus) then
263   - result = result .. print_str .. "\n"
264   - end
265   - else
266   - print_str = "t(" .. suitable_string(src) .. ", " .. suitable_string(src) .. ", " .. suitable_string(tag) .. ")"
267   - -- f2:write(print_str .. "\n")
268   - f2_text = f2_text .. print_str .. "\n"
269   - f2_count = f2_count + 1
270   - end
271   - if section ~= "not_merged" or not merged_src[src] then
272   - f:write(print_str .. '\n')
273   - end
274   - if section ~= "not_merged" then
275   - all_entry = all_entry + 1
276   - if locale_tran then
277   - translated = translated + 1
278   - end
279   - end
280   - end
281   - f:write("\n\n")
282   - result = result .. "\n\n"
283   - if f2_text ~= "" then
284   - f2:write("------------------------------------------------\n")
285   - f2:write(('section "%s"\n'):format(section))
286   - f2:write(("-- %d entries\n"):format(f2_count))
287   - f2:write(f2_text)
288   - f2:write("\n\n")
289   - end
290   - return result
291   -end
292   -local output_filename ={}
293   -local output_content = {}
294   -local function copy_file(filename)
295   - local fc = io.open(filename, "r")
296   - local result = 'locale "' .. locale .. '"\n'
297   - if fc then
298   - while true do
299   - local l = fc:read()
300   - if not l then break end
301   - result = result .. l .. "\n"
302   - end
303   - end
304   - return result .. "\n"
305   -end
306   -local function get_section_shortname(section)
307   - if section == "always_merge" then
308   - return "engine"
309   - elseif section:find("game/engines/default/") then
310   - return "engine"
311   - elseif section:find("game/modules/tome/") then
312   - return "tome"
313   - elseif section:find("game/addons/") then
314   - return "addon-" .. section:gsub("game/addons/tome%-([^/]+).+", "%1")
315   - elseif section:find("game/dlcs/") then
316   - return "dlc-" .. section:gsub("game/dlcs/tome%-([^/]+).+", "%1")
317   - else
318   - return nil
319   - end
320   -end
321   -local function setup_section(shortname)
322   - local file_name = ""
323   - if shortname == "tome" then
324   - lfs.mkdir("../game/modules/tome/data/locales")
325   - file_name = "../game/modules/tome/data/locales/" .. locale .. ".lua"
326   - elseif shortname == "engine" then
327   - lfs.mkdir("../game/engines/default/data/locales")
328   - lfs.mkdir("../game/engines/default/data/locales/engine")
329   - file_name = "../game/engines/default/data/locales/engine/" .. locale .. ".lua"
330   - elseif shortname:find("addon-") then
331   - local name = shortname:gsub("^addon%-", "")
332   - lfs.mkdir("../game/addons/tome-" .. name .. "/data/locales")
333   - file_name = "../game/addons/tome-" .. name .. "/data/locales/" .. locale .. ".lua"
334   - elseif shortname:find("dlc-") then
335   - local name = shortname:gsub("^dlc%-", "")
336   - lfs.mkdir("../game/dlcs/tome-" .. name .. "/data/locales")
337   - file_name = "../game/dlcs/tome-" .. name .. "/data/locales/" .. locale .. ".lua"
338   - end
339   - output_filename[shortname] = file_name
340   - output_content[shortname] = copy_file(shortname .. "." .. locale .. ".copy.lua")
341   -end
342   -local function check_section(section, result)
343   - local shortname = get_section_shortname(section)
344   - if shortname then
345   - if not output_filename[shortname] then
346   - setup_section(shortname)
347   - end
348   - output_content[shortname] = output_content[shortname] .. result
349   - end
350   -end
351   -local function print_file(file_out, file_out_2)
352   - local f = io.open(file_out, "w")
353   - local f2 = io.open(file_out_2, "w")
354   - table.sort(sections)
355   - for _, section in ipairs(sections) do
356   - local result = write_section(f, f2, section)
357   - check_section(section, result)
358   - end
359   - for shortname, content in pairs(output_content) do
360   - print(shortname)
361   - lfs.mkdir("outputs")