i18n for zh-HANS

i18n for zh-HANS

i18n for zh-HANS

--- app/locale/zh-HANS.coffee
+++ app/locale/zh-HANS.coffee
@@ -92,8 +92,8 @@
     campaign_player_created_description: "……在这里你可以与你的小伙伴的创造力战斗 技术指导。"
     campaign_classic_algorithms: "经典算法"
     campaign_classic_algorithms_description: "... 你可以在此学习到计算机科学中最常用的算法"
-#    campaign_old_multiplayer: "(Deprecated) Old Multiplayer Arenas"
-#    campaign_old_multiplayer_description: "Relics of a more civilized age. No simulations are run for these older, hero-less multiplayer arenas."
+    campaign_old_multiplayer: "（过时的）旧的多人竞技场"
+    campaign_old_multiplayer_description: "一个文明时代的遗迹。没有模拟运行这些老的、英雄少的多人竞技场。"

   share_progress_modal:
     blurb: "你的进度真快！快告诉其他人你从CodeCombat学到了什么！" # {change}
@@ -160,7 +160,7 @@
     unwatch: "取消关注"
     submit_patch: "提交补丁"
     submit_changes: "提交更新"
-#    save_changes: "Save Changes"
+    save_changes: "保存更新"

   general:
     and: "与"
@@ -296,7 +296,7 @@
     time_goto: "跳到:"
     non_user_code_problem_title: "不能读入关卡"
     infinite_loop_title: "有无限循环"
-#    infinite_loop_description: "The initial code to build the world never finished running. It's probably either really slow or has an infinite loop. Or there might be a bug. You can either try running this code again or reset the code to the default state. If that doesn't fix it, please let us know."
+    infinite_loop_description: "建立世界的初始代码永远不会运行完毕。这可能是真的运行的很慢或者陷入了一个死循环。又或者可能存在bug。您可以尝试再次运行该代码，或者将代码重置为默认状态。如果仍旧解决不了，请让告诉我们。"
     check_dev_console: "你也可以打开开发者界面看一下有什么可能出错了。"
     check_dev_console_link: "(说明)"
     infinite_loop_try_again: "请重试"
@@ -347,7 +347,7 @@
     tip_hate_computers: "那些认为他们讨厌电脑的人，其实他们讨厌的是垃圾程序编写员。- Larry Niven"
     tip_open_source_contribute: "你可以帮助「CodeCombat」提高！"
     tip_recurse: "迭代为人，递归为神 - L. Peter Deutsch"
-#    tip_free_your_mind: "You have to let it all go, Neo. Fear, doubt, and disbelief. Free your mind. - Morpheus"
+    tip_free_your_mind: "丢掉一切私心杂念,丢掉害怕、疑问和拒信,解放你的思想。 - Morpheus"
     tip_strong_opponents: "即使是最强大的对手也是有弱点的. - Itachi Uchiha"

   game_menu:
@@ -405,7 +405,7 @@
     prompt_body: "还需要更多吗？"
     prompt_button: "进入商店"
     recovered: "之前购买的宝石已恢复。请刷新页面。"
-#    price: "x3500 / mo"
+    price: "x3500 / 月"

   subscribe:
     comparison_blurb: "亲，订阅CodeCombat，大力的提升你的技能！"
@@ -450,31 +450,31 @@
     unlock_help_videos: "订阅后才可以解锁视频教学哦！"
     personal_sub: "个人订阅" # Accounts Subscription View below
     loading_info: "正在读入订阅内容..."
