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
Pulled all of the globalite extension code into a new extension file
Bryan Kearney (author)
Tue Jul 15 09:55:11 -0700 2008
commit  b724ef99625a94e65d46be306c319409a964bc69
tree    e1b6abcf00353de315ac9eea31a204fdb8d76b48
parent  65db7973a23ae8ecc48107ccd24bc63eaa5cee00
...
1
 
2
3
4
5
...
1
2
3
4
5
6
0
@@ -1,4 +1,5 @@
0
 require 'globalite'
0
+require 'globalite_extensions'
0
 # Load the base translations, and the app overrides
0
 Globalite.add_localization_source(File.join(RAILS_ROOT, "vendor", "plugins", "community_engine", "lang", "ui"))
0
 Globalite.add_localization_source(File.join(RAILS_ROOT, "lang", "ui"))
0
\ No newline at end of file
...
3
4
5
6
7
8
9
...
3
4
5
 
6
7
8
0
@@ -3,7 +3,6 @@ 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
 
7
8
9
...
1
2
 
 
 
 
3
4
5
6
0
@@ -1,9 +1,6 @@
0
 module Globalite
0
 
0
- module L10n
0
- @@show_localization_keys_for_debugging = false
0
- attr_accessor :show_localization_keys_for_debugging
0
-
0
+ module L10n
0
     @@default_language = :en
0
     attr_reader :default_language
0
 
...
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 
39
...
16
17
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
20
0
@@ -16,23 +16,4 @@ module SymbolExtension # :nodoc:
0
   end
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
0
+end
0
\ No newline at end of file

Comments

    No one has commented yet.