amatsuda-i18n_generators 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/README.rdoc +70 -0
  2. metadata +3 -3
  3. data/README +0 -56
data/README.rdoc ADDED
@@ -0,0 +1,70 @@
1
+ = I18n generators
2
+
3
+ This gem plugin generates a set of locale files for Rails 2.2 i18n feature.
4
+
5
+ * http://github.com/amatsuda/i18n_generators/tree/master
6
+
7
+
8
+ == FEATURES
9
+
10
+ This gem/plugin provides following three script/generate commands.
11
+
12
+ === 1. Generate Locale Files for ActiveRecord/ActiveSupport/ActionPack
13
+
14
+ % ./script/generate i18n_locales ja-JP (de-AT, pt-BR, etc.)
15
+
16
+ This will generate following locale files.
17
+
18
+ config/initializers/i18n_config.rb
19
+ lib/locale/action_view_ja-JP.yml
20
+ lib/locale/active_record_ja-JP.yml
21
+ lib/locale/active_support_ja-JP.yml
22
+
23
+ Basically, all the generated .yml files in lib/locale directory are copied from en-US.yml files bundled inside Rails framework, and each attribute value is one-to-one localized/translated into the specified locale/language.
24
+ Also, the generated config file adds the generated .yml files to the I18n load_path, and sets the application default locale to the specified locale.
25
+
26
+ === 2. Generate Models/Attributes Translation Yaml File For All Models
27
+
28
+ % ./script/generate i18n_models ja-JP (de-AT, pt-BR, etc.)
29
+
30
+ This will generate following YAML file.
31
+
32
+ lib/locale/models_ja-JP.yml
33
+
34
+ This file contains definitions of all the AR model names and attributes in your app/models directory, so that you don't have to write the YAML skeleton manually or by copy/paste.
35
+ In addition, the generator tries to translate each of them into the specified language.
36
+ The generator doesn't overwrite the existing value so that you can rerun the generator again and again just like Annotate Model plugin.
37
+
38
+ === 3. Generate All
39
+
40
+ % ./script/generate i18n ja-JP (de-AT, pt-BR, etc.)
41
+
42
+ Generates all the i18n_locales and i18N_models files at once.
43
+
44
+ == REQUIREMENTS:
45
+
46
+ * Ruby on Rails (>= 2.2)
47
+ * Ruby-GetText-Package ( http://rubyforge.org/projects/gettext/ )
48
+ * high speed Internet connection
49
+
50
+
51
+ == INSTALL:
52
+
53
+ * As a gem
54
+
55
+ % sudo gem install amatsuda-i18n_generators -s http://gems.github.com
56
+
57
+ * As a Rails plugin
58
+
59
+ % ./script/plugin install git://github.com/amatsuda/i18n_generators.git
60
+
61
+
62
+ == CAUTION
63
+
64
+ Current version of this plugin is very very very very roughly implemented just for experiment.
65
+ Every time you execute the generate command, the plugin connects to the Unicode CLDR website and scrapes the huge amount of its contents.
66
+ Please be careful not to harm your network environment and CLDR website by running this plugin too many times.
67
+
68
+
69
+ Copyright (c) 2008 Akira Matsuda, released under the MIT license
70
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amatsuda-i18n_generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Matsuda
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-11-16 00:00:00 -08:00
12
+ date: 2008-11-17 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -31,7 +31,7 @@ extra_rdoc_files: []
31
31
 
32
32
  files:
33
33
  - MIT-LICENSE
34
- - README
34
+ - README.rdoc
35
35
  - Rakefile
36
36
  - generators/i18n/USAGE
37
37
  - generators/i18n/i18n_generator.rb
data/README DELETED
@@ -1,56 +0,0 @@
1
- I18n generator
2
- ======
3
-
4
- This plugin generates a config file and locale files for Rails 2.2 i18n feature.
5
-
6
-
7
- Installation
8
- =======
9
-
10
- As a gem
11
-
12
- % sudo gem install amatsuda-i18n_generators -s http://gems.github.com
13
-
14
- As a Rails plugin
15
-
16
- % ./script/plugin install git://github.com/amatsuda/i18n_generators.git
17
-
18
-
19
- Example
20
- =======
21
-
22
- % ./script/generate i18n ja-JP (de-AT, pt-BR, etc.)
23
-
24
- This will generate following files.
25
-
26
- config/initializers/i18n_config.rb
27
- lib/locale/action_view_ja-JP.yml
28
- lib/locale/active_record_ja-JP.yml
29
- lib/locale/active_support_ja-JP.yml
30
-
31
-
32
- Requirement
33
- =======
34
-
35
- This plugin requires gettext gem ( http://rubyforge.org/projects/gettext/ )
36
- and sufficient speed of the Internet connection.
37
-
38
-
39
- Caution
40
- =======
41
-
42
- Current version of this plugin is very very very very roughly implemented just for experiment.
43
- Every time you execute the generate command, the plugin connects to the Unicode CLDR website and scrapes the huge amount of its contents.
44
- Please be careful not to harm your network environment and CLDR website by running this plugin too many times.
45
-
46
-
47
- Todo
48
- =======
49
-
50
- * More accurate format tranlation.
51
- * Download the XML data file via CLDR website and store in tmp directory.
52
- * Merging with the existing locale file.
53
- * Currency sign
54
-
55
-
56
- Copyright (c) 2008 Akira Matsuda, released under the MIT license