Permalink
Browse files

Implement TISTUD-1052 Externalize UI strings in Titanium Mobile ruble

  • Loading branch information...
1 parent 7025282 commit d9a8c973e662616ec009ec5b8d287fb629ec914f @sgtcoolguy sgtcoolguy committed Jan 23, 2012
Showing with 34 additions and 19 deletions.
  1. +6 −8 bundle.rb
  2. +1 −1 commands/appcelerator_titanium_mobile_developer_center.rb
  3. +17 −0 config/locales/en.yml
  4. +10 −10 samples/project_samples.rb
View
@@ -1,16 +1,14 @@
require 'ruble'
-require 'ruble/platform'
bundle 'Appcelerator Titanium Mobile' do |bundle|
bundle.author = 'Thomas Aylott/Appcelerator'
bundle.copyright = "Copyright 2011 Thomas Aylott/Appcelerator. Distributed under the MIT license."
- bundle.contact_email_rot_13 = 'null'
bundle.description = 'Support for Appcelerator Titanium Mobile'
- bundle.display_name = 'Titanium Mobile'
+ bundle.display_name = t(:bundle_name)
bundle.repository = "git@github.com:appcelerator/titanium_mobile.ruble.git"
- bundle.menu 'Titanium Mobile' do |main_menu|
- main_menu.command 'Titanium Mobile Developer Center'
+ bundle.menu t(:bundle_name) do |main_menu|
+ main_menu.command t(:developer_center)
main_menu.command 'Ti.API.debug'
main_menu.command 'Ti.API.info'
main_menu.command 'Ti.API.log'
@@ -46,23 +44,23 @@
main_menu.command 'vibrate'
end
- project_template "Single Window Application" do |t|
+ project_template t(:single_window_application) do |t|
t.type = :titanium_mobile
t.location = "staging/SingleWindow.zip"
t.description = "A single window application with a single view - a mostly blank canvas. Requires Titanium Mobile SDK 1.7.5+ or 1.8.0+"
t.icon = "http://preview.appcelerator.com/dashboard/img/icons/icon_single_window.png"
puts t
end
- project_template "Master/Detail Application" do |t|
+ project_template t(:master_detail_application) do |t|
t.type = :titanium_mobile
t.location = "staging/MasterDetail.zip"
t.description = "A master detail view, utilizing a native table view component and platform-specific UI and navigation. A starting point for a navigation-based application with hierarchical data, or a stack of windows. Requires Titanium Mobile SDK 1.7.5+ or 1.8.0+."
t.icon = "http://preview.appcelerator.com/dashboard/img/icons/icon_detail.png"
puts t
end
- project_template "Tabbed Application" do |t|
+ project_template t(:tabbed_application) do |t|
t.type = :titanium_mobile
t.location = "staging/Tabbed.zip"
t.description = "A tabbed application, consisting of multiple stacks of windows associated with tabs in a tab group. A starting point for tab-based application with multiple top-level windows. Requires Titanium Mobile SDK 1.7.5+ or 1.8.0+."
@@ -1,6 +1,6 @@
require 'ruble'
-command 'Titanium Mobile Developer Center' do |cmd|
+command t(:developer_center) do |cmd|
#cmd.key_binding = 'M4+H'
cmd.output = :show_as_html
cmd.input = :selection, :word
View
@@ -0,0 +1,17 @@
+en:
+ bundle_name: 'Titanium Mobile'
+ developer_center: 'Titanium Mobile Developer Center'
+ single_window_application: "Single Window Application"
+ master_detail_application: "Master/Detail Application"
+ tabbed_application: "Tabbed Application"
+ geocoder: "Geocoder"
+ geocoder_description: "A sample Master/Detail app that uses native maps to plot locations. With it you can forward geocode addresses and add them as annotations to the map."
+ rss_reader: "RSS Reader"
+ rss_reader_description: "A sample Master/Detail app that creates a RSS reader. With it you can pull live RSS feeds from the internet, list them along with thumbnails, then drill down to the article itself."
+ todo_list: "Todo List"
+ todo_list_description: "A sample tabbed application that creates a basic todo list. With this app you can maintain a listing of tasks to be completed, add to that list, and mark tasks as done."
+ kitchen_sink: "Kitchen Sink"
+ kitchen_sink_description: "A sample Titanium Mobile project that demonstrates a variety of APIs available in Titanium Mobile"
+ kitchen_sink_ipad: "Kitchen Sink iPad"
+ kitchen_sink_ipad_description: "A sample Titanium Mobile project that demonstrates a variety of APIs available in Titanium Mobile (For iPad)"
+
@@ -1,46 +1,46 @@
require 'ruble'
-project_sample "Geocoder" do |s|
+project_sample t(:geocoder) do |s|
s.id = "com.appcelerator.titanium.mobile.samples.mapping"
s.category = "com.appcelerator.titanium.mobile.samples.category"
s.location = "git://github.com/appcelerator-developer-relations/Sample.Mapping.git"
- s.description = "A sample Master/Detail app that uses native maps to plot locations. With it you can forward geocode addresses and add them as annotations to the map."
+ s.description = t(:geocoder_description)
s.natures = ["com.appcelerator.titanium.mobile.nature", "com.aptana.projects.webnature"]
s.icon = "http://preview.appcelerator.com/dashboard/img/icons/icon_geo.png"
end
-project_sample "RSS Reader" do |s|
+project_sample t(:rss_reader) do |s|
s.id = "com.appcelerator.titanium.mobile.samples.rss"
s.category = "com.appcelerator.titanium.mobile.samples.category"
s.location = "git://github.com/appcelerator-developer-relations/Sample.RSS.git"
- s.description = "A sample Master/Detail app that creates a RSS reader. With it you can pull live RSS feeds from the internet, list them along with thumbnails, then drill down to the article itself."
+ s.description = t(:rss_reader_description)
s.natures = ["com.appcelerator.titanium.mobile.nature", "com.aptana.projects.webnature"]
s.icon = "http://preview.appcelerator.com/dashboard/img/icons/icon_rss.png"
end
-project_sample "Todo List" do |s|
+project_sample t(:todo_list) do |s|
s.id = "com.appcelerator.titanium.mobile.samples.todo"
s.category = "com.appcelerator.titanium.mobile.samples.category"
s.location = "git://github.com/appcelerator-developer-relations/Sample.Todo.git"
- s.description = "A sample tabbed application that creates a basic todo list. With this app you can maintain a listing of tasks to be completed, add to that list, and mark tasks as done."
+ s.description = t(:todo_list_description)
s.natures = ["com.appcelerator.titanium.mobile.nature", "com.aptana.projects.webnature"]
s.icon = "http://preview.appcelerator.com/dashboard/img/icons/icon_to_do_list.png"
end
-project_sample "Kitchen Sink" do |s|
+project_sample t(:kitchen_sink) do |s|
s.id = "com.appcelerator.titanium.mobile.samples.kitchensink"
s.category = "com.appcelerator.titanium.mobile.samples.category"
s.location = "git://github.com/appcelerator/KitchenSink.git"
- s.description = "A sample Titanium Mobile project that demonstrates a variety of APIs available in Titanium Mobile"
+ s.description = t(:kitchen_sink_description)
s.natures = ["com.appcelerator.titanium.mobile.nature", "com.aptana.projects.webnature"]
s.icon = "http://preview.appcelerator.com/dashboard/img/icons/icon_kitchen_sink.png"
end
-project_sample "Kitchen Sink iPad" do |s|
+project_sample t(:kitchen_sink_ipad) do |s|
s.id = "com.appcelerator.titanium.mobile.samples.kitchensink.ipad"
s.category = "com.appcelerator.titanium.mobile.samples.category"
s.location = "git://github.com/appcelerator/KitchenSinkiPad.git"
- s.description = "A sample Titanium Mobile project that demonstrates a variety of APIs available in Titanium Mobile (For iPad)"
+ s.description = t(:kitchen_sink_ipad_description)
s.natures = ["com.appcelerator.titanium.mobile.nature", "com.aptana.projects.webnature"]
s.icon = "http://preview.appcelerator.com/dashboard/img/icons/icon_kitchen_sink.png"
end

0 comments on commit d9a8c97

Please sign in to comment.