GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Adds basic social networking capabilities to your existing application, including users, blogs, photos, clippings, favorites, and more.
Homepage: http://www.communityengine.org
Clone URL: git://github.com/bborn/communityengine.git
some changes to globalite to allow gibberish-like usage
bborn (author)
Tue Jul 15 07:11:49 -0700 2008
commit  65db7973a23ae8ecc48107ccd24bc63eaa5cee00
tree    dd1663b8a12ca4ec6c05987fc93d093fdb5474e5
parent  777d9bf2339cf1be7c955dd05c9dbc12337f3337
...
2
3
4
5
6
 
 
 
 
7
8
 
 
9
10
11
12
 
 
 
 
13
14
15
 
16
...
2
3
4
 
 
5
6
7
8
9
 
10
11
12
13
 
 
14
15
16
17
18
 
19
20
21
0
@@ -2,13 +2,18 @@
0
   .yui-gc
0
     .yui-u.first
0
       .box
0
- %h2=:get_started_banner.l_with_args :site=>AppConfig.community_name
0
- %p=:get_started_text_1.l
0
+ %h2
0
+ =:get_started_banner.l_with_args :site=>AppConfig.community_name
0
+ %p
0
+ ="CommunityEngine is the best way to go from zero to hero in no time".l
0
         %h4
0
- %a{:href=>"http://www.missingmethod.com/projects/community_engine"}=:get_started_text_2.l
0
+ %a{:href=>"http://www.missingmethod.com/projects/community_engine"}
0
+ ="Download it now and get started".l
0
     .yui-u
0
       .box
0
- %h2=:see_how_it_works.l
0
- %p=:create_your_account.l
0
+ %h2
0
+ ="See how it works".l
0
+ %p
0
+ ="Create Your Account".l
0
         %h4
0
- =link_to :sign_up.l, signup_path
0
\ No newline at end of file
0
+ =link_to "Sign Up!".l, signup_path
0
\ No newline at end of file
...
4
5
6
7
 
 
8
9
10
...
13
14
15
16
17
 
 
18
19
20
 
 
 
21
22
23
24
25
 
26
27
28
 
29
30
31
32
33
 
34
35
36
...
4
5
6
 
7
8
9
10
11
...
14
15
16
 
 
17
18
19
20
 
21
22
23
24
25
26
27
 
28
29
30
 
31
32
33
34
35
 
36
37
38
39
0
@@ -4,7 +4,8 @@
0
 #yui-main
0
   .yui-b
0
     .box.hfeed
0
- %h3=:recent_posts.l
0
+ %h3
0
+ ="Recent Posts".l
0
       = render :partial => 'posts/post', :collection => @posts
0
 
0
 .yui-b
0
@@ -13,23 +14,25 @@
0
     %ul.list.checks
0
       - Category.find(:all).each do |c|
0
         %li= link_to c.name, category_path(c)
0
- %li= link_to "What's Popular", popular_url, {:class => 'popular'}
0
- %li= link_to "Find an Expert", skills_path, {:class => 'users'}
0
+ %li= link_to "What's Popular".l, popular_url, {:class => 'popular'}
0
+ %li= link_to "Find an Expert".l, skills_path, {:class => 'users'}
0
 
0
   .box.alt
0
- %h3=:what_is_hot.l
0
+ %h3
0
+ = "What's Hot".l
0
+
0
     %ul.list.page
0
       -@popular_posts.each do |post|
0
         =render :partial => 'posts/sidebar_post', :locals => {:post => post}
0
     %h6.all
0
- %a{:href=>"/popular"} SEE ALL
0
+ %a{:href=>"/popular"}= "SEE ALL".l
0
 
0
   .box.alt
0
- %h3=:featured_writers.l
0
+ %h3= "Featured Writers".l
0
     -@featured_writers.each do |user|
0
       =render :partial => "users/sidebar_user", :locals => {:user => user}
0
 
0
   .box.alt
0
- %h3=:active_users.l
0
+ %h3= "Active Users".l
0
     -@active_users.each do |user|
0
       =render :partial => "users/sidebar_user", :locals => {:user => user}
0
\ No newline at end of file
...
26
27
28
29
 
30
31
32
...
34
35
36
37
 
38
39
40
 
41
42
43
 
 
44
45
 
 
46
47
 
 
 
48
49
 
50
51
52
 
 
53
...
26
27
28
 
29
30
31
32
...
34
35
36
 
37
38
39
 
40
41
42
 
43
44
45
 
46
47
48
 
49
50
51
52
 
53
54
 
55
56
57
58
0
@@ -26,7 +26,7 @@
0
         -if show_footer_content?
0
           .yui-gc#footer_content
0
             = image_tag 'spinner.gif', :plugin => 'community_engine'
0
- =:loading_recent_content.l
0
+ ="Loading recent content...".l
0
 
0
           %script{:type=>"text/javascript"}
