Merge branch 'master' into feature/jsondiffpatch

Conflicts:
	bower.json
This commit is contained in:
Scott Erickson 2014-04-08 19:29:43 -07:00
commit 721648dadf
54 changed files with 472 additions and 1674 deletions

View file

@ -72,7 +72,7 @@
<!-- end olark code -->
</head>
<body class="clearfix">
<body class="nano clearfix">
<div id="fb-root"></div>
<!-- begin facebook code -->
@ -160,23 +160,5 @@
(function(a){if(window.filepicker){return}var b=a.createElement("script");b.type="text/javascript";b.async=!0;b.src=("https:"===a.location.protocol?"https:":"http:")+"//api.filepicker.io/v1/filepicker.js";var c=a.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c);var d={};d._queue=[];var e="pick,pickMultiple,pickAndStore,read,write,writeUrl,export,convert,store,storeUrl,remove,stat,setKey,constructWidget,makeDropPane".split(",");var f=function(a,b){return function(){b.push([a,arguments])}};for(var g=0;g<e.length;g++){d[e[g]]=f(e[g],d._queue)}window.filepicker=d})(document);
</script>
<!-- end filepicker.io code -->
<!-- being nanascroller code -->
<script type="text/javascript">
function renderScrollbar(){
$('.nano-pane').css('display','none');
$(function(){
$('body').nanoScroller();
});
};
// Doesn't seem to load when you open for first time.
$(function(){
setTimeout(function(){
$('body').nanoScroller();
},1000);
});
</script>
<!-- end nanoscroller code -->
</body>
</html>

View file

@ -83,9 +83,7 @@ module.exports = class Simulator extends CocoClass
@setupGodSpells()
setupGoalManager: ->
@god.goalManager = new GoalManager @world
@god.goalManager.goals = @god.level.goals
@god.goalManager.goalStates = @manuallyGenerateGoalStates()
@god.goalManager = new GoalManager @world, @level.get 'goals'
commenceSimulationAndSetupCallback: ->
@god.createWorld()
@ -157,32 +155,21 @@ module.exports = class Simulator extends CocoClass
return taskResults
calculateSessionRank: (sessionID, goalStates, teamSessionMap) ->
humansDestroyed = goalStates["destroy-humans"].status is "success"
ogresDestroyed = goalStates["destroy-ogres"].status is "success"
if humansDestroyed is ogresDestroyed
ogreGoals = (goalState for key, goalState of goalStates when goalState.team is 'ogres')
humanGoals = (goalState for key, goalState of goalStates when goalState.team is 'humans')
ogresWon = _.all ogreGoals, {status: 'success'}
humansWon = _.all humanGoals, {status: 'success'}
if ogresWon is humansWon
return 0
else if humansDestroyed and teamSessionMap["ogres"] is sessionID
else if ogresWon and teamSessionMap["ogres"] is sessionID
return 0
else if humansDestroyed and teamSessionMap["ogres"] isnt sessionID
else if ogresWon and teamSessionMap["ogres"] isnt sessionID
return 1
else if ogresDestroyed and teamSessionMap["humans"] is sessionID
else if humansWon and teamSessionMap["humans"] is sessionID
return 0
else
return 1
manuallyGenerateGoalStates: ->
goalStates =
"destroy-humans":
keyFrame: 0
killed:
"Human Base": false
status: "incomplete"
"destroy-ogres":
keyFrame:0
killed:
"Ogre Base": false
status: "incomplete"
setupGodSpells: ->
@generateSpellsObject()
@god.spells = @spells

View file

@ -95,7 +95,7 @@ module.exports = class GoalManager extends CocoClass
return if @goalStates[goal.id]?
@goals.push(goal)
goal.isPositive = @goalIsPositive goal.id
@goalStates[goal.id] = {status: 'incomplete', keyFrame: 0}
@goalStates[goal.id] = {status: 'incomplete', keyFrame: 0, team: goal.team}
@notifyGoalChanges()
return unless goal.notificationGoal
f = (channel) => (event) => @onNote(channel, event)
@ -123,6 +123,7 @@ module.exports = class GoalManager extends CocoClass
state = {
status: null # should eventually be either 'success', 'failure', or 'incomplete'
keyFrame: 0 # when it became a 'success' or 'failure'
team: goal.team
}
@initGoalState(state, [goal.killThangs, goal.saveThangs], 'killed')
for getTo in goal.getAllToLocations ? []

View file

@ -12,15 +12,15 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
manual: "El ile"
fork: "Çatalla"
play: "Oyna"
# retry: "Retry"
retry: "Yeniden Dene"
# units:
# second: "second"
# seconds: "seconds"
# minute: "minute"
# minutes: "minutes"
# hour: "hour"
# hours: "hours"
units:
second: "saniye"
seconds: "saniyeler"
minute: "dakika"
minutes: "dakikalar"
hour: "saat"
hours: "saatler"
modal:
close: "Kapat"
@ -54,7 +54,7 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
login:
sign_up: "Kaydol"
log_in: "Giriş Yap"
# logging_in: "Logging In"
logging_in: "Giriş Yapılıyor"
log_out: "Çıkış Yap"
recover: "şifrenizi sıfırlayabilirsiniz."
@ -77,12 +77,12 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
no_ie: "CodeCombat maalesef Internet Explorer 9 veya daha eski sürümlerde çalışmaz."
no_mobile: "CodeCombat mobil cihazlar için tasarlanmamıştır bu sebeple mobil cihazlarda çalışmayabilir."
play: "Oyna"
# old_browser: "Uh oh, your browser is too old to run CodeCombat. Sorry!"
# old_browser_suffix: "You can try anyway, but it probably won't work."
# campaign: "Campaign"
# for_beginners: "For Beginners"
# multiplayer: "Multiplayer"
# for_developers: "For Developers"
old_browser: "Olamaz, Tarayıcınız CodeCombat'ı çalıştırmak için çok eski. Üzgünüz!"
old_browser_suffix: "Deneyebilirsiniz, ama muhtemelen oyun çalışmayacaktır."
campaign: "Senaryo Modu"
for_beginners: "Yeni Başlayanlar için"
multiplayer: "Çoklu-oyuncu Modu"
for_developers: "Geliştiriciler için"
play:
choose_your_level: "Seviye Seçimi"
@ -98,8 +98,8 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
campaign_player_created: "Oyuncuların Oluşturdukları"
campaign_player_created_description: "<a href=\"/contribute#artisan\">Zanaatkâr Büyücüler</a>in yaratıcılıklarına karşı mücadele etmek için..."
level_difficulty: "Zorluk: "
# play_as: "Play As"
# spectate: "Spectate"
play_as: "Olarak Oyna"
spectate: "İzleyici olarak katıl"
contact:
contact_us: "CodeCombat ile İletişim"
@ -141,7 +141,7 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
wizard_tab: "Sihirbaz"
password_tab: "Şifre"
emails_tab: "E-postalar"
# admin: "Admin"
admin: "Yönetici"
gravatar_select: "Kullanılacak Gravatar fotoğrafını seçin"
gravatar_add_photos: "Burada resim olarak kullanmak için Gravatar hesabınıza buradaki e-posta adresinin aynısı olacak şekilde resim yükleyin."
gravatar_add_more_photos: "Burada kullanmak üzere Gravatar hesabınıza resim yükleyin."
@ -150,7 +150,7 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
new_password_verify: "Teyit Et"
email_subscriptions: "E-posta Abonelikleri"
email_announcements: "Duyurular"
# email_notifications: "Notifications"
email_notifications: "Bilgilendirme"
email_notifications_description: "Düzenli bilgilendirmelere kaydol."
email_announcements_description: "CodeCombat ile ilgili son haberlere ve gelişmelere ulaşın."
contributor_emails: "İştirakçi Sınıfı E-postaları"
@ -198,8 +198,8 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
victory_sign_up: " Güncellemelere Abone Ol"
victory_sign_up_poke: "Son haberleri e-postanızda görmek ister misiniz? Ücretsiz bir hesap oluşturmanız durumunda sizi bilgilendirebiliriz."
victory_rate_the_level: "Seviyeyi oyla:"
# victory_rank_my_game: "Rank My Game"
# victory_ranking_game: "Submitting..."
victory_rank_my_game: "Oyunumu Derecelendir"
victory_ranking_game: "Kayıt Ediliyor..."
# victory_return_to_ladder: "Return to Ladder"
victory_play_next_level: "Sonraki Seviyeyi Oyna: "
victory_go_home: "Anasayfaya Git"
@ -295,8 +295,8 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
contact_us: "bize ulaşın!"
hipchat_prefix: "Bizi ayrıca"
hipchat_url: "HipChat otasında bulabilirsiniz."
# revert: "Revert"
# revert_models: "Revert Models"
revert: "Geri al"
revert_models: "Önceki Modeller"
level_some_options: "Bazı Seçenekler?"
level_tab_thangs: "Nesneler"
level_tab_scripts: "Betikler"
@ -315,19 +315,19 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
level_components_title: "Tüm Nesneleri Geri Dön"
level_components_type: "Tür"
level_component_edit_title: "Bileşen Düzenle"
# level_component_config_schema: "Config Schema"
# level_component_settings: "Settings"
level_component_config_schema: "Yapılandırma Şeması"
level_component_settings: "Ayarlar"
level_system_edit_title: "Sistem Düzenle"
create_system_title: "Yeni Sistem Oluştur"
new_component_title: "Yeni Bileşen Oluştur"
new_component_field_system: "Sistem"
# new_article_title: "Create a New Article"
# new_thang_title: "Create a New Thang Type"
# new_level_title: "Create a New Level"
new_level_title: "Yeni Bir Seviye Oluştur"
# article_search_title: "Search Articles Here"
# thang_search_title: "Search Thang Types Here"
# level_search_title: "Search Levels Here"
# read_only_warning: "Note: you can't save any edits here, because you're not logged in as an admin."
level_search_title: "Seviye ara"
read_only_warning: "Uyarı: Yönetici olarak giriş yapmadığınız sürece herhangi bir değişikliği kayıt edemezsiniz."
article:
edit_btn_preview: "Önizleme"
@ -339,27 +339,27 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
body: "Gövde"
version: "Sürüm"
commit_msg: "Gönderme İletisi"
# history: "History"
history: "Geçmiş"
version_history_for: "Sürüm Geçmişi: "
# result: "Result"
result: "Sonuç"
results: "Sonuçlar"
description: "ıklama"
or: "veya"
email: "E-posta"
# password: "Password"
password: "Şifre"
message: "İleti"
# code: "Code"
code: "Kod"
# ladder: "Ladder"
# when: "When"
# opponent: "Opponent"
# rank: "Rank"
# score: "Score"
# win: "Win"
# loss: "Loss"
# tie: "Tie"
# easy: "Easy"
# medium: "Medium"
# hard: "Hard"
when: "iken"
opponent: "Rakip"
rank: "Sıra"
score: "Skor"
win: "Zafer"
loss: "Yenilgi"
tie: "Berabere"
easy: "Kolay"
medium: "Normal"
hard: "Zor"
about:
who_is_codecombat: "CodeCombat kimlerden oluşur?"
@ -445,32 +445,32 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
nutshell_description: "Seviye editöründe sağladığımız tüm içerik, seviye düzenleme sırasında kullanmanız için uygundur. Fakat ileride bu öğelerin kullanımını kısıtlama hakkını saklı tutmaktayız."
canonical: "Belirleyici, hukuki nitelikte olan, bu dökümanın İngilizce sürümüdür. Çeviriler arasında tutarsızlık olması halinde İngilizce dökümanda yer alan hüküm dikkate alınacaktır."
# contribute:
contribute:
# page_title: "Contributing"
# character_classes_title: "Character Classes"
character_classes_title: "Karakter Sınıfları"
# introduction_desc_intro: "We have high hopes for CodeCombat."
# introduction_desc_pref: "We want to be where programmers of all stripes come to learn and play together, introduce others to the wonderful world of coding, and reflect the best parts of the community. We can't and don't want to do that alone; what makes projects like GitHub, Stack Overflow and Linux great are the people who use them and build on them. To that end, "
# introduction_desc_github_url: "CodeCombat is totally open source"
introduction_desc_github_url: "CodeCombat tümüyle açık kaynaklıdır"
# introduction_desc_suf: ", and we aim to provide as many ways as possible for you to take part and make this project as much yours as ours."
# introduction_desc_ending: "We hope you'll join our party!"
# introduction_desc_signature: "- Nick, George, Scott, Michael, Jeremy and Glen"
# alert_account_message_intro: "Hey there!"
alert_account_message_intro: "Merhaba!"
# alert_account_message_pref: "To subscribe for class emails, you'll need to "
# alert_account_message_suf: "first."
# alert_account_message_create_url: "create an account"
alert_account_message_suf: "öncelikle."
alert_account_message_create_url: "Hesap Oluştur"
# archmage_summary: "Interested in working on game graphics, user interface design, database and server organization, multiplayer networking, physics, sound, or game engine performance? Want to help build a game to help other people learn what you are good at? We have a lot to do and if you are an experienced programmer and want to develop for CodeCombat, this class is for you. We would love your help building the best programming game ever."
# archmage_introduction: "One of the best parts about building games is they synthesize so many different things. Graphics, sound, real-time networking, social networking, and of course many of the more common aspects of programming, from low-level database management, and server administration to user facing design and interface building. There's a lot to do, and if you're an experienced programmer with a hankering to really dive into the nitty-gritty of CodeCombat, this class might be for you. We would love to have your help building the best programming game ever."
# class_attributes: "Class Attributes"
# archmage_attribute_1_pref: "Knowledge in "
# archmage_attribute_1_suf: ", or a desire to learn. Most of our code is in this language. If you're a fan of Ruby or Python, you'll feel right at home. It's JavaScript, but with a nicer syntax."
# archmage_attribute_2: "Some experience in programming and personal initiative. We'll help you get oriented, but we can't spend much time training you."
# how_to_join: "How To Join"
# join_desc_1: "Anyone can help out! Just check out our "
how_to_join: "Nasıl Üye olunur?"
join_desc_1: "Herkes katkıda bulunabilir! Şimdi göz atın "
# join_desc_2: "to get started, and check the box below to mark yourself as a brave Archmage and get the latest news by email. Want to chat about what to do or how to get more deeply involved? "
# join_desc_3: ", or find us in our "
# join_desc_4: "and we'll go from there!"
# join_url_email: "Email us"
# join_url_hipchat: "public HipChat room"
join_url_email: "E-Posta ile Bize ulaşın"
join_url_hipchat: "Herkese açık HipChat odası"
# more_about_archmage: "Learn More About Becoming an Archmage"
# archmage_subscribe_desc: "Get emails on new coding opportunities and announcements."
# artisan_summary_pref: "Want to design levels and expand CodeCombat's arsenal? People are playing through our content at a pace faster than we can build! Right now, our level editor is barebone, so be wary. Making levels will be a little challenging and buggy. If you have visions of campaigns spanning for-loops to"
@ -555,7 +555,7 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
counselor_title: "Danışman"
counselor_title_description: "(Uzman/Öğretmen)"
# ladder:
ladder:
# please_login: "Please log in first before playing a ladder game."
# my_matches: "My Matches"
# simulate: "Simulate"
@ -564,15 +564,15 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
# simulate_all: "RESET AND SIMULATE GAMES"
# games_simulated_by: "Games simulated by you:"
# games_simulated_for: "Games simulated for you:"
# leaderboard: "Leaderboard"
leaderboard: "Sıralama"
# battle_as: "Battle as "
# summary_your: "Your "
summary_your: "Senin "
# summary_matches: "Matches - "
# summary_wins: " Wins, "
# summary_losses: " Losses"
# rank_no_code: "No New Code to Rank"
# rank_my_game: "Rank My Game!"
# rank_submitting: "Submitting..."
rank_my_game: "Oyunumu Derecelendir!"
rank_submitting: "Kayıt Ediliyor..."
# rank_submitted: "Submitted for Ranking"
# rank_failed: "Failed to Rank"
# rank_being_ranked: "Game Being Ranked"
@ -603,26 +603,26 @@ module.exports = nativeDescription: "Türkçe", englishDescription: "Turkish", t
# new_to_programming: ". New to programming? Hit our beginner campaign to skill up."
# so_ready: "I Am So Ready for This"
# loading_error:
# could_not_load: "Error loading from server"
# connection_failure: "Connection failed."
# unauthorized: "You need to be signed in. Do you have cookies disabled?"
# forbidden: "You do not have the permissions."
# not_found: "Not found."
# not_allowed: "Method not allowed."
# timeout: "Server timeout."
loading_error:
could_not_load: "Yüklenemiyor"
connection_failure: "Bağlantı hatası."
unauthorized: "Giriş yapmalısınız. Çerezlere izin verdiniz mi?"
forbidden: "Yetkiniz yok."
not_found: "Bulunamadı."
not_allowed: "Yönteme izin verilmiyor."
timeout: "Sunucu zamanaşımı."
# conflict: "Resource conflict."
# bad_input: "Bad input."
# server_error: "Server error."
# unknown: "Unknown error."
server_error: "Sunucu hatası."
unknown: "Bilinmeyen hata."
# resources:
# your_sessions: "Your Sessions"
# level: "Level"
# social_network_apis: "Social Network APIs"
# facebook_status: "Facebook Status"
# facebook_friends: "Facebook Friends"
# facebook_friend_sessions: "Facebook Friend Sessions"
# gplus_friends: "G+ Friends"
# gplus_friend_sessions: "G+ Friend Sessions"
# leaderboard: "leaderboard"
resources:
your_sessions: "Oturumlarınız"
level: "Seviye"
social_network_apis: "Sosyal Ağ API'leri"
facebook_status: "Facebook Durumu"
facebook_friends: "Facebook Arkadaşları"
facebook_friend_sessions: "Facebook Arkadaş Oturumları"
gplus_friends: "G+ Arkadaşları"
gplus_friend_sessions: "G+ Arkadaş Oturumları"
leaderboard: "Sıralama"

