tr8n 3.2.2 → 3.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/Gemfile.lock +1 -1
  2. data/lib/tr8n/version.rb +1 -1
  3. data/tr8n.gemspec +2 -2
  4. metadata +41 -117
  5. data/app/javascript/compile.rb +0 -37
  6. data/app/javascript/compile.sh +0 -1
  7. data/app/javascript/compressors/google/COPYING +0 -202
  8. data/app/javascript/compressors/google/README +0 -292
  9. data/app/javascript/compressors/google/compiler.jar +0 -0
  10. data/app/javascript/config.yml +0 -66
  11. data/app/javascript/src/base.js +0 -35
  12. data/app/javascript/src/effects.js +0 -67
  13. data/app/javascript/src/ext/inflector.js +0 -309
  14. data/app/javascript/src/ext/jsDraw2D.js +0 -24
  15. data/app/javascript/src/ext/keyboard_1_36.js +0 -1214
  16. data/app/javascript/src/ext/keyboard_1_44.js +0 -1735
  17. data/app/javascript/src/ext/keyboard_1_49.js +0 -1796
  18. data/app/javascript/src/ext/md5.js +0 -209
  19. data/app/javascript/src/ext/shortcut.js +0 -223
  20. data/app/javascript/src/init.js +0 -47
  21. data/app/javascript/src/language.js +0 -38
  22. data/app/javascript/src/logger.js +0 -203
  23. data/app/javascript/src/prototype/effects.js +0 -65
  24. data/app/javascript/src/proxy.js +0 -254
  25. data/app/javascript/src/rules/date_rule.js +0 -37
  26. data/app/javascript/src/rules/gender_list_rule.js +0 -37
  27. data/app/javascript/src/rules/gender_rule.js +0 -87
  28. data/app/javascript/src/rules/language_rule.js +0 -55
  29. data/app/javascript/src/rules/list_rule.js +0 -37
  30. data/app/javascript/src/rules/numeric_rule.js +0 -95
  31. data/app/javascript/src/tml/label.js +0 -60
  32. data/app/javascript/src/tml/token.js +0 -107
  33. data/app/javascript/src/tokens/data_token.js +0 -45
  34. data/app/javascript/src/tokens/decoration_token.js +0 -82
  35. data/app/javascript/src/tokens/token.js +0 -121
  36. data/app/javascript/src/tokens/transform_token.js +0 -106
  37. data/app/javascript/src/translation_key.js +0 -183
  38. data/app/javascript/src/ui/language_case_manager.js +0 -155
  39. data/app/javascript/src/ui/language_selector.js +0 -126
  40. data/app/javascript/src/ui/lightbox.js +0 -72
  41. data/app/javascript/src/ui/translator.js +0 -257
  42. data/app/javascript/src/utils.js +0 -286
