fast_gettext 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fast_gettext/cache.rb +42 -0
- data/lib/fast_gettext/storage.rb +28 -55
- data/lib/fast_gettext/version.rb +1 -1
- metadata +105 -73
- data/.gitignore +0 -2
- data/.travis.yml +0 -17
- data/Appraisals +0 -8
- data/CHANGELOG +0 -8
- data/Gemfile +0 -10
- data/Gemfile.lock +0 -52
- data/Rakefile +0 -25
- data/Readme.md +0 -261
- data/benchmark/base.rb +0 -46
- data/benchmark/baseline.rb +0 -5
- data/benchmark/fast_gettext.rb +0 -18
- data/benchmark/i18n_simple.rb +0 -8
- data/benchmark/ideal.rb +0 -24
- data/benchmark/locale/de.yml +0 -126
- data/benchmark/locale/de/LC_MESSAGES/large.mo +0 -0
- data/benchmark/misc/threadsave.rb +0 -21
- data/benchmark/namespace/fast_gettext.rb +0 -15
- data/benchmark/namespace/original.rb +0 -14
- data/benchmark/original.rb +0 -22
- data/examples/db/migration.rb +0 -22
- data/examples/missing_translation_logger.rb +0 -13
- data/fast_gettext.gemspec +0 -12
- data/gemfiles/rails23.gemfile +0 -14
- data/gemfiles/rails23.gemfile.lock +0 -56
- data/gemfiles/rails32.gemfile +0 -14
- data/gemfiles/rails32.gemfile.lock +0 -112
- data/gemfiles/rails40.gemfile +0 -15
- data/gemfiles/rails40.gemfile.lock +0 -110
- data/spec/aa_unconfigued_spec.rb +0 -21
- data/spec/cases/fake_load_path/iconv.rb +0 -2
- data/spec/cases/iconv_fallback.rb +0 -22
- data/spec/cases/interpolate_i18n_after_fast_gettext.rb +0 -7
- data/spec/cases/interpolate_i18n_before_fast_gettext.rb +0 -9
- data/spec/cases/safe_mode_can_handle_locales.rb +0 -5
- data/spec/fast_gettext/mo_file_spec.rb +0 -35
- data/spec/fast_gettext/po_file_spec.rb +0 -35
- data/spec/fast_gettext/storage_spec.rb +0 -386
- data/spec/fast_gettext/translation_repository/base_spec.rb +0 -24
- data/spec/fast_gettext/translation_repository/chain_spec.rb +0 -98
- data/spec/fast_gettext/translation_repository/db_spec.rb +0 -114
- data/spec/fast_gettext/translation_repository/logger_spec.rb +0 -40
- data/spec/fast_gettext/translation_repository/mo_spec.rb +0 -58
- data/spec/fast_gettext/translation_repository/po_spec.rb +0 -65
- data/spec/fast_gettext/translation_repository/yaml_spec.rb +0 -84
- data/spec/fast_gettext/translation_repository_spec.rb +0 -33
- data/spec/fast_gettext/translation_spec.rb +0 -363
- data/spec/fast_gettext/vendor/iconv_spec.rb +0 -7
- data/spec/fast_gettext/vendor/string_spec.rb +0 -101
- data/spec/fast_gettext_spec.rb +0 -51
- data/spec/fuzzy_locale/de/test.po +0 -22
- data/spec/locale/de/LC_MESSAGES/test.mo +0 -0
- data/spec/locale/de/LC_MESSAGES/test2.mo +0 -0
- data/spec/locale/de/test.po +0 -74
- data/spec/locale/de/test2.po +0 -64
- data/spec/locale/en/LC_MESSAGES/plural_test.mo +0 -0
- data/spec/locale/en/LC_MESSAGES/test.mo +0 -0
- data/spec/locale/en/plural_test.po +0 -20
- data/spec/locale/en/test.po +0 -59
- data/spec/locale/gsw_CH/LC_MESSAGES/test.mo +0 -0
- data/spec/locale/gsw_CH/test.po +0 -61
- data/spec/locale/yaml/de.yml +0 -25
- data/spec/locale/yaml/de2.yml +0 -25
- data/spec/locale/yaml/en.yml +0 -21
- data/spec/locale/yaml/notfound.yml +0 -2
- data/spec/obsolete_locale/de/test.po +0 -21
- data/spec/spec_helper.rb +0 -42
- data/spec/support/be_accessible_matcher.rb +0 -8
@@ -1,21 +0,0 @@
|
|
1
|
-
# SOME DESCRIPTIVE TITLE.
|
2
|
-
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
3
|
-
# This file is distributed under the same license as the PACKAGE package.
|
4
|
-
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
5
|
-
#
|
6
|
-
#, fuzzy
|
7
|
-
msgid ""
|
8
|
-
msgstr ""
|
9
|
-
"Project-Id-Version: version 0.0.1\n"
|
10
|
-
"POT-Creation-Date: 2009-02-26 19:50+0100\n"
|
11
|
-
"PO-Revision-Date: 2009-02-18 14:53+0100\n"
|
12
|
-
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13
|
-
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14
|
-
"MIME-Version: 1.0\n"
|
15
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
16
|
-
"Content-Transfer-Encoding: 8bit\n"
|
17
|
-
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
18
|
-
|
19
|
-
#: app/helpers/translation_helper.rb:3
|
20
|
-
#~ msgid "%{relative_time} ago"
|
21
|
-
#~ msgstr "vor %{relative_time}"
|
data/spec/spec_helper.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
# $VERBOSE = true # ignore complaints in spec files
|
2
|
-
|
3
|
-
# ---- requirements
|
4
|
-
$LOAD_PATH.unshift File.expand_path("../lib", File.dirname(__FILE__))
|
5
|
-
require 'fast_gettext'
|
6
|
-
|
7
|
-
# ---- revert to defaults
|
8
|
-
RSpec.configure do |config|
|
9
|
-
config.before do
|
10
|
-
FastGettext.default_available_locales = nil
|
11
|
-
FastGettext.available_locales = nil
|
12
|
-
FastGettext.locale = 'de'
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def default_setup
|
17
|
-
# make sure all tests are really independent
|
18
|
-
Thread.current[:fast_gettext_text_domain] = nil
|
19
|
-
Thread.current[:fast_gettext__locale] = nil
|
20
|
-
Thread.current[:fast_gettext_available_locales] = nil
|
21
|
-
Thread.current[:fast_gettext_pluralisation_rule] = nil
|
22
|
-
Thread.current[:fast_gettext_current_cache] = nil
|
23
|
-
FastGettext.send(:class_variable_set, :@@translation_repositories, {})
|
24
|
-
FastGettext.send(:class_variable_set, :@@caches, {})
|
25
|
-
FastGettext.add_text_domain('test',:path=>File.join(File.dirname(__FILE__),'locale'))
|
26
|
-
FastGettext.text_domain = 'test'
|
27
|
-
FastGettext.available_locales = ['en','de','gsw_CH']
|
28
|
-
FastGettext.locale = 'de'
|
29
|
-
FastGettext.send(:update_current_cache)
|
30
|
-
end
|
31
|
-
|
32
|
-
def pending_if(condition, *args)
|
33
|
-
if condition
|
34
|
-
pending(*args) { yield }
|
35
|
-
else
|
36
|
-
yield
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
def setup_extra_domain
|
41
|
-
FastGettext.add_text_domain('test2',:path=>File.join(File.dirname(__FILE__),'locale'))
|
42
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
RSpec::Matchers.define :be_accessible do |attribute|
|
2
|
-
match do |response|
|
3
|
-
response.class.accessible_attributes.include?(attribute.to_s)
|
4
|
-
end
|
5
|
-
description { "be accessible :#{attribute}" }
|
6
|
-
failure_message_for_should { ":#{attribute} should be accessible" }
|
7
|
-
failure_message_for_should_not { ":#{attribute} should not be accessible" }
|
8
|
-
end
|