-#    managed_by: "Managed by"
-#    will_be_cancelled: "Will be cancelled on"
-#    currently_free: "You currently have a free subscription"
-#    currently_free_until: "You currently have a free subscription until"
-#    was_free_until: "You had a free subscription until"
-#    managed_subs: "Managed Subscriptions"
-#    managed_subs_desc: "Add subscriptions for other players (students, children, etc.)"
-#    managed_subs_desc_2: "Recipients must have a CodeCombat account associated with the email address you provide."
-#    group_discounts: "Group discounts"
-#    group_discounts_1: "We also offer group discounts for bulk subscriptions."
-#    group_discounts_1st: "1st subscription"
+    managed_by: "管理"
+    will_be_cancelled: "将被取消"
+    currently_free: "您目前有一个免费订阅"
+    currently_free_until: "您目前有一个免费订阅，直到"
+    was_free_until: "您有过一个免费订阅，直到"
+    managed_subs: "管理订阅"
+    managed_subs_desc: "为其他玩家（学生、儿童等）添加订阅。"
+    managed_subs_desc_2: "收件人必须有一个与您提供的电子邮件地址相关联的codecombat帐户。"
+    group_discounts: "团购价"
+    group_discounts_1: "我们还为批量订阅提供团购价"
+    group_discounts_1st: "1个订阅"
     group_discounts_full: "全价"
-#    group_discounts_2nd: "Subscriptions 2-11"
+    group_discounts_2nd: "2-11个订阅"
     group_discounts_20: "八折"
-#    group_discounts_12th: "Subscriptions 12+"
+    group_discounts_12th: "12+个订阅"
     group_discounts_40: "六折"
-#    subscribing: "Subscribing..."
-#    recipient_emails_placeholder: "Enter email address to subscribe, one per line."
+    subscribing: "订阅中..."
+    recipient_emails_placeholder: "请输入电子邮件地址来订阅，每行一个。"
     subscribe_users: "订阅用户"
-#    users_subscribed: "Users subscribed:"
-#    no_users_subscribed: "No users subscribed, please double check your email addresses."
-#    current_recipients: "Current Recipients"
-#    unsubscribing: "Unsubscribing..."
-#    subscribe_prepaid: "Click Subscribe to use prepaid code"
-#    using_prepaid: "Using prepaid code for monthly subscription"
+    users_subscribed: "用户订阅："
+    no_users_subscribed: "没有用户订阅，请仔细检查您的电子邮件地址。"
+    current_recipients: "当前收件人"
+    unsubscribing: "取消订阅中..."
+    subscribe_prepaid: "点击订阅来使用预付费代码"
+    using_prepaid: "使用预付费代码进行每月订阅"

   choose_hero:
     choose_hero: "请选择您的英雄"
@@ -502,13 +502,13 @@
     blocks: "格挡" # As in "this shield blocks this much damage"
     backstab: "背刺" # As in "this dagger does this much backstab damage"
     skills: "技能"
-#    attack_1: "Deals"
-#    attack_2: "of listed"
+    attack_1: "交易"
+    attack_2: "列表"
     attack_3: "武器攻击力."
-#    health_1: "Gains"
-#    health_2: "of listed"
+    health_1: "收益"
+    health_2: "列表"
     health_3: "装备血量."
-#    speed_1: "Moves at"
+    speed_1: "移动速度"
     speed_2: "米每秒."
     available_for_purchase: "可以购买" # Shows up when you have unlocked, but not purchased, a hero in the hero store
     level_to_unlock: "未解锁关卡：" # Label for which level you have to beat to unlock a particular hero (click a locked hero in the store to see)
@@ -588,9 +588,9 @@
     josh_title: "游戏设计师"
     josh_blurb: "地面是熔岩"
     jose_title: "音乐"
-#    jose_blurb: "Taking Off"
-#    retrostyle_title: "Illustration"
-#    retrostyle_blurb: "RetroStyle Games"
+    jose_blurb: "放轻松"
+    retrostyle_title: "插画师"
+    retrostyle_blurb: "复古风格的游戏"

   teachers:
     title: "CodeCombat给教师的说明"


Update zh-HANS.coffee

Update zh-HANS.coffee

Translate some

--- app/locale/zh-HANS.coffee
+++ app/locale/zh-HANS.coffee
@@ -73,7 +73,7 @@
     creating: "账户创建中……"
     sign_up: "注册"
     log_in: "登录"
-#    social_signup: "Or, you can sign up through Facebook or G+:"
+    social_signup: "或者你可以通过Facebook或G+注册"

   home:
     slogan: "通过游戏学习 Javascript"