@@ -1,292 +0,0 @@
1
- /*
2
- * Copyright 2009 The Closure Compiler Authors.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- //
18
- // Contents
19
- //
20
-
21
- The Closure Compiler performs checking, instrumentation, and
22
- optimizations on JavaScript code. The purpose of this README is to
23
- explain how to build and run the Closure Compiler.
24
-
25
- The Closure Compiler requires Java 6 or higher.
26
- http://www.java.com/
27
-
28
-
29
- //
30
- // Building The Closure Compiler
31
- //
32
-
33
- There are three ways to get a Closure Compiler executable.
34
-
35
- 1) Use one we built for you.
36
-
37
- Pre-built Closure binaries can be found at
38
- http://code.google.com/p/closure-compiler/downloads/list
39
-
40
-
41
- 2) Check out the source and build it with Apache Ant.
42
-
43
- First, check out the full source tree of the Closure Compiler. There
44
- are instructions on how to do this at the project site.
45
- http://code.google.com/p/closure-compiler/source/checkout
46
-
47
- Apache Ant is a cross-platform build tool.
48
- http://ant.apache.org/
49
-
50
- At the root of the source tree, there is an Ant file named
51
- build.xml. To use it, navigate to the same directory and type the
52
- command
53
-
54
- ant jar
55
-
56
- This will produce a jar file called "build/compiler.jar".
57
-
58
-
59
- 3) Check out the source and build it with Eclipse.
60
-
61
- Eclipse is a cross-platform IDE.
62
- http://www.eclipse.org/
63
-
64
- Under Eclipse's File menu, click "New > Project ..." and create a
65
- "Java Project." You will see an options screen. Give the project a
66
- name, select "Create project from existing source," and choose the
67
- root of the checked-out source tree as the existing directory. Verify
68
- that you are using JRE version 6 or higher.
69
-
70
- Eclipse can use the build.xml file to discover rules. When you
71
- navigate to the build.xml file, you will see all the build rules in
72
- the "Outline" pane. Run the "jar" rule to build the compiler in
73
- build/compiler.jar.
74
-
75
-
76
- //
77
- // Running The Closure Compiler
78
- //
79
-
80
- Once you have the jar binary, running the Closure Compiler is straightforward.
81
-
82
- On the command line, type
83
-
84
- java -jar compiler.jar
85
-
86
- This starts the compiler in interactive mode. Type
87
-
88
- var x = 17 + 25;
89
-
90
- then hit "Enter", then hit "Ctrl-Z" (on Windows) or "Ctrl-D" (on Mac or Linux)
91
- and "Enter" again. The Compiler will respond:
92
-
93
- var x=42;
94
-
95
- The Closure Compiler has many options for reading input from a file,
96
- writing output to a file, checking your code, and running
97
- optimizations. To learn more, type
98
-
99
- java -jar compiler.jar --help
100
-
101
- You can read more detailed documentation about the many flags at
102
- http://code.google.com/closure/compiler/docs/gettingstarted_app.html
103
-
104
-
105
- //
106
- // Compiling Multiple Scripts
107
- //
108
-
109
- If you have multiple scripts, you should compile them all together with
110
- one compile command.
111
-
112
- java -jar compiler.jar --js=in1.js --js=in2.js ... --js_output_file=out.js
113
-
114
- The Closure Compiler will concatenate the files in the order they're
115
- passed at the command line.
116
-
117
- If you need to compile many, many scripts together, you may start to
118
- run into problems with managing dependencies between scripts. You
119
- should check out the Closure Library. It contains functions for
120
- enforcing dependencies between scripts, and a tool called calcdeps.py
121
- that knows how to give scripts to the Closure Compiler in the right
122
- order.
123
-
124
- http://code.google.com/p/closure-library/
125
-
126
- //
127
- // Licensing
128
- //
129
-
130
- Unless otherwise stated, all source files are licensed under
131
- the Apache License, Version 2.0.
132
-
133
-
134
- -----
135
- Code under:
136
- src/com/google/javascript/rhino
137
- test/com/google/javascript/rhino
138
-
139
- URL: http://www.mozilla.org/rhino
140
- Version: 1.5R3, with heavy modifications
141
- License: Netscape Public License and MPL / GPL dual license
142
-
143
- Description: A partial copy of Mozilla Rhino. Mozilla Rhino is an
144
- implementation of JavaScript for the JVM. The JavaScript parser and
145
- the parse tree data structures were extracted and modified
146
- significantly for use by Google's JavaScript compiler.
147
-
148
- Local Modifications: The packages have been renamespaced. All code not
149
- relavant to parsing has been removed. A JSDoc parser and static typing
150
- system have been added.
151
-
152
-
153
- -----
154
- Code in:
155
- lib/rhino
156
-
157
- Rhino
158
- URL: http://www.mozilla.org/rhino
159
- Version: Trunk
160
- License: Netscape Public License and MPL / GPL dual license
161
-
162
- Description: Mozilla Rhino is an implementation of JavaScript for the JVM.
163
-
164
- Local Modifications: Minor changes to parsing JSDoc that usually get pushed
165
- up-stream to Rhino trunk.
166
-
167
-
168
- -----
169
- Code in:
170
- lib/args4j.jar
171
-
172
- Args4j
173
- URL: https://args4j.dev.java.net/
174
- Version: 2.0.12
175
- License: MIT
176
-
177
- Description:
178
- args4j is a small Java class library that makes it easy to parse command line
179
- options/arguments in your CUI application.
180
-
181
- Local Modifications: None.
182
-
183
-
184
- -----
185
- Code in:
186
- lib/guava.jar
187
-
188
- Guava Libraries
189
- URL: http://code.google.com/p/guava-libraries/
190
- Version: r08
191
- License: Apache License 2.0
192
-
193
- Description: Google's core Java libraries.
194
-
195
- Local Modifications: None.
196
-
197
-
198
- -----
199
- Code in:
200
- lib/jsr305.jar
201
-
202
- Annotations for software defect detection
203
- URL: http://code.google.com/p/jsr-305/
204
- Version: svn revision 47
205
- License: BSD License
206
-
207
- Description: Annotations for software defect detection.
208
-
209
- Local Modifications: None.
210
-
211
-
212
- -----
213
- Code in:
214
- lib/jarjar.jar
215
-
216
- Jar Jar Links
217
- URL: http://jarjar.googlecode.com/
218
- Version: 1.1
219
- License: Apache License 2.0
220
-
221
- Description:
222
- A utility for repackaging Java libraries.
223
-
224
- Local Modifications: None.
225
-
226
-
227
- ----
228
- Code in:
229
- lib/junit.jar
230
-
231
- JUnit
232
- URL: http://sourceforge.net/projects/junit/
233
- Version: 4.8.2
234
- License: Common Public License 1.0
235
-
236
- Description: A framework for writing and running automated tests in Java.
237
-
238
- Local Modifications: None.
239
-
240
-
241
- ---
242
- Code in:
243
- lib/protobuf-java.jar
244
-
245
- Protocol Buffers
246
- URL: http://code.google.com/p/protobuf/
247
- Version: 2.3.0
248
- License: New BSD License
249
-
250
- Description: Supporting libraries for protocol buffers,
251
- an encoding of structured data.
252
-
253
- Local Modifications: None
254
-
255
-
256
- ---
257
- Code in:
258
- lib/ant.jar
259
- lib/ant-launcher.jar
260
-
261
- URL: http://ant.apache.org/bindownload.cgi
262
- Version: 1.8.1
263
- License: Apache License 2.0
264
- Description:
265
- Ant is a Java based build tool. In theory it is kind of like "make"
266
- without make's wrinkles and with the full portability of pure java code.
267
-
268
- Local Modifications: None
269
-
270
-
271
- ---
272
- Code in:
273
- lib/json.jar
274
- URL: http://json.org/java/index.html
275
- Version: JSON version 20090211
276
- License: MIT license
277
- Description:
278
- JSON is a set of java files for use in transmitting data in JSON format.
279
-
280
- Local Modifications: None
281
-
282
- ---
283
- Code in:
284
- tools/maven-ant-tasks-2.1.1.jar
285
- URL: http://maven.apache.org
286
- Version 2.1.1
287
- License: Apache License 2.0
288
- Description:
289
- Maven Ant tasks are used to manage dependencies and to install/deploy to
290
- maven repositories.
291
-
292
- Local Modifications: None
@@ -1,66 +0,0 @@
1
- all:
2
- src/ext/inflector.js
3
- src/ext/md5.js
4
- src/ext/shortcut.js
5
- src/ext/keyboard_1_49.js
6
- src/base.js
7
- src/utils.js
8
- src/effects.js
9
- src/ui/language_case_manager.js
10
- src/ui/language_selector.js
11
- src/ui/lightbox.js
12
- src/ui/translator.js
13
- src/proxy.js
14
- src/logger.js
15
- src/language.js
16
- src/translation_key.js
17
- src/tokens/token.js
18
- src/tokens/data_token.js
19
- src/tokens/transform_token.js
20
- src/tokens/decoration_token.js
21
- src/rules/language_rule.js
22
- src/rules/date_rule.js
23
- src/rules/gender_rule.js
24
- src/rules/numeric_rule.js
25
- src/rules/list_rule.js
26
- src/rules/gender_list_rule.js
27
- src/tml/label.js
28
- src/tml/token.js
29
- src/init.js
30
-
31
- ui:
32
- src/ext/shortcut.js
33
- src/ext/keyboard_1_49.js
34
- src/base.js
35
- src/utils.js
36
- src/effects.js
37
- src/ui/language_case_manager.js
38
- src/ui/language_selector.js
39
- src/ui/lightbox.js
40
- src/ui/translator.js
41
- src/init.js
42
-
43
- proxy:
44
- src/ext/inflector.js
45
- src/ext/md5.js
46
- src/base.js
47
- src/utils.js
48
- src/effects.js
49
- src/proxy.js
50
- src/logger.js
51
- src/language.js
52
- src/translation_key.js
53
- src/tokens/token.js
54
- src/tokens/data_token.js
55
- src/tokens/transform_token.js
56
- src/tokens/decoration_token.js
57
- src/rules/language_rule.js
58
- src/rules/date_rule.js
59
- src/rules/gender_rule.js
60
- src/rules/numeric_rule.js
61
- src/rules/list_rule.js
62
- src/rules/gender_list_rule.js
63
- src/tml/label.js
64
- src/tml/token.js
65
-
66
-
@@ -1,35 +0,0 @@
1
- /****************************************************************************
2
- Copyright (c) 2010-2012 Michael Berkovich, Ian McDaniel, tr8n.net
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining
5
- a copy of this software and associated documentation files (the
6
- "Software"), to deal in the Software without restriction, including
7
- without limitation the rights to use, copy, modify, merge, publish,
8
- distribute, sublicense, and/or sell copies of the Software, and to
9
- permit persons to whom the Software is furnished to do so, subject to
10
- the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be
13
- included in all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
- ****************************************************************************/
23
-
24
- document.createElement('tr8n');
25
- document.createElement('tml');
26
-
27
- var Tr8n = Tr8n || {
28
- element:function(element_id) {
29
- if (typeof element_id == 'string') return document.getElementById(element_id);
30
- return element_id;
31
- },
32
- value:function(element_id) {
33
- return Tr8n.element(element_id).value;
34
- }
35
- };
@@ -1,67 +0,0 @@
1
- /****************************************************************************
2
- Copyright (c) 2010-2012 Michael Berkovich, Ian McDaniel, tr8n.net
3
-
4
- Permission is hereby granted, free of charge, to any person obtaining
5
- a copy of this software and associated documentation files (the
6
- "Software"), to deal in the Software without restriction, including
7
- without limitation the rights to use, copy, modify, merge, publish,
8
- distribute, sublicense, and/or sell copies of the Software, and to
9
- permit persons to whom the Software is furnished to do so, subject to
10
- the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be
13
- included in all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
- ****************************************************************************/
23
-
24
- Tr8n.Effects = {
25
- toggle: function(element_id) {
26
- if (Tr8n.element(element_id).style.display == "none")
27
- Tr8n.element(element_id).show();
28
- else
29
- Tr8n.element(element_id).hide();
30
- },
31
- hide: function(element_id) {
32
- Tr8n.element(element_id).style.display = "none";
33
- },
34
- show: function(element_id) {
35
- var style = (Tr8n.element(element_id).tagName == "SPAN") ? "inline" : "block";
36
- Tr8n.element(element_id).style.display = style;
37
- },
38
- blindUp: function(element_id) {
39
- Tr8n.Effects.hide(element_id);
40
- },
41
- blindDown: function(element_id) {
42
- Tr8n.Effects.show(element_id);
43
- },
44
- appear: function(element_id) {
45
- Tr8n.Effects.show(element_id);
46
- },
47
- fade: function(element_id) {
48
- Tr8n.Effects.hide(element_id);
49
- },
50
- submit: function(element_id) {
51
- Tr8n.element(element_id).submit();
52
- },
53
- focus: function(element_id) {
54
- Tr8n.element(element_id).focus();
55
- },
56
- scrollTo: function(element_id) {
57
- var theElement = Tr8n.element(element_id);
58
- var selectedPosX = 0;
59
- var selectedPosY = 0;
60
- while(theElement != null){
61
- selectedPosX += theElement.offsetLeft;
62
- selectedPosY += theElement.offsetTop;
63
- theElement = theElement.offsetParent;
64
- }
65
- window.scrollTo(selectedPosX,selectedPosY);
66
- }
67
- }