View file

@ -5,22 +5,22 @@ module.exports = nativeDescription: "українська мова", englishDesc
sending: "Надсилання..."
cancel: "Відміна"
save: "Зберегти"
# create: "Create"
create: "Створити"
delay_1_sec: "1 секунда"
delay_3_sec: "3 секунди"
delay_5_sec: "5 секунд"
manual: "Інструкція"
fork: "Форк"
play: "Грати"
# retry: "Retry"
retry: "Повтор"
# units:
# second: "second"
# seconds: "seconds"
# minute: "minute"
# minutes: "minutes"
# hour: "hour"
# hours: "hours"
units:
second: "Секунда"
seconds: "Секунди"
minute: "Хвилина"
minutes: "Хвилини"
hour: "Година"
hours: "Години"
modal:
close: "Закрити"
@ -336,30 +336,30 @@ module.exports = nativeDescription: "українська мова", englishDesc
general:
and: "та"
name: "Ім’я"
# body: "Body"
body: "Тіло"
version: "Версія"
# commit_msg: "Commit Message"
# history: "History"
history: "Історія"
# version_history_for: "Version History for: "
# result: "Result"
result: "Результат"
results: "Результати"
description: "Опис"
or: "чи"
email: "Email"
# password: "Password"
password: "Пароль"
message: "Повідомлення"
# code: "Code"
# ladder: "Ladder"
# when: "When"
# opponent: "Opponent"
when: "Коли"
opponent: "Противник"
# rank: "Rank"
# score: "Score"
# win: "Win"
# loss: "Loss"
win: "Перемога"
loss: "Поразка"
# tie: "Tie"
# easy: "Easy"
# medium: "Medium"
# hard: "Hard"
easy: "Легкий"
medium: "Середній"
hard: "Важкий"
about:
who_is_codecombat: "Хто є CodeCombat?"

View file

