diff options
author | elijah <elijah@riseup.net> | 2015-04-30 00:32:33 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2015-04-30 00:32:33 -0700 |
commit | 63871baf6061668b162972193c55b5a8f7490797 (patch) | |
tree | ca8cd5fbab18cbe59b728a123f450140ed98f519 /lib | |
parent | c3b133cb6f02003ab934e5008e108f489ace4158 (diff) |
added support for email notifications of ticket changes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/en_US.yml | 106 | ||||
-rw-r--r-- | lib/tasks/i18n.rake | 44 |
2 files changed, 130 insertions, 20 deletions
diff --git a/lib/en_US.yml b/lib/en_US.yml index b00f29e..5c4190f 100644 --- a/lib/en_US.yml +++ b/lib/en_US.yml @@ -1,6 +1,6 @@ en_US: -### Do NOT edit this file directly, as all changes will be overwritten by `rake i18:bundle` +### Do NOT edit this file directly, as all changes will be overwritten by `rake i18n:bundle` ### Instead, make changes in the appropriate file in config/locales. ### Source strings in transifex are automatically updated from this file (via github url) @@ -157,6 +157,12 @@ en_US: for payment are available at INSERT_URL bye: Goodbye! bye_message: So long and thanks for all the fish. + contact_email: Contact Email + contact_email_info: ! 'You may specify an email address where we can contact you if + there is a problem with your account. For privacy reasons, you might prefer to leave + this empty. + + ' users: overview: welcome: Welcome %{username}. @@ -183,3 +189,101 @@ en_US: placeholders: user: email_forward: my_other_email@domain.net + + +######################################## +### billing/config/locales/en.yml + create_new_customer: Create a new Braintree Customer + must_create_customer: You must store a customer in braintree before subscribing to + a plan + subscribe: Subscribe + save_customer_info: Save Customer Information + donation_not_payment: ! 'Note: This is a donation, and will not be applied towards + your account.' + no_relevant_subscription: No subscription which is Active, Pending, or Past Due + plan: Plan + description: Description + cost: Cost + free: Free + + +######################################## +### support/config/locales/en.yml + support_tickets: Support + email_notice_text: A new comment has been added to this help ticket. + email_no_reply_text: Do not reply to this email. + layouts: + tickets: Tickets + title: + tickets: Tickets + header: + tickets: Tickets + navigation: + tickets: Support Tickets + tickets: + all: All Tickets + open: Open Tickets + closed: Closed Tickets + new: New Ticket + created: Created at + updated: Updated at + subject: couchrest.models.tickets.attributes.subject + status: + open: Open + closed: Closed + action: + open: Open + close: Close + confirm: + destroy: + are_you_sure: Are you sure you want to destroy this ticket? + tabs: + all: All Tickets + open: Open Tickets + closed: Closed Tickets + index: + none: No tickets have been found. + voices: Voices + destroy: Destroy + post_reply: Post Reply + reply_and_close: Reply and Close + access_ticket_text: ! 'You can later access this ticket at the URL %{full_url}. + You might want to bookmark this page to find it again. Anybody with this URL will + be able to access this ticket, so if you are on a shared computer you might want + to remove it from the browser history. + + ' + helpers: + submit: + ticket: + create: Submit Ticket + update: Update Ticket + couchrest: + models: + ticket: Ticket + ticket_comment: Comment + attributes: + ticket: + subject: Subject + email: Email + regarding_user: Regarding User + regarding_account: Regarding Account + is_open: Status + ticket_comment: + body: Description + private: private + simple_form: + labels: + ticket: + regarding_: + email: Email + comments: + body: Description + options: + ticket: + is_open: + 'true': Open + 'false': Closed + hints: + ticket: + email: Provide an email address in order to notified when this ticket is updated. diff --git a/lib/tasks/i18n.rake b/lib/tasks/i18n.rake index daa1834..5ccc65e 100644 --- a/lib/tasks/i18n.rake +++ b/lib/tasks/i18n.rake @@ -1,6 +1,19 @@ require 'yaml' require 'fileutils' +def process_locale_file(output, file) + ## print separator to see where another file begins + output.write("\n\n" + '#' * 40 + "\n" + '### ' + file + "\n") + output.write( + # remove the toplevel "en" key + YAML.dump(YAML.load_file(file)['en']).lines.map { + |line| " #{line}" # << prefix all lines with two spaces (we're nested below "en:") + }[ + 1..-1 # << skip the first line (it's "---" and freaks out the parser if it sees it multiple times in a file) + ].join + ) +end + namespace :i18n do # # for coding, it helps to have the english strings in separate files. @@ -14,27 +27,20 @@ namespace :i18n do desc "combine config/locales/*.en.yml to lib/en_US.yml" task :bundle do en_yml = File.join(Rails.root, 'lib', 'en_US.yml') - Dir.chdir('config/locales/') do - if File.exists?(en_yml) - File.unlink en_yml - end - File.open(en_yml, 'w') do |output| - output.write("en_US:\n\n"+ - "### Do NOT edit this file directly, as all changes will be overwritten by `rake i18:bundle`\n"+ - "### Instead, make changes in the appropriate file in config/locales.\n"+ - "### Source strings in transifex are automatically updated from this file (via github url)") + File.open(en_yml, 'w') do |output| + output.write("en_US:\n\n"+ + "### Do NOT edit this file directly, as all changes will be overwritten by `rake i18n:bundle`\n"+ + "### Instead, make changes in the appropriate file in config/locales.\n"+ + "### Source strings in transifex are automatically updated from this file (via github url)") + Dir.chdir('config/locales/') do Dir.glob('*.en.yml').sort.each do |file| - ## print separator to see where another file begins - output.write("\n\n" + '#' * 40 + "\n" + '### ' + file + "\n") - output.write( - # remove the toplevel "en" key - YAML.load_file(file)['en']. - to_yaml. - # prefix all lines with two spaces (we're nested below "en:") - lines.map {|line| " #{line}"}[ - 1..-1 # << skip the first line (it's "---" and freaks out the parser if it sees it multiple times in a file) - ].join) + process_locale_file(output, file) + end + end + Dir.chdir('engines/') do + Dir.glob('*/config/locales/en.yml').sort.each do |file| + process_locale_file(output, file) end end puts "You can now find the bundled locale yml in: #{en_yml}" |