@@ -128,9 +128,9 @@
   wizard_settings:
     title: "设置向导"
     customize_avatar: "设置你的头像"
-#    active: "Active"
-#    color: "Color"
-#    group: "Group"
+    active: "启用"
+    color: "颜色"
+    group: "类别"
     clothes: "衣服"
     trim: "条纹"
     cloud: "云"


hackathon: fixed a few example API links

--- client/landing/site.hackathon/coffee/home/AppViewFull.coffee
+++ client/landing/site.hackathon/coffee/home/AppViewFull.coffee
@@ -561,7 +561,8 @@
         LinkedIn
         Freebase
         Wolfram Alpha
-        Import.io
+        Import.io
+        Kimono
         Imgur

         ...to name a few. And any mention of APIs would be incomplete without a hat tip


Update snippets

Update snippets

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/pyfisch/atom-language-rust.git/'


:memo: Convert Git docs

:memo: Convert Git docs

--- src/git.coffee
+++ src/git.coffee
@@ -20,16 +20,16 @@
 # For a repository with submodules this would have the following outcome:
 #
 # ```coffee
-# repo = atom.project.getRepo()
-# repo.getShortHead() # 'master'
-# repo.getShortHead('vendor/path/to/a/submodule') # 'dead1234'
+#   repo = atom.project.getRepo()
+#   repo.getShortHead() # 'master'
+#   repo.getShortHead('vendor/path/to/a/submodule') # 'dead1234'
 # ```
 #
-# ## Example
-#
-# ```coffeescript
-# git = atom.project.getRepo()
-# console.log git.getOriginUrl()
+# ## Examples
+#
+# ```coffee
+#   git = atom.project.getRepo()
+#   console.log git.getOriginUrl()
 # ```
 #
 # ## Requiring in packages
@@ -44,12 +44,12 @@

   # Public: Creates a new Git instance.
   #
-  # path - The path to the Git repository to open.
-  # options - An object with the following keys (default: {}):
-  #   :refreshOnWindowFocus - `true` to refresh the index and statuses when the
-  #                           window is focused.
-  #
-  # Returns a Git instance or null if the repository could not be opened.
+  # * `path` The {String} path to the Git repository to open.
+  # * `options` An optinal {Object} with the following keys:
+  #   * `refreshOnWindowFocus` A {Boolean}, `true` to refresh the index and
+  #                            statuses when the window is focused.
+  #
+  # Returns a {Git} instance or `null` if the repository could not be opened.
   @open: (path, options) ->
     return null unless path
     try
@@ -114,8 +114,10 @@
     else
       checkoutHead()

-  # Public: Destroy this `Git` object. This destroys any tasks and subscriptions
-  # and releases the underlying libgit2 repository handle.
+  # Public: Destroy this {Git} object.
+  #
+  # This destroys any tasks and subscriptions and releases the underlying
+  # libgit2 repository handle.
   destroy: ->
     if @statusTask?
       @statusTask.terminate()
@@ -147,7 +149,7 @@

   # Public: Get the status of a single path in the repository.
   #
-  # path - A {String} repository-relative path.
+  # `path` A {String} repository-relative path.
   #
   # Returns a {Number} representing the status. This value can be passed to
   # {::isStatusModified} or {::isStatusNew} to get more information.
@@ -196,8 +198,8 @@
   # `refs/remotes`.  It also shortens the SHA-1 of a detached `HEAD` to 7
   # characters.
   #
-  # path - An optional {String} path in the repository to get this information
-  #        for, only needed if the repository contains submodules.
+  # * `path` An optional {String} path in the repository to get this information
+  #          for, only needed if the repository contains submodules.
   #
   # Returns a {String}.
   getShortHead: (path) -> @getRepo(path).getShortHead()
@@ -207,12 +209,12 @@
   #
   # This is essentially the same as running:
   #
+  # ```sh
+  #   git reset HEAD -- <path>
+  #   git checkout HEAD -- <path>
   # ```