0
             = remote_function(:update => "footer_content", :url => { :controller => 'base', :action => 'footer_content' })
0
@@ -34,18 +34,23 @@
0
       #CommunityFooter
0
         %ul
0
           %li
0
- %a{:href=>"/", :title=>"#{AppConfig.community_name} Home"}=:home.l
0
+ %a{:href=>"/", :title=>"#{AppConfig.community_name} Home"}= "Home".l
0
           - if !logged_in?
0
             %li
0
- = link_to :log_in.l , login_path
0
+ = link_to "Log In".l , login_path
0
           - else
0
             %li
0
- %a{:href=>"/logout", :title=>"Log out of your #{AppConfig.community_name} account"}=:log_out.l
0
+ %a{:href=>"/logout", :title=>"Log out of your #{AppConfig.community_name} account"}
0
+ ="Log Out".l
0
           %li
0
- %a{:href=>"/about", :title=>"What is #{AppConfig.community_name}?"}=:about.l
0
+ %a{:href=>"/about", :title=>"What is #{AppConfig.community_name}?"}
0
+ ="About".l
0
           %li
0
- %a{:href=>"/faq", :title=>"Frequent Asked Questions"}=:faq.l
0
+ %a{:href=>"/faq", :title=>"Frequent Asked Questions"}
0
+ ="FAQ".l
0
+
0
           - if @rss_title && @rss_url
0
- %li#rss= link_to :rss.l, @rss_url, {:title => @rss_title}
0
+ %li#rss= link_to "RSS".l, @rss_url, {:title => @rss_title}
0
 
0
- %p=:community_tagline.l
0
\ No newline at end of file
0
+ %p
0
+ = :community_tagline.l
0
\ No newline at end of file
...
9
10
11
 
 
 
12
...
9
10
11
12
13
14
15
0
@@ -9,3 +9,6 @@ if AppConfig.theme
0
   theme_view_path = "#{RAILS_ROOT}/themes/#{AppConfig.theme}/views"
0
   ActionController::Base.view_paths = ActionController::Base.view_paths.dup.unshift(theme_view_path)
0
 end
0
+
0
+
0
+Globalite.show_localization_keys_for_debugging = true if RAILS_ENV.eql?('development')
0
\ No newline at end of file
...
3
4
5
 
6
7
8
...
3
4
5
6
7
8
9
0
@@ -3,6 +3,7 @@ require 'rails/core_ext'
0
 require 'globalite/l10n'
0
 require 'globalite/locale'
0
 Symbol.send :include, SymbolExtension
0
+String.send :include, StringExtension
0
 
0
 module Globalite
0
   extend L10n
...
1
2
3
 
 
4
5
6
...
1
2
3
4
5
6
7
8
0
@@ -1,6 +1,8 @@
0
 module Globalite
0
 
0
   module L10n
0
+ @@show_localization_keys_for_debugging = false
0
+ attr_accessor :show_localization_keys_for_debugging
0
     
0
     @@default_language = :en
0
     attr_reader :default_language
...
17
18
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
0
@@ -17,3 +17,22 @@ module SymbolExtension # :nodoc:
0
   alias :l_with_args :localize_with_args
0
   
0
 end
0
+
0
+module StringExtension
0
+ def localize(*args)
0
+ if args.first.is_a? Symbol
0
+ sym = args.shift
0
+ else
0
+ sym = underscore.tr(' ', '_').gsub(/[^a-z1-9_]+/i, '').to_sym
0
+ end
0
+
0
+ if Globalite.show_localization_keys_for_debugging
0
+ # wrap in a span to show the localization key
0
+ return "<span localization_key='#{sym}'>#{sym.localize(self, *args)}</span>"
0
+ else
0
+ sym.localize(self, *args)
0
+ end
0
+ end
0
+ alias :l :localize
0
+
0
+end
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
21
...
 
 
1
 
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
4
5
0
@@ -1,19 +1,3 @@
0
-about: About
0
-active_users: Active Users
0
 community_tagline: CommunityEngine Rocks!
0
-create_your_account: Create Your Account
0
 explore_site: Explore {site}
0
-faq: F.A.Q.
0
-featured_writers: Featured Writers
0
-get_started_banner: Get started with <a href="/">{site}</a> today!
0
-get_started_text_1: CommunityEngine is the best way to go from zero to hero in no time.
0
-get_started_text_2: Download it now and get started
0
-home: Home
0
-log_in: Log In
0
-log_out: Log Out
0
-loading_recent_content: Loading recent content...
0
-recent_posts: Recent Posts
0
-rss: RSS
0
-see_how_it_works: See how it works
0
-sign_up: Sign Up!
0
-what_is_hot: What's Hot?
0
\ No newline at end of file
0
+get_started_banner: Get started with <a href="/">{site}</a> today!
0
\ No newline at end of file

Comments

    No one has commented yet.