@ -12,7 +12,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
manual: "手动"
fork: "派生"
play: "开始"
# retry: "Retry"
retry: "重试"
units:
second: ""
@ -64,7 +64,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
signup:
create_account_title: "创建一个账户来保存进度"
description: "这是免费的,简单易学:"
description: "免费而且简单易学:"
email_announcements: "通过邮件接收通知"
coppa: "13岁以上或非美国用户"
coppa_why: " 为什么?"
@ -74,7 +74,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
home:
slogan: "通过游戏学习 Javascript"
no_ie: "抱歉!Internet Explorer 9 等旧式预览器无法使用本网站。"
no_ie: "抱歉! Internet Explorer 9 等旧式预览器无法使用本网站。"
no_mobile: "CodeCombat 不是针对手机设备设计的,所以可能无法达到最好的体验!"
play: "开始游戏"
old_browser: "噢, 你的浏览器太老了, 不能运行CodeCombat. 抱歉!"
@ -85,7 +85,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
for_developers: "适合开发者"
play:
choose_your_level: "取难度"
choose_your_level: "择关卡"
adventurer_prefix: "你可以选择以下任意关卡,或者讨论以上的关卡。到"
adventurer_forum: "冒险者论坛"
adventurer_suffix: ""
@ -98,24 +98,24 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
campaign_player_created: "创建玩家"
campaign_player_created_description: "……在这里你可以与你的小伙伴的创造力战斗 <a href=\"/contribute#artisan\">技术指导</a>."
level_difficulty: "难度:"
# play_as: "Play As"
play_as: "Play As"
spectate: "旁观他人的游戏"
contact:
contact_us: "联系我们"
welcome: "我们很乐意收到你的邮件!用这个表单给我们发邮件。 "
contribute_prefix: "如果你想贡献什么,请看我们的联系方式 "
welcome: "我们很乐意收到你的邮件!用这个表单给我们发邮件。 "
contribute_prefix: "如果你想贡献什么,请看我们的 "
contribute_page: "贡献页面"
contribute_suffix: ""
forum_prefix: "对于任何公开部分,请尝试用"
forum_prefix: "如果你想发布任何公开的东西, 可以试试"
forum_page: "我们的论坛"
forum_suffix: "代替"
send: "意见反馈"
forum_suffix: ""
send: "反馈意见"
diplomat_suggestion:
title: "我们翻译 CodeCombat"
title: "我们翻译 CodeCombat"
sub_heading: "我们需要您的语言技能"
pitch_body: "我们开发了 CodeCombat 英文版,但是现在我们的玩家遍布全球。很多人英语不熟练,所以很想玩简体中文版的游戏,所以如果你中英文都很熟练,请考虑参加我们的翻译工作,帮忙把 CodeCombat 网站还有所有的关卡翻译成简体中文。"
pitch_body: "我们开发了 CodeCombat 英文版,但是现在我们的玩家遍布全球。很多人英语不熟练,所以很想玩简体中文版的游戏,如果你中英文都很熟练,请考虑参加我们的翻译工作,帮忙把 CodeCombat 网站和所有关卡翻译成简体中文。"
missing_translations: "没被翻译的文字将以英文显示。"
learn_more: "了解更多成为翻译人员的说明"
subscribe_as_diplomat: "提交翻译人员申请"
@ -198,14 +198,14 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
victory_sign_up: "保存进度"
victory_sign_up_poke: "想保存你的代码?创建一个免费账户吧!"
victory_rate_the_level: "评估关卡:"
# victory_rank_my_game: "Rank My Game"
victory_rank_my_game: "给我的游戏评分"
victory_ranking_game: "正在提交..."
# victory_return_to_ladder: "Return to Ladder"
victory_return_to_ladder: "返回"
victory_play_next_level: "下一关"
victory_go_home: "返回主页"
victory_review: "给我们反馈!"
victory_hour_of_code_done: "你完成了吗"
victory_hour_of_code_done_yes: "是的,俺完成了俺的代码!"
victory_hour_of_code_done: "你完成了吗?"
victory_hour_of_code_done_yes: "是的, 完成了!"
multiplayer_title: "多人游戏设置"
multiplayer_link_description: "把这个链接告诉小伙伴们,一起玩吧。"
multiplayer_hint_label: "提示:"
@ -238,33 +238,33 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
# editor_config_indentguides_description: "Displays vertical lines to see indentation better."
# editor_config_behaviors_label: "Smart Behaviors"
# editor_config_behaviors_description: "Autocompletes brackets, braces, and quotes."
# loading_ready: "Ready!"
loading_ready: "载入完成!"
# tip_insert_positions: "Shift+Click a point on the map to insert it into the spell editor."
tip_toggle_play: "用 Ctrl+P 来暂停或继续"
# tip_scrub_shortcut: "Ctrl+[ and Ctrl+] rewind and fast-forward."
# tip_guide_exists: "Click the guide at the top of the page for useful info."
tip_scrub_shortcut: "用 Ctrl+[ 和 Ctrl+] 来倒退和快进."
tip_guide_exists: "点击页面上方的指南, 可以获得更多有用信息."
tip_open_source: "CodeCombat 是 100% 开源的!"
# tip_beta_launch: "CodeCombat launched its beta in October, 2013."
tip_beta_launch: "CodeCombat 开始于 2013的10月份."
tip_js_beginning: "JavaScript 仅仅只是个开始."
# tip_autocast_setting: "Adjust autocast settings by clicking the gear on the cast button."
# think_solution: "Think of the solution, not the problem."
think_solution: "思考解决方法, 而不是问题."
# tip_theory_practice: "In theory, there is no difference between theory and practice. But in practice, there is. - Yogi Berra"
# tip_error_free: "There are two ways to write error-free programs; only the third one works. - Alan Perlis"
# tip_debugging_program: "If debugging is the process of removing bugs, then programming must be the process of putting them in. - Edsger W. Dijkstra"
# tip_debugging_program: "如果说调试修理 bug 的一种流程, 那么编程肯定是制造bug的流程f debugging is the process of removing bugs, then programming must be the process of putting them in. - Edsger W. Dijkstra"
# tip_forums: "Head over to the forums and tell us what you think!"
# tip_baby_coders: "In the future, even babies will be Archmages."
# tip_morale_improves: "Loading will continue until morale improves."
# tip_all_species: "We believe in equal opportunities to learn programming for all species."
# tip_reticulating: "Reticulating spines."
# tip_harry: "Yer a Wizard, "
tip_harry: "巫师, "
# tip_great_responsibility: "With great coding skill comes great debug responsibility."
# tip_munchkin: "If you don't eat your vegetables, a munchkin will come after you while you're asleep."
tip_binary: "这个世界上只有 10 种人: 那些懂二进制的, 还有那些不懂二进制的."
# tip_commitment_yoda: "A programmer must have the deepest commitment, the most serious mind. ~ Yoda"
# tip_no_try: "Do. Or do not. There is no try. - Yoda"
# tip_patience: "Patience you must have, young Padawan. - Yoda"
tip_no_try: "做. 或是不做. 这世上不存在'尝试'这种东西. - 尤达大师"
# tip_patience: "Patience you must have, young Padawan. - 尤达大师"
tip_documented_bug: "一个写在文档里的漏洞不算漏洞, 那是个功能."
# tip_impossible: "It always seems impossible until it's done. - Nelson Mandela"
tip_impossible: "It always seems impossible until it's done. - Nelson Mandela"
tip_talk_is_cheap: "多说无用, 亮出你的代码. - Linus Torvalds"
# tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay"
time_current: "现在:"
@ -315,19 +315,19 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
level_components_title: "返回到所有物体主页"
level_components_type: "类型"
level_component_edit_title: "编辑组件"
# level_component_config_schema: "Config Schema"
level_component_config_schema: "配置模式"
level_component_settings: "设置"
level_system_edit_title: "编辑系统"
create_system_title: "创建新的系统"
new_component_title: "创建新的组件"
new_component_field_system: "系统"
# new_article_title: "Create a New Article"
# new_thang_title: "Create a New Thang Type"
# new_level_title: "Create a New Level"
# article_search_title: "Search Articles Here"
# thang_search_title: "Search Thang Types Here"
new_article_title: "创建一个新物品"
new_thang_title: "创建一个新物品类型"
new_level_title: "创建一个新关卡"
article_search_title: "在这里搜索物品"
thang_search_title: "在这里搜索物品类型"
level_search_title: "在这里搜索关卡"
# read_only_warning: "Note: you can't save any edits here, because you're not logged in as an admin."
read_only_warning: "注意: 你无法保存这里的编辑结果, 因为你没有以管理员身份登录."
article:
edit_btn_preview: "预览"
@ -335,7 +335,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
general:
and: ""
name: ""
name: ""
body: "正文"
version: "版本"
commit_msg: "提交信息"
@ -347,16 +347,16 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
or: ""
email: "邮件"
password: "密码"
message: ""
# code: "Code"
# ladder: "Ladder"
# when: "When"
message: ""
code: "代码"
ladder: "升级比赛"
when: ""
opponent: "对手"
# rank: "Rank"
# score: "Score"
rank: "等级"
score: "分数"
win: "胜利"
loss: "失败"
# tie: "Tie"
tie: "平局"
easy: "容易"
medium: "中等"
hard: "困难"
@ -364,10 +364,10 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
about:
who_is_codecombat: "什么是 CodeCombat?"
why_codecombat: "为什么选择 CodeCombat?"
who_description_prefix: "2013年开始一起编写 CodeCombat。在2008年时我们还创造"
who_description_suffix: "并且发展出了开发中文和日文的Web和IOS应用的首选教程"
who_description_prefix: " 2013 年开始一起编写 CodeCombat。在 2008 年时,我们还创造"
who_description_suffix: "并且发展出了开发中文和日文的 Web 和 IOS 应用的首选教程"
who_description_ending: "现在是时候教人们如何写代码了。"
why_paragraph_1: "当我们制作 Skritter 的时候George 还不会写程序,对于不能实现他的灵感这一点很苦恼。他试着学了学,但那些课程都太慢了。他的室友不想通过教材学习新技能,试了试 CodeAcademy但是觉得“太无聊了。”每星期都会有个熟人尝试 CodeAcademy然后无一例外地放弃掉。我们发现这和 Skritter 想要解决的是一个问题:人们想要的是高速学习、充分练习,得到的却是缓慢、冗长的课程。我们知道该怎么办了。"
why_paragraph_1: "当我们制作 Skritter George 还不会写程序,对于不能实现他的灵感这一点很苦恼。他试着学了学,但那些课程都太慢了。他的室友不想通过教材学习新技能,试了试 CodeAcademy但是觉得“太无聊了。”每星期都会有个熟人尝试 CodeAcademy然后无一例外地放弃掉。我们发现这和 Skritter 想要解决的是一个问题:人们想要的是高速学习、充分练习,得到的却是缓慢、冗长的课程。我们知道该怎么办了。"
why_paragraph_2: "你想学编程?你不用上课。你需要的是写好多代码,并且享受这个过程。"
why_paragraph_3_prefix: "这才是编程的要义。编程必须要好玩。不是"
why_paragraph_3_italic: "哇又一个奖章诶"
@ -376,7 +376,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
why_paragraph_3_suffix: "这就是为什么 CodeCombat 是个多人游戏,而不是一个游戏化的编程课。你不停,我们就不停——但这次这是件好事。"
why_paragraph_4: "如果你一定要对游戏上瘾,那就对这个游戏上瘾,然后成为科技时代的法师吧。"
why_ending: "再说,这游戏还是免费的。"
why_ending_url: "开始学习法术"
why_ending_url: "开始学习法术"
# george_description: "CEO, business guy, web designer, game designer, and champion of beginning programmers everywhere."
# scott_description: "Programmer extraordinaire, software architect, kitchen wizard, and master of finances. Scott is the reasonable one."
# nick_description: "Programming wizard, eccentric motivation mage, and upside-down experimenter. Nick can do anything and chooses to build CodeCombat."
@ -387,11 +387,11 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
legal:
page_title: "法律"
opensource_intro: "CodeCombat 是一个自由发挥,完全开源的项目。"
opensource_description_prefix: "查看"
opensource_description_prefix: "查看 "
github_url: "我们的 GitHub"
opensource_description_center: "并做你想做的修改吧CodeCombat 是构筑在几十个开源项目的基础之上,我们爱它们。见"
archmage_wiki_url: "我们的 Archmage wiki"
opensource_description_suffix: "了解让这个游戏成为可能的名单。"
opensource_description_center: "并做你想做的修改吧CodeCombat 是构筑在几十个开源项目之上的,我们爱它们。请查阅"
archmage_wiki_url: "我们 大法师的维基页"
opensource_description_suffix: " 看看是哪些人让这个游戏成为可能."
practices_title: "尊重最佳实践"
practices_description: "这是我们对您的承诺,即玩家,尽管这在法律用语中略显不足。"
privacy_title: "隐私"
@ -412,11 +412,11 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
recruitment_description_ending: "。而这网站也就能保持免费,皆大欢喜。计划就是这样。"
copyrights_title: "版权与许可"
contributor_title: "贡献者许可协议"
contributor_description_prefix: "在本网站或者我们的 GitHub 版本库的所有贡献都依照我们的"
contributor_description_prefix: "所有对本网站或是 GitHub 代码库的贡献都依照我们的"
cla_url: "贡献者许可协议CLA"
contributor_description_suffix: "而这在您贡献之前就应该已经同意。"
contributor_description_suffix: "而这在您贡献之前就应该已经同意。"
code_title: "代码 - MIT"
code_description_prefix: "所有由 CodeCombat 拥有或托管在 codecombat.com 的代码,在 GitHub 版本库或者 codecombat.com 数据库,以上许可协议都依照"
code_description_prefix: "所有由 CodeCombat 拥有或托管在 codecombat.com 的代码,在 GitHub 版本库或者 codecombat.com 数据库,以上许可协议都依照"
mit_license_url: "MIT 许可证"
code_description_suffix: "这包括所有 CodeCombat 公开的制作关卡用的系统和组件代码。"
art_title: "美术和音乐 - Creative Commons"
@ -449,29 +449,29 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
page_title: "贡献"
character_classes_title: "贡献者职业"
introduction_desc_intro: "我们对 CodeCombat 有很高的期望。"
introduction_desc_pref: "我们希望所有的程序员一起来学习和游戏,让其他人也见识到代码的美妙,并且展现出社区的最好一面。我们不能也不想独自完成这个目标:让 GitHub、Stack Overflow 和 Linux 真正伟大的是它们的用户。为了完成这个目标,"
introduction_desc_pref: "我们希望所有的程序员一起来学习和游戏,让其他人也见识到代码的美妙,并且展现出社区的最好一面。我们无法, 而且也不想独自完成这个目标:你要知道, 让 GitHub、Stack Overflow 和 Linux 真正伟大的是它们的用户。为了完成这个目标,"
introduction_desc_github_url: "我们把 CodeCombat 完全开源"
introduction_desc_suf: ",而且我们希望提供尽可能多的方法让你来参加这个项目,与我们一起创造。"
introduction_desc_ending: "我们希望你也加入进来!"
introduction_desc_ending: "我们希望你也能一起加入进来!"
introduction_desc_signature: "- Nick, George, Scott, Michael, Jeremy 以及 Glen"
alert_account_message_intro: "你好!"
alert_account_message_pref: "要订阅贡献者邮件,你得先"
alert_account_message_suf: ""
alert_account_message_create_url: "创建账号"
archmage_summary: "你对游戏图像、界面设计、数据库和服务器运营、多人在线、物理、声音、游戏引擎性能感兴趣吗?想做一个教别人编程的游戏吗?如果你有编程经验,想要开发 CodeCombat ,那就选择这个职业吧。我们会非常高兴在制作史上最好的编程游戏的过程中得到你的帮助。"
archmage_introduction: "制作游戏的时候,最令人激动人心的事情莫过于整合诸多的要素。图像、音响、实事网络交流、社交网络,以及从底层数据库管理到服务器运维,再到用户界面的设计和实现的各种编程方面。制作游戏有很多事情要做,因此如果你有编程经验,还有深入 CodeCombat 的细节中的干劲,你可能应该选择这个职业。我们会非常高兴在制作史上最好的编程游戏的过程中得到你的帮助。"
class_attributes: "职业特性"
archmage_summary: "你对游戏图像、界面设计、数据库和服务器运营、多人在线、物理、声音、游戏引擎性能感兴趣吗?想做一个教别人编程的游戏吗?如果你有编程经验,想要开发 CodeCombat ,那就选择这个职业吧。我们会非常高兴在制作史上最编程游戏的过程中得到你的帮助。"
archmage_introduction: "制作游戏时,最令人激动的事莫过于整合诸多东西。图像、音响、实时网络交流、社交网络,从底层数据库管理到服务器运维,再到用户界面的设计和实现。制作游戏有很多事情要做,所以如果你有编程经验, 那么你应该选择这个职业。我们会很高兴在制作史上最好编程游戏的路上有你的陪伴."
class_attributes: "职业说明"
archmage_attribute_1_pref: "了解"
archmage_attribute_1_suf: ",或者想要学习。我们的多数代码都是用它写就的。如果你喜欢 Ruby 或者 Python那你肯定会感到很熟悉。它就是 JavaScript但它的语法更友好。"
archmage_attribute_2: "编程经验和干劲。我们可以帮你走上正规,但恐怕没多少时间培训你。"
how_to_join: "如何加入"
join_desc_1: "谁都可以帮忙!先看看我们的"
join_desc_2: ",然后勾下面的复选框,这样你就会作为勇敢的大法师收到我们的电邮。如果你想和开发人员聊天或者更深入地参与,可以"
join_desc_3: "或者去我们的"
join_desc_1: "谁都可以加入!先看看我们的"
join_desc_2: ",然后勾下面的复选框,这样你就会作为勇敢的大法师收到我们的电邮。如果你想和开发人员聊天或者更深入地参与,可以 "
join_desc_3: " 或者去我们的"
join_desc_4: ",然后我们有话好说!"
join_url_email: "给我们发邮件"
join_url_hipchat: " HipChat 聊天室"
more_about_archmage: "了解成为大法师的方法"
more_about_archmage: "了解如何成为一名大法师"
archmage_subscribe_desc: "通过电子邮件获得新的编码机会和公告。"
artisan_summary_pref: "想要设计 CodeCombat 的关卡吗人们玩的比我们做的快多了现在我们的关卡编辑器还很基本所以做起关卡来会有点麻烦还会有bug。只要你有制作关卡的灵感不管是简单的for循环还是"
artisan_summary_suf: "这种东西,这个职业都很适合你。"
@ -481,40 +481,40 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
# artisan_attribute_2: "A hankering to do a whole lot of testing and iteration. To make good levels, you need to take it to others and watch them play it, and be prepared to find a lot of things to fix."
# artisan_attribute_3: "For the time being, endurance en par with an Adventurer. Our Level Editor is super preliminary and frustrating to use. You have been warned!"
# artisan_join_desc: "Use the Level Editor in these steps, give or take:"
# artisan_join_step1: "Read the documentation."
# artisan_join_step2: "Create a new level and explore existing levels."
# artisan_join_step3: "Find us in our public HipChat room for help."
# artisan_join_step4: "Post your levels on the forum for feedback."
more_about_artisan: "了解成为工匠的方法"
artisan_join_step1: "阅读文档."
artisan_join_step2: "创建一个新关卡 以及探索已经存在的关卡."
artisan_join_step3: "来我们的 HipChat 聊天室寻求帮助."
artisan_join_step4: "吧你的关卡发到论坛让别人给你评价."
more_about_artisan: "了解如何成为一名工匠"
artisan_subscribe_desc: "通过电子邮件获得关卡编辑器更新和公告。"
adventurer_summary: "丑话说在前面,你就是那个挡枪子的,而且你会伤得很重。我们需要人手来测试崭新的关卡,并且提出改进意见。做一个好游戏是一个漫长的过程,没人第一次就能搞对。如果你能忍得了这些,而且身体健壮,那这个职业就是你的了。"
# adventurer_introduction: "Let's be clear about your role: you are the tank. You're going to take heavy damage. We need people to try out brand-new levels and help identify how to make things better. The pain will be enormous; making good games is a long process and no one gets it right the first time. If you can endure and have a high constitution score, then this class might be for you."
# adventurer_attribute_1: "A thirst for learning. You want to learn how to code and we want to teach you how to code. You'll probably be doing most of the teaching in this case, though."
# adventurer_attribute_2: "Charismatic. Be gentle but articulate about what needs improving, and offer suggestions on how to improve."
# adventurer_join_pref: "Either get together with (or recruit!) an Artisan and work with them, or check the box below to receive emails when there are new levels to test. We'll also be posting about levels to review on our networks like"
# adventurer_forum_url: "our forum"
# adventurer_join_suf: "so if you prefer to be notified those ways, sign up there!"
more_about_adventurer: "了解成为冒险家的方法"
adventurer_forum_url: "我们的论坛"
adventurer_join_suf: "如果你更喜欢以这些方式被通知, 那就注册吧!"
more_about_adventurer: "了解如何成为一名冒险家"
adventurer_subscribe_desc: "通过电子邮件获得新关卡通知。"
scribe_summary_pref: "CodeCombat 不只是一堆关卡的集合,它还是玩家们编程知识的来源。这样的话,每个工匠都能链接详尽的文档,以供玩家们学习,类似于"
scribe_summary_suf: "那些。如果你喜欢解释编程概念,那这个职业适合你。"
scribe_summary_suf: "那些。如果你喜欢解释编程概念,那这个职业适合你。"
# scribe_introduction_pref: "CodeCombat isn't just going to be a bunch of levels. It will also include a resource for knowledge, a wiki of programming concepts that levels can hook into. That way rather than each Artisan having to describe in detail what a comparison operator is, they can simply link their level to the Article describing them that is already written for the player's edification. Something along the lines of what the "
# scribe_introduction_url_mozilla: "Mozilla Developer Network"
scribe_introduction_url_mozilla: "Mozilla 开发者社区"
# scribe_introduction_suf: " has built. If your idea of fun is articulating the concepts of programming in Markdown form, then this class might be for you."
# scribe_attribute_1: "Skill in words is pretty much all you need. Not only grammar and spelling, but able to convey complicated ideas to others."
# contact_us_url: "Contact us"
# scribe_join_description: "tell us a little about yourself, your experience with programming and what sort of things you'd like to write about. We'll go from there!"
more_about_scribe: "了解成为文书的方法"
scribe_join_description: "介绍一下你自己, 比如你的编程经历和你喜欢写什么东西, 我们将从这里开始了解你!!"
more_about_scribe: "了解如何成为一名文书"
scribe_subscribe_desc: "通过电子邮件获得写作新文档的通知。"
diplomat_summary: "很多国家不说英文,但是人们对 CodeCombat 兴致很高!我们需要具有热情的翻译者,来把这个网站上的文字尽快带向全世界。如果你想帮我们走向全球,那这个职业适合你。"
diplomat_introduction_pref: "如果说我们从"
diplomat_launch_url: "十月的发布"
diplomat_introduction_suf: "中得到了什么启发:那就是全球的人对 CodeCombat 都很感兴趣。我们召集了一群翻译者,尽快地把网站上的信息翻译成各国文字。如果你对即将发布的新内容感兴趣,想让你的国家的人们玩上,就快来成为外交官吧。"
diplomat_introduction_suf: "中得到了什么启发:那就是全世界的人都对 CodeCombat 很感兴趣。我们召集了一群翻译者,尽快地把网站上的信息翻译成各国文字。如果你对即将发布的新内容感兴趣,想让你的国家的人们玩上,就快来成为外交官吧。"
diplomat_attribute_1: "既会说流利的英语,也熟悉自己的语言。编程是一件很复杂的事情,而要翻译复杂的概念,你必须对两种语言都在行!"
diplomat_join_pref_github: ""
diplomat_github_url: "GitHub"
diplomat_join_suf_github: "找到你的语言文件,在线编辑它,然后提交一个合并请求。同时,选中下面这个复选框来关注最新的国际化开发!"
more_about_diplomat: "了解成为外交官的方法"
diplomat_github_url: " GitHub "
diplomat_join_suf_github: "找到你的语言文件 (中文的是: codecombat/app/locale/zh-HNAS.coffee),在线编辑它,然后提交一个合并请求。同时,选中下面这个复选框来关注最新的国际化开发!"
more_about_diplomat: "了解如何成为一名外交官"
diplomat_subscribe_desc: "接受有关国际化开发和翻译情况的邮件"
ambassador_summary: "我们要建立一个社区,而当社区遇到麻烦的时候,就要支持人员出场了。我们运用 IRC、电邮、社交网站等多种平台帮助玩家熟悉游戏。如果你想帮人们参与进来学习编程然后玩的开心那这个职业属于你。"
ambassador_introduction: "这是一个正在成长的社区而你将成为我们与世界的联结点。大家可以通过Olark即时聊天、邮件、参与者众多的社交网络来认识了解讨论我们的游戏。如果你想帮助大家尽早参与进来、获得乐趣、感受CodeCombat的脉搏、与我们同行那么这将是一个适合你的职业。"
@ -522,7 +522,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
ambassador_join_desc: "介绍一下你自己:你做过什么?你喜欢做什么?我们将从这里开始了解你!"
# ambassador_join_note_strong: "Note"
# ambassador_join_note_desc: "One of our top priorities is to build multiplayer where players having difficulty solving levels can summon higher level wizards to help them. This will be a great way for ambassadors to do their thing. We'll keep you posted!"
more_about_ambassador: "了解成为使节的方法"
more_about_ambassador: "了解如何成为一名使节"
ambassador_subscribe_desc: "通过电子邮件获得支持系统的现状,以及多人游戏方面的新进展。"
counselor_summary: "以上的职业都不适合你?没关系,我们欢迎每一个想参与 CodeCombat 开发的人!如果你熟悉教学、游戏开发、开源管理,或者任何你觉得和我们有关的方面,那这个职业属于你。"
counselor_introduction_1: "也许你有人生的经验,也许你对 CodeCombat 的发展有独特的观点。在所有这些角色中,这个角色花费的时间可能最少,但作为个人你的价值却最高。我们在寻找各方面的贤人,尤其是在教学、游戏开发、开源软件管理、技术企业招聘、创业或者设计方面的。"
@ -530,8 +530,8 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
counselor_attribute_1: "经验。上述的任何领域,或者你认为对我们有帮助的领域。"
counselor_attribute_2: "一点用来谈笑风生的时间!"
counselor_join_desc: ",向我们介绍以下你自己:你做过什么、对什么有兴趣。当我们需要你的建议的时候,我们会联系你的(不会很经常)。"
more_about_counselor: "了解成为顾问的方式"
changes_auto_save: "您切换复选框时,更改将自动保存。"
more_about_counselor: "了解如何成为一名顾问"
changes_auto_save: "你勾选复选框后,更改将自动保存。"
diligent_scribes: "我们勤奋的文书:"
powerful_archmages: "我们强力的大法师:"
creative_artisans: "我们极具创意的工匠:"
@ -557,20 +557,20 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
ladder:
please_login: "请在对奕之前先登录."
# my_matches: "My Matches"
# simulate: "Simulate"
# simulation_explanation: "By simulating games you can get your game ranked faster!"
# simulate_games: "Simulate Games!"
my_matches: "我的对手"
simulate: "模拟"
# simulation_explanation: "通过模拟游戏, 你可以把排名提的更快!"
simulate_games: "模拟游戏!"
# simulate_all: "RESET AND SIMULATE GAMES"
# games_simulated_by: "Games simulated by you:"
# games_simulated_for: "Games simulated for you:"
# leaderboard: "Leaderboard"
# battle_as: "Battle as "
# summary_your: "Your "
# summary_matches: "Matches - "
leaderboard: "排行榜"
battle_as: "我要加入这一方 "
summary_your: " "
summary_matches: "对手 - "
summary_wins: " 胜利, "
summary_losses: " 失败"
# rank_no_code: "No New Code to Rank"
rank_no_code: "没有新代码可供评分"
# rank_my_game: "Rank My Game!"
rank_submitting: "正在提交..."
# rank_submitted: "Submitted for Ranking"
@ -581,48 +581,48 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese
# no_ranked_matches_post: " team! Play against some competitors and then come back here to get your game ranked."
choose_opponent: "选择一个对手"
tutorial_play: "玩教程"
# tutorial_recommended: "Recommended if you've never played before"
tutorial_recommended: "如果你从未玩过的话,推荐先玩下教程"
tutorial_skip: "跳过教材"
# tutorial_not_sure: "Not sure what's going on?"
tutorial_play_first: "先玩一次教."
tutorial_not_sure: "不知道怎么玩?"
tutorial_play_first: "先玩一次教."
simple_ai: "简单电脑"
# warmup: "Warmup"
warmup: "热身"
vs: "对决"
# multiplayer_launch:
# introducing_dungeon_arena: "Introducing Dungeon Arena"
# new_way: "The new way to compete with code."
# to_battle: "To Battle, Developers!"
multiplayer_launch:
introducing_dungeon_arena: "介绍地下城竞技场"
new_way: "用代码竞技的新方式."
to_battle: "去战斗, 开发者们!"
# modern_day_sorcerer: "You know how to code? That's badass. You're a modern-day sorcerer! Isn't about time that you used your magic coding powers to command your minions in epic combat? And we're not talking robots here."
# arenas_are_here: "CodeCombat head-to-head multiplayer arenas are here."
# ladder_explanation: "Choose your heroes, enchant your human or ogre armies, and climb your way over defeated fellow Wizards to reach the top of the laddersthen challenge your friends in our glorious, asynchronous multiplayer coding arenas. If you're feeling creative, you can even"
# fork_our_arenas: "fork our arenas"
# create_worlds: "and create your own worlds."
fork_our_arenas: "派生我的竞技场"
create_worlds: "以及创造我自己的世界."
# javascript_rusty: "JavaScript a bit rusty? Don't worry; there's a"
# tutorial: "tutorial"
tutorial: "教程"
# new_to_programming: ". New to programming? Hit our beginner campaign to skill up."
# so_ready: "I Am So Ready for This"
so_ready: "我准备好了!"
# loading_error:
# could_not_load: "Error loading from server"
# connection_failure: "Connection failed."
# unauthorized: "You need to be signed in. Do you have cookies disabled?"
# forbidden: "You do not have the permissions."
# not_found: "Not found."
# not_allowed: "Method not allowed."
# timeout: "Server timeout."
# conflict: "Resource conflict."
# bad_input: "Bad input."
# server_error: "Server error."
# unknown: "Unknown error."
loading_error:
could_not_load: "载入失败"
connection_failure: "连接失败."
unauthorized: "你需要登录才行. 你是不是把 cookies 禁用了?"
forbidden: "你没有权限."
not_found: "没找到."
not_allowed: "方法不允许."
timeout: "服务器超时."
conflict: "资源冲突."
bad_input: "坏输入."
server_error: "服务器错误."
unknown: "未知错误."
# resources:
resources:
# your_sessions: "Your Sessions"
# level: "Level"
# social_network_apis: "Social Network APIs"
# facebook_status: "Facebook Status"
# facebook_friends: "Facebook Friends"
level: "等级"
social_network_apis: "社交网络 APIs"
facebook_status: "Facebook 状态"
facebook_friends: "Facebook 朋友"
# facebook_friend_sessions: "Facebook Friend Sessions"
# gplus_friends: "G+ Friends"
gplus_friends: "G+ 朋友"
# gplus_friend_sessions: "G+ Friend Sessions"
# leaderboard: "leaderboard"
leaderboard: "排行榜"

