tr8n_client_sdk 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +22 -0
- data/README.rdoc +3 -0
- data/Rakefile +38 -0
- data/app/assets/images/tr8n/tr8n_logo.png +0 -0
- data/app/views/tr8n_client_sdk/tags/_language_strip.html.erb +20 -0
- data/app/views/tr8n_client_sdk/tags/_powered_by_tr8n.html.erb +6 -0
- data/app/views/tr8n_client_sdk/tags/_scripts.html.erb +20 -0
- data/config/routes.rb +2 -0
- data/lib/generators/tr8n_client_sdk/templates/config/tr8n/config.yml +53 -0
- data/lib/generators/tr8n_client_sdk/templates/config/tr8n/tokens/data.yml +45 -0
- data/lib/generators/tr8n_client_sdk/templates/config/tr8n/tokens/decorations.yml +37 -0
- data/lib/generators/tr8n_client_sdk/tr8n_client_sdk_generator.rb +37 -0
- data/lib/tasks/tr8n_client_sdk_tasks.rake +30 -0
- data/lib/tr8n_client_sdk.rb +28 -0
- data/lib/tr8n_client_sdk/config.rb +197 -0
- data/lib/tr8n_client_sdk/engine.rb +31 -0
- data/lib/tr8n_client_sdk/extensions/action_common_methods.rb +122 -0
- data/lib/tr8n_client_sdk/extensions/action_controller_extension.rb +123 -0
- data/lib/tr8n_client_sdk/extensions/action_view_extension.rb +218 -0
- data/lib/tr8n_client_sdk/railtie.rb +54 -0
- data/lib/tr8n_client_sdk/version.rb +27 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/images/bg-pattern.png +0 -0
- data/test/dummy/app/assets/images/facebook.png +0 -0
- data/test/dummy/app/assets/images/github.png +0 -0
- data/test/dummy/app/assets/images/glyphicons-halflings-white.png +0 -0
- data/test/dummy/app/assets/images/glyphicons-halflings.png +0 -0
- data/test/dummy/app/assets/images/how_it_works_1.gif +0 -0
- data/test/dummy/app/assets/images/how_it_works_2.gif +0 -0
- data/test/dummy/app/assets/images/how_it_works_3.gif +0 -0
- data/test/dummy/app/assets/images/hr.png +0 -0
- data/test/dummy/app/assets/images/linkedin.png +0 -0
- data/test/dummy/app/assets/images/silhouette.gif +0 -0
- data/test/dummy/app/assets/images/twitter.png +0 -0
- data/test/dummy/app/assets/images/wordpress.png +0 -0
- data/test/dummy/app/assets/images/youtube.png +0 -0
- data/test/dummy/app/assets/javascripts/ace/ace.js +11 -0
- data/test/dummy/app/assets/javascripts/ace/ext-static_highlight.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/ext-textarea.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/keybinding-emacs.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/keybinding-vim.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-abap.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-asciidoc.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-c9search.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-c_cpp.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-clojure.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-coffee.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-coldfusion.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-csharp.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-css.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-dart.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-diff.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-dot.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-glsl.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-golang.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-groovy.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-haml.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-haxe.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-html.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-jade.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-java.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-javascript.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-json.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-jsp.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-jsx.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-latex.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-less.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-liquid.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-lisp.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-lua.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-luapage.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-lucene.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-makefile.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-markdown.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-objectivec.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-ocaml.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-perl.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-pgsql.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-php.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-powershell.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-python.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-r.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-rdoc.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-rhtml.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-ruby.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-scad.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-scala.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-scss.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-sh.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-sql.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-stylus.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-svg.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-tcl.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-tex.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-text.js +0 -0
- data/test/dummy/app/assets/javascripts/ace/mode-textile.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-typescript.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-xml.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-xquery.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/mode-yaml.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-ambiance.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-chaos.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-chrome.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-clouds.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-clouds_midnight.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-cobalt.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-crimson_editor.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-dawn.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-dreamweaver.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-eclipse.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-github.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-idle_fingers.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-kr.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-merbivore.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-merbivore_soft.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-mono_industrial.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-monokai.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-pastel_on_dark.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-solarized_dark.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-solarized_light.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-textmate.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-tomorrow.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-tomorrow_night.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-tomorrow_night_blue.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-tomorrow_night_bright.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-tomorrow_night_eighties.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-twilight.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-vibrant_ink.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/theme-xcode.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/worker-coffee.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/worker-css.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/worker-javascript.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/worker-json.js +1 -0
- data/test/dummy/app/assets/javascripts/ace/worker-xquery.js +1 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/javascripts/bootstrap.js +2291 -0
- data/test/dummy/app/assets/javascripts/bootstrap.min.js +7 -0
- data/test/dummy/app/assets/javascripts/jquery-ace.js +195 -0
- data/test/dummy/app/assets/javascripts/jquery-ui-1.10.3.custom.min.js +7 -0
- data/test/dummy/app/assets/javascripts/jquery.tocify.min.js +4 -0
- data/test/dummy/app/assets/javascripts/jquery191.js +16 -0
- data/test/dummy/app/assets/javascripts/prism.js +20 -0
- data/test/dummy/app/assets/javascripts/prism_rails.js +49 -0
- data/test/dummy/app/assets/javascripts/sh.js +573 -0
- data/test/dummy/app/assets/stylesheets/application.css +8 -0
- data/test/dummy/app/assets/stylesheets/bootstrap/bootstrap.css +6315 -0
- data/test/dummy/app/assets/stylesheets/bootstrap/bootstrap.min.css +874 -0
- data/test/dummy/app/assets/stylesheets/bootstrap/bootstrap_and_overrides.css.scss +16 -0
- data/test/dummy/app/assets/stylesheets/jquery.tocify.css +62 -0
- data/test/dummy/app/assets/stylesheets/prism.css +108 -0
- data/test/dummy/app/assets/stylesheets/prism_rails.css.scss +42 -0
- data/test/dummy/app/assets/stylesheets/sh.css +193 -0
- data/test/dummy/app/controllers/application_controller.rb +82 -0
- data/test/dummy/app/controllers/docs_controller.rb +42 -0
- data/test/dummy/app/controllers/home_controller.rb +29 -0
- data/test/dummy/app/controllers/login_controller.rb +55 -0
- data/test/dummy/app/controllers/signup_controller.rb +58 -0
- data/test/dummy/app/controllers/welcome_controller.rb +30 -0
- data/test/dummy/app/helpers/application_helper.rb +26 -0
- data/test/dummy/app/mailers/request_mailer.rb +38 -0
- data/test/dummy/app/models/user.rb +48 -0
- data/test/dummy/app/views/docs/index.html.erb +591 -0
- data/test/dummy/app/views/docs/installation.html.erb +59 -0
- data/test/dummy/app/views/docs/test.html.erb +17 -0
- data/test/dummy/app/views/docs/tml.html.erb +176 -0
- data/test/dummy/app/views/docs/tml_content.html.erb +33 -0
- data/test/dummy/app/views/home/index.html.erb +107 -0
- data/test/dummy/app/views/layouts/_flashes.html.erb +35 -0
- data/test/dummy/app/views/layouts/_footer.html.erb +31 -0
- data/test/dummy/app/views/layouts/_head.html.erb +8 -0
- data/test/dummy/app/views/layouts/_header.html.erb +70 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/login/_common.html.erb +29 -0
- data/test/dummy/app/views/login/cookies.html.erb +20 -0
- data/test/dummy/app/views/login/index.html.erb +1 -0
- data/test/dummy/app/views/login/out.html.erb +1 -0
- data/test/dummy/app/views/signup/index.html.erb +22 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mail.rb +14 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +8 -0
- data/test/dummy/config/tr8n/config.yml +53 -0
- data/test/dummy/config/tr8n/tokens/data.yml +45 -0
- data/test/dummy/config/tr8n/tokens/decorations.yml +37 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/migrate/20130506202619_create_users.rb +16 -0
- data/test/dummy/db/schema.rb +29 -0
- data/test/dummy/log/development.log +40036 -0
- data/test/dummy/log/tr8n.log +14602 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/spec/models/request_spec.rb +5 -0
- data/test/dummy/spec/models/user_spec.rb +5 -0
- data/test/dummy/tmp/cache/assets/BCA/680/sprockets%2F0e766e5046b2556242937265334a7776 +0 -0
- data/test/dummy/tmp/cache/assets/C41/5A0/sprockets%2Ff3979161c897640872293fb74f7e4185 +0 -0
- data/test/dummy/tmp/cache/assets/C69/980/sprockets%2F1289412d200b47c7f5ba1714da031188 +0 -0
- data/test/dummy/tmp/cache/assets/C80/840/sprockets%2F562c2d168da585f80579347d10790a0a +0 -0
- data/test/dummy/tmp/cache/assets/C85/8C0/sprockets%2F262c6124c54467ed84e71473a5748a2f +0 -0
- data/test/dummy/tmp/cache/assets/C9B/B70/sprockets%2F3c5f068b5a07f9215020042ed660bb45 +0 -0
- data/test/dummy/tmp/cache/assets/CAC/8A0/sprockets%2Fb3da0b5a24a9277687d1b973d1638126 +0 -0
- data/test/dummy/tmp/cache/assets/CB0/D20/sprockets%2F0850d836310c2fc600217ce3f894f9c8 +0 -0
- data/test/dummy/tmp/cache/assets/CB1/E50/sprockets%2Fea7a0c10450c627f752b87495d915b66 +0 -0
- data/test/dummy/tmp/cache/assets/CBF/A00/sprockets%2F82c0bd0c273938e78e80698057bf165e +0 -0
- data/test/dummy/tmp/cache/assets/CC3/730/sprockets%2F730877507dec32fd7d2e038899bb8067 +0 -0
- data/test/dummy/tmp/cache/assets/CC6/350/sprockets%2F7486d25d54ef6d9548205d5a17ff3468 +0 -0
- data/test/dummy/tmp/cache/assets/CC7/620/sprockets%2F395359137b16e965efa7fa58db855904 +0 -0
- data/test/dummy/tmp/cache/assets/CC7/A90/sprockets%2F77713cc98a179981d615f84f952add24 +0 -0
- data/test/dummy/tmp/cache/assets/CD5/2C0/sprockets%2F166c056119ebdfb8b7104c97b424b423 +0 -0
- data/test/dummy/tmp/cache/assets/CD6/450/sprockets%2Ff0c4fb28a62f912b5542965358a10a1f +0 -0
- data/test/dummy/tmp/cache/assets/CD6/C30/sprockets%2Fe15182011d74255aa67fde5a783dd612 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/CD8/F00/sprockets%2F2344b925523c2c28a3fd1e73ad5f9181 +0 -0
- data/test/dummy/tmp/cache/assets/CD9/BA0/sprockets%2Fb9fa8aa2057e7d8702f10317694a8c10 +0 -0
- data/test/dummy/tmp/cache/assets/CE2/720/sprockets%2F922b15b49871931e5df1d0a2be4826f8 +0 -0
- data/test/dummy/tmp/cache/assets/CE3/EB0/sprockets%2F28ee30e42c7c583083e76a377df3035d +0 -0
- data/test/dummy/tmp/cache/assets/CE5/650/sprockets%2F8ab512c9b33ac90e699b73469d71f061 +0 -0
- data/test/dummy/tmp/cache/assets/CE8/2F0/sprockets%2Fb74ee6e80ba2911167d148d791d6728c +0 -0
- data/test/dummy/tmp/cache/assets/CEE/D60/sprockets%2F7b699b03f091fe228759da88a323a56f +0 -0
- data/test/dummy/tmp/cache/assets/CF0/450/sprockets%2F65704938b67ef6b06e386cea3c1848b6 +0 -0
- data/test/dummy/tmp/cache/assets/CF1/5A0/sprockets%2Fec49552e4a6b67bee359e0485610d887 +0 -0
- data/test/dummy/tmp/cache/assets/CFC/880/sprockets%2Fd89c211d7a3dc2a94a7625d7155000ab +0 -0
- data/test/dummy/tmp/cache/assets/D05/210/sprockets%2F5d0d1d45d694d6d4f803a9a1340b741c +0 -0
- data/test/dummy/tmp/cache/assets/D05/820/sprockets%2Fee427231dd340c1b50573f187a8a6d5d +0 -0
- data/test/dummy/tmp/cache/assets/D09/6F0/sprockets%2F0f69fe87b4b574153bdc60711a6ca208 +0 -0
- data/test/dummy/tmp/cache/assets/D0A/C20/sprockets%2Fd177dbfcd8235d07a0072c4d9c307385 +0 -0
- data/test/dummy/tmp/cache/assets/D0C/820/sprockets%2F1002e68d7cf06571cb63a864f93bb4e3 +0 -0
- data/test/dummy/tmp/cache/assets/D0E/A30/sprockets%2F71398e105f60c431f86d78e3abbbf125 +0 -0
- data/test/dummy/tmp/cache/assets/D0E/FF0/sprockets%2F2c4cc11f6c24fbb41d97713864854d1f +0 -0
- data/test/dummy/tmp/cache/assets/D18/E00/sprockets%2Ff017e80af40be5c829882bd1885a38f4 +0 -0
- data/test/dummy/tmp/cache/assets/D19/120/sprockets%2F69f0907662f738cd217edca24ef2328d +0 -0
- data/test/dummy/tmp/cache/assets/D25/FD0/sprockets%2F03006f6bba722ebc14ceac8221b81917 +0 -0
- data/test/dummy/tmp/cache/assets/D26/7C0/sprockets%2F771cba4a2e4f22141377c4eccc1065c0 +0 -0
- data/test/dummy/tmp/cache/assets/D28/B20/sprockets%2Fbd19c0bc42912a8ba7c5c3b100f71592 +0 -0
- data/test/dummy/tmp/cache/assets/D29/280/sprockets%2F04fd073ef39e04ced71111a204cb70e6 +0 -0
- data/test/dummy/tmp/cache/assets/D29/320/sprockets%2Feb3792401fd26ebf610c8531b0a4bd32 +0 -0
- data/test/dummy/tmp/cache/assets/D29/AF0/sprockets%2F841d8c0c4ba32a5e25aa41b7069ba581 +0 -0
- data/test/dummy/tmp/cache/assets/D32/4F0/sprockets%2Fb8023435d8d01feca8fd3a1ce9144181 +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D38/DB0/sprockets%2Fe848eed2f10d359a60040b50d486b3fd +0 -0
- data/test/dummy/tmp/cache/assets/D39/6E0/sprockets%2F4d3170e44fdaa2f62cc266b62e5925e4 +0 -0
- data/test/dummy/tmp/cache/assets/D3C/2C0/sprockets%2F9c4d26aabdb46cc90d0228c79344950e +0 -0
- data/test/dummy/tmp/cache/assets/D3D/2D0/sprockets%2Fc83c38e1374d350196211ce9ffed3aa6 +0 -0
- data/test/dummy/tmp/cache/assets/D3D/970/sprockets%2F23fb0067086af38f593481abd034deff +0 -0
- data/test/dummy/tmp/cache/assets/D41/C20/sprockets%2F5b768ca318275843ae6b901bb9cca29e +0 -0
- data/test/dummy/tmp/cache/assets/D42/030/sprockets%2Ff991fbde306579de4c94d611ced13023 +0 -0
- data/test/dummy/tmp/cache/assets/D47/A20/sprockets%2F9f6654abeaa85f117a98806392ac2a8d +0 -0
- data/test/dummy/tmp/cache/assets/D47/D00/sprockets%2Fd76fe4489f3b7f2cd62450204cef631f +0 -0
- data/test/dummy/tmp/cache/assets/D4A/640/sprockets%2F94ec7bb9872d4b005d267d56cb80f7e4 +0 -0
- data/test/dummy/tmp/cache/assets/D4C/020/sprockets%2F2c26fac647b394d5f49b2743950aefe9 +0 -0
- data/test/dummy/tmp/cache/assets/D4D/A20/sprockets%2F0de50df58d85f5cce135f460979bd472 +0 -0
- data/test/dummy/tmp/cache/assets/D4D/E30/sprockets%2F828b744b9a72d6b05ace77264f878bdb +0 -0
- data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/cache/assets/D53/1E0/sprockets%2F6d4776ffd4fc7486550b6508cb2dd57e +0 -0
- data/test/dummy/tmp/cache/assets/D5A/B70/sprockets%2F7b76786736bb5e9eeb4887dd32c83ec2 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D62/720/sprockets%2F34a95b2bb07a4fbd408c81f1c37bd860 +0 -0
- data/test/dummy/tmp/cache/assets/D69/B50/sprockets%2F1c7aa58ab12825ccfb465ca5e7c77551 +0 -0
- data/test/dummy/tmp/cache/assets/D6F/220/sprockets%2F99d4cd656c271484bee1a14ac84e5ad2 +0 -0
- data/test/dummy/tmp/cache/assets/D74/280/sprockets%2F049b078c38d43fbe7e6b1eb49da1b775 +0 -0
- data/test/dummy/tmp/cache/assets/D74/9A0/sprockets%2F049cf32cc869e7138b76f1bb04ae78ad +0 -0
- data/test/dummy/tmp/cache/assets/D77/770/sprockets%2F67b869074d0a5b5bb8698e55ccca47aa +0 -0
- data/test/dummy/tmp/cache/assets/D7A/290/sprockets%2F5acdbbb05bd53866c8225e95f8e805e8 +0 -0
- data/test/dummy/tmp/cache/assets/D7A/2A0/sprockets%2F91a461699d36fdd71c4cec0a8d737cf4 +0 -0
- data/test/dummy/tmp/cache/assets/D7C/5B0/sprockets%2F2b864c6eb9b8d679b2716db1a1e93c8f +0 -0
- data/test/dummy/tmp/cache/assets/D82/930/sprockets%2Fecdc4c7caa1aa683b13d14a91234b452 +0 -0
- data/test/dummy/tmp/cache/assets/D8D/610/sprockets%2Ffb7e1b81f737cb510ac8166a241bbc4c +0 -0
- data/test/dummy/tmp/cache/assets/D91/080/sprockets%2Fbcca522c6302f184f12fe0e8a7d7e71a +0 -0
- data/test/dummy/tmp/cache/assets/D91/2B0/sprockets%2F354460cd2db93ca02614a4bb76ffde3e +0 -0
- data/test/dummy/tmp/cache/assets/D96/DA0/sprockets%2F55af2375310fff6b9706cbacfb2ec540 +0 -0
- data/test/dummy/tmp/cache/assets/D9E/F30/sprockets%2Fc32ceef2bde9f93b4c5b866c8200371c +0 -0
- data/test/dummy/tmp/cache/assets/D9F/300/sprockets%2Fc13fc73ceafa45876a901b3e775b83ae +0 -0
- data/test/dummy/tmp/cache/assets/D9F/390/sprockets%2Fe2fc3cc13d4d3677be6574e0fd2732cf +0 -0
- data/test/dummy/tmp/cache/assets/DAA/A50/sprockets%2F231c56d70690f8b4f8f6fea2cea9d39b +0 -0
- data/test/dummy/tmp/cache/assets/DB5/350/sprockets%2F3b5ebcf21def6fff9868a18e239495f1 +0 -0
- data/test/dummy/tmp/cache/assets/DB9/150/sprockets%2Fdaff6d12c8afc96d0c91d77e91d79966 +0 -0
- data/test/dummy/tmp/cache/assets/DC9/DB0/sprockets%2F43a2aed943cbb05dcc84468c73ddea55 +0 -0
- data/test/dummy/tmp/cache/assets/DCE/310/sprockets%2F2f221a6c5ffcaf07ef30f4ee9a793b44 +0 -0
- data/test/dummy/tmp/cache/assets/DD2/750/sprockets%2Ff70dee8c3d675153ad76abe3f730dc4f +0 -0
- data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/DFF/270/sprockets%2Fb84f2daecc65ed711132bff2d8f5fe08 +0 -0
- data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/E13/010/sprockets%2Feecfc58398a4d26289a5e0fe9ecd09ec +0 -0
- data/test/dummy/tmp/cache/assets/E23/880/sprockets%2F436adfe0b6333bf5af1eaaf3ea4e919b +0 -0
- data/test/dummy/tmp/cache/assets/E25/4F0/sprockets%2Fa24db6eec8d3a80f7fe3a50b4cdd243f +0 -0
- data/test/dummy/tmp/cache/assets/E2C/210/sprockets%2Fdd7b14fc1e5b2b7dcdac381cc7f9c267 +0 -0
- data/test/dummy/tmp/cache/assets/E3A/950/sprockets%2F8a6c7c212feec8ae888ad7e7fa50a3ff +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_accordion.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_alerts.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_breadcrumbs.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_button-groups.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_buttons.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_carousel.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_close.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_code.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_component-animations.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_dropdowns.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_forms.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_grid.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_hero-unit.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_labels-badges.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_layouts.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_media.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_mixins.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_modals.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_navbar.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_navs.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_pager.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_pagination.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_popovers.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_progress-bars.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_reset.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_responsive-1200px-min.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_responsive-767px-max.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_responsive-768px-979px.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_responsive-navbar.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_responsive-utilities.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_scaffolding.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_sprites.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_tables.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_thumbnails.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_tooltip.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_type.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_utilities.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_variables.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/_wells.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/bootstrap.scssc +0 -0
- data/test/dummy/tmp/cache/sass/076477e2114ee474e8df1a7a673f9162f60724cc/responsive.scssc +0 -0
- data/test/dummy/tmp/cache/sass/2a9f8d893763e4aeafa77aedd38023c2d92257b4/bootstrap-responsive.scssc +0 -0
- data/test/dummy/tmp/cache/sass/2bca5584fcb1177ad07e4f21325c39e4eda592bf/bootstrap_and_overrides.css.scssc +0 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- data/test/tr8n_client_sdk_test.rb +7 -0
- metadata +771 -0
@@ -0,0 +1,59 @@
|
|
1
|
+
<h2><%= tr("Installation Instructions") %></h2>
|
2
|
+
|
3
|
+
<p>
|
4
|
+
<%= tr("Clone the git repository to your projects folder:") %>
|
5
|
+
</p>
|
6
|
+
|
7
|
+
|
8
|
+
<h3><%= tr("Connecting to Tr8n service") %></h3>
|
9
|
+
<p>
|
10
|
+
<%=tr("To connect to a hosted tr8n service, visit [link: tr8nhub.com], register as a new user and create a new application.", :link => {:href => "http://tr8nhub.com"}) %>
|
11
|
+
<%=tr("Then add the following line to your PHP application:") %>
|
12
|
+
</p>
|
13
|
+
|
14
|
+
<pre><code class="language-php"> </code></pre>
|
15
|
+
|
16
|
+
<h3><%= tr("Running your own Tr8n service") %></h3>
|
17
|
+
|
18
|
+
<p>
|
19
|
+
<%=tr("Alternatively, you can host a tr8n service instance yourself. Tr8n service is written using Ruby on Rails. To run the service yourself, clone the git repository:") %>
|
20
|
+
</p>
|
21
|
+
|
22
|
+
<pre><code class="language-php">$ git clone git@github.com:tr8n/tr8n.git</code></pre>
|
23
|
+
|
24
|
+
<p>
|
25
|
+
<%= tr("Run the following commands: (temporary, until the service node is ready)") %>
|
26
|
+
</p>
|
27
|
+
|
28
|
+
<pre><code class="language-php">
|
29
|
+
$ cd tr8n/test/dummy
|
30
|
+
$ bundle
|
31
|
+
$ bundle exec rake db:migrate
|
32
|
+
$ bundle exec rake tr8n:init
|
33
|
+
$ bundle exec rails s
|
34
|
+
|
35
|
+
</code></pre>
|
36
|
+
|
37
|
+
<p>
|
38
|
+
<%= tr("You should see the following output:") %>
|
39
|
+
</p>
|
40
|
+
|
41
|
+
<pre><code class="language-php">
|
42
|
+
=> Booting WEBrick
|
43
|
+
=> Rails 3.2.3 application starting in development on http://0.0.0.0:3000
|
44
|
+
=> Call with -d to detach
|
45
|
+
=> Ctrl-C to shutdown server
|
46
|
+
[2013-08-14 20:21:39] INFO WEBrick 1.3.1
|
47
|
+
[2013-08-14 20:21:39] INFO ruby 1.9.3 (2013-02-22) [x86_64-darwin12.2.1]
|
48
|
+
[2013-08-14 20:21:39] INFO WEBrick::HTTPServer#start: pid=29722 port=3000
|
49
|
+
|
50
|
+
</code></pre>
|
51
|
+
|
52
|
+
<p>
|
53
|
+
<%= tr("This means that the service is running. Visit http://localhost:3000 and register as a new user. Go to the admin tools and retrieve your application secret.") %>
|
54
|
+
</p>
|
55
|
+
|
56
|
+
<p>
|
57
|
+
<%= tr("In your config.yml file update the application credentials:") %>
|
58
|
+
</p>
|
59
|
+
<pre><code class="language-php"> </code></pre>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<p>
|
2
|
+
|
3
|
+
<%= tr("This is your {count::ordinal} warning", :count => 1) %>
|
4
|
+
<br><br><br>
|
5
|
+
|
6
|
+
<%= tr("you have [bold: {count} [i: {count|message}]]", :count => 1) %>
|
7
|
+
|
8
|
+
<br><br><br>
|
9
|
+
|
10
|
+
<%= tr("{actor} loved {target}", :actor => {:object => {:name => "Михаил", :gender => "male"}, :attribute => :name},
|
11
|
+
:target => {:object => {:name => "Анна", :gender => "female"}, :attribute => :name}) %>
|
12
|
+
|
13
|
+
<br><br>
|
14
|
+
<%= tr("{actor} loved {target}", :target => {:object => {:name => "Михаил", :gender => "male"}, :attribute => :name},
|
15
|
+
:actor => {:object => {:name => "Анна", :gender => "female"}, :attribute => :name}) %>
|
16
|
+
|
17
|
+
</p>
|
@@ -0,0 +1,176 @@
|
|
1
|
+
<h1 style="text-align:center"><%= tr("TML Interactive Console") %></h1>
|
2
|
+
|
3
|
+
<form action="/docs/tml_content" method="get" id="tml_form" target="tml_translations">
|
4
|
+
<input type="hidden" id="tml_label" name="tml_label" value="">
|
5
|
+
<input type="hidden" id="tml_context" name="tml_context" value="">
|
6
|
+
<input type="hidden" id="tml_tokens" name="tml_tokens" value="">
|
7
|
+
<input type="hidden" id="tml_options" name="tml_options" value="">
|
8
|
+
|
9
|
+
<%
|
10
|
+
examples = [
|
11
|
+
{:label => "Hello World"},
|
12
|
+
{:label => "Invite", :description => "An invitation"},
|
13
|
+
{:label => "Invite", :description => "Action to invite someone"},
|
14
|
+
{:label => "Number of messages: {count}", :tokens => {"count" => 5}},
|
15
|
+
{:label => "You have {count|| one: message, other: messages}", :tokens => {"count" => 5}},
|
16
|
+
{:label => "You have {count|| message, messages}", :tokens => {"count" => 5}},
|
17
|
+
{:label => "You have {count|| message}", :tokens => {"count" => 5}},
|
18
|
+
{:label => "You have {count| message}", :tokens => {"count" => 5}},
|
19
|
+
{:label => "Hello [bold: World]"},
|
20
|
+
{:label => "Hello [bold: {user}]", :tokens => {"user" => "Michael"}},
|
21
|
+
{:label => "Hello [bold: {user}], you have {count||message}.", :tokens => {"user" => "Michael", "count" => 5}},
|
22
|
+
{:label => "Hello [bold: {user}], [italic: you have [bold: {count||message}]].", :tokens => {"user" => "Michael", "count" => 1}},
|
23
|
+
{:label => "Hello [bold: {user}], [italic]you have [bold: {count||message}][/italic].", :tokens => {"user" => "Michael", "count" => 3}},
|
24
|
+
{:label => "{user|He, She} likes this post.", :tokens => {"user" => {"object" => {"gender" => "male", "name" => "Michael"}}}},
|
25
|
+
{:label => "{user|Dear} {user}", :tokens => {"user" => {"object" => {"gender" => "male", "name" => "Michael"}, "attribute" => "name"}}},
|
26
|
+
{:label => "{users||likes, like} this post.", :tokens => {"users" => [[{"gender" => "male", "name" => "Michael"}, {"gender" => "female", "name" => "Anna"}], {"attribute" => "name"}]}},
|
27
|
+
{:label => "{users||likes, like} this post.", :tokens => {"users" => [[{"gender" => "female", "name" => "Anna"}], {"attribute" => "name"}]}},
|
28
|
+
{:label => "{users|He likes, She likes, They like} this post.", :tokens => {"users"=> [[{"gender"=> "male", "name"=>"Michael"}, {"gender"=> "female", "name"=>"Anna"}], {"attribute"=> "name"}]}},
|
29
|
+
{:label => "{users|He likes, She likes, They like} this post.", :tokens => {"users"=> [[{"gender"=> "female", "name"=>"Anna"}], {"attribute"=> "name"}]}},
|
30
|
+
{:label => "{users|He likes, She likes, They like} this post.", :tokens => {"users"=> [[{"gender"=> "male", "name"=>"Michael"}], {"attribute"=> "name"}]}}
|
31
|
+
]
|
32
|
+
%>
|
33
|
+
|
34
|
+
<div style="padding-top:15px;">
|
35
|
+
<div style="font-size:12px;float:right;padding-top:15px;color:#888"><%= tr("The text that you would like to translate.")%></div>
|
36
|
+
|
37
|
+
<h4 style="display:inline-block;"><%= tr("Label (required, TML)") %></h4>
|
38
|
+
<div class="dropdown" style="display:inline-block; padding-left:10px;">
|
39
|
+
<a id="user_menu_trigger" href="#" class="dropdown-toggle" data-toggle="dropdown">
|
40
|
+
<%= tr("try some examples") %><b class="caret"></b>
|
41
|
+
</a>
|
42
|
+
<ul class="dropdown-menu pas" style="max-height:500px;overflow:auto;">
|
43
|
+
<% examples.each_with_index do |sample, index| %>
|
44
|
+
<li style="font-size:13px;">
|
45
|
+
<%=link_to("javascript: loadExample(#{index})") do %>
|
46
|
+
<%= index+1 %>)
|
47
|
+
<strong><%= sample[:label] %></strong>
|
48
|
+
<% if sample[:description] %>
|
49
|
+
<div style="font-size:10px;padding-left:15px;">Context: <%=sample[:description]%></div>
|
50
|
+
<% end %>
|
51
|
+
<% if sample[:tokens] %>
|
52
|
+
<div style="font-size:10px;padding-left:15px;">Tokens: <%=sample[:tokens]%></div>
|
53
|
+
<% end %>
|
54
|
+
<% if sample[:options] %>
|
55
|
+
<div style="font-size:10px;padding-left:15px;">Options: <%=sample[:options]%></div>
|
56
|
+
<% end %>
|
57
|
+
<% end %>
|
58
|
+
</li>
|
59
|
+
<li class="divider"></li>
|
60
|
+
<% end %>
|
61
|
+
</ul>
|
62
|
+
</div>
|
63
|
+
<div class="ace_editor" id="tml_label_editor" style="height:80px;"></div>
|
64
|
+
</div>
|
65
|
+
|
66
|
+
<div style="padding-top:15px;">
|
67
|
+
<div style="font-size:12px;float:right;padding-top:15px;color:#888"><%= tr("If label is ambiguous, context provides a hint to translators as well as a unique key for the label.")%></div>
|
68
|
+
<h4><%= tr("Context (optional, plain text)") %></h4>
|
69
|
+
<div class="ace_editor" id="tml_context_editor" style="height:50px;"></div>
|
70
|
+
</div>
|
71
|
+
|
72
|
+
<table style="width:100%">
|
73
|
+
<tr>
|
74
|
+
<td style="width:50%">
|
75
|
+
<div style="font-size:12px;float:right;padding-top:15px;color:#888"><%= tr("Dynamic data to be substituted")%></div>
|
76
|
+
<h4><%= tr("Tokens (optional, JSON)") %></h4>
|
77
|
+
<div class="ace_editor" id="tml_tokens_editor" style="height:100px;">{}</div>
|
78
|
+
</td>
|
79
|
+
<td> </td>
|
80
|
+
<td style="width:50%">
|
81
|
+
<div style="font-size:12px;float:right;padding-top:15px;color:#888"><%= tr("Translation options")%></div>
|
82
|
+
<h4><%= tr("Options (optional, JSON)") %></h4>
|
83
|
+
<div class="ace_editor" id="tml_options_editor" style="height:100px;">{}</div>
|
84
|
+
</td>
|
85
|
+
</tr>
|
86
|
+
</table>
|
87
|
+
|
88
|
+
<div style="padding-top:10px;">
|
89
|
+
<div style="float:right">
|
90
|
+
</div>
|
91
|
+
<div>
|
92
|
+
<button type="button" class="btn btn-primary" onClick="submitTml()">
|
93
|
+
<%= tr("Translate") %>
|
94
|
+
</button>
|
95
|
+
<button type="button" class="btn" onClick="newSample()">
|
96
|
+
<%= tr("Clear") %>
|
97
|
+
</button>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
</form>
|
101
|
+
|
102
|
+
<hr>
|
103
|
+
<div style="text-align:center;font-size:50px;color:#ccc;padding-bottom:30px;">
|
104
|
+
▼
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<iframe id="tml_translations" name="tml_translations" src="/docs/tml_content" style="width:100%;height:600px;background:white;border:1px solid #eee;"></iframe>
|
108
|
+
|
109
|
+
<%= javascript_include_tag("ace/ace.js") %>
|
110
|
+
<%= javascript_include_tag("ace/theme-chrome.js") %>
|
111
|
+
<%= javascript_include_tag("ace/mode-html.js") %>
|
112
|
+
<%= javascript_include_tag("ace/mode-json.js") %>
|
113
|
+
|
114
|
+
<style type="text/css" media="screen">
|
115
|
+
.ace_editor {
|
116
|
+
position: relative;
|
117
|
+
top: 0;
|
118
|
+
left: 0;
|
119
|
+
width:100%;
|
120
|
+
height:50px;
|
121
|
+
border:1px solid #eee;
|
122
|
+
}
|
123
|
+
</style>
|
124
|
+
|
125
|
+
<script>
|
126
|
+
var label_editor = ace.edit("tml_label_editor");
|
127
|
+
label_editor.setTheme("ace/theme/chrome");
|
128
|
+
label_editor.getSession().setMode("ace/mode/text");
|
129
|
+
|
130
|
+
var context_editor = ace.edit("tml_context_editor");
|
131
|
+
context_editor.setTheme("ace/theme/chrome");
|
132
|
+
context_editor.getSession().setMode("ace/mode/text");
|
133
|
+
|
134
|
+
var tokens_editor = ace.edit("tml_tokens_editor");
|
135
|
+
tokens_editor.setTheme("ace/theme/chrome");
|
136
|
+
tokens_editor.getSession().setMode("ace/mode/json");
|
137
|
+
|
138
|
+
var options_editor = ace.edit("tml_options_editor");
|
139
|
+
options_editor.setTheme("ace/theme/chrome");
|
140
|
+
options_editor.getSession().setMode("ace/mode/json");
|
141
|
+
|
142
|
+
function submitTml() {
|
143
|
+
$("#tml_label").val(label_editor.getValue());
|
144
|
+
$("#tml_context").val(context_editor.getValue());
|
145
|
+
$("#tml_tokens").val(tokens_editor.getValue());
|
146
|
+
$("#tml_options").val(options_editor.getValue());
|
147
|
+
$("#tml_form").submit();
|
148
|
+
}
|
149
|
+
|
150
|
+
function newSample() {
|
151
|
+
location.reload();
|
152
|
+
}
|
153
|
+
|
154
|
+
var examples = <%=examples.to_json.html_safe%>;
|
155
|
+
function loadExample(index) {
|
156
|
+
// alert("Loading: " + index);
|
157
|
+
label_editor.setValue(examples[index].label);
|
158
|
+
|
159
|
+
if (examples[index].description)
|
160
|
+
context_editor.setValue(examples[index].description);
|
161
|
+
else
|
162
|
+
context_editor.setValue("");
|
163
|
+
|
164
|
+
if (examples[index].tokens)
|
165
|
+
tokens_editor.setValue(JSON.stringify(examples[index].tokens));
|
166
|
+
else
|
167
|
+
tokens_editor.setValue("{}");
|
168
|
+
|
169
|
+
if (examples[index].options)
|
170
|
+
options_editor.setValue(JSON.stringify(examples[index].options));
|
171
|
+
else
|
172
|
+
options_editor.setValue("{}");
|
173
|
+
|
174
|
+
submitTml();
|
175
|
+
}
|
176
|
+
</script>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= tr8n_current_language.locale %>" lang="<%= tr8n_current_language.locale %>">
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<%=render :partial => "/layouts/head" %>
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
padding:0px;
|
9
|
+
margin:0px;
|
10
|
+
}
|
11
|
+
</style>
|
12
|
+
</head>
|
13
|
+
<body>
|
14
|
+
|
15
|
+
<%
|
16
|
+
label = params[:tml_label]
|
17
|
+
description = params[:tml_context]
|
18
|
+
|
19
|
+
tokens = params[:tml_tokens].blank? ? "{}" : params[:tml_tokens]
|
20
|
+
tokens = JSON.parse(tokens)
|
21
|
+
|
22
|
+
options = params[:tml_options].blank? ? "{}" : params[:tml_options]
|
23
|
+
options = JSON.parse(options)
|
24
|
+
%>
|
25
|
+
|
26
|
+
<div style="padding:15px;">
|
27
|
+
<% unless params[:tml_label].blank? %>
|
28
|
+
<%=tr(label, description, tokens, options) %>
|
29
|
+
<% end %>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
</body>
|
33
|
+
</html>
|
@@ -0,0 +1,107 @@
|
|
1
|
+
<style>
|
2
|
+
h3 span {
|
3
|
+
background:#FFF;
|
4
|
+
padding:5px 15px 5px 15px;
|
5
|
+
}
|
6
|
+
</style>
|
7
|
+
|
8
|
+
<div class="hero-unit">
|
9
|
+
<div class="text-center">
|
10
|
+
<%= image_tag('tr8n/tr8n_logo.png') %>
|
11
|
+
</div>
|
12
|
+
<h2 class="text-center"><%= tr("Welcome to Tr8n For Ruby on Rails") %></h2>
|
13
|
+
<p class="text-center">
|
14
|
+
<%= tr("Tr8n for Ruby on Rails is a Client SDK library that allows RoR based applications to integrate with the Tr8n crowd-sourced translation platform.") %>
|
15
|
+
<%= tr("This sample application demonstrates some of Tr8n's capabilities.") %>
|
16
|
+
</p>
|
17
|
+
<br>
|
18
|
+
<% unless tr8n_current_translator %>
|
19
|
+
<p class="text-center">
|
20
|
+
<a href="<%=tr8n_application.host%>/signup" class="btn btn-large"><%= tr("Sign up to get started now!") %></a>
|
21
|
+
</p>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<h3 class="hr strong"><span><%= tr("How It Works") %></span></h3>
|
26
|
+
|
27
|
+
<div class="row">
|
28
|
+
<div class="span4">
|
29
|
+
<p class="text-center"><%= image_tag("how_it_works_1.gif") %></p>
|
30
|
+
<h4 class="text-center"><%= tr("Use your users") %></h4>
|
31
|
+
<p><%= tr("Your multilngual users can sign up to help translate your site into over 270 different languages.")%> <%= tr("Their translations can then be viewed and voted on by other users.") %></p>
|
32
|
+
</div>
|
33
|
+
<div class="span4">
|
34
|
+
<p class="text-center"><%= image_tag("how_it_works_2.gif") %></p>
|
35
|
+
<h4 class="text-center"><%= tr("Share translations") %></h4>
|
36
|
+
<p><%= tr("Translations from your site get synced to our servers and can then be shared with thousands of other websites.") %></p>
|
37
|
+
</div>
|
38
|
+
<div class="span4">
|
39
|
+
<p class="text-center"><%= image_tag("how_it_works_3.gif") %></p>
|
40
|
+
<h4 class="text-center"><%= tr("Get what you give") %></h4>
|
41
|
+
<p><%= tr("Regularly pull down new translations from not only your users but users of other websites as you sync your translations.") %></p>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<h3 class="hr strong"><span><%= tr("Features") %></span></h3>
|
46
|
+
|
47
|
+
<div class="row">
|
48
|
+
<div class="span4">
|
49
|
+
<h4><%=tr("Support for over 250 languages") %></h4>
|
50
|
+
<p><%=tr("All browser supported language are included. Just choose which languages you want to enabled on your app.") %></p>
|
51
|
+
</div>
|
52
|
+
<div class="span4">
|
53
|
+
<h4><%=tr("Inline translation tools") %></h4>
|
54
|
+
<p><%=tr("Intuitive translation tools allow your users to easily translate your website.") %></p>
|
55
|
+
</div>
|
56
|
+
<div class="span4">
|
57
|
+
<h4><%=tr("Translation management") %></h4>
|
58
|
+
<p><%=tr("Keep track of all the translated text on your website, through an easy to use dashboard.") %></p>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div class="row">
|
63
|
+
<div class="span4">
|
64
|
+
<h4><%=tr("Translation ranking system") %></h4>
|
65
|
+
<p><%=tr("Translators vote on translations and the best translations are used in your application.") %></p>
|
66
|
+
</div>
|
67
|
+
<div class="span4">
|
68
|
+
<h4><%=tr("Translator ranking system") %></h4>
|
69
|
+
<p><%=tr("Translators are ranked based on the quality of the work they do. The higher the rank the more valuable they become.") %></p>
|
70
|
+
</div>
|
71
|
+
<div class="span4">
|
72
|
+
<h4><%=tr("Powerful Metrics") %></h4>
|
73
|
+
<p><%=tr("Stay up to date on the progress of your translations.") %></p>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
<div class="row">
|
78
|
+
<div class="span4">
|
79
|
+
<h4><%=tr("Translation Markup Language") %></h4>
|
80
|
+
<p><%=tr("TML syntax makes developers happy - it simplifies the code and allows to encode complex rules using simple structures.") %></p>
|
81
|
+
</div>
|
82
|
+
<div class="span4">
|
83
|
+
<h4><%=tr("Language Context Rules") %></h4>
|
84
|
+
<p><%=tr("Tr8n supports all language rules to make translations very accurate.") %></p>
|
85
|
+
</div>
|
86
|
+
<div class="span4">
|
87
|
+
<h4><%=tr("Language Cases") %></h4>
|
88
|
+
<p><%=tr("Language cases are supported across all languages to make translations sound as native as they can be.") %></p>
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div class="row">
|
93
|
+
<div class="span4">
|
94
|
+
<h4><%= tr("Glossary") %></h4>
|
95
|
+
<p><%=tr("Create a glossary of the key terms of your application. Translators will see those terms and will be able to provide more accurate translations.") %></p>
|
96
|
+
</div>
|
97
|
+
<div class="span4">
|
98
|
+
<h4><%=tr("Language Discussion Boards") %></h4>
|
99
|
+
<p><%=tr("Translators can discuss translations and terms in the message boards across all languages.") %></p>
|
100
|
+
</div>
|
101
|
+
<div class="span4">
|
102
|
+
<h4><%=tr("Admin Tools") %></h4>
|
103
|
+
<p><%=tr("Administration tools allow you to configure every aspect of your application.") %></p>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<hr>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<% if flash[:trfn] %>
|
2
|
+
<div id="flash_notice">
|
3
|
+
<div class="alert alert-success strong">
|
4
|
+
<%=link_to_function("×", "$('#flash_notice').hide();", :class => "close") %>
|
5
|
+
<%= flash[:trfn] %>
|
6
|
+
</div>
|
7
|
+
<%flash[:trfn] = nil%>
|
8
|
+
</div>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<% if flash[:trfe] %>
|
12
|
+
<div id="flash_error">
|
13
|
+
<div class="alert alert-danger strong">
|
14
|
+
<%=link_to_function("×", "$('#flash_error').hide();", :class => "close") %>
|
15
|
+
<%= flash[:trfe] %>
|
16
|
+
</div>
|
17
|
+
<%flash[:trfe] = nil%>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
<% if flash[:trfw] %>
|
22
|
+
<div id="flash_warning">
|
23
|
+
<div class="alert strong">
|
24
|
+
<%=link_to_function("×", "$('#flash_warning').hide();", :class => "close") %>
|
25
|
+
<%= flash[:trfw] %>
|
26
|
+
</div>
|
27
|
+
<%flash[:trfw] = nil%>
|
28
|
+
</div>
|
29
|
+
<% end %>
|
30
|
+
|
31
|
+
<noscript>
|
32
|
+
<div class="flash_error alert danger">
|
33
|
+
<%=tr("This site requires JavaScript! Please enable JavaScript in your browser's settings to use this part of the site.")%>
|
34
|
+
</div>
|
35
|
+
</noscript>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<style>
|
2
|
+
#navlist li {
|
3
|
+
display: inline;
|
4
|
+
list-style-type: none;
|
5
|
+
padding-right: 10px;
|
6
|
+
}
|
7
|
+
</style>
|
8
|
+
|
9
|
+
<footer>
|
10
|
+
<div class="container">
|
11
|
+
<ul id="navlist" style="float:right;">
|
12
|
+
<li><%=link_to(tr("Documentation"), "http://wiki.tr8nhub.com", :class => "quiet")%></li>
|
13
|
+
|
14
|
+
<li><%=image_tag('github.png')%> <%=link_to(tr("Source"), "http://github.com/tr8n", :class => "quiet")%></li>
|
15
|
+
<li><%=image_tag('wordpress.png')%> <%=link_to(tr("Blog"), "http://blog.tr8nhub.com", :class => "quiet")%></li>
|
16
|
+
<li><%=image_tag('facebook.png')%> <%=link_to(tr("Facebook"), "http://www.facebook.com/pages/Tr8n-Translation-Engine/138407706218622", :class => "quiet")%></li>
|
17
|
+
<li><%=image_tag('twitter.png')%> <%=link_to(tr("Twitter"), "http://twitter.com/Tr8nHub", :class => "quiet")%></li>
|
18
|
+
<li><%=image_tag('linkedin.png')%> <%=link_to(tr("LinkedIn"), "http://www.linkedin.com/groups/Internationalizing-your-application-using-Tr8n-4090552?gid=4090552", :class => "quiet")%></li>
|
19
|
+
|
20
|
+
<!-- li><%=link_to(tr("Extensions"), "/extensions", :class => "quiet")%></li -->
|
21
|
+
</ul>
|
22
|
+
|
23
|
+
© <%=link_to("Tr8nHub.com", "http://www.tr8nhub.com", :class => "quiet")%> 2013
|
24
|
+
</div>
|
25
|
+
</footer>
|
26
|
+
|
27
|
+
<div style="padding-top:30px;">
|
28
|
+
<%= tr8n_language_strip_tag %>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<%= render :partial => "/tr8n_client_sdk/tags/powered_by_tr8n" %>
|