-  # git reset HEAD -- <path>
-  # git checkout HEAD -- <path>
-  # ```
-  #
-  # path - The {String} path to checkout.
+  #
+  # * `path` The {String} path to checkout.
   #
   # Returns a {Boolean} that's true if the method was successful.
   checkoutHead: (path) ->
@@ -223,9 +225,9 @@

   # Public: Checks out a branch in your repository.
   #
-  # reference - The String reference to checkout
-  # create -  A Boolean value which, if true creates the new reference if it
-  #           doesn't exist.
+  # * `reference` The {String} reference to checkout.
+  # * `create`    A {Boolean} value which, if true creates the new reference if
+  #               it doesn't exist.
   #
   # Returns a Boolean that's true if the method was successful.
   checkoutReference: (reference, create) ->
@@ -236,18 +238,18 @@
   # This compares the working directory contents of the path to the `HEAD`
   # version.
   #
-  # path - The {String} path to check.
+  # * `path` The {String} path to check.
   #
   # Returns an {Object} with the following keys:
-  #   :added - The {Number} of added lines.
-  #   :deleted - The {Number} of deleted lines.
+  #   * `added` The {Number} of added lines.
+  #   * `deleted` The {Number} of deleted lines.
   getDiffStats: (path) ->
     repo = @getRepo(path)
     repo.getDiffStats(repo.relativize(path))

   # Public: Is the given path a submodule in the repository?
   #
-  # path - The {String} path to check.
+  # * `path` The {String} path to check.
   #
   # Returns a {Boolean}.
   isSubmodule: (path) ->
@@ -262,7 +264,7 @@

   # Public: Get the status of a directory in the repository's working directory.
   #
-  # path - The {String} path to check.
+  # * `path` The {String} path to check.
   #
   # Returns a {Number} representing the status. This value can be passed to
   # {::isStatusModified} or {::isStatusNew} to get more information.
@@ -276,14 +278,14 @@
   # Public: Retrieves the line diffs comparing the `HEAD` version of the given
   # path and the given text.
   #
-  # path - The {String} path relative to the repository.
-  # text - The {String} to compare against the `HEAD` contents
+  # * `path` The {String} path relative to the repository.
+  # * `text` The {String} to compare against the `HEAD` contents
   #
   # Returns an {Array} of hunk {Object}s with the following keys:
-  #   :oldStart - The line {Number} of the old hunk.
-  #   :newStart - The line {Number} of the new hunk.
-  #   :oldLines - The {Number} of lines in the old hunk.
-  #   :newLines - The {Number} of lines in the new hunk
+  #   * `oldStart` The line {Number} of the old hunk.
+  #   * `newStart` The line {Number} of the new hunk.
+  #   * `oldLines` The {Number} of lines in the old hunk.
+  #   * `newLines` The {Number} of lines in the new hunk
   getLineDiffs: (path, text) ->
     # Ignore eol of line differences on windows so that files checked in as
     # LF don't report every line modified when the text contains CRLF endings.
@@ -293,68 +295,68 @@

   # Public: Returns the git configuration value specified by the key.
   #
-  # path - An optional {String} path in the repository to get this information
-  #        for, only needed if the repository has submodules.
+  # * `path` An optional {String} path in the repository to get this information
+  #          for, only needed if the repository has submodules.
   getConfigValue: (key, path) -> @getRepo(path).getConfigValue(key)

   # Public: Returns the origin url of the repository.
   #
-  # path - An optional {String} path in the repository to get this information
-  #        for, only needed if the repository has submodules.
+  # * `path` An optional {String} path in the repository to get this information
+  #          for, only needed if the repository has submodules.
   getOriginUrl: (path) -> @getConfigValue('remote.origin.url', path)

   # Public: Returns the upstream branch for the current HEAD, or null if there
   # is no upstream branch for the current HEAD.
   #
-  # path - An optional {String} path in the repo to get this information for,
-  #        only needed if the repository contains submodules.
+  # * `path` An optional {String} path in the repo to get this information for,
+  #          only needed if the repository contains submodules.
   #
   # Returns a {String} branch name such as `refs/remotes/origin/master`.
   getUpstreamBranch: (path) -> @getRepo(path).getUpstreamBranch()

