Skip to content
Browse files

Updated i18n code a tiny bit and cleaned up readme.

  • Loading branch information...
1 parent 25ef18f commit 5786aa6466bb2a089fe27919ca8f37d30cd4cf0f @commondream commondream committed Mar 13, 2011
Showing with 45 additions and 20 deletions.
  1. +23 −20 README.md
  2. +1 −0 lib/payday.rb
  3. +2 −0 lib/payday/i18n.rb
  4. +19 −0 lib/payday/locale/en.yml
View
43 README.md
@@ -107,27 +107,30 @@ Be sure to restart your server after you edit the mime_types initializer. The up
I18n
===
-Payday uses the i18n gem to provide support for custom labels and internationalized applications. You can change the default labels by
-adding a YAML file in the `config/locales` directory of your Rails app. Here are the default labels you can customize :
+Payday uses the i18n gem to provide support for custom labels and internationalized applications. You can change the default labels by adding a YAML file in the `config/locales` directory of your Rails app. Here are the default labels you can customize:
- payday:
- status:
- paid: PAID
- overdue: OVERDUE
- invoice:
- bill_to: Bill To
- ship_to: Ship To
- invoice_no: "Invoice #:"
- due_date: "Due Date:"
- paid_date: "Paid Date:"
- subtotal: "Subtotal:"
- tax: "Tax:"
- total: "Total:"
- line_item:
- description: Description
- unit_price: Unit Price
- quantity: Quantity
- amount: Amount
+ en:
+ payday:
+ status:
+ paid: PAID
+ overdue: OVERDUE
+ invoice:
+ bill_to: Bill To
+ ship_to: Ship To
+ invoice_no: "Invoice #:"
+ due_date: "Due Date:"
+ paid_date: "Paid Date:"
+ subtotal: "Subtotal:"
+ tax: "Tax:"
+ total: "Total:"
+ line_item:
+ description: Description
+ unit_price: Unit Price
+ quantity: Quantity
+ amount: Amount
+
+If you translate the invoice to your own language, please send me a copy of your locale.yml file so that we can include it with
+the main Payday distribution and other Payday users can enjoy the fruits of your labor.
Examples
===
View
1 lib/payday.rb
@@ -7,6 +7,7 @@
require 'payday/version'
require 'payday/config'
+require 'payday/i18n'
require 'payday/line_itemable'
require 'payday/line_item'
require 'payday/pdf_renderer'
View
2 lib/payday/i18n.rb
@@ -0,0 +1,2 @@
+# Load everything in the local folder
+I18n.load_path << Dir[File.join(File.dirname(__FILE__), "payday", "locale", "*.yml")]
View
19 lib/payday/locale/en.yml
@@ -0,0 +1,19 @@
+en:
+ payday:
+ status:
+ paid: PAID
+ overdue: OVERDUE
+ invoice:
+ bill_to: Bill To
+ ship_to: Ship To
+ invoice_no: "Invoice #:"
+ due_date: "Due Date:"
+ paid_date: "Paid Date:"
+ subtotal: "Subtotal:"
+ tax: "Tax:"
+ total: "Total:"
+ line_item:
+ description: Description
+ unit_price: Unit Price
+ quantity: Quantity
+ amount: Amount

0 comments on commit 5786aa6

Please sign in to comment.
Something went wrong with that request. Please try again.