View file

@ -5,6 +5,9 @@
html
background-color: #2f261d
body
position: absolute !important
// https://github.com/twbs/bootstrap/issues/9237 -- need a version that's not !important
.secret
display: none

View file

@ -9,8 +9,8 @@
.thang-name
.thang-actions.thang-elem
.nano-table
.nano-table-content
.nano
.nano-content
.action-header(data-i18n="play_level.action_timeline") Action Timeline
.table-container
.progress-arrow.progress-indicator

View file

@ -55,16 +55,16 @@ class LiveEditingMarkup extends TreemaNode.nodeMap.ace
buildValueForDisplay: (valEl) ->
@editor?.destroy()
valEl.html(marked(@data))
class SoundFileTreema extends TreemaNode.nodeMap.string
valueClass: 'treema-sound-file'
editable: false
soundCollection: 'files'
onClick: (e) ->
return if $(e.target).closest('.btn').length
super(arguments...)
getFiles: ->
@settings[@soundCollection]?.models or []
@ -76,7 +76,7 @@ class SoundFileTreema extends TreemaNode.nodeMap.string
.click(@playFile)
stopButton = $('<a class="btn"><i class="icon-stop"></i></a>')
.click(@stopFile)
dropdown = $('<div class="btn-group dropdown"></div>')
dropdownButton = $('<a></a>')
@ -84,9 +84,9 @@ class SoundFileTreema extends TreemaNode.nodeMap.string
.attr('href', '#')
.append($('<span class="caret"></span>'))
.dropdown()
dropdown.append dropdownButton
menu = $('<div class="dropdown-menu"></div>')
files = @getFiles()
for file in files
@ -102,7 +102,7 @@ class SoundFileTreema extends TreemaNode.nodeMap.string
@data = $(e.target).data('fullPath') or @data
@reset()
dropdown.append(menu)
valEl.append(pickButton)
if @data
valEl.append(playButton)
@ -112,12 +112,12 @@ class SoundFileTreema extends TreemaNode.nodeMap.string
path = @data.split('/')
name = path[path.length-1]
valEl.append($('<span></span>').text(name))
reset: ->
@instance = null
@flushChanges()
@refreshDisplay()
playFile: =>
@src = "/file/#{@data}"
@ -129,27 +129,27 @@ class SoundFileTreema extends TreemaNode.nodeMap.string
registered = createjs.Sound.registerSound(@src)
if registered is true
@instance = createjs.Sound.play(@src)
else
f = (event) =>
@instance = createjs.Sound.play(event.src) if event.src is @src
createjs.Sound.removeEventListener('fileload', f)
createjs.Sound.addEventListener('fileload', f)
stopFile: => @instance?.stop()
onFileChosen: (InkBlob) =>
if not @settings.filePath
console.error('Need to specify a filePath for this treema', @getRoot())
throw Error('cannot upload file')
body =
url: InkBlob.url
filename: InkBlob.filename
mimetype: InkBlob.mimetype
path: @settings.filePath
force: true
@uploadingPath = [@settings.filePath, InkBlob.filename].join('/')
$.ajax('/file', { type: 'POST', data: body, success: @onFileUploaded })
@ -279,13 +279,13 @@ class LatestVersionReferenceNode extends TreemaNode
search: =>
term = @getValEl().find('input').val()
return if term is @lastTerm
# HACK while search is broken
if @collection
@lastTerm = term
@searchCallback()
return
@getSearchResultsEl().empty() if @lastTerm and not term
return unless term
@lastTerm = term
@ -295,9 +295,9 @@ class LatestVersionReferenceNode extends TreemaNode
# HACK while search is broken
# @collection.url = "#{@url}?term=#{term}&project=true"
@collection.url = "#{@url}?term=#{''}&project=true"
@collection.fetch()
@listenTo(@collection, 'sync', @searchCallback)
@collection.once 'sync', @searchCallback, @
searchCallback: ->
container = @getSearchResultsEl().detach().empty()
@ -306,10 +306,10 @@ class LatestVersionReferenceNode extends TreemaNode
row = $('<div></div>').addClass('treema-search-result-row')
text = @formatDocument(model)
continue unless text?
# HACK while search is broken
continue unless text.toLowerCase().indexOf(@lastTerm.toLowerCase()) >= 0
row.addClass('treema-search-selected') if first
first = false
row.text(text)