-  # Public: Returns the current SHA for the given reference.
-  #
-  # reference - The {String} reference to get the target of.
-  # path - An optional {String} path in the repo to get the reference target
-  #        for. Only needed if the repository contains submodules.
+  # Public: Returns the current {String} SHA for the given reference.
+  #
+  # * `reference` The {String} reference to get the target of.
+  # * `path` An optional {String} path in the repo to get the reference target
+  #          for. Only needed if the repository contains submodules.
   getReferenceTarget: (reference, path) ->
     @getRepo(path).getReferenceTarget(reference)

   # Public: Gets all the local and remote references.
   #
-  # path - An optional {String} path in the repository to get this information
-  #        for, only needed if the repository has submodules.
+  # * `path` An optional {String} path in the repository to get this information
+  #          for, only needed if the repository has submodules.
   #
   # Returns an {Object} with the following keys:
-  #  :heads - An {Array} of head reference names.
-  #  :remotes - An {Array} of remote reference names.
-  #  :tags - An {Array} of tag reference names.
+  #  * `heads`   An {Array} of head reference names.
+  #  * `remotes` An {Array} of remote reference names.
+  #  * `tags`    An {Array} of tag reference names.
   getReferences: (path) -> @getRepo(path).getReferences()

   # Public: Returns the number of commits behind the current branch is from the
   # its upstream remote branch.
   #
-  # reference - The {String} branch reference name.
-  # path      - The {String} path in the repository to get this information for,
-  #             only needed if the repository contains submodules.
+  # * `reference` The {String} branch reference name.
+  # * `path`      The {String} path in the repository to get this information for,
+  #               only needed if the repository contains submodules.
   getAheadBehindCount: (reference, path) ->
     @getRepo(path).getAheadBehindCount(reference)

   # Public: Get the cached ahead/behind commit counts for the current branch's
   # upstream branch.
   #
-  # path - An optional {String} path in the repository to get this information
-  #        for, only needed if the repository has submodules.
+  # * `path` An optional {String} path in the repository to get this information
+  #          for, only needed if the repository has submodules.
   #
   # Returns an {Object} with the following keys:
-  #   :ahead  - The {Number} of commits ahead.
-  #   :behind - The {Number} of commits behind.
+  #   * `ahead`  The {Number} of commits ahead.
+  #   * `behind` The {Number} of commits behind.
   getCachedUpstreamAheadBehindCount: (path) ->
     @getRepo(path).upstream ? @upstream

   # Public: Get the cached status for the given path.
   #
-  # path - A {String} path in the repository, relative or absolute.
+  # * `path` A {String} path in the repository, relative or absolute.
   #
   # Returns a status {Number} or null if the path is not in the cache.
   getCachedPathStatus: (path) ->


Bug fix: jar upload was not showing without a first jar to start with

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/unicredit/spark-jobserver-frontend.git/'


Added Relation module

Added Relation module

error: pathspec 'ideas/gg/Relation.coffee' did not match any file(s) known to git

--- ideas/gg/Relation.coffee
+++ ideas/gg/Relation.coffee
@@ -0,0 +1,29 @@
+_ = require 'underscore'
+class Relation
+  constructor: (table) ->
+    names = _.first table
+    tuples = _.rest table
+
+    n = names.length
+    m = tuples.length
+
+    # TODO use metadata to determine if
+    # a column should be used as keys.
+    # For now integer keys are generated.
+    @keys = [0...m]
+
+    @attributes = for i in [0...n]
+      name = names[i]
+      map = {}
+      for key in @keys
+        tuple = tuples[key]
+        map[key] = parseFloat tuple[i]
+      new Attribute name, @keys, map
+  attribute: (name) -> _.findWhere @attributes, {name}
+
+class Attribute
+  constructor: (@name, @keys, @map) ->
+  values: -> @map[key] for key in @keys
+
+Relation.Attribute = Attribute
+module.exports = Relation