middleman-core 3.0.0.beta.2 → 3.0.0.beta.3
Sign up to get free protection for your applications and to get access to all the features.
- data/features/cli_extension.feature +13 -0
- data/features/{cli.feature → cli_init.feature} +1 -10
- data/features/directory_index.feature +29 -1
- data/features/dynamic_pages.feature +1 -0
- data/features/extensionless_text_files.feature +0 -2
- data/features/front-matter.feature +17 -1
- data/features/frontmatter_page_settings.feature +16 -1
- data/features/helpers_relative_link_to.feature +68 -0
- data/features/unicode_filenames.feature +14 -0
- data/fixtures/csspie/config.rb +0 -0
- data/fixtures/csspie/source/stylesheets/PIE.htc +96 -0
- data/fixtures/dynamic-pages-app/config.rb +3 -0
- data/fixtures/frontmatter-app/source/front-matter-auto.erb +6 -0
- data/fixtures/frontmatter-app/source/front-matter.html.erb +2 -0
- data/fixtures/frontmatter-app/source/json-front-matter-2.php.erb +7 -0
- data/fixtures/frontmatter-app/source/json-front-matter-auto.erb +6 -0
- data/fixtures/frontmatter-app/source/json-front-matter.html.erb +6 -0
- data/fixtures/unicode-filenames-app/config.rb +1 -0
- data/fixtures/unicode-filenames-app/source/snowmen-rule-/342/230/203.html +4 -0
- data/lib/middleman-core/application.rb +43 -335
- data/lib/middleman-core/cli/build.rb +11 -4
- data/lib/middleman-core/cli/bundler.rb +40 -0
- data/lib/middleman-core/cli/extension.rb +36 -0
- data/lib/middleman-core/cli/server.rb +2 -2
- data/lib/middleman-core/cli.rb +2 -6
- data/lib/middleman-core/core_extensions/assets.rb +35 -31
- data/lib/middleman-core/core_extensions/builder.rb +14 -9
- data/lib/middleman-core/core_extensions/data.rb +150 -145
- data/lib/middleman-core/core_extensions/default_helpers.rb +159 -97
- data/lib/middleman-core/core_extensions/extensions.rb +103 -97
- data/lib/middleman-core/core_extensions/external_helpers.rb +27 -23
- data/lib/middleman-core/core_extensions/file_watcher.rb +140 -110
- data/lib/middleman-core/core_extensions/front_matter.rb +155 -175
- data/lib/middleman-core/core_extensions/i18n.rb +111 -102
- data/lib/middleman-core/core_extensions/rendering.rb +293 -295
- data/lib/middleman-core/core_extensions/request.rb +338 -0
- data/lib/middleman-core/core_extensions/routing.rb +72 -68
- data/lib/middleman-core/core_extensions/show_exceptions.rb +23 -18
- data/lib/middleman-core/core_extensions.rb +39 -0
- data/lib/middleman-core/extensions/directory_indexes.rb +1 -4
- data/lib/middleman-core/extensions/lorem.rb +10 -3
- data/lib/middleman-core/extensions.rb +2 -64
- data/lib/middleman-core/preview_server.rb +157 -0
- data/lib/middleman-core/sitemap/extensions/ignores.rb +73 -68
- data/lib/middleman-core/sitemap/extensions/on_disk.rb +65 -58
- data/lib/middleman-core/sitemap/extensions/proxies.rb +86 -75
- data/lib/middleman-core/sitemap/extensions/traversal.rb +68 -61
- data/lib/middleman-core/sitemap/resource.rb +123 -102
- data/lib/middleman-core/sitemap/store.rb +170 -149
- data/lib/middleman-core/sitemap.rb +57 -57
- data/lib/middleman-core/step_definitions/server_steps.rb +13 -3
- data/lib/middleman-core/templates/extension/Gemfile +4 -0
- data/lib/middleman-core/templates/extension/Rakefile +12 -0
- data/lib/middleman-core/templates/extension/features/support/env.rb +4 -0
- data/lib/middleman-core/templates/extension/gemspec +24 -0
- data/lib/middleman-core/templates/extension/lib/lib.rb +49 -0
- data/lib/middleman-core/templates/extension/lib/middleman_extension.rb +1 -0
- data/lib/middleman-core/templates/shared/gitignore +14 -0
- data/lib/middleman-core/templates.rb +14 -8
- data/lib/middleman-core/util.rb +31 -9
- data/lib/middleman-core/version.rb +1 -1
- data/lib/middleman-core.rb +6 -4
- data/middleman-core.gemspec +4 -6
- metadata +62 -203
- data/lib/middleman-core/vendor/padrino-core-0.10.6/.document +0 -5
- data/lib/middleman-core/vendor/padrino-core-0.10.6/.gitignore +0 -22
- data/lib/middleman-core/vendor/padrino-core-0.10.6/.yardopts +0 -1
- data/lib/middleman-core/vendor/padrino-core-0.10.6/LICENSE.txt +0 -20
- data/lib/middleman-core/vendor/padrino-core-0.10.6/README.rdoc +0 -294
- data/lib/middleman-core/vendor/padrino-core-0.10.6/Rakefile +0 -5
- data/lib/middleman-core/vendor/padrino-core-0.10.6/bin/padrino +0 -9
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/application/rendering.rb +0 -292
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/application/routing.rb +0 -943
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/application/showexceptions.rb +0 -20
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/application.rb +0 -269
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/caller.rb +0 -53
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/adapter.rb +0 -24
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/base.rb +0 -150
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/console.rb +0 -20
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/rake.rb +0 -24
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/cli/rake_tasks.rb +0 -59
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/command.rb +0 -38
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/images/404.png +0 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/images/500.png +0 -0
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/loader.rb +0 -211
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/cs.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/da.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/de.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/en.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/es.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/fr.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/hu.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/it.yml +0 -40
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/ja.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/lv.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/nl.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/no.yml +0 -35
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/pl.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/pt_br.yml +0 -40
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/ru.yml +0 -35
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/tr.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/uk.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/zh_cn.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/locale/zh_tw.yml +0 -34
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/logger.rb +0 -428
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/mounter.rb +0 -224
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/reloader.rb +0 -254
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/router.rb +0 -98
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/server.rb +0 -79
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/support_lite.rb +0 -199
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/tasks.rb +0 -21
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core/version.rb +0 -20
- data/lib/middleman-core/vendor/padrino-core-0.10.6/lib/padrino-core.rb +0 -152
- data/lib/middleman-core/vendor/padrino-core-0.10.6/padrino-core.gemspec +0 -38
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/apps/.components +0 -6
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/apps/.gitignore +0 -7
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/apps/complex.rb +0 -32
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/apps/simple.rb +0 -33
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/a.rb +0 -9
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/b.rb +0 -4
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/c.rb +0 -1
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/circular/e.rb +0 -13
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/circular/f.rb +0 -2
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/circular/g.rb +0 -2
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/fixtures/dependencies/d.rb +0 -4
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/helper.rb +0 -83
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/mini_shoulda.rb +0 -45
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_application.rb +0 -108
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_core.rb +0 -77
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_dependencies.rb +0 -44
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_filters.rb +0 -278
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_locale.rb +0 -21
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_logger.rb +0 -154
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_mounter.rb +0 -177
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_reloader_complex.rb +0 -75
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_reloader_simple.rb +0 -98
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_rendering.rb +0 -461
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_restful_routing.rb +0 -33
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_router.rb +0 -146
- data/lib/middleman-core/vendor/padrino-core-0.10.6/test/test_routing.rb +0 -1680
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/.document +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/.gitignore +0 -21
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/.yardopts +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/LICENSE.txt +0 -20
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/README.rdoc +0 -239
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/Rakefile +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/asset_tag_helpers.rb +0 -417
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/form_builder/abstract_form_builder.rb +0 -251
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/form_builder/standard_form_builder.rb +0 -43
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/form_helpers.rb +0 -787
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/format_helpers.rb +0 -381
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/cs.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/da.yml +0 -91
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/de.yml +0 -81
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/en.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/es.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/fr.yml +0 -80
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/hu.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/it.yml +0 -89
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/ja.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/lv.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/nl.yml +0 -82
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/no.yml +0 -91
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/pl.yml +0 -95
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/pt_br.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/ru.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/tr.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/uk.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/zh_cn.yml +0 -104
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/locale/zh_tw.yml +0 -103
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/number_helpers.rb +0 -288
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers/abstract_handler.rb +0 -98
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers/erb_handler.rb +0 -79
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers/haml_handler.rb +0 -63
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers/slim_handler.rb +0 -81
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/output_helpers.rb +0 -175
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/render_helpers.rb +0 -60
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/tag_helpers.rb +0 -260
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers/translation_helpers.rb +0 -38
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/lib/padrino-helpers.rb +0 -59
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/padrino-helpers.gemspec +0 -27
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/app.rb +0 -73
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/capture_concat.erb +0 -14
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/capture_concat.haml +0 -12
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/capture_concat.slim +0 -13
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_for.erb +0 -14
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_for.haml +0 -12
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_for.slim +0 -12
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_tag.erb +0 -11
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_tag.haml +0 -9
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/content_tag.slim +0 -9
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/current_engine.erb +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/current_engine.haml +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/current_engine.slim +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/fields_for.erb +0 -20
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/fields_for.haml +0 -15
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/fields_for.slim +0 -15
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_for.erb +0 -72
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_for.haml +0 -59
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_for.slim +0 -59
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_tag.erb +0 -86
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_tag.haml +0 -70
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/form_tag.slim +0 -70
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/link_to.erb +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/link_to.haml +0 -4
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/link_to.slim +0 -4
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/mail_to.erb +0 -3
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/mail_to.haml +0 -3
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/mail_to.slim +0 -3
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/meta_tag.erb +0 -3
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/meta_tag.haml +0 -3
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/meta_tag.slim +0 -3
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/partials/_erb.erb +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/partials/_haml.haml +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/partials/_slim.slim +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/simple_partial.erb +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/simple_partial.haml +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/markup_app/views/simple_partial.slim +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/app.rb +0 -50
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/current_engine.haml +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/current_engines/_erb.erb +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/current_engines/_haml.haml +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/current_engines/_slim.slim +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/erb/test.erb +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/explicit_engine.haml +0 -5
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/haml/test.haml +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/template/_user.haml +0 -7
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/template/haml_template.haml +0 -1
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/fixtures/render_app/views/template/some_template.haml +0 -2
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/helper.rb +0 -66
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_asset_tag_helpers.rb +0 -328
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_form_builder.rb +0 -1106
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_form_helpers.rb +0 -770
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_format_helpers.rb +0 -227
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_locale.rb +0 -20
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_number_helpers.rb +0 -139
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_output_helpers.rb +0 -153
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_render_helpers.rb +0 -76
- data/lib/middleman-core/vendor/padrino-helpers-0.10.6/test/test_tag_helpers.rb +0 -106
- data/lib/middleman-core/watcher.rb +0 -196
@@ -1,381 +0,0 @@
|
|
1
|
-
module Padrino
|
2
|
-
module Helpers
|
3
|
-
###
|
4
|
-
# Helpers related to formatting or manipulating text within templates.
|
5
|
-
#
|
6
|
-
module FormatHelpers
|
7
|
-
##
|
8
|
-
# Returns escaped text to protect against malicious content
|
9
|
-
#
|
10
|
-
# @param [String] text
|
11
|
-
# Unsanitized HTML string that needs to be escaped.
|
12
|
-
#
|
13
|
-
# @return [String] HTML with escaped characters.
|
14
|
-
#
|
15
|
-
# @example
|
16
|
-
# escape_html("<b>Hey<b>") => "<b>Hey<b;gt;"
|
17
|
-
# h("Me & Bob") => "Me & Bob"
|
18
|
-
#
|
19
|
-
# @api public
|
20
|
-
def escape_html(text)
|
21
|
-
Rack::Utils.escape_html(text)
|
22
|
-
end
|
23
|
-
alias h escape_html
|
24
|
-
alias sanitize_html escape_html
|
25
|
-
|
26
|
-
##
|
27
|
-
# Returns escaped text to protect against malicious content
|
28
|
-
# Returns blank if the text is empty
|
29
|
-
#
|
30
|
-
# @param [String] text
|
31
|
-
# Unsanitized HTML string that needs to be escaped.
|
32
|
-
# @param [String] blank_text
|
33
|
-
# Text to return if escaped text is blank.
|
34
|
-
#
|
35
|
-
# @return [String] HTML with escaped characters or the value specified if blank.
|
36
|
-
#
|
37
|
-
# @example
|
38
|
-
# h!("Me & Bob") => "Me & Bob"
|
39
|
-
# h!("", "Whoops") => "Whoops"
|
40
|
-
#
|
41
|
-
# @api public
|
42
|
-
def h!(text, blank_text = ' ')
|
43
|
-
return blank_text if text.nil? || text.empty?
|
44
|
-
h text
|
45
|
-
end
|
46
|
-
|
47
|
-
##
|
48
|
-
# Strips all HTML tags from the html
|
49
|
-
#
|
50
|
-
# @param [String] html
|
51
|
-
# The HTML for which to strip tags.
|
52
|
-
#
|
53
|
-
# @return [String] HTML with tags stripped.
|
54
|
-
#
|
55
|
-
# @example
|
56
|
-
# strip_tags("<b>Hey</b>") => "Hey"
|
57
|
-
#
|
58
|
-
# @api public
|
59
|
-
def strip_tags(html)
|
60
|
-
html.gsub(/<\/?[^>]*>/, "") if html
|
61
|
-
end
|
62
|
-
|
63
|
-
##
|
64
|
-
# Returns text transformed into HTML using simple formatting rules. Two or more consecutive newlines(\n\n) are considered
|
65
|
-
# as a paragraph and wrapped in <p> or your own tags. One newline (\n) is considered as a linebreak and a <br /> tag is appended.
|
66
|
-
# This method does not remove the newlines from the text.
|
67
|
-
#
|
68
|
-
# @param [String] text
|
69
|
-
# The simple text to be formatted.
|
70
|
-
# @param [Hash] options
|
71
|
-
# Formatting options for the text. Can accept html options for the wrapper tag.
|
72
|
-
# @option options [Symbol] :tag (p)
|
73
|
-
# The html tag to use for formatting newlines.
|
74
|
-
#
|
75
|
-
# @return [String] The text formatted as simple HTML.
|
76
|
-
#
|
77
|
-
# @example
|
78
|
-
# simple_format("hello\nworld") # => "<p>hello<br/>world</p>"
|
79
|
-
# simple_format("hello\nworld", :tag => :div, :class => :foo) # => "<div class="foo">hello<br/>world</div>"
|
80
|
-
#
|
81
|
-
# @api public
|
82
|
-
def simple_format(text, options={})
|
83
|
-
t = options.delete(:tag) || :p
|
84
|
-
start_tag = tag(t, options, true)
|
85
|
-
text = text.to_s.dup
|
86
|
-
text.gsub!(/\r\n?/, "\n") # \r\n and \r -> \n
|
87
|
-
text.gsub!(/\n\n+/, "</#{t}>\n\n#{start_tag}") # 2+ newline -> paragraph
|
88
|
-
text.gsub!(/([^\n]\n)(?=[^\n])/, '\1<br />') # 1 newline -> br
|
89
|
-
text.insert 0, start_tag
|
90
|
-
text << "</#{t}>"
|
91
|
-
end
|
92
|
-
|
93
|
-
##
|
94
|
-
# Attempts to pluralize the singular word unless count is 1. If plural is supplied, it will use that when count is > 1,
|
95
|
-
# otherwise it will use the Inflector to determine the plural form
|
96
|
-
#
|
97
|
-
# @param [Fixnum] count
|
98
|
-
# The count which determines pluralization.
|
99
|
-
# @param [String] singular
|
100
|
-
# The word to be pluralized if appropriate based on +count+.
|
101
|
-
# @param [String] plural
|
102
|
-
# Explicit pluralized word to be used; if not specified uses inflector.
|
103
|
-
#
|
104
|
-
# @return [String] The properly pluralized word.
|
105
|
-
#
|
106
|
-
# @example
|
107
|
-
# pluralize(2, 'person') => '2 people'
|
108
|
-
#
|
109
|
-
# @api public
|
110
|
-
def pluralize(count, singular, plural = nil)
|
111
|
-
"#{count || 0} " + ((count == 1 || count == '1') ? singular : (plural || singular.pluralize))
|
112
|
-
end
|
113
|
-
|
114
|
-
##
|
115
|
-
# Truncates a given text after a given :length if text is longer than :length (defaults to 30).
|
116
|
-
# The last characters will be replaced with the :omission (defaults to "…") for a total length not exceeding :length.
|
117
|
-
#
|
118
|
-
# @param [String] text
|
119
|
-
# The text to be truncated.
|
120
|
-
# @param [Hash] options
|
121
|
-
# Formatting options for the truncation.
|
122
|
-
# @option options [Fixnum] :length (30)
|
123
|
-
# The number of characters before truncation occurs.
|
124
|
-
# @option options [String] :omission ("...")
|
125
|
-
# The characters that are placed after the truncated text.
|
126
|
-
#
|
127
|
-
# @return [String] The text truncated after the given number of characters.
|
128
|
-
#
|
129
|
-
# @example
|
130
|
-
# truncate("Once upon a time in a world far far away", :length => 8) => "Once upon..."
|
131
|
-
#
|
132
|
-
# @api public
|
133
|
-
def truncate(text, options={})
|
134
|
-
options.reverse_merge!(:length => 30, :omission => "...")
|
135
|
-
if text
|
136
|
-
len = options[:length] - options[:omission].length
|
137
|
-
chars = text
|
138
|
-
(chars.length > options[:length] ? chars[0...len] + options[:omission] : text).to_s
|
139
|
-
end
|
140
|
-
end
|
141
|
-
|
142
|
-
##
|
143
|
-
# Truncates words of a given text after a given :length if number of words in text is more than :length (defaults to 30).
|
144
|
-
# The last words will be replaced with the :omission (defaults to "…") for a total number of words not exceeding :length.
|
145
|
-
#
|
146
|
-
# @param [String] text
|
147
|
-
# The text to be truncated.
|
148
|
-
# @param [Hash] options
|
149
|
-
# Formatting options for the truncation.
|
150
|
-
# @option options [Fixnum] :length (30)
|
151
|
-
# The number of words before truncation occurs.
|
152
|
-
# @option options [String] :omission ("...")
|
153
|
-
# The characters that are placed after the truncated text.
|
154
|
-
#
|
155
|
-
# @return [String] The text truncated after the given number of words.
|
156
|
-
#
|
157
|
-
# @example
|
158
|
-
# truncate_words("Once upon a time in a world far far away", :length => 8) => "Once upon a time in a world far..."
|
159
|
-
#
|
160
|
-
# @api public
|
161
|
-
def truncate_words(text, options={})
|
162
|
-
options.reverse_merge!(:length => 30, :omission => "...")
|
163
|
-
if text
|
164
|
-
words = text.split()
|
165
|
-
words[0..(options[:length]-1)].join(' ') + (words.length > options[:length] ? options[:omission] : '')
|
166
|
-
end
|
167
|
-
end
|
168
|
-
|
169
|
-
##
|
170
|
-
# Wraps the text into lines no longer than line_width width.
|
171
|
-
# This method breaks on the first whitespace character that does not exceed line_width (which is 80 by default).
|
172
|
-
#
|
173
|
-
# @overload word_wrap(text, options={})
|
174
|
-
# @param [String] text
|
175
|
-
# The text to be wrapped.
|
176
|
-
# @param [Hash] options
|
177
|
-
# Formatting options for the wrapping.
|
178
|
-
# @option options [Fixnum] :line_width (80)
|
179
|
-
# The line width before a wrap should occur.
|
180
|
-
#
|
181
|
-
# @return [String] The text with line wraps for lines longer then +line_width+
|
182
|
-
#
|
183
|
-
# @example
|
184
|
-
# word_wrap('Once upon a time', :line_width => 8) => "Once upon\na time"
|
185
|
-
#
|
186
|
-
# @api public
|
187
|
-
def word_wrap(text, *args)
|
188
|
-
options = args.extract_options!
|
189
|
-
unless args.blank?
|
190
|
-
options[:line_width] = args[0] || 80
|
191
|
-
end
|
192
|
-
options.reverse_merge!(:line_width => 80)
|
193
|
-
|
194
|
-
text.split("\n").map do |line|
|
195
|
-
line.length > options[:line_width] ? line.gsub(/(.{1,#{options[:line_width]}})(\s+|$)/, "\\1\n").strip : line
|
196
|
-
end * "\n"
|
197
|
-
end
|
198
|
-
|
199
|
-
##
|
200
|
-
# Highlights one or more words everywhere in text by inserting it into a :highlighter string.
|
201
|
-
#
|
202
|
-
# The highlighter can be customized by passing :+highlighter+ as a single-quoted string
|
203
|
-
# with \1 where the phrase is to be inserted.
|
204
|
-
#
|
205
|
-
# @overload highlight(text, words, options={})
|
206
|
-
# @param [String] text
|
207
|
-
# The text that will be searched.
|
208
|
-
# @param [String] words
|
209
|
-
# The words to be highlighted in the +text+.
|
210
|
-
# @param [Hash] options
|
211
|
-
# Formatting options for the highlight.
|
212
|
-
# @option options [String] :highlighter ('<strong class="highlight">\1</strong>')
|
213
|
-
# The html pattern for wrapping the highlighted words.
|
214
|
-
#
|
215
|
-
# @return [String] The text with the words specified wrapped with highlighted spans.
|
216
|
-
#
|
217
|
-
# @example
|
218
|
-
# highlight('Lorem ipsum dolor sit amet', 'dolor')
|
219
|
-
# # => Lorem ipsum <strong class="highlight">dolor</strong> sit amet
|
220
|
-
#
|
221
|
-
# highlight('Lorem ipsum dolor sit amet', 'dolor', :highlighter => '<span class="custom">\1</span>')
|
222
|
-
# # => Lorem ipsum <strong class="custom">dolor</strong> sit amet
|
223
|
-
#
|
224
|
-
# @api public
|
225
|
-
def highlight(text, words, *args)
|
226
|
-
options = args.extract_options!
|
227
|
-
options.reverse_merge!(:highlighter => '<strong class="highlight">\1</strong>')
|
228
|
-
|
229
|
-
if text.blank? || words.blank?
|
230
|
-
text
|
231
|
-
else
|
232
|
-
match = Array(words).map { |p| Regexp.escape(p) }.join('|')
|
233
|
-
text.gsub(/(#{match})(?!(?:[^<]*?)(?:["'])[^<>]*>)/i, options[:highlighter])
|
234
|
-
end
|
235
|
-
end
|
236
|
-
|
237
|
-
##
|
238
|
-
# Reports the approximate distance in time between two Time or Date objects or integers as seconds.
|
239
|
-
# Set +include_seconds+ to true if you want more detailed approximations when distance < 1 min, 29 secs
|
240
|
-
# Distances are reported based on the following table:
|
241
|
-
#
|
242
|
-
# 0 <-> 29 secs # => less than a minute
|
243
|
-
# 30 secs <-> 1 min, 29 secs # => 1 minute
|
244
|
-
# 1 min, 30 secs <-> 44 mins, 29 secs # => [2..44] minutes
|
245
|
-
# 44 mins, 30 secs <-> 89 mins, 29 secs # => about 1 hour
|
246
|
-
# 89 mins, 29 secs <-> 23 hrs, 59 mins, 29 secs # => about [2..24] hours
|
247
|
-
# 23 hrs, 59 mins, 29 secs <-> 47 hrs, 59 mins, 29 secs # => 1 day
|
248
|
-
# 47 hrs, 59 mins, 29 secs <-> 29 days, 23 hrs, 59 mins, 29 secs # => [2..29] days
|
249
|
-
# 29 days, 23 hrs, 59 mins, 30 secs <-> 59 days, 23 hrs, 59 mins, 29 secs # => about 1 month
|
250
|
-
# 59 days, 23 hrs, 59 mins, 30 secs <-> 1 yr minus 1 sec # => [2..12] months
|
251
|
-
# 1 yr <-> 1 yr, 3 months # => about 1 year
|
252
|
-
# 1 yr, 3 months <-> 1 yr, 9 months # => over 1 year
|
253
|
-
# 1 yr, 9 months <-> 2 yr minus 1 sec # => almost 2 years
|
254
|
-
# 2 yrs <-> max time or date # => (same rules as 1 yr)
|
255
|
-
#
|
256
|
-
# With +include_seconds+ = true and the difference < 1 minute 29 seconds:
|
257
|
-
# 0-4 secs # => less than 5 seconds
|
258
|
-
# 5-9 secs # => less than 10 seconds
|
259
|
-
# 10-19 secs # => less than 20 seconds
|
260
|
-
# 20-39 secs # => half a minute
|
261
|
-
# 40-59 secs # => less than a minute
|
262
|
-
# 60-89 secs # => 1 minute
|
263
|
-
#
|
264
|
-
# @param [Time] from_time
|
265
|
-
# The time to be compared against +to_time+ in order to approximate the distance.
|
266
|
-
# @param [Time] to_time
|
267
|
-
# The time to be compared against +from_time+ in order to approximate the distance.
|
268
|
-
# @param [Boolean] include_seconds
|
269
|
-
# Set true for more detailed approximations.
|
270
|
-
# @param [Hash] options
|
271
|
-
# Flags for the approximation.
|
272
|
-
# @option options [String] :locale
|
273
|
-
# The translation locale to be used for approximating the time.
|
274
|
-
#
|
275
|
-
# @return [String] The time formatted as a relative string.
|
276
|
-
#
|
277
|
-
# @example
|
278
|
-
# from_time = Time.now
|
279
|
-
# distance_of_time_in_words(from_time, from_time + 50.minutes) # => about 1 hour
|
280
|
-
# distance_of_time_in_words(from_time, 50.minutes.from_now) # => about 1 hour
|
281
|
-
# distance_of_time_in_words(from_time, from_time + 15.seconds) # => less than a minute
|
282
|
-
# distance_of_time_in_words(from_time, from_time + 15.seconds, true) # => less than 20 seconds
|
283
|
-
# distance_of_time_in_words(from_time, 3.years.from_now) # => about 3 years
|
284
|
-
# distance_of_time_in_words(from_time, from_time + 60.hours) # => about 3 days
|
285
|
-
# distance_of_time_in_words(from_time, from_time + 45.seconds, true) # => less than a minute
|
286
|
-
# distance_of_time_in_words(from_time, from_time - 45.seconds, true) # => less than a minute
|
287
|
-
# distance_of_time_in_words(from_time, 76.seconds.from_now) # => 1 minute
|
288
|
-
# distance_of_time_in_words(from_time, from_time + 1.year + 3.days) # => about 1 year
|
289
|
-
# distance_of_time_in_words(from_time, from_time + 3.years + 6.months) # => over 3 years
|
290
|
-
# distance_of_time_in_words(from_time, from_time + 4.years + 9.days + 30.minutes + 5.seconds) # => about 4 years
|
291
|
-
# to_time = Time.now + 6.years + 19.days
|
292
|
-
# distance_of_time_in_words(from_time, to_time, true) # => about 6 years
|
293
|
-
# distance_of_time_in_words(to_time, from_time, true) # => about 6 years
|
294
|
-
# distance_of_time_in_words(Time.now, Time.now) # => less than a minute
|
295
|
-
#
|
296
|
-
# @api public
|
297
|
-
def distance_of_time_in_words(from_time, to_time = 0, include_seconds = false, options = {})
|
298
|
-
from_time = from_time.to_time if from_time.respond_to?(:to_time)
|
299
|
-
to_time = to_time.to_time if to_time.respond_to?(:to_time)
|
300
|
-
distance_in_minutes = (((to_time.to_i - from_time.to_i).abs)/60).round
|
301
|
-
distance_in_seconds = ((to_time.to_i - from_time.to_i).abs).round
|
302
|
-
|
303
|
-
I18n.with_options :locale => options[:locale], :scope => :'datetime.distance_in_words' do |locale|
|
304
|
-
case distance_in_minutes
|
305
|
-
when 0..1
|
306
|
-
return distance_in_minutes == 0 ?
|
307
|
-
locale.t(:less_than_x_minutes, :count => 1) :
|
308
|
-
locale.t(:x_minutes, :count => distance_in_minutes) unless include_seconds
|
309
|
-
|
310
|
-
case distance_in_seconds
|
311
|
-
when 0..4 then locale.t :less_than_x_seconds, :count => 5
|
312
|
-
when 5..9 then locale.t :less_than_x_seconds, :count => 10
|
313
|
-
when 10..19 then locale.t :less_than_x_seconds, :count => 20
|
314
|
-
when 20..39 then locale.t :half_a_minute
|
315
|
-
when 40..59 then locale.t :less_than_x_minutes, :count => 1
|
316
|
-
else locale.t :x_minutes, :count => 1
|
317
|
-
end
|
318
|
-
|
319
|
-
when 2..44 then locale.t :x_minutes, :count => distance_in_minutes
|
320
|
-
when 45..89 then locale.t :about_x_hours, :count => 1
|
321
|
-
when 90..1439 then locale.t :about_x_hours, :count => (distance_in_minutes.to_f / 60.0).round
|
322
|
-
when 1440..2529 then locale.t :x_days, :count => 1
|
323
|
-
when 2530..43199 then locale.t :x_days, :count => (distance_in_minutes.to_f / 1440.0).round
|
324
|
-
when 43200..86399 then locale.t :about_x_months, :count => 1
|
325
|
-
when 86400..525599 then locale.t :x_months, :count => (distance_in_minutes.to_f / 43200.0).round
|
326
|
-
else
|
327
|
-
distance_in_years = distance_in_minutes / 525600
|
328
|
-
minute_offset_for_leap_year = (distance_in_years / 4) * 1440
|
329
|
-
remainder = ((distance_in_minutes - minute_offset_for_leap_year) % 525600)
|
330
|
-
if remainder < 131400
|
331
|
-
locale.t(:about_x_years, :count => distance_in_years)
|
332
|
-
elsif remainder < 394200
|
333
|
-
locale.t(:over_x_years, :count => distance_in_years)
|
334
|
-
else
|
335
|
-
locale.t(:almost_x_years, :count => distance_in_years + 1)
|
336
|
-
end
|
337
|
-
end
|
338
|
-
end
|
339
|
-
end
|
340
|
-
|
341
|
-
##
|
342
|
-
# Like distance_of_time_in_words, but where <tt>to_time</tt> is fixed to <tt>Time.now</tt>.
|
343
|
-
#
|
344
|
-
# @param [Time] from_time
|
345
|
-
# The time to be compared against now in order to approximate the distance.
|
346
|
-
# @param [Boolean] include_seconds
|
347
|
-
# Set true for more detailed approximations.
|
348
|
-
#
|
349
|
-
# @return [String] The time formatted as a relative string.
|
350
|
-
#
|
351
|
-
# @example
|
352
|
-
# time_ago_in_words(3.minutes.from_now) # => 3 minutes
|
353
|
-
# time_ago_in_words(Time.now - 15.hours) # => 15 hours
|
354
|
-
# time_ago_in_words(Time.now) # => less than a minute
|
355
|
-
#
|
356
|
-
# @api public
|
357
|
-
def time_ago_in_words(from_time, include_seconds = false)
|
358
|
-
distance_of_time_in_words(from_time, Time.now, include_seconds)
|
359
|
-
end
|
360
|
-
|
361
|
-
##
|
362
|
-
# Used in xxxx.js.erb files to escape html so that it can be passed to javascript from Padrino
|
363
|
-
#
|
364
|
-
# @param [String] html
|
365
|
-
# The html content to be escaped into javascript compatible format.
|
366
|
-
#
|
367
|
-
# @return [String] The html escaped for javascript passing.
|
368
|
-
#
|
369
|
-
# @example
|
370
|
-
# js_escape_html("<h1>Hey</h1>")
|
371
|
-
#
|
372
|
-
# @api public
|
373
|
-
def js_escape_html(html_content)
|
374
|
-
return '' unless html_content
|
375
|
-
javascript_mapping = { '\\' => '\\\\', '</' => '<\/', "\r\n" => '\n', "\n" => '\n', "\r" => '\n', '"' => '\\"', "'" => "\\'" }
|
376
|
-
html_content.gsub(/(\\|<\/|\r\n|[\n\r"'])/) { javascript_mapping[$1] }
|
377
|
-
end
|
378
|
-
alias :escape_javascript :js_escape_html
|
379
|
-
end # FormatHelpers
|
380
|
-
end # Helpers
|
381
|
-
end # Padrino
|
@@ -1,103 +0,0 @@
|
|
1
|
-
cs:
|
2
|
-
number:
|
3
|
-
# Used in number_with_delimiter()
|
4
|
-
# These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
|
5
|
-
format:
|
6
|
-
# Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
|
7
|
-
separator: ","
|
8
|
-
# Delimets thousands (e.g. 1,000,000 is a million) (always in groups of three)
|
9
|
-
delimiter: " "
|
10
|
-
# Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00)
|
11
|
-
precision: 3
|
12
|
-
|
13
|
-
# Used in number_to_currency()
|
14
|
-
currency:
|
15
|
-
format:
|
16
|
-
# Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
|
17
|
-
format: "%n %u"
|
18
|
-
unit: "Kč"
|
19
|
-
# These three are to override number.format and are optional
|
20
|
-
separator: ","
|
21
|
-
delimiter: " "
|
22
|
-
precision: 2
|
23
|
-
|
24
|
-
# Used in number_to_percentage()
|
25
|
-
percentage:
|
26
|
-
format:
|
27
|
-
# These three are to override number.format and are optional
|
28
|
-
# separator:
|
29
|
-
delimiter: ""
|
30
|
-
# precision:
|
31
|
-
|
32
|
-
# Used in number_to_precision()
|
33
|
-
precision:
|
34
|
-
format:
|
35
|
-
# These three are to override number.format and are optional
|
36
|
-
# separator:
|
37
|
-
delimiter: ""
|
38
|
-
# precision:
|
39
|
-
|
40
|
-
# Used in number_to_human_size()
|
41
|
-
human:
|
42
|
-
format:
|
43
|
-
# These three are to override number.format and are optional
|
44
|
-
# separator:
|
45
|
-
delimiter: ""
|
46
|
-
precision: 1
|
47
|
-
storage_units:
|
48
|
-
# Storage units output formatting.
|
49
|
-
# %u is the storage unit, %n is the number (default: 2 MB)
|
50
|
-
format: "%n %u"
|
51
|
-
units:
|
52
|
-
byte:
|
53
|
-
one: "Byte"
|
54
|
-
other: "Bytes"
|
55
|
-
kb: "KB"
|
56
|
-
mb: "MB"
|
57
|
-
gb: "GB"
|
58
|
-
tb: "TB"
|
59
|
-
|
60
|
-
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
|
61
|
-
datetime:
|
62
|
-
distance_in_words:
|
63
|
-
half_a_minute: "půl minutou"
|
64
|
-
less_than_x_seconds:
|
65
|
-
one: "asi před sekundou"
|
66
|
-
other: "asi před %{count} sekundami"
|
67
|
-
x_seconds:
|
68
|
-
one: "sekundou"
|
69
|
-
other: "%{count} sekundami"
|
70
|
-
less_than_x_minutes:
|
71
|
-
one: "před necelou minutou"
|
72
|
-
other: "před ani ne %{count} minutami"
|
73
|
-
x_minutes:
|
74
|
-
one: "minutou"
|
75
|
-
other: "%{count} minutami"
|
76
|
-
about_x_hours:
|
77
|
-
one: "asi hodinou"
|
78
|
-
other: "asi %{count} hodinami"
|
79
|
-
x_days:
|
80
|
-
one: "24 hodinami"
|
81
|
-
other: "%{count} dny"
|
82
|
-
about_x_months:
|
83
|
-
one: "asi měsícem"
|
84
|
-
other: "asi %{count} měsíci"
|
85
|
-
x_months:
|
86
|
-
one: "měsícem"
|
87
|
-
other: "%{count} měsíci"
|
88
|
-
about_x_years:
|
89
|
-
one: "asi rokem"
|
90
|
-
other: "asi %{count} roky"
|
91
|
-
over_x_years:
|
92
|
-
one: "více než před rokem"
|
93
|
-
other: "více než %{count} roky"
|
94
|
-
almost_x_years:
|
95
|
-
one: "skoro rokem"
|
96
|
-
other: "almost %{count} roků"
|
97
|
-
models:
|
98
|
-
errors:
|
99
|
-
template:
|
100
|
-
header:
|
101
|
-
one: "Při ukládání %{model} došlo k chybě a nebylo jej možné uložit"
|
102
|
-
other: "Při ukládání %{model} došlo ke %{count} chybám a nebylo možné jej uložit"
|
103
|
-
body: "Následující pole obsahují chybně vyplněné údaje:"
|
@@ -1,91 +0,0 @@
|
|
1
|
-
da:
|
2
|
-
number:
|
3
|
-
format:
|
4
|
-
separator: ","
|
5
|
-
delimiter: "."
|
6
|
-
precision: 3
|
7
|
-
currency:
|
8
|
-
format:
|
9
|
-
format: "%u %n"
|
10
|
-
unit: "DKK"
|
11
|
-
separator: ","
|
12
|
-
delimiter: "."
|
13
|
-
precision: 2
|
14
|
-
precision:
|
15
|
-
format:
|
16
|
-
# separator:
|
17
|
-
delimiter: ""
|
18
|
-
# precision:
|
19
|
-
human:
|
20
|
-
format:
|
21
|
-
# separator:
|
22
|
-
delimiter: ""
|
23
|
-
precision: 1
|
24
|
-
storage_units:
|
25
|
-
# Storage units output formatting.
|
26
|
-
# %u is the storage unit, %n is the number (default: 2 MB)
|
27
|
-
format: "%n %u"
|
28
|
-
units:
|
29
|
-
byte:
|
30
|
-
one: "Byte"
|
31
|
-
other: "Bytes"
|
32
|
-
kb: "KB"
|
33
|
-
mb: "MB"
|
34
|
-
gb: "GB"
|
35
|
-
tb: "TB"
|
36
|
-
percentage:
|
37
|
-
format:
|
38
|
-
# separator:
|
39
|
-
delimiter: ""
|
40
|
-
# precision:
|
41
|
-
|
42
|
-
datetime:
|
43
|
-
distance_in_words:
|
44
|
-
half_a_minute: "et halvt minut"
|
45
|
-
less_than_x_seconds:
|
46
|
-
one: "mindre end et sekund"
|
47
|
-
other: "mindre end %{count} sekunder"
|
48
|
-
x_seconds:
|
49
|
-
one: "et sekund"
|
50
|
-
other: "%{count} sekunder"
|
51
|
-
less_than_x_minutes:
|
52
|
-
one: "mindre end et minut"
|
53
|
-
other: "mindre end %{count} minutter"
|
54
|
-
x_minutes:
|
55
|
-
one: "et minut"
|
56
|
-
other: "%{count} minutter"
|
57
|
-
about_x_hours:
|
58
|
-
one: "cirka en time"
|
59
|
-
other: "cirka %{count} timer"
|
60
|
-
x_days:
|
61
|
-
one: "en dag"
|
62
|
-
other: "%{count} dage"
|
63
|
-
about_x_months:
|
64
|
-
one: "cirka en måned"
|
65
|
-
other: "cirka %{count} måneder"
|
66
|
-
x_months:
|
67
|
-
one: "en måned"
|
68
|
-
other: "%{count} måneder"
|
69
|
-
about_x_years:
|
70
|
-
one: "cirka et år"
|
71
|
-
other: "cirka %{count} år"
|
72
|
-
over_x_years:
|
73
|
-
one: "mere end et år"
|
74
|
-
other: "mere end %{count} år"
|
75
|
-
almost_x_years:
|
76
|
-
one: "næsten et år"
|
77
|
-
other: "næsten %{count} years"
|
78
|
-
prompts:
|
79
|
-
second: "Sekund"
|
80
|
-
minute: "Minut"
|
81
|
-
hour: "Time"
|
82
|
-
day: "Dag"
|
83
|
-
month: "Måned"
|
84
|
-
year: "År"
|
85
|
-
models:
|
86
|
-
errors:
|
87
|
-
template:
|
88
|
-
header:
|
89
|
-
one: "En fejl forhindrede %{model} i at blive gemt"
|
90
|
-
other: "%{count} fejl forhindrede denne %{model} i at blive gemt"
|
91
|
-
body: "Der var problemer med følgende felter:"
|
@@ -1,81 +0,0 @@
|
|
1
|
-
de:
|
2
|
-
number:
|
3
|
-
format:
|
4
|
-
precision: 2
|
5
|
-
separator: ','
|
6
|
-
delimiter: '.'
|
7
|
-
currency:
|
8
|
-
format:
|
9
|
-
unit: '€'
|
10
|
-
format: '%n%u'
|
11
|
-
separator: ","
|
12
|
-
delimiter: "."
|
13
|
-
precision: 2
|
14
|
-
percentage:
|
15
|
-
format:
|
16
|
-
delimiter: ""
|
17
|
-
precision:
|
18
|
-
format:
|
19
|
-
delimiter: ""
|
20
|
-
human:
|
21
|
-
format:
|
22
|
-
delimiter: ""
|
23
|
-
precision: 1
|
24
|
-
storage_units:
|
25
|
-
# Storage units output formatting.
|
26
|
-
# %u is the storage unit, %n is the number (default: 2 MB)
|
27
|
-
format: "%n %u"
|
28
|
-
units:
|
29
|
-
byte:
|
30
|
-
one: "Byte"
|
31
|
-
other: "Bytes"
|
32
|
-
kb: "KB"
|
33
|
-
mb: "MB"
|
34
|
-
gb: "GB"
|
35
|
-
tb: "TB"
|
36
|
-
|
37
|
-
datetime:
|
38
|
-
distance_in_words:
|
39
|
-
half_a_minute: 'eine halbe Minute'
|
40
|
-
less_than_x_seconds:
|
41
|
-
zero: 'weniger als 1 Sekunde'
|
42
|
-
one: 'weniger als 1 Sekunde'
|
43
|
-
other: 'weniger als %{count} Sekunden'
|
44
|
-
x_seconds:
|
45
|
-
one: '1 Sekunde'
|
46
|
-
other: '%{count} Sekunden'
|
47
|
-
less_than_x_minutes:
|
48
|
-
zero: 'weniger als 1 Minute'
|
49
|
-
one: 'weniger als 1 Minute'
|
50
|
-
other: 'weniger als %{count} Minuten'
|
51
|
-
x_minutes:
|
52
|
-
one: '1 Minute'
|
53
|
-
other: '%{count} Minuten'
|
54
|
-
about_x_hours:
|
55
|
-
one: 'etwa 1 Stunde'
|
56
|
-
other: 'etwa %{count} Stunden'
|
57
|
-
x_days:
|
58
|
-
one: '1 Tag'
|
59
|
-
other: '%{count} Tage'
|
60
|
-
about_x_months:
|
61
|
-
one: 'etwa 1 Monat'
|
62
|
-
other: 'etwa %{count} Monate'
|
63
|
-
x_months:
|
64
|
-
one: '1 Monat'
|
65
|
-
other: '%{count} Monate'
|
66
|
-
about_x_years:
|
67
|
-
one: 'etwa 1 Jahr'
|
68
|
-
other: 'etwa %{count} Jahre'
|
69
|
-
over_x_years:
|
70
|
-
one: 'mehr als 1 Jahr'
|
71
|
-
other: 'mehr als %{count} Jahre'
|
72
|
-
almost_x_years:
|
73
|
-
one: 'fast ein Jahr'
|
74
|
-
other: 'fast %{count} Jahre'
|
75
|
-
models:
|
76
|
-
errors:
|
77
|
-
template:
|
78
|
-
header:
|
79
|
-
one: "1 Fehler verhindert, dass Objekt %{model} gesichert werden kann"
|
80
|
-
other: "%{count} Fehler verhindern, dass Objekt %{model} gesichert werden kann"
|
81
|
-
body: "Es existieren Probleme mit den folgenden Feldern:"
|