View file

@ -34,7 +34,7 @@ module.exports = class SystemsTabView extends View
do (url) -> ls.url = -> url
continue if @supermodel.getModelByURL ls.url
ls.fetch()
@listenTo(ls, 'sync', @onSystemLoaded)
@listenToOnce ls, 'sync', @onSystemLoaded
++@toLoad
@onDefaultSystemsLoaded() unless @toLoad
@ -63,7 +63,7 @@ module.exports = class SystemsTabView extends View
systemModelMap = {}
systemModelMap[sys.get('original')] = sys.get('name') for sys in systemModels
systems = _.sortBy systems, (sys) -> systemModelMap[sys.original]
treemaOptions =
# TODO: somehow get rid of the + button, or repurpose it to open the LevelSystemAddView instead
supermodel: @supermodel
@ -143,6 +143,8 @@ class LevelSystemNode extends TreemaObjectNode
@collection = @system?.attributes?.configSchema?.properties?
grabDBComponent: ->
unless _.isString @data.original
return alert('Press the "Add System" button at the bottom instead of the "+". Sorry.')
@system = @settings.supermodel.getModelByOriginalAndMajorVersion LevelSystem, @data.original, @data.majorVersion
#@system = _.find @settings.supermodel.getModels(LevelSystem), (m) =>
# m.get('original') is @data.original and m.get('version').major is @data.majorVersion

View file

@ -30,6 +30,10 @@ module.exports = class RootView extends CocoView
$el ?= @$el.find('.main-content-area')
super($el)
renderScrollbar: ->
$('.nano-pane').css('display','none')
$ -> $('.nano').nanoScroller()
afterInsert: ->
# force the browser to scroll to the hash
# also messes with the browser history, so perhaps come up with a better solution
@ -38,7 +42,7 @@ module.exports = class RootView extends CocoView
location.hash = ''
location.hash = hash
@buildLanguages()
renderScrollbar()
@renderScrollbar()
#@$('.antiscroll-wrap').antiscroll() # not yet, buggy
afterRender: ->

View file

@ -37,7 +37,8 @@
"firebase": "~1.0.2",
"catiline": "~2.9.3",
"d3": "~3.4.4",
"jsondiffpatch": "~0.1.5"
"jsondiffpatch": "~0.1.5",
"nanoscroller": "~0.8.0"
},
"overrides": {
"backbone": {

View file

@ -70,7 +70,7 @@ exports.config =
stylesheets:
defaultExtension: 'sass'
joinTo:
'stylesheets/app.css': /^(app|vendor)/
'stylesheets/app.css': /^(app|vendor|bower_components)/
order:
before: [
'app/styles/bootstrap.scss'

View file

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<variables>
<version>1.2</version>
<version>2.1</version>
<author>GlenDC</author>
<copyright>CodeCombat.com © 2013-2014</copyright>
<github_url>https://github.com/codecombat/codecombat.git</github_url>
<github_ssh>git@github.com:codecombat/codecombat.git</github_ssh>
<database_backup>http://23.21.59.137/dump.tar.gz</database_backup>
</variables>

View file

@ -11,7 +11,6 @@
<nodejs>http://nodejs.org/dist/v0.10.25/x64/node-v0.10.25-x64.msi</nodejs>
<ruby>http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353-x64.exe?direct</ruby>
<python>http://s3.amazonaws.com/CodeCombatLargeFiles/python-64.msi</python>
<winsdk>http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/winsdk_web.exe</winsdk>
<vs12redist>http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe</vs12redist>
</b64>
<general>

View file

@ -2,6 +2,7 @@
<variables>
<global>
<native>Deutsch</native>
<description>German</description>
<intro>Ab jetzt senden wir unser Feedback in Englisch!</intro>
</global>
<install>
@ -61,6 +62,7 @@
<mongodb>Setting up a MongoDB database for you...</mongodb>
<database>Downloading the last version of the CodeCombat database...</database>
<script>Preparing the automatic startup script for you...</script>
<close>Don't close!</close>
</npm>
<error>
<path>Dieser Pfad existiert bereits. Willst du ihn wirklich überschreiben?</path>

View file

@ -2,6 +2,7 @@
<variables>
<global>
<native>English</native>
<description>English</description>
<intro>From now on we'll send our feedback in English!</intro>
</global>
<install>
@ -51,6 +52,13 @@
<bashq>Please enter the full path where git bash is installed or just press enter if it's in the default location</bashq>
<ssh>Do you want to checkout the repository via ssh?</ssh>
</process>
<config>
<intro>You should have forked CodeCombat to your own GitHub Account by now...</intro>
<info>Please enter your github information, to configure your local repository.</info>
<username>Username: </username>
<password>Password: </password>
<process>Thank you... Configuring your local repistory right now...</process>
</config>
</github>
<npm>
<install>Installing bower, brunch, nodemon and sendwithus...</install>
@ -61,6 +69,7 @@
<mongodb>Setting up a MongoDB database for you...</mongodb>
<db>Downloading the last version of the CodeCombat database...</db>
<script>Preparing the automatic startup script for you...</script>
<close>Don't close!</close>
</npm>
<error>
<path>That path already exists, are you sure you want to overwrite it?</path>

View file

@ -2,6 +2,7 @@
<variables>
<global>
<native>français</native>
<description>French</description>
<intro>From now on we'll send our feedback in English!</intro>
</global>
<install>
@ -61,6 +62,7 @@
<mongodb>Setting up a MongoDB database for you...</mongodb>
<db>Downloading the last version of the CodeCombat database...</db>
<script>Preparing the automatic startup script for you...</script>
<close>Don't close!</close>
</npm>
<error>
<path>That path already exists, are you sure you want to overwrite it?</path>

View file

@ -2,6 +2,7 @@
<variables>
<global>
<native>Nederlands</native>
<description>Dutch</description>
<intro>Vanaf nu geven we onze feedback in het Nederlands!</intro>
</global>
<install>
@ -61,6 +62,7 @@
<mongodb>Setting up a MongoDB database for you...</mongodb>
<database>Downloading the last version of the CodeCombat database...</database>
<script>Preparing the automatic startup script for you...</script>
<close>Niet sluiten!</close>
</npm>
<error>
<path>Dat pad bestaat al, ben je zeker dat je het wil overschrijven?</path>

View file

@ -2,6 +2,7 @@
<variables>
<global>
<native>简体中文</native>
<description>Traditional Chinese</description>
<intro>目前我们只能用英文给你反馈!</intro>
</global>
<install>
@ -26,7 +27,7 @@
<installing>正在安装...</installing>
<unzipping>正在解压...</unzipping>
<cleaning>正在清理...</cleaning>
<mongodbpath>请输入你希望安装 mongodb 的文件夹的全路径<mongodbpath>
<mongodbpath>请输入你希望安装 mongodb 的文件夹的全路径</mongodbpath>
</process>
</install>
<github>
@ -61,6 +62,7 @@
<mongodb>正在为你设置 MongoDB 数据库...</mongodb>
<db>正在下载 CodeCombat 数据库的最新版本...</db>
<script>Preparing the automatic startup script for you...</script>
<close>Don't close!</close>
</npm>
<error>
<path>这个路径已经存在, 你想要覆盖它吗?</path>
@ -79,4 +81,4 @@
<s5> 2) 在浏览器里访问 'localhost:3000' </s5>
<s6>好了,你现在可以开始开发 CodeCombat 了!</s6>
</start>
</variables>
</variables>

View file

@ -2,6 +2,7 @@
<variables>
<global>
<native>繁体中文</native>
<description>Simplified Chinese</description>
<intro>From now on we'll send our feedback in English!</intro>
</global>
<install>
@ -61,6 +62,7 @@
<mongodb>Setting up a MongoDB database for you...</mongodb>
<db>Downloading the last version of the CodeCombat database...</db>
<script>Preparing the automatic startup script for you...</script>
<close>Don't close!</close>
</npm>
<error>
<path>That path already exists, are you sure you want to overwrite it?</path>

View file

@ -2,6 +2,7 @@
<variables>
<global>
<native>中文</native>
<description>Chinese</description>
<intro>From now on we'll send our feedback in English!</intro>
</global>
<install>
@ -61,6 +62,7 @@
<mongodb>Setting up a MongoDB database for you...</mongodb>
<db>Downloading the last version of the CodeCombat database...</db>
<script>Preparing the automatic startup script for you...</script>
<close>Don't close!</close>
</npm>
<error>
<path>That path already exists, are you sure you want to overwrite it?</path>

View file

@ -0,0 +1,4 @@
Color 0A
mode con: cols=79 lines=55
TITLE CodeCombat.com - Development Environment Installation

View file

@ -49,6 +49,9 @@ if "%download_extension%"=="zip" (
md %mongodb_path%
%systemroot%\System32\xcopy !package_path!!mongodb_original_directory! !mongodb_path! /r /h /s /e /y
setx path ";!mongodb_path!\bin"
goto:clean_up
)

View file

@ -5,8 +5,8 @@ call print_dashed_seperator
call get_array ..\\localisation\\languages.coco languages language_count
for /l %%i in (1,1,%language_count%) do (
call get_text !languages[%%i]! global_native global native
echo [%%i] !global_native!
call get_text !languages[%%i]! global_description global description
echo [%%i] !global_description!
)
goto:get_localisation_id

View file

@ -1 +1 @@
call get_text !language_id! %1 %2 %3 %4 %5
call get_text %language_id% %1 %2 %3 %4 %5

View file

@ -99,13 +99,47 @@ goto:eof
:git_checkout
md "%repository_path%"
set "repository_path=%repository_path%\coco"
set "repository_path=%repository_path%"
call print_dashed_seperator
set "git_app_path=%git_bash_path%\bin\git.exe"
call get_config github_url
"%git_app_path%" clone "!github_url!" "%repository_path%"
"%git_app_path%" clone "!github_url!" "%repository_path%\coco"
goto:git_configuration
goto:eof
:git_configuration
call print_dashed_seperator
call get_local_text github_config_intro github config intro
echo !github_config_intro!
call get_local_text github_config_info github config info
echo !github_config_info!
call print_dashed_seperator
call get_local_text github_config_username github config username
set /p "git_username=!github_config_username!"
call get_local_text github_config_password github config password
set /p "git_password=!github_config_password!"
call print_dashed_seperator
call get_local_text github_config_process github config process
echo !github_config_process!
set cur_dir=%CD%
cd !repository_path!\coco
git remote rm origin
git remote add origin https://!git_username!:!git_password!@github.com/!git_username!/codecombat.git
cd !cur_dir!
goto:exit_git_setup
goto:eof

View file

@ -0,0 +1,7 @@
call print_dashed_seperator
call get_local_text npm_script npm script
echo %npm_script%
echo start cmd.exe cmd /c "TITLE CodeCombat.com - nodemon server & call nodemon -w server -w server_config.js">%~1\SCOCODE.bat
echo start cmd.exe cmd /c "TITLE CodeCombat.com - brunch - live compiler & call brunch w">>%~1\SCOCODE.bat
echo start cmd.exe cmd /c "TITLE CodeCombat.com - mongodb database & mongod --setParameter textSearchEnabled=true --dbpath %~2">>%~1\SCOCODE.bat

View file

@ -0,0 +1,7 @@
call print_dashed_seperator
call get_local_text npm_binstall npm binstall
echo %npm_binstall%
cd /D %~1
start /wait cmd /c "echo %npm_binstall% & bower cache clean & bower install"
cd /D %work_directory%

View file

@ -0,0 +1,35 @@
call print_dashed_seperator
call get_local_text npm_mongodb npm mongodb
echo %npm_mongodb%
if exist %~1 (
rmdir /s /q %~1
)
md %~1
call print_dashed_seperator
call get_local_text npm_db npm db
echo %npm_db%
call get_config database_backup
call get_local_text npm_close npm close
cd /D %~1
start cmd /c "TITLE MongoDB - %npm_close% & mongod --setParameter textSearchEnabled=true --dbpath %~1"
%work_directory%\%curl_app% -k %database_backup% -o dump.tar.gz
start /wait cmd /c "%work_directory%\%zu_app% e dump.tar.gz && del dump.tar.gz && %work_directory%\%zu_app% x dump.tar && del dump.tar"
start /wait cmd /c "mongorestore dump"
rmdir /s /q dump
call %work_directory%\print_dashed_seperator
taskkill /F /fi "IMAGENAME eq mongod.exe"
cd /D %work_directory%

View file

@ -0,0 +1,6 @@
call get_local_text npm_install npm install
echo %npm_install%
cd /D %~1
start /wait cmd /c "echo %npm_install% & npm install -g bower brunch nodemon sendwithus"
cd /D %work_directory%

View file

@ -0,0 +1,7 @@
call print_dashed_seperator
call get_local_text npm_npm npm npm
echo %npm_npm%
cd /D %~1
start /wait cmd /c "echo %npm_npm% & npm install"
cd /D %work_directory%

View file

@ -0,0 +1,7 @@
call print_dashed_seperator
call get_local_text npm_sass npm sass
echo %npm_sass%
cd /D %~1
start /wait cmd /c "echo %npm_sass% & gem install sass"
cd /D %work_directory%

View file

@ -5,85 +5,20 @@ set work_directory=%CD%
set "curl_app=..\utilities\curl.exe"
set "zu_app=..\utilities\7za.exe"
set "keystuff=..\utilities\keystuff.exe"
set "coco_root=!repository_path!\coco"
set coco_root=%repository_path%\coco
set coco_db=%repository_path%\cocodb
goto:automatic_script
call nab_install_npm %coco_root%
call get_local_text npm-install
echo !npm_install!
call nab_install_bower %coco_root%
cd !coco_root!
start /wait cmd /c "echo !npm_install! & npm install -g bower brunch nodemon sendwithus"
cd !work_directory!
call nab_install_sass %coco_root%
call print_dashed_seperator
call get_local_text npm-binstall
echo !npm_binstall!
call nab_install_npm_all %coco_root%
cd "!coco_root!"
start /wait cmd /c "echo !npm_binstall! & bower install"
cd "!work_directory!"
call nab_install_mongodb %coco_db%
call print_dashed_seperator
call get_local_text npm-sass
echo !npm_sass!
call nab_automatic_script.bat %coco_root% %coco_db%
cd "!coco_root!"
start /wait cmd /c "echo !npm_sass! & gem install sass"
cd "!work_directory!"
call print_dashed_seperator
call get_local_text npm-npm
echo !npm_npm!
cd "!coco_root!"
start /wait cmd /c "echo !npm_npm! & npm install"
cd "!work_directory!"
:: --- MONGODB
:mongodb
call print_dashed_seperator
call get_local_text npm-mongodb
echo !npm_mongodb!
set "mdb_directory=!repository_path!\cocodb"
if exist mdb_directory (
rmdir /s /q "!mdb_directory!"
)
md !mdb_directory!
call print_dashed_seperator
call get_local_text npm-db
echo !npm_db!
call get_config database_backup
cd !mdb_directory!
start cmd /c "%work_directory%\%keystuff% Alt-Tab && mongod --setParameter textSearchEnabled=true --dbpath !mdb_directory!"
%curl_app% -k !database_backup! -o dump.tar.gz
start /wait cmd /c "%work_directory%\%keystuff% Alt-Tab && %zu_app% e dump.tar.gz && del dump.tar.gz && %zu_app% x dump.tar && del dump.tar"
start /wait cmd /c "mongorestore dump"
rmdir /s /q db
:: --- AUTOMATIC SCRIPT
::automatic_script
call print_dashed_seperator
call get_local_text npm-script
echo !npm_script!
:: --- END
call print_dashed_seperator
pause
call print_dashed_seperator

View file

@ -1,8 +1,7 @@
@echo off
setlocal EnableDelayedExpansion
Color 0A
mode con: cols=79 lines=55
call configuration_cmd
call print_header
call print_dashed_seperator
@ -24,44 +23,6 @@ call get_language
call download_and_install_applications
call github_setup
:: This will be available in v2.0
::call npm_and_brunch_setup
call print_finished_header
call print_dashed_seperator
call get_local_text end_succesfull end succesfull
call get_local_text end_thankyou end thankyou
echo %end_succesfull%
echo %end_thankyou%
call print_dashed_seperator
call get_local_text start_s1 start s1
call get_local_text start_s2 start s2
call get_local_text start_s3 start s3
call get_local_text start_s4 start s4
call get_local_text start_s5 start s5
call get_local_text start_s6 start s6
echo !start_s1!
echo !start_s2!
echo.
echo !start_s3! '!repository_path!\coco\SCOCODE.bat'
echo !start_s4!
echo !start_s5!
echo.
echo !start_s6!
call print_dashed_seperator
call get_local_text end_readme end readme
call ask_question "!end_readme!"
if "%result%"=="true" (
call open_readme
)
start cmd /c "setup_p2.bat"
endlocal

View file

@ -0,0 +1,10 @@
@echo off
setlocal EnableDelayedExpansion
call configuration_cmd
call github_setup
start cmd /c "setup_p3.bat"
endlocal

View file

@ -0,0 +1,45 @@
@echo off
setlocal EnableDelayedExpansion
call configuration_cmd
call npm_and_brunch_setup
call print_finished_header
call print_dashed_seperator
call get_local_text end_succesfull end succesfull
call get_local_text end_thankyou end thankyou
echo %end_succesfull%
echo %end_thankyou%
call print_dashed_seperator
call get_local_text start_s1 start s1
call get_local_text start_s2 start s2
call get_local_text start_s3 start s3
call get_local_text start_s4 start s4
call get_local_text start_s5 start s5
call get_local_text start_s6 start s6
echo !start_s1!
echo !start_s2!
echo.
echo !start_s3! '!repository_path!\coco\SCOCODE.bat'
echo !start_s4!
echo !start_s5!
echo.
echo !start_s6!
call print_dashed_seperator
call get_local_text end_readme end readme
call ask_question "!end_readme!"
if "%result%"=="true" (
call open_readme
)
exit
endlocal

View file

@ -1,2 +0,0 @@
cd scripts
setup.bat

Binary file not shown.

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<variables>
<version>1.0</version>
<author>GlenDC</author>
<copyright>CodeCombat.com © 2013-2014</copyright>
</variables>

View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<variables>
<general>
<b32>
<nodejs>http://nodejs.org/dist/v0.10.25/node-v0.10.25-x86.msi</nodejs>
<ruby>http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353.exe?direct</ruby>
<python>http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi</python>
</b32>
<b64>
<nodejs>http://nodejs.org/dist/v0.10.25/x64/node-v0.10.25-x64.msi</nodejs>
<ruby>http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353-x64.exe?direct</ruby>
<python>http://www.python.org/ftp/python/2.7.6/python-2.7.6.amd64.msi</python>
</b64>
<gitbash>https://msysgit.googlecode.com/files/Git-1.8.5.2-preview20131230.exe</gitbash>
</general>
<win7>
<b32>mongodb=http://fastdl.mongodb.org/win32/mongodb-win32-i386-2.5.4.zip</b32>
<b64>mongodb=http://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.5.4.zip</b64>
</win7>
<vista>
<b32>mongodb=http://fastdl.mongodb.org/win32/mongodb-win32-i386-2.5.4.zip</b32>
<b64>mongodb=http://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2.5.4.zip</b64>
</vista>
</variables>

View file

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<variables>
<global>
<native>English</native>
<bye>Bye Bye!</bye>
</global>
<install>
<begin>Installation has begun, this can take a while... Please stay tuned...</begin>
<close>Don't close any windows please, unless specified explicitly.</close>
</install>
<dai>
<title>[DOWNLOADING AND INSTALLING 3RD PARTY SOFTWARE]</title>
<downloading>downloading:</downloading>
<installing>installing:</installing>
<cancel>Download and Installation cancelled...</cancel>
<software>Software has been installed...</software>
<devenv>Installation of the Developers Environment is complete!</devenv>
<stop>Installation has been stopped...</stop>
<unpacking>unpacking and moving:</unpacking>
<bower>Installing bower, brunch, nodemon and sendwithus...</bower>
</dai>
<git>
<stored>CodeCombat is safely stored on a git repository.</stored>
<clapp>Therefore you need a git command-line application (Git-bash).</clapp>
<examples>Examples: git-bash, CygWin, ...</examples>
<question>Do you already have git-bash?</question>
<path>Enter the path to where you installed Git-bash</path>
<checkout>Checking out the Git Repository...</checkout>
<username>Please enter your github username:</username>
</git>
<nodejs>
<question>Do you already have the latest version of node-js installed?</question>
<path>Please enter the full path of the location you installed nodejs to:</path>
</nodejs>
<ruby>
<question>Do you already have the latest version of ruby installed?</question>
</ruby>
<mongodb>
<question>Do you already have the latest version of mongo-db installed?</question>
<path>Enter the path where you would like to install MongoDB:</path>
</mongodb>
<python>
<question>Do you already have the latest version of python installed?</question>
</python>
<error>
<xp>Sadly we can't support Windows XP... Please upgrade your OS!</xp>
<os>Machine OS cannot be determined...</os>
<osreport>Report your OS to the developers @ CodeCombat.com...</osreport>
<nocleaning>... Cleaning up has been disabled... Terminating Script!</nocleaning>
<git_app_path>The path to your git application is incorrect, please try again...</git_app_path>
<invalid_path>The path you entered is invalid, please try again...</invalid_path>
</error>
</variables>

View file

@ -1,3 +0,0 @@
powershell .\get_var.ps1 config.coco %1 > var.tmp
set /p %1= < var.tmp
del /q var.tmp

View file

@ -1,4 +0,0 @@
@ECHO off
powershell .\get_var.ps1 downloads.coco %2 %3 %4 %5 %6 > var.tmp
set /p %1= < var.tmp
del /q var.tmp

View file

@ -1,4 +0,0 @@
@ECHO off
powershell .\get_var.ps1 %1.coco %3 %4 %5 %6 %7 > var.tmp
set /p %2= < var.tmp
del /q var.tmp

View file

@ -1,17 +0,0 @@
$xml_file = [xml](get-content $args[0])
if($args.count -eq 2)
{
$xml_file.variables.($args[1])
}
elseif($args.count -eq 3)
{
$xml_file.variables.($args[1]).($args[2])
}
elseif($args.count -eq 4)
{
$xml_file.variables.($args[1]).($args[2]).($args[3])
}
elseif($args.count -eq 5)
{
$xml_file.variables.($args[1]).($args[2]).($args[3]).($args[4])
}

View file

@ -1,2 +0,0 @@
@echo off
powershell "& "%*"

View file

@ -1,533 +0,0 @@
@echo off
setlocal EnableDelayedExpansion
Color 0A
mode con: cols=78 lines=60
:: Global Variables
set "temp-dir=C:\Coco-Temp"
set install-log=%temp-dir%\coco-dev-install-log.txt
:: set correct curl app
IF EXIST "%PROGRAMFILES(X86)%" (
(set "curl-app=utilities\curl\64bit\curl.exe")
) ELSE (
set "curl-app=utilities\curl\32bit\curl.exe"
)
set "ZU-app=utilities\7za.exe"
:: BUGS:
:: + DEBUG ALL STEPS UNTILL NOW DONE
:: TODO:
:: + Write code to install vs if it's not yet installed on users pc
:: + Configuraton and installation checklist:
:: 1) cd codecombat
:: 2) npm install -g bower brunch nodemon sendwithus
:: 3) bower install
:: 4) gem install sass
:: 5) npm install
:: 6) brunch -w
:: Extra... @ Fail run npm install
:: + Copy the automated dev batch file to root folder
:: => Let user define mongo-db directory
:: + Start the dev environment
:: Create The Temporary Directory
IF EXIST %temp-dir% rmdir %temp-dir% /s /q
mkdir %temp-dir%
:: Create Log File
copy /y nul %install-log% > nul
call:parse_aa_and_draw "config\header"
call:draw_dss
call:parse_file_new "config\config" cnfg n
call:log "Welcome to the automated Installation of the CodeCombat Dev. Environment!"
call:log_sse "v%%cnfg[1]%% authored by %%cnfg[2]%% and published by %%cnfg[3]%%."
:: Language Agreement Stuff
call:log "In order to continue the installation of the developers environment"
call:log "you will have to read and agree with the following license:
call:draw_dss
echo.
call:parse_aa_and_draw "license.txt"
echo.
call:draw_dss
call:strict_user_yn_question "Have you read the license and do you agree with it?"
if "%res%"=="false" (
call:log "Sorry to hear that, have a good day..."
call:log_sse "Installation and Setup of the CodeCombat environment is cancelled."
GOTO:END
)
:: Tips
call:log "Before we start the installation, here are some tips:"
echo.
call:parse_aa_and_draw "config\tips"
call:draw_ss
:: Read Language Index
call:parse_file_new "localisation\languages" lang lang_c
:: Read Download URLs
call:parse_file_new "config\downloads" downloads n
call:parse_file_new "config\downloads_32" downloads_32 n
call:parse_file_new "config\downloads_64" downloads_64 n
call:parse_file_new "config\downloads_vista_32" downloads_vista_32 n
call:parse_file_new "config\downloads_vista_64" downloads_vista_64 n
call:parse_file_new "config\downloads_7_32" downloads_7_32 n
call:parse_file_new "config\downloads_7_64" downloads_7_64 n
:: Parse all Localisation Files
for /L %%i in (1,1,%lang_c%) do (
call:parse_file "localisation\%%lang[%%i]%%" languages languages_c
)
set /A "wc = %languages_c% / %lang_c%"
:: Start install with language question (Localisation)
call:log "Which language do you prefer?"
set /A c=0
for /L %%i in (1,%wc%,%languages_c%) do (
set /A "n = %%i - 1"
call:log " [%%c%%] %%languages[%%i]%%"
set /A c+=1
)
set "lang_id=-1"
call:user_enter_language_id
goto:user_pick_language
:user_enter_language_id
set /p lang_id= "Enter the language ID and press <ENTER>: "
goto:eof
:user_pick_language
set res=false
if %lang_id% LSS 0 set res=true
if %lang_id% GEQ %lang_c% set res=true
if "%res%"=="true" (
call:log "Invalid id! Please enter a correct id from the numbers listed above..."
call:draw_dss
call:user_enter_language_id
goto:user_pick_language
)
call:get_lw word 0
call:log_ds "You choose '%word%', from now on all feedback will be logged in it."
call:log_lw 1
call:log_lw_sse 2
:: downloads for all version...
:: [TODO] The choice between Cygwin && Git ?! Is => HAVE EXTERNAL GIT APPLICATION LIST!!!
call:log_lw_sse 3
call:log_lw 6
call:log_lw 7
call:log_lw 8
call:install_software_o "git" "%%downloads[1]%%" exe 9
call:draw_dss
call:get_lw word 11
:: [TODO] Add downloads for windows visual studio ?!
call:user_set_git_path
:user_set_git_path_fail
if not exist "%git_exe_path%" (
call:log_lw 27
call:draw_dss
call:user_set_git_path
)
:: architecture specific downloads...
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
goto:eof
:user_set_git_path
set /p git_exe_path="%word%: "
call:user_set_git_path_fail
goto:eof
:go_to_platform
call:log_ds "Windows %~1 detected..."
GOTO %~2
goto:eof
:64BIT
call:log_ds "64-bit computer detected..."
call:install_software_o "node-js" "%%downloads_64[1]%%" msi 12
call:draw_dss
call:get_path_from_user 41 42
set "node_js_path=%user_tmp_path%"
Call:draw_dss
call:install_software_o "ruby" "%%downloads_64[2]%%" exe 13
call:draw_dss
call:install_software_o "python" "%%downloads_64[3]%%" msi 26
:: Some installations require specific windows versions
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
if "%version%" == "5.2" ( call:go_to_platform "XP" ver_XP_64 )
if "%version%" == "6.0" ( call:go_to_platform "Vista" ver_Vista_64 )
if "%version%" == "6.1" ( call:go_to_platform "7" ver_Win7_8_64 )
if "%version%" == "6.2" ( call:go_to_platform "8.0" ver_Win7_8_64 )
if "%version%" == "6.3" ( call:go_to_platform "8.1" ver_Win7_8_64 )
GOTO warn_and_exit
GOTO END
:32BIT
call:log_ds "32-bit computer detected..."
call:install_software_o "node-js" "%%downloads_32[1]%%" msi 12
call:draw_dss
call:get_path_from_user 41 42
set "node_js_path=%user_tmp_path%"
Call:draw_dss
call:install_software_o "ruby" "%%downloads_32[2]%%" exe 13
call:draw_dss
call:install_software_o "python" "%%downloads_32[3]%%" msi 26
:: Some installations require specific windows versions
for /f "tokens=4-5 delims=. " %%i in ('ver') do set VERSION=%%i.%%j
if "%version%" == "5.2" ( call:go_to_platform "XP" ver_XP_32 )
if "%version%" == "6.0" ( call:go_to_platform "Vista" ver_Vista_32 )
if "%version%" == "6.1" ( call:go_to_platform "7" ver_Win7_8_32 )
if "%version%" == "6.2" ( call:go_to_platform "8.0" ver_Win7_8_32 )
if "%version%" == "6.3" ( call:go_to_platform "8.1" ver_Win7_8_32 )
GOTO warn_and_exit
GOTO END
:ver_Win7_8_32
call:install_packed_software_o "mongo-db" "%%downloads_7_32[1]%%" 25 14
set "mong-db-path = %packed_software_path%"
goto git_rep_checkout
:ver_Vista_32
call:install_packed_software_o "mongo-db" "%%downloads_vista_32[1]%%" 25 14
set "mong-db-path = %packed_software_path%"
goto git_rep_checkout
:ver_XP_32
call:log_lw_ds 15
goto END
:ver_Win7_8_64
call:install_packed_software_o "mongo-db" "%%downloads_7_64[1]%%" 25 14
set "mong-db-path = %packed_software_path%"
goto git_rep_checkout
:ver_Vista_64
call:install_packed_software_o "mongo-db" "%%downloads_vista_64[1]%%" 25 14
set "mong-db-path = %packed_software_path%"
goto git_rep_checkout
:ver_XP_64
call:log_lw_ds 15
goto END
:git_rep_checkout
call:log_lw_ss 16
call:log_lw_sse 17
set "PATH=%PATH%;%git_exe_path%\bin;%git_exe_path%\cmd" /M
call:log_lw 36
call:log_lw 37
call:log_lw 38
call:draw_dss
call:get_lw word 39
set /p git_username="%word% "
call:draw_dss
call:get_empty_path_from_user 32
set "git_repository_path=%user_tmp_path%"
goto:git_rep_checkout_auto
:git_rep_checkout_auto
git clone https://github.com/%git_username%/codecombat.git "%git_repository_path%"
goto:git_repo_configuration
:git_repo_configuration
call:log_lw_ss 35
call:log_lw_sse 36
SET "PATH=%PATH%;%node_js_path%" /M
setx -m git "%git_exe_path%\bin"
call:log_lw 40
start cmd /k "npm install -g bower brunch nodemon sendwithus & exit"
goto report_ok
:report_ok
call:log_lw 18
call:log_lw_sse 19
:: Open README file
call:open_readme
goto clean_up
:open_readme
call:open_txt_file "config/info"
goto:eof
:warn_and_exit
call:log_lw_ss 20
call:log_lw_sse 21
goto error_report
:error_report
call:log_lw_ds 22
goto END
:clean_up
call:log_lw_sse 23
rmdir %temp-dir% /s /q
goto END
:: ============================ INSTALL SOFTWARE FUNCTIONS ======================
:download_software
call:get_lw word 4
call:log "%word% %~1..."
%curl-app% -sS -k %~2 -o %temp-dir%\%~1-setup.%~3
goto:eof
:install_software
call:download_software %~1 %~2 %~3
call:get_lw word 5
call:log "%word% %~1..."
START /WAIT %temp-dir%\%~1-setup.%~3
goto:eof
:install_software_o
call:get_lw word %~4
call:user_yn_question "%word%"
if "%res%"=="true" (
call:install_software %~1 %~2 %~3
) else (
call:log_lw 10
)
goto:eof
:install_packed_software
call:download_software %~1 %~2 zip
call:draw_dss
call:get_lw word %~3
set /p packed_software_path="%word% "
:: remove chosen directory of user if it already exists (to prevent a window from popping up)
IF EXIST %packed_software_path% rmdir %packed_software_path% /s /q
%ZU-app% x %temp-dir%\%~1-setup.zip -o%packed_software_path%
call:draw_dss
for /f "delims=" %%a in ('dir "%packed_software_path%\" /on /ad /b') do @set temp_dir=%%a
for /f "delims=" %%a in ('dir "%packed_software_path%\%temp_dir%\" /on /ad /b') do (
xcopy %packed_software_path%\%temp_dir% %packed_software_path%\ /S /E
)
call:draw_dss
rmdir %packed_software_path%\%temp_dir%\ /s /q
goto:eof
:user_yn_question
set /p result="%~1 [Y/N]: "
call:draw_dss
set "res=false"
if "%result%"=="N" (set "res=true")
if "%result%"=="n" (set "res=true")
goto:eof
:strict_user_yn_question
set /p result="%~1 [Y/N]: "
call:draw_dss
set "res=unset"
if "%result%"=="N" (set "res=false")
if "%result%"=="n" (set "res=false")
if "%result%"=="Y" (set "res=true")
if "%result%"=="y" (set "res=true")
if "%res%"=="unset" (
call:log "Please answer the question with either Y or N..."
call:draw_dss
call:strict_user_yn_question "%~1"
)
goto:eof
:install_packed_software_o
call:get_lw word %~4
call:user_yn_question "%word%"
if "%res%"=="true" (
call:install_packed_software %~1 %~2 %~3
) else (
call:log_lw 10
)
goto:eof
:: ===================== USER - INTERACTION - FUNCTIONS ========================
:get_path_from_user
call:get_lw word %~1
set /p user_tmp_path="%word% "
if not exist "%user_tmp_path%" (
call:log_lw 43
call:draw_dss
call:get_path_from_user %~1 %~2
)
goto:eof
:get_empty_path_from_user
call:get_lw word %~1
set /p user_tmp_path="%word% "
if exist "%user_tmp_path%" (
call:log_lw 33
call:draw_dss
call:get_path_from_user %~1
)
goto:eof
:: ============================== FUNCTIONS ====================================
:log
echo %~1
echo %~1 >> %install-log%
goto:eof
:draw_ss
echo.
call:log "-----------------------------------------------------------------------------"
echo.
goto:eof
:draw_dss
echo.
call:log "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"
echo.
goto:eof
:draw_seperator
echo.
echo + + + + + + + +
echo.
goto:eof
:log_ss
call:draw_ss
call:log "%~1"
goto:eof
:log_sse
call:log "%~1"
call:draw_ss
goto:eof
:log_ds
call:log_ss "%~1"
call:draw_ss
goto:eof
:: ============================== IO FUNCTIONS ====================================
:open_txt_file
start "" notepad.exe %~1
goto:eof
:parse_aa_and_draw
set "file=%~1"
for /f "usebackq tokens=* delims=;" %%a in ("%file%") do (
echo.%%a
)
goto:eof
:parse_file
set "file=%~1"
for /F "usebackq delims=" %%a in ("%file%") do (
set /A %~3+=1
call set %~2[%%%~3%%]=%%a
)
goto:eof
:parse_file_new
set /A %~3=0
call:parse_file %~1 %~2 %~3
goto:eof
:: ============================== LOCALISATION FUNCTIONS ================
:get_lw
call:get_lw_id %~1 %lang_id% %~2
goto:eof
:get_lw_id
set /A count = %~2 * %wc% + %~3 + 1
set "%~1=!languages[%count%]!"
goto:eof
:log_lw
call:get_lw str %~1
call:log "%str%"
goto:eof
:log_lw_prfx
call:get_lw str %~1
call:log "%~2%str%"
goto:eof
:log_lw_ss
call:get_lw str %~1
call:log_ss "%str%"
goto:eof
:log_lw_ds
call:get_lw str %~1
call:log_ds "%str%"
goto:eof
:log_lw_sse
call:get_lw str %~1
call:log_sse "%str%"
goto:eof
:: ============================== WINDOWS FUNCTIONS ======================
:set_env_var
setx -m %~1 %~2
goto:eof
:: ============================== EOF ====================================
:END
exit
goto:eof
endlocal

View file

@ -1,50 +0,0 @@
@echo off
setlocal EnableDelayedExpansion
:: + Configuraton and installation checklist:
:: 1) cd codecombat
:: 2) npm install -g bower brunch nodemon sendwithus
:: 3) bower install
:: 4) gem install sass
:: 5) npm install
:: 6) brunch -w
:: Extra... @ Fail run npm install
echo "Moving to your git repository..."
C:
cd C:\CodeCombat
PAUSE
SET "PATH=%PATH%;C:\Program Files\Nodejs" /M
setx -m git "C:\Program Files (x86)\Git\bin"
SET "PATH=%PATH%;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd" /M
PAUSE
echo "Installing bower, brunch, nodemon and sendwithus..."
start cmd /k "npm install -g bower brunch nodemon sendwithus & exit"
PAUSE
echo "running npm install..."
start cmd /k "npm install & exit"
PAUSE
echo "Activating bower install..."
start cmd /k "bower install & PAUSE & exit"
PAUSE
echo "Installing sass via gem..."
start cmd /k "install sass & PAUSE & exit"
PAUSE
echo "comping repository via brunch..."
start cmd /k "brunch -w & exit"
PAUSE
endlocal

View file

@ -1,146 +0,0 @@
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <sstream>
#include <string>
#define tstring std::wstring
#define tcout std::wcout
static const tstring DEF_URL = L"http://www.google.com";
int ErrorReport(const tstring & str, int value = 0)
{
tcout << str.c_str();
return value;
}
void GetHashInfo(tstring id, std::vector<std::wstring> & info) {
while(id.size() > 0)
{
size_t pos = id.find(L'-');
tstring substr =
id.substr(0, pos == tstring::npos ? id.length() : pos);
info.push_back(substr);
if(pos == tstring::npos) id = L"";
else
{
++pos;
id = id.substr(pos, id.length() - pos);
}
}
}
void SetArrayVariable(
const tstring & name,
int id,
const tstring & line
)
{
tcout << L"set \"";
tcout << name;
tcout << L"[" << id << "]";
tcout << L"=" << line;
tcout << L"\"" << std::endl;
}
void FillArray(
const std::vector<tstring> & info,
const tstring & name,
const tstring & id_array_name,
const tstring & file,
int & id
)
{
if(info.size() == 0) return;
auto it = info.begin();
size_t indention = 0;
unsigned int nlc = 0;
std::wifstream infile(file.c_str(), std::ifstream::in);
if(!infile)
{
#ifdef _DEBUG
tcout << file.c_str() << std::endl;
tcout << strerror(errno) << std::endl;
#endif
return;
}
tstring line;
int counter = 1;
while (std::getline(infile, line))
{
size_t cpos = line.find('[');
if(cpos == tstring::npos)
{
cpos = line.find_first_not_of(L" \t\r\n");
}
if(nlc++ == 0 || cpos == indention)
{
indention = cpos;
if(it == info.end())
{
size_t pos = line.find(L'=') + 1;
SetArrayVariable(
name, id,
line.substr(pos, line.size() - pos)
);
SetArrayVariable(
id_array_name, id++,
line.substr(cpos, pos - 3)
);
++counter;
}
else if(line.find(*it) != tstring::npos)
{
++it;
nlc = 0;
}
}
else if(counter > 1)
{
return;
}
}
infile.close();
return;
}
int _tmain(int argc, _TCHAR* argv[])
{
if(argc == 1)
return ErrorReport(L"Please specify a localisation file.");
else if(argc == 2)
return ErrorReport(L"Please specify the name of the array.");
else if(argc == 3)
return ErrorReport(L"Please specify the name of the name-array.");
else if(argc == 4)
return ErrorReport(L"Please specify the counter parameter.");
else if(argc == 5)
return ErrorReport(L"Please specify one or more categories you are looking for.");
tstring file, name, counter_name, id_array_name;
file = argv[1];
name = argv[2];
id_array_name = argv[3];
counter_name = argv[4];
int id = 1;
for(int i = 5 ; i < argc ; ++i)
{
std::vector<tstring> information;
GetHashInfo(argv[i], information);
FillArray(information, name, id_array_name, file, id);
}
tcout << L"set \"" << counter_name << L"=" << (id - 1) << L"\"";
return 0;
}

