Skip to content

Commit 966cbd4

Browse files
Di PengIgorMinar
authored andcommitted
feat(i18n): collect and convert locale info from closure
- add i18n/closure directory with closure i18n files and update-closure.sh script to update them - generate.sh script runs node.js scripts that extract localization rules from the closure library, transform them to a more suitable format and dumps them into i18n/locale directory as angular's $locale services - update Rakefile to copy i18n files to build/ and pkg/ dirs - copy i18n stuff during rake build - e2e tests for several locales
1 parent 8534b7c commit 966cbd4

22 files changed

Lines changed: 7384 additions & 0 deletions

Rakefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ task :compile => [:init, :compile_scenario, :compile_jstd_scenario_adapter, :gen
217217
--language_in ECMASCRIPT5_STRICT \
218218
--js #{path_to('angular.js')} \
219219
--js_output_file #{path_to('angular.min.js')})
220+
221+
FileUtils.cp_r 'i18n/locale', path_to('i18n')
220222
end
221223

222224

@@ -252,6 +254,7 @@ task :package => [:clean, :compile, :docs] do
252254
FileUtils.cp(src, pkg_dir + '/' + dest)
253255
end
254256

257+
FileUtils.cp_r path_to('i18n'), "#{pkg_dir}/i18n-#{NG_VERSION.full}"
255258
FileUtils.cp_r path_to('docs'), "#{pkg_dir}/docs-#{NG_VERSION.full}"
256259

257260
File.open("#{pkg_dir}/docs-#{NG_VERSION.full}/index.html", File::RDWR) do |f|

i18n/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# i18n directory overview:
2+
3+
- closure/ - closure files we use for ruleset generation
4+
- locale/ - angular's locale ruleset files
5+
- src/ - source files
6+
- spec/ - spec files for stuff in src directory
7+
- generate.sh - runs src scripts on closure dir and stores output in locale dir
8+
- update-closure.sh - downloads the latest version of closure files from public svn repo
9+
10+
The closure files (maintained by Shanjian Li (shanjian)) change very rarely, so we don't need to
11+
regenerate locale files very often.
12+

0 commit comments

Comments
 (0)