Updated some tags. Added a script to copy tags from en.coffee.

This commit is contained in:
Nick Winter 2014-01-14 10:29:23 -08:00
parent 6a40e27bdd
commit 60850d5c48
5 changed files with 61 additions and 15 deletions

View file

@ -1,6 +1,8 @@
module.exports = nativeDescription: "English", englishDescription: "English", translation: module.exports = nativeDescription: "English", englishDescription: "English", translation:
common: common:
loading: "Loading..." loading: "Loading..."
saving: "Saving..."
sending: "Sending..."
modal: modal:
close: "Close" close: "Close"
@ -33,14 +35,30 @@ module.exports = nativeDescription: "English", englishDescription: "English", tr
email: "Email" email: "Email"
message: "Message" message: "Message"
cancel: "Cancel" cancel: "Cancel"
save: "Save"
versions:
save_version_title: "Save New Version"
commit_message: "Commit Message"
new_major_version: "New Major Version"
cla_prefix: "To save changes, first you must agree to our"
cla_url: "CLA"
cla_suffix: "."
cla_agree: "I AGREE"
login: login:
login_modal_title: "Log In"
log_in: "Log In" log_in: "Log In"
sign_up: "create new account" sign_up: "create new account"
or: ", or " or: ", or "
recover: "recover account" recover: "recover account"
recover:
recover_account_title: "Recover Account"
send_password: "Send Recovery Password"
signup: signup:
create_account_title: "Create Account to Save Progress"
description: "It's free. Just need a couple things and you'll be good to go:" description: "It's free. Just need a couple things and you'll be good to go:"
email_announcements: "Receive announcements by email" email_announcements: "Receive announcements by email"
coppa: "13+ or non-USA " coppa: "13+ or non-USA "
@ -91,6 +109,10 @@ module.exports = nativeDescription: "English", englishDescription: "English", tr
learn_more: "Learn more about being a Diplomat" learn_more: "Learn more about being a Diplomat"
subscribe_as_diplomat: "Subscribe as a Diplomat" subscribe_as_diplomat: "Subscribe as a Diplomat"
wizard_settings:
title: "Wizard Settings"
customize_avatar: "Customize Your Avatar"
account_settings: account_settings:
title: "Account Settings" title: "Account Settings"
not_logged_in: "Log in or create an account to change your settings." not_logged_in: "Log in or create an account to change your settings."
@ -231,9 +253,11 @@ module.exports = nativeDescription: "English", englishDescription: "English", tr
level_components_type: "Type" level_components_type: "Type"
level_component_edit_title: "Edit Component" level_component_edit_title: "Edit Component"
level_system_edit_title: "Edit System" level_system_edit_title: "Edit System"
create_system_title: "Create New System"
create_system_field_name: "Name" create_system_field_name: "Name"
create_system_btn_cancel: "Cancel" create_system_btn_cancel: "Cancel"
create_system_btn_create: "Create" create_system_btn_create: "Create"
new_component_title: "Create New Component"
new_component_field_system: "System" new_component_field_system: "System"
new_component_field_name: "Name" new_component_field_name: "Name"
new_component_btn_cancel: "Cancel" new_component_btn_cancel: "Cancel"

View file

@ -6,13 +6,13 @@ block modal-header-content
block modal-body-content block modal-body-content
.form-inline .form-inline
.control-group .control-group
label.control-label(for="recover-email") Email label.control-label(for="recover-email", data-i18n="forms.email") Email
.controls .controls
input#recover-email.input-large(name="email", type="email") input#recover-email.input-large(name="email", type="email")
block modal-body-wait-content block modal-body-wait-content
h3 Sending h3(data-i18n="common.sending") Sending...
block modal-footer block modal-footer
.modal-footer .modal-footer
button.btn.btn-primary.btn-large#recover-button Send Recover Password button.btn.btn-primary.btn-large#recover-button(data-i18n="recover.send_password") Send Recovery Password

View file

@ -1,29 +1,30 @@
extends /templates/modal/modal_base extends /templates/modal/modal_base
block modal-header-content block modal-header-content
h3(data-i18n="save.save_version_title") Save New Version h3(data-i18n="versions.save_version_title") Save New Version
block modal-body-content block modal-body-content
form.form-horizontal form.form-horizontal
.control-group .control-group
label.control-label(for="commitMessage") Commit Message label.control-label(for="commitMessage", data-i18n="versions.commit_message") Commit Message
.controls .controls
textarea#commit-message.input-large(name="commitMessage", type="text") textarea#commit-message.input-large(name="commitMessage", type="text")
.control-group .control-group
label.control-label(for="level-version-is-major") New Major Version label.control-label(for="level-version-is-major", data-i18n="versions.new_major_version") New Major Version
.controls .controls
input#major-version.input-large(name="version-is-major", type="checkbox") input#major-version.input-large(name="version-is-major", type="checkbox")
span.help-block span.help-block
block modal-body-wait-content block modal-body-wait-content
h3 Saving... h3(data-i18n="common.saving") Saving...
block modal-footer-content block modal-footer-content
#accept-cla-wrapper.alert.alert-info #accept-cla-wrapper.alert.alert-info
| To save changes, first you must agree to span(data-i18n="versions.cla_prefix") To save changes, first you must agree to our
strong#cla-link our CLA |
| . strong#cla-link(data-i18n="versions.cla_url") CLA
button.btn#agreement-button I AGREE span(data-i18n="versions.cla_suffix") .
button.btn#agreement-button(data-i18n="versions.cla_agree") I AGREE
button.btn(data-dismiss="modal") Cancel button.btn(data-dismiss="modal", data-i18n="forms.cancel") Cancel
button.btn.btn-primary#save-version-button Save button.btn.btn-primary#save-version-button(data-i18n="forms.save") Save

View file

@ -1,10 +1,10 @@
extends /templates/modal/modal_base extends /templates/modal/modal_base
block modal-header-content block modal-header-content
h3(data-i18n="modal.wizard_settings_title") Wizard Settings h3(data-i18n="wizard_settings.title") Wizard Settings
block modal-body-content block modal-body-content
h4 Customize Your Avatar h4(data-i18n="wizard_settings.customize_avatar") Customize Your Avatar
canvas(width="120px", height="150px") canvas(width="120px", height="150px")
.settings .settings

View file

@ -0,0 +1,21 @@
fs = require 'fs'
en = require('app/locale/en').translation
dir = fs.readdirSync 'app/locale'
for file in dir when not (file in ['locale.coffee', 'en.coffee'])
contents = require('app/locale/' + file)
categories = contents.translation
lines = ["module.exports = nativeDescription: \"#{contents.nativeDescription}\", englishDescription: \"#{contents.englishDescription}\", translation:"]
first = true
for enCat, enTags of en
catMissing = not categories[enCat]
cat = (categories[enCat] ?= {})
lines.push "" unless first # blank lines between categories
lines.push "#{if catMissing then '#' else ''} #{enCat}:"
first = false
for enTag, enString of enTags
tagMissing = not cat[enTag]
tag = (cat[enTag] ?= enString)
tag = tag.replace /"/g, '\\"'
lines.push "#{if tagMissing then '#' else ''} #{enTag}: \"#{tag}\""
newContents = lines.join('\n') + '\n'
fs.writeFileSync 'app/locale/' + file, newContents