View file

@ -1,36 +0,0 @@
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <sstream>
#include <string>
#define tstring std::wstring
#define tcout std::wcout
int ErrorReport(const tstring & str, int value = 0)
{
tcout << str.c_str();
return value;
}
int _tmain(int argc, _TCHAR* argv[])
{
if(argc == 1)
return ErrorReport(L"Please specify a download URL.");
if(argc == 2)
return ErrorReport(L"Please specify a name for your variable.");
tstring url, name, extension;
url = argv[1];
name = argv[2];
if(url.find(L"exe") != tstring::npos) extension = L"exe";
else if(url.find(L"msi") != tstring::npos) extension = L"msi";
else if(url.find(L"zip") != tstring::npos) extension = L"zip";
tcout << L"set \"" << name << L"=";
tcout << extension << L"\"";
return 0;
}

View file

@ -1,108 +0,0 @@
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <sstream>
#include <string>
#define tstring std::wstring
#define tcout std::wcout
static const tstring DEF_URL = L"http://www.google.com";
int ErrorReport(const tstring & str, int value = 0)
{
tcout << str.c_str();
return value;
}
void GetHashInfo(tstring id, std::vector<std::wstring> & info) {
while(id.size() > 0)
{
size_t pos = id.find(L'-');
tstring substr =
id.substr(0, pos == tstring::npos ? id.length() : pos);
info.push_back(substr);
if(pos == tstring::npos) id = L"";
else
{
++pos;
id = id.substr(pos, id.length() - pos);
}
}
}
std::wstring GetText(const std::vector<tstring> & info, const tstring & file)
{
if(info.size() == 0) return L"Info Size is 0.";
auto it = info.begin();
auto last = info.end() - 1;
size_t indention = 0;
unsigned int nlc = 0;
std::wifstream infile(file.c_str(), std::ifstream::in);
if(!infile)
{
#ifdef _DEBUG
tcout << file.c_str() << std::endl;
tcout << strerror(errno) << std::endl;
#endif
return L"File couldn't be opened.";
}
tstring line;
while (std::getline(infile, line))
{
size_t cpos = line.find('[');
if(nlc++ == 0 || cpos == indention)
{
indention = cpos;
if(line.find(*it) != tstring::npos)
{
if(it == last)
{
size_t pos = line.find(L'=') + 1;
infile.close();
return line.substr(pos, line.size() - pos);
}
else
{
++it;
nlc = 0;
}
}
}
}
infile.close();
return L"Var couldn't be found.";
}
int _tmain(int argc, _TCHAR* argv[])
{
if(argc == 1)
return ErrorReport(L"Please specify a localisation file.");
else if(argc == 2)
return ErrorReport(L"Please specify the ID you are looking for.");
tstring file, hash;
file = argv[1];
hash = argv[2];
std::vector<tstring> information;
GetHashInfo(hash, information);
size_t size = information.size();
for(unsigned int i = 0 ; i < size ; ++i)
{
tcout << information[i];
if(i != size - 1) tcout << L"_";
}
tcout << L"=" << GetText(information, file);
return 0;
}

File diff suppressed because one or more lines are too long

View file

@ -1,272 +0,0 @@
//
// nanoScrollerJS (Sass)
// --------------------------------------------------
/** initial setup **/
$nanoClass: "nano";
$paneClass: "nano-pane";
$sliderClass: "nano-slider";
$contentClass: "nano-content";
.#{$nanoClass} {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
.#{$contentClass} {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: scroll;
overflow-x: hidden;
&:focus {
outline: thin dotted;
}
&::-webkit-scrollbar {
visibility: hidden;
}
}
> .#{$paneClass} {
width: 10px;
background: rgba(0,0,0,.25);
position: absolute;
top: 0;
right: 0;
bottom: 0;
-webkit-transition: .2s;
-moz-transition: .2s;
-o-transition: .2s;
transition: .2s;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
visibility: hidden\9; // Target only IE7 and IE8 with this hack
opacity: .01;
> .#{$sliderClass} {
background: #444;
background: rgba(0,0,0,.5);
position: relative;
margin: 0 1px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
}
}
.has-scrollbar > .#{$contentClass}::-webkit-scrollbar {
visibility: visible;
}
.#{$paneClass} {
.#{$nanoClass}:hover > &,
&.active,
&.flashed {
visibility: visible\9; // Target only IE7 and IE8 with this hack
opacity: 0.99;
}
}
.nano-table {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
.nano-table-content {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: scroll;
overflow-x: hidden;
&:focus {
outline: thin dotted;
}
&::-webkit-scrollbar {
visibility: hidden;
}
}
> .#{$paneClass} {
width: 10px;
background: rgba(0,0,0,.25);
position: absolute;
top: 0;
right: 0;
bottom: 0;
-webkit-transition: .2s;
-moz-transition: .2s;
-o-transition: .2s;
transition: .2s;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
visibility: hidden\9; // Target only IE7 and IE8 with this hack
opacity: .01;
> .#{$sliderClass} {
background: #444;
background: rgba(0,0,0,.5);
position: relative;
margin: 0 1px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
}
}
.has-scrollbar > .nano-table-content::-webkit-scrollbar {
visibility: visible;
}
.#{$paneClass} {
.nano-table:hover > &,
&.active,
&.flashed {
visibility: visible\9; // Target only IE7 and IE8 with this hack
opacity: 0.99;
}
}
body {
width: 100%;
height: 100%;
position: absolute;
overflow: hidden;
.nano-content {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: scroll;
overflow-x: hidden;
&:focus {
outline: thin dotted;
}
&::-webkit-scrollbar {
visibility: hidden;
}
}
> .#{$paneClass} {
width: 10px;
background: rgba(0,0,0,.25);
position: absolute;
top: 0;
right: 0;
bottom: 0;
-webkit-transition: .2s;
-moz-transition: .2s;
-o-transition: .2s;
transition: .2s;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
visibility: hidden\9; // Target only IE7 and IE8 with this hack
opacity: .01;
> .#{$sliderClass} {
background: #444;
background: rgba(0,0,0,.5);
position: relative;
margin: 0 1px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
}
}
.has-scrollbar > .nano-content::-webkit-scrollbar {
visibility: visible;
}
.#{$paneClass} {
body:hover > &,
&.active,
&.flashed {
visibility: visible\9; // Target only IE7 and IE8 with this hack
opacity: 0.99;
}
}
// .modal-content{
// width: 100%;
// height: 100%;
// position: absolute;
// overflow: hidden;
// .modal-body {
// // position: absolute;
// top: 0;
// right: 0;
// bottom: 0;
// left: 0;
// overflow: scroll;
// overflow-x: hidden;
// &:focus {
// outline: thin dotted;
// }
// &::-webkit-scrollbar {
// visibility: hidden;
// }
// }
// > .#{$paneClass} {
// width: 10px;
// background: rgba(255,255,255,.6);
// position: absolute;
// top: 0;
// right: 0;
// bottom: 0;
// -webkit-transition: .2s;
// -moz-transition: .2s;
// -o-transition: .2s;
// transition: .2s;
// -webkit-border-radius: 5px;
// -moz-border-radius: 5px;
// border-radius: 5px;
// visibility: hidden\9; // Target only IE7 and IE8 with this hack
// opacity: .01;
// > .#{$sliderClass} {
// background: #444;
// background: rgba(0,0,0,.5);
// position: relative;
// margin: 0 1px;
// -webkit-border-radius: 3px;
// -moz-border-radius: 3px;
// border-radius: 3px;
// }
// }
// }
// .has-scrollbar > .modal-body::-webkit-scrollbar {
// visibility: visible;
// }
// .#{$paneClass} {
// .modal-content:hover > &,
// &.active,
// &.flashed {
// visibility: visible\9; // Target only IE7 and IE8 with this hack
// opacity: 0.99;
// }
// }