pax_global_header00006660000000000000000000000064130017217540014512gustar00rootroot0000000000000052 comment=73eda901fee7f2217ab03d10b1b589c83bf1d78d fast_gettext-1.3.0/000077500000000000000000000000001300172175400142145ustar00rootroot00000000000000fast_gettext-1.3.0/.gitignore000066400000000000000000000000241300172175400162000ustar00rootroot00000000000000pkg benchmark/locle fast_gettext-1.3.0/.travis.yml000066400000000000000000000004101300172175400163200ustar00rootroot00000000000000bundler_args: "" script: "bundle exec rake spec" sudo: false rvm: - 2.1.8 - 2.2.4 - 2.3.1 gemfile: - gemfiles/rails42.gemfile - gemfiles/rails50.gemfile branches: only: master matrix: exclude: - rvm: 2.1.8 gemfile: gemfiles/rails50.gemfile fast_gettext-1.3.0/CHANGELOG000066400000000000000000000017521300172175400154330ustar00rootroot000000000000001.1.0 -- translations are no longer eager loaded for improved startup performance, pass `eager_load: true` to preload for example in preforked web server 1.0.0 -- do not enforce attr_accessible unless ProtectedAttributes are loaded 0.9.0 -- reworked internals of caching to be plugable 0.7.0 -- set_locale resets to default locale if none of the available locales was tried to set 0.6.0 -- plurals use singular translations as fallack e.g. you translated 'Axis' then n_('Axis','Axis',1) would return the translation for 'Axis' if no plural translation was found 0.4.14 -- "" is translated as "", not as gettext meta information 0.4.0 -- pluralisation_rules is no longer stored in each repository, only retrived. Added Chain and Logger repository. 0.3.6 -- FastGettext.default_locale= 0.3.5 -- FastGettext.default_text_domain= 0.3.4 -- Exceptions are thrown, not returned when translating without text domain 0.3 -- pluralisation methods accept/return n plural forms, contrary to singular/plural before fast_gettext-1.3.0/Gemfile000066400000000000000000000000461300172175400155070ustar00rootroot00000000000000source "https://rubygems.org" gemspec fast_gettext-1.3.0/Gemfile.lock000066400000000000000000000021651300172175400164420ustar00rootroot00000000000000PATH remote: . specs: fast_gettext (1.3.0) GEM remote: https://rubygems.org/ specs: activemodel (5.0.0) activesupport (= 5.0.0) activerecord (5.0.0) activemodel (= 5.0.0) activesupport (= 5.0.0) arel (~> 7.0) activesupport (5.0.0) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) arel (7.1.1) bump (0.5.3) concurrent-ruby (1.0.2) diff-lcs (1.2.5) i18n (0.7.0) minitest (5.9.0) rake (11.2.2) rspec (3.5.0) rspec-core (~> 3.5.0) rspec-expectations (~> 3.5.0) rspec-mocks (~> 3.5.0) rspec-core (3.5.2) rspec-support (~> 3.5.0) rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.5.0) rspec-mocks (3.5.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.5.0) rspec-support (3.5.0) sqlite3 (1.3.11) thread_safe (0.3.5) tzinfo (1.2.2) thread_safe (~> 0.1) wwtd (1.3.0) PLATFORMS ruby DEPENDENCIES activerecord bump fast_gettext! i18n rake rspec sqlite3 wwtd BUNDLED WITH 1.12.5 fast_gettext-1.3.0/Rakefile000066400000000000000000000007361300172175400156670ustar00rootroot00000000000000require 'bundler/setup' require 'bundler/gem_tasks' require 'bump/tasks' require 'wwtd/tasks' task :default => "wwtd:local" task :spec do sh "rspec spec" end task :benchmark do puts "Running on #{RUBY_DESCRIPTION}" %w[baseline ideal fast_gettext original i18n_simple].each do |bench| puts `ruby -I. benchmark/#{bench}.rb` puts "" end end task :namespaces do puts `ruby benchmark/namespace/original.rb` puts `ruby benchmark/namespace/fast_gettext.rb` end fast_gettext-1.3.0/Readme.md000066400000000000000000000251531300172175400157410ustar00rootroot00000000000000FastGettext =========== GetText but 3.5 x faster, 560 x less memory, simple, clean namespace (7 vs 34) and threadsafe! It supports multiple backends (.mo, .po, .yml files, Database(ActiveRecord + any other), Chain, Loggers) and can easily be extended. [Example Rails application](https://github.com/grosser/gettext_i18n_rails_example) Comparison ==========
Hash FastGettext GetText ActiveSupport I18n::Simple
Speed* 0.82s 1.36s 4.88s 21.77s
RAM* 4K 8K 4480K 10100K
Included backends db, yml, mo, po, logger, chain mo yml (db/key-value/po/chain in other I18n backends)
*50.000 translations with ruby enterprise 1.8.6 through `rake benchmark` Setup ===== ### 1. Install sudo gem install fast_gettext ### 2. Add a translation repository From mo files (traditional/default) FastGettext.add_text_domain('my_app', path: 'locale') Or po files (less maintenance than mo) FastGettext.add_text_domain('my_app', path: 'locale', type: :po) # :ignore_fuzzy => true to not use fuzzy translations # :report_warning => false to hide warnings about obsolete/fuzzy translations Or yaml files (use I18n syntax/indentation) FastGettext.add_text_domain('my_app', path: 'config/locales', type: :yaml) Or database (scaleable, good for many locales/translators) # db access is cached <-> only first lookup hits the db require "fast_gettext/translation_repository/db" FastGettext::TranslationRepository::Db.require_models #load and include default models FastGettext.add_text_domain('my_app', type: :db, model: TranslationKey) ### 3. Choose text domain and locale for translation Do this once in every Thread. (e.g. Rails -> ApplicationController) FastGettext.text_domain = 'my_app' FastGettext.available_locales = ['de','en','fr','en_US','en_UK'] # only allow these locales to be set (optional) FastGettext.locale = 'de' ### 4. Start translating include FastGettext::Translation _('Car') == 'Auto' _('not-found') == 'not-found' s_('Namespace|not-found') == 'not-found' n_('Axis','Axis',3) == 'Achsen' #German plural of Axis _('Hello %{name}!') % {name: "Pete"} == 'Hello Pete!' Managing translations ============ ### mo/po-files Generate .po or .mo files using GetText parser (example tasks at [gettext_i18n_rails](http://github.com/grosser/gettext_i18n_rails)) Tell Gettext where your .mo or .po files lie, e.g. for locale/de/my_app.po and locale/de/LC_MESSAGES/my_app.mo FastGettext.add_text_domain('my_app', path: 'locale') Use the [original GetText](http://github.com/mutoh/gettext) to create and manage po/mo-files. (Work on a po/mo parser & reader that is easier to use has started, contributions welcome @ [get_pomo](http://github.com/grosser/get_pomo) ) ###Database [Example migration for ActiveRecord](http://github.com/grosser/fast_gettext/blob/master/examples/db/migration.rb)
The default plural seperator is `||||` but you may overwrite it (or suggest a better one..). This is usable with any model DataMapper/Sequel or any other(non-database) backend, the only thing you need to do is respond to the self.translation(key, locale) call. If you want to use your own models, have a look at the [default models](http://github.com/grosser/fast_gettext/tree/master/lib/fast_gettext/translation_repository/db_models) to see what you want/need to implement. To manage translations via a Web GUI, use a [Rails application and the translation_db_engine](http://github.com/grosser/translation_db_engine) Rails ======================= Try the [gettext_i18n_rails plugin](http://github.com/grosser/gettext_i18n_rails), it simplifies the setup.
Try the [translation_db_engine](http://github.com/grosser/translation_db_engine), to manage your translations in a db. Setting `available_locales`,`text_domain` or `locale` will not work inside the `evironment.rb`, since it runs in a different thread then e.g. controllers, so set them inside your application_controller. #environment.rb after initializers Object.send(:include, FastGettext::Translation) FastGettext.add_text_domain('accounting', path: 'locale') FastGettext.add_text_domain('frontend', path: 'locale') ... #application_controller.rb class ApplicationController ... include FastGettext::Translation before_filter :set_locale def set_locale FastGettext.available_locales = ['de','en',...] FastGettext.text_domain = 'frontend' FastGettext.set_locale(params[:locale] || session[:locale] || request.env['HTTP_ACCEPT_LANGUAGE']) session[:locale] = I18n.locale = FastGettext.locale end Advanced features ================= ### Abnormal pluralisation Plurals are selected by index, think of it as `['car', 'cars'][index]`
A pluralisation rule decides which form to use e.g. in english its `count == 1 ? 0 : 1`.
If you have any languages that do not fit this rule, you have to add a custom pluralisation rule. Via Ruby: FastGettext.pluralisation_rule = lambda{|count| count > 5 ? 1 : (count > 2 ? 0 : 2)} Via mo/pofile: Plural-Forms: nplurals=2; plural=n==2?3:4; [Plural expressions for all languages](http://translate.sourceforge.net/wiki/l10n/pluralforms). ###default_text_domain If you only use one text domain, setting `FastGettext.default_text_domain = 'app'` is sufficient and no more `text_domain=` is needed ###default_locale If the simple rule of "first `availble_locale` or 'en'" is not suficcient for you, set `FastGettext.default_locale = 'de'`. ###default_available_locales Fallback when no available_locales are set ###Chains You can use any number of repositories to find a translation. Simply add them to a chain and when the first cannot translate a given key, the next is asked and so forth. repos = [ FastGettext::TranslationRepository.build('new', path: '....'), FastGettext::TranslationRepository.build('old', path: '....') ] FastGettext.add_text_domain 'combined', type: :chain, :chain: repos ###Merge In some cases you can benefit from using merge repositories as an alternative to chains. They behave nearly the same. The difference is in the internal data structure. While chain repos iterate over the whole chain for each translation, merge repositories select and store the first translation at the time a subordinate repository is added. This puts the burden on the load phase and speeds up the translations. repos = [ FastGettext::TranslationRepository.build('new', :path: '....'), FastGettext::TranslationRepository.build('old', :path: '....') ] domain = FastGettext.add_text_domain 'combined', type: :merge, chain: repos Downside of this approach is that you have to reload the merge repo each time a language is changed. FastGettext.locale = 'de' domain.reload ###Logger When you want to know which keys could not be translated or were used, add a Logger to a Chain: repos = [ FastGettext::TranslationRepository.build('app', path: '....') FastGettext::TranslationRepository.build('logger', type: :logger, callback: lambda{|key_or_array_of_ids| ... }), } FastGettext.add_text_domain 'combined', type: :chain, chain: repos If the Logger is in position #1 it will see all translations, if it is in position #2 it will only see the unfound. Unfound may not always mean missing, if you choose not to translate a word because the key is a good translation, it will appear nevertheless. A lambda or anything that responds to `call` will do as callback. A good starting point may be `examples/missing_translations_logger.rb`. ###Plugins Want a xml version ? Write your own TranslationRepository! #fast_gettext/translation_repository/xxx.rb module FastGettext module TranslationRepository class Wtf define initialize(name,options), [key], plural(*keys) and either inherit from TranslationRepository::Base or define available_locales and pluralisation_rule end end end ###Multi domain support If you have more than one gettext domain, there are two sets of functions available: include FastGettext::TranslationMultidomain d_("domainname", "string") # finds 'string' in domain domainname dn_("domainname", "string", "strings", 1) # ditto # etc. These are helper methods so you don't need to write: FastGettext.text_domain = "domainname" _("string") It is useful in Rails plugins in the views for example. The second set of functions are D functions which search for string in _all_ domains. If there are multiple translations in different domains, it returns them in random order (depends on the Ruby hash implementation): include FastGettext::TranslationMultidomain D_("string") # finds 'string' in any domain # etc. Alternatively you can use [merge repository](https://github.com/grosser/fast_gettext#merge) to achieve the same behaviour. FAQ === - [Problems with ActiveRecord messages?](http://wiki.github.com/grosser/fast_gettext/activerecord) - [Iconv require error in 1.9.2](http://exceptionz.wordpress.com/2010/02/03/how-to-fix-the-iconv-require-error-in-ruby-1-9) TODO ==== - Add a fallback for Iconv.conv in ruby 1.9.4 -> lib/fast_gettext/vendor/iconv - YML backend that reads ActiveSupport::I18n files Author ====== Mo/Po-file parsing from Masao Mutoh, see vendor/README ### [Contributors](http://github.com/grosser/fast_gettext/contributors) - [geekq](http://www.innoq.com/blog/vd) - [Matt Sanford](http://blog.mzsanford.com) - [Antonio Terceiro](http://softwarelivre.org/terceiro) - [J. Pablo Fernández](http://pupeno.com) - Rudolf Gavlas - [Ramón Cahenzli](http://www.psy-q.ch) - [Rainux Luo](http://rainux.org) - [Dmitry Borodaenko](https://github.com/angdraug) - [Kouhei Sutou](https://github.com/kou) - [Hoang Nghiem](https://github.com/hoangnghiem) - [Costa Shapiro](https://github.com/costa) - [Jamie Dyer](https://github.com/kernow) - [Stephan Kulow](https://github.com/coolo) - [Fotos Georgiadis](https://github.com/fotos) - [Lukáš Zapletal](https://github.com/lzap) - [Dominic Cleal](https://github.com/domcleal) - [Tomas Strachota](https://github.com/tstrachota) [Michael Grosser](http://grosser.it)
michael@grosser.it
License: MIT, some vendor parts under the same license terms as Ruby (see headers)
[![Build Status](https://travis-ci.org/grosser/fast_gettext.png)](https://travis-ci.org/grosser/fast_gettext) fast_gettext-1.3.0/benchmark/000077500000000000000000000000001300172175400161465ustar00rootroot00000000000000fast_gettext-1.3.0/benchmark/base.rb000066400000000000000000000020411300172175400174020ustar00rootroot00000000000000require 'benchmark' $LOAD_PATH.unshift 'lib' RUNS = 50_0000 DEFAULTS = {:memory=>0} def locale_folder(domain) path = case domain when 'test' then File.join(File.expand_path(File.dirname(__FILE__)),'..','spec','locale') when 'large' then File.join(File.expand_path(File.dirname(__FILE__)),'locale') end mo = File.join(path,'de','LC_MESSAGES',"#{domain}.mo") raise unless File.exist?(mo) path end def results_test(&block) print "#{(result(&block)).to_s.strip.split(' ').first}s / #{memory}K <-> " end def results_large print "#{(result {_('login') == 'anmelden'}).to_s.strip.split(' ').first}s / #{memory}K" puts "" end def result result =Benchmark.measure do RUNS.times do raise "not translated" unless yield end end result end def memory pid = Process.pid if RUBY_PLATFORM.downcase.include?("darwin") map = `vmmap #{pid}` else map = `pmap -d #{pid}` end map.split("\n").last.strip.squeeze(' ').split(' ')[3].to_i - DEFAULTS[:memory] end DEFAULTS[:memory] = memory + 4 #4 => 0 for base calls fast_gettext-1.3.0/benchmark/baseline.rb000066400000000000000000000001371300172175400202560ustar00rootroot00000000000000require_relative 'base' puts "Baseline: (doing nothing in a loop)" results_test{true} puts "" fast_gettext-1.3.0/benchmark/fast_gettext.rb000066400000000000000000000007561300172175400212040ustar00rootroot00000000000000require_relative 'base' require 'fast_gettext' include FastGettext::Translation FastGettext.available_locales = ['de','en'] FastGettext.locale = 'de' puts "FastGettext:" FastGettext.add_text_domain('test',:path=>locale_folder('test')) FastGettext.text_domain = 'test' results_test{_('car') == 'Auto'} #i cannot add the large file, since its an internal applications mo file FastGettext.add_text_domain('large',:path=>locale_folder('large')) FastGettext.text_domain = 'large' results_large fast_gettext-1.3.0/benchmark/i18n_simple.rb000066400000000000000000000004071300172175400206240ustar00rootroot00000000000000require_relative 'base' require 'active_support' I18n.backend = I18n::Backend::Simple.new I18n.load_path = ['benchmark/locale/de.yml'] I18n.locale = :de puts "ActiveSupport I18n::Backend::Simple :" results_test{I18n.translate('activerecord.models.car')=='Auto'} fast_gettext-1.3.0/benchmark/ideal.rb000066400000000000000000000011161300172175400175500ustar00rootroot00000000000000require_relative 'base' module FastestGettext def set_domain(folder,domain,locale) @data = {} require 'fast_gettext/vendor/mofile' FastGettext::GetText::MOFile.open(File.join(folder,locale,'LC_MESSAGES',"#{domain}.mo"), "UTF-8").each{|k,v|@data[k]=v} end def _(word) @data[word] end end include FastestGettext set_domain(locale_folder('test'),'test','de') puts "Ideal: (primitive Hash lookup)" results_test{_('car') == 'Auto'} #i cannot add the large file, since its an internal applications mo file set_domain(locale_folder('large'),'large','de') results_large fast_gettext-1.3.0/benchmark/locale/000077500000000000000000000000001300172175400174055ustar00rootroot00000000000000fast_gettext-1.3.0/benchmark/locale/de.yml000066400000000000000000000071241300172175400205240ustar00rootroot00000000000000# German translations for Ruby on Rails # by Clemens Kofler (clemens@railway.at) de: date: formats: default: "%d.%m.%Y" short: "%e. %b" long: "%e. %B %Y" only_day: "%e" day_names: [Sonntag, Montag, Dienstag, Mittwoch, Donnerstag, Freitag, Samstag] abbr_day_names: [So, Mo, Di, Mi, Do, Fr, Sa] month_names: [~, Januar, Februar, März, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember] abbr_month_names: [~, Jan, Feb, Mär, Apr, Mai, Jun, Jul, Aug, Sep, Okt, Nov, Dez] time: formats: default: "%A, %e. %B %Y, %H:%M Uhr" short: "%e. %B, %H:%M Uhr" long: "%A, %e. %B %Y, %H:%M Uhr" time: "%H:%M" am: "vormittags" pm: "nachmittags" datetime: distance_in_words: half_a_minute: 'eine halbe Minute' less_than_x_seconds: zero: 'weniger als 1 Sekunde' one: 'weniger als 1 Sekunde' other: 'weniger als {{count}} Sekunden' x_seconds: one: '1 Sekunde' other: '{{count}} Sekunden' less_than_x_minutes: zero: 'weniger als 1 Minute' one: 'weniger als eine Minute' other: 'weniger als {{count}} Minuten' x_minutes: one: '1 Minute' other: '{{count}} Minuten' about_x_hours: one: 'etwa 1 Stunde' other: 'etwa {{count}} Stunden' x_days: one: '1 Tag' other: '{{count}} Tage' about_x_months: one: 'etwa 1 Monat' other: 'etwa {{count}} Monate' x_months: one: '1 Monat' other: '{{count}} Monate' about_x_years: one: 'etwa 1 Jahr' other: 'etwa {{count}} Jahre' over_x_years: one: 'mehr als 1 Jahr' other: 'mehr als {{count}} Jahre' number: format: precision: 2 separator: ',' delimiter: '.' currency: format: unit: '€' format: '%n%u' separator: delimiter: precision: percentage: format: delimiter: "" precision: format: delimiter: "" human: format: delimiter: "" precision: 1 support: array: sentence_connector: "und" skip_last_comma: true activerecord: errors: template: header: one: "Konnte dieses {{model}} Objekt nicht speichern: 1 Fehler." other: "Konnte dieses {{model}} Objekt nicht speichern: {{count}} Fehler." body: "Bitte überprüfen Sie die folgenden Felder:" format: seperator: ' ' messages: inclusion: "ist kein gültiger Wert" exclusion: "ist nicht verfügbar" invalid: "ist nicht gültig" confirmation: "stimmt nicht mit der Bestätigung überein" accepted: "muss akzeptiert werden" empty: "muss ausgefüllt werden" blank: "muss ausgefüllt werden" too_long: "ist zu lang (nicht mehr als {{count}} Zeichen)" too_short: "ist zu kurz (nicht weniger als {{count}} Zeichen)" wrong_length: "hat die falsche Länge (muss genau {{count}} Zeichen haben)" taken: "ist bereits vergeben" not_a_number: "ist keine Zahl" greater_than: "muss größer als {{count}} sein" greater_than_or_equal_to: "muss größer oder gleich {{count}} sein" equal_to: "muss genau {{count}} sein" less_than: "muss kleiner als {{count}} sein" less_than_or_equal_to: "muss kleiner oder gleich {{count}} sein" odd: "muss ungerade sein" even: "muss gerade sein" models: car: 'BAUTO' cars: 'CAUTO' Car: 'DAUTO' models: car: 'Auto' fast_gettext-1.3.0/benchmark/locale/de/000077500000000000000000000000001300172175400177755ustar00rootroot00000000000000fast_gettext-1.3.0/benchmark/locale/de/LC_MESSAGES/000077500000000000000000000000001300172175400215625ustar00rootroot00000000000000fast_gettext-1.3.0/benchmark/locale/de/LC_MESSAGES/large.mo000066400000000000000000003340701300172175400232200ustar00rootroot00000000000000! BXX!"XDXYXtXXCX>X?,YlYAY*YY=ZLZ aZ5lZ Z5ZZZ [ [ [ "[-[4[F[ ][k[ {[,[([D[ $\1\ @\K\\\x\\\\ \\ \\ \\ ]] ]!]?]U]i])r]])]]]]]^^4^L^`^r^^^^ ^ ^^^^ ^ ^^^ __+_ <_J_\_d_l__ _ ____g`]{``2`a3aEaUala|a'a&aa aaab b#b>bNb_bhbwbb-=ckc c cccccZdbddddddddddee e+eCe1Ke}e eeeeeeef f2fRfefyf ffffff+f.fg%g sDs KsVs^szs!sqs+tFtNt St^tuttttttu!u ;u Iu7Wuuuuu uv5vLvcv }vv vvvvw'w 9w GwQww&Ux|xxxx#xxxxy*y~1yy yyyy z z z*z Cz Pz\ztz zzzzz z$z {.${S{j{7p{${{{ {{|* | 6|D|_| h| u||||||| |/| } &}2}B}I}.Z}}}%}}} ~~#~>~ T~ `~l~{~~~~~~~* = G R^m}      0= Vbj{+!3 9CYhv ߁  & 4AQ cp;:/4 dq6  )8 MZ r  Äӄ"$9P_h ~<8Ʌ9< TbNG!1S2q Ƈ ̇ه   5? Uchw >ˆ );Nez lj׉  4 =Jg4 Š7Ԋ ,<C%Sy#ËՋ݋  !1L [i}ό  % 3?]{  ֍  , 7DV] } ֎  ' 5A J,k  ƏЏ  "/C S _.j ΐՐ *=Pbj q~  Ƒؑ 6?BQ Uafmq  ÒaNp ͓n@3̔lm" ͕ӕ ' 5I O[cz (֖Vk —ϗԗ  %E!`/@r2fZLFQ-ƚ a!q ɛ4.INe8#7[xF% F:)nMh2q[K{[jנ BL%c ,ߡ! <J [ei5p ʢբ  &$1Vks w  ģУ "8$]bj| ˤ Ѥߤ  $3X\ap!ץ FU[ kw};Ц֦ܦߦ= 6G~/ݧ3 Q [fo$  ƨͨШ ֨     (6,Er{ ˩ҩ !>Vo x Ȫݪ +5 ITYm~6  $'.7V"23 3 ? KW gu ͭ٭    + 7 CO _l }  ˮ׮   .>D\qį%ӯ6 *C&n  ΰ#$ />Y$r$!(J$cN׳$!*LaRw%ʴ%.DE@ȵ (6;6r<  $48>,E/rk!5I^rĸ ̸ٸ ߸ G̿3P Vbq   &8H Yf  1 cs@32H {   ""E%;QYby /5 PZb~ GH ?!0 8 E P [i z:1  )2;{A,97@*Y    +"; ^l!i.E KW_fl hg9?.n)u1$ #xY_:B}w:X DxO^*'`R2M@4u& D20wmE\q '/7JYjs|x & +35 is     $09 > H Ubrw ] *6 Ucv  - ALip j&:za8 LV;J.L Wrme$p $ e ? S Z t / /     ) 3 {;  CR   1 1Rkt$6+Eq v      5GVg&z7-1J-|   6  :FK T_h pz6@ #Mq+  !' -9A]y   \%     8:F"v:<J `  }! ! !! !!!!" V#c#k#q#v#I~#S#I$f$ j$v$$1$$ $ $$% %% % %%0%6% ?%L%`% i%w%!%%%%%%%Q%2!&2T&& '$''V'D7(/|(*(6( ))#) 5) ?) I)T)Y)w) ~)r) ): *D*S* [* g*#4 A4 M47Z4 4 4 444 4445 55"5 666 6 77-767?J77:77 7H7>8N8 _8 i8s8)8 8%8879 ;9F9 ^9k99999999::9:N:c: l: w::: :::::;;;$;+;>; O;Z; c;m; ; ;;; ;;;;;<)</<N<'m<+<<< < << ==Y4= > > > >> >>>> ? ?2? D?N?NT??? ? ??? ???@@@ /@=@P@b@j@z@@ @ @ @ @ @@@@ @*@/'AWA `AjAAAA BBBC CCj!#Cdd ddL`e e e!eexfGf;fggh- h ;h GhShZhsh wh%hhhhhhhi i/i7Miii)j(jjjjjjk(kGk*ak2kKkO lO[l lljlW)mPmXm+nGn\nqnvnmyn)n*o{C{R{ c{q{"u{ {{ {{{{{!{=|T|Z|c| |||0| || || }}"}7}I}M}R}[}1u}} }}}}}~ ~~)~ =~G~Ha~~~ ~~~1~#(+4EH^8) -) W amsz # π ۀ(+/HMi~  Ł΁ Ձ߁   -@H[ciq  !؂  ؄g AK ^ ht ʆ+3< NX] d$n ;   -1+],z- ދ\ߍ/<l,+X^4ޑIZ]x+,N!MmbTmt5>tr o|8PףQ(z #Ф"! 'Bjq x{,s-JSX[k ͮuCݲw>X-$ Lg'%F(r7 =A8kJYe:3NCd )vYYHL=M<bW2x_(\ O7#NddO4lx-q D&]Xl2[\@3L YI6~kzVO=UM@i bR0M |8^U, +zoN# W19%0;nk E5.F{ >hduZo'xe)#&o}_ujAT.` J\6]Z.lh~xN5 <vT3:Bfi,:'S$mPP&Lh]U>8t 1RJtebwr5;R8CEa* ;_zw 1 w,m"W0py g,G7^XP|cED& *QK=e{h-/~o+G./#9|$y4^m<9B'?}5I )SMv($[qc/ qOb7A<w*SQsHA`1r+rB2 y-C+Hi@n!E~f|X KRkT9B?"s^3?2!WV(lZ{KV\ZsQ*4m}FnGcsipz a[ttpUPQIcj  >{T!fu_j"@g)aK`/?%aD4f"%;p0gH Iu 6j}!:6V`SyG[nJq]vDFC%{days} days Pro%{language} subtitle for %{movie}%{months} months Pro%{name} joined rathershort%{relative_time} ago%{title} was submitted to jury.(Pro users pay for viewing a film with a share of their montly fee)(check below), you are ready to enter the film to rathershort.(check below), you are ready to enter the film to rathershort. (rathershort) as licence holder- %{days} days download access (starting with the first download)- step-by-step tutorial: how to burn a dvd- the DVD disk image- the video DVD containing all films in a customized dvd case- worldwide shipping1 year Pro1,00€ goes to the film owner %{name} %{explanation}5 € / monthA new activalion mail was sent to your email address.AboutAbo|Duration in daysAbo|End atAbo|FreeAbo|Start atAbo|StatusAccessAccess|AccessableAccess|Accessable typeAccess|End atAccess|Start atAccess|StatusActivate email notification for new messagesActivation code is not valid (too old?).Activation email could not be sent, please check your email address.Add FestivalAdd a new postAdd to DVDAdd to favoritesAdded a subtitle to %{name}Additional InformationAddressAddress|AdditionalAddress|BillingAddress|CityAddress|CountryAddress|NameAddress|StreetAddress|ZipAdminAdventureAllAll countriesAll numbers without warranty.Allowance explanationAllowed characters:AnimatorAnother user is already using this email!AnswerAre you sure, you want to delete %{name}?ArtArt DepartmentAssistant DirectorAssistant EditorAssistant ProducerAssistant Production ManagerAttachment|Content typeAttachment|FilenameAttachment|HeightAttachment|SizeAttachment|WidthBackBasicBasic AccountBasic DataBeginBestBest BoyBest matchBest reviewsBest shortfilmsBilling addressBoom OperatorBringing your movie to usBrowse festivalsBrowse moviesBuilding your DVDBuy AboBuy DVDBuy DVD CompilationBuy DVD ExplanationBuy DownladBuy DownloadBuy Download ExplanationBuy Download Explanation WidgetBuy Download|A tutorial with links to players for every computer system and tips for getting the most of your films is included.Buy Download|Files:Buy Download|You can download the files for %{days} days (starting with your first download).Buy film(€ 2,50)By registering for rathershort.com, you accept ourCalculation detailsCamera DepartmentCamera OperatorCampaign|Coupons countCampaign|End onCampaign|TitleCannot create rating without review_id!Cannot create review without movie_id!CastCast and crewCastingCasting AssistantCasting DirectorCategoriesChange in %{name} section.Change passwordCheck your movieCheckoutChildren MovieChoose who can watch your filmChoose who will have access to your movie.
You can decide for full public access or for restricted access for pro users only.
This can be changed at any time.Click here to add information about yourself.Click here to enter descriptionCollaboratorCollaboratorsCollaborators of %{person}ComedyComing soon...Common render errors (like black/white/gray errors at the start) will be fixed by our team, no need to re-render the movie.CompanyComplete Address InformationComposerContactContact rathershort.comContentContinueCopyright NoticesCopyright Notices 0Copyright Notices 1Costume DepartmentCostume DesignerCountryCoupon CodeCoupon sent to %{email}CouponsCoupons that you issued yourself are not counted.Coupon|CampaignCoupon|CodeCoupon|CreatorCoupon|Expires atCoupon|Order itemCoupon|RecipientCoupon|Redeemed atCoupon|Redeemed byCreateCreate a new accountCreate a new movie and your receive a FTP account.Create successful!Create your accountCreatedCreated atCreatingCrewCrimeDVD ExplanationDVD image downloadDVD produced by rathershort, shipped to youDeactivate email notification for new messagesDeleteDescription in EnglishDescription in original languageDetailed Information for FilmmakersDifferent shipping addressDirectingDirectorDirector of PhotographyDiscountsDiscussedDiscussion|DiscussedDiscussion|Discussed typeDiscussion|TitleDistributorDistributor nameDo it again!Do you have CAPSLOCK activated?DocumentationDon't forget your teamDont allow to sellDownload PdfDownload couponsDownload my movie for freeDownload the .ics file and add is as a new calendar or subscribe to the address of the link.Download/DVD salesDramaDresserDvd|RenderDvd|StatusDvd|TitleE-Mail not found.EditEdit festivalEdit organisationEdit profileEdit subtitleEditingEditorEducationEinschränkungen sind während der Filmanmeldung möglich.Email or Password are wrong!EmbedEmbed FilmsEmbed Films ExplanationEmbed the complete film on your website or blog.EndEnter FilmEnter new movieEnter your Email to receive a new password.EroticError during payment procedureEveryone can watch and buy your film.Except for coupon payments.ExistingExpired Pro (%{ago})Explanantion|Burn ISOExplanation|Age restrictionExplanation|Allow users to create subtitlesExplanation|Cast and crewExplanation|Description in EnglishExplanation|Description in original languageExplanation|Festival imageExplanation|FestivalsExplanation|File ManagementExplanation|Introductive VideoExplanation|Java appletExplanation|Jury EvaluationExplanation|LocationExplanation|Money MakingExplanation|MusicExplanation|Person imageExplanation|Production CompaniesExplanation|Rights availableExplanation|Rights not availableExplanation|StatusExplanation|Subtitle rename and folderExplanation|SubtitlesExplanation|Upload BasicExplanation|Upload CoverExplanation|Who can watchExtended DataExtended searchFTP|ExplanationFactsheetFantasyFavoriteFavorite FestivalsFavorite FilmsFavorited %{name}FeaturesFemaleFestivalFestival Edit ExplanationFestival nameFestival remindersFestivalParticipation|AwardFestivalParticipation|YearFestivalsFestivals %{distance} km nearby %{name}Festivals & moreFestivals nearbyFestival|AboutFestival|CityFestival|CountryFestival|CreatorFestival|DeadFestival|DeadlineFestival|Deadline onFestival|DurationFestival|EmailFestival|EventFestival|Event onFestival|Feed urlFestival|Future shortFestival|ImageFestival|LocationFestival|Location latitudeFestival|Location longitudeFestival|LockedFestival|NameFestival|PermalinkFestival|ProgramFestival|Program urlFestival|Total visitorsFestival|UpdaterFestival|WebsiteFile ManagementFile was deleted from the server.FilesFilm NoirFilmdetailsFilmmaker, whoes film got accepted, can watch all other Pro-only films for free.FilmmakersFilmmakers InformationFilmmakers Information ExplanationFilmmakers shareFilmmakers share:Filmmakers-SurveyFilmsFilmteamFind shortfilmsFirst Assistant CameraFiscal AuthoritiesFoley ArtistFor DVD production (MPEG2)For PC, Mac or IPod (H264)Forgot your password?Found atFound festival locationsFreeFree FTP Software:GafferGenreGenresGenre|NameGermanyGet more out of rathershortGive Feedback to rathershortHas won %{count} festival awards.Hello %{name}, Your rathershort.com account has been created! Visit this url to activate your account: %{url}Help others by translatingHistoryHomeHome | AboHome | Abo ExplanationHome | Buy DVDHome | Buy DVD ExplanationHome | Buy DownloadHome | Buy Download ExplanationHome | DifferenceHome | Difference ExplanationHome | Embedded filmsHome | Embedded films ExplanationHome | FinishHome | FutureHome | How does rathershort.com distribute short films?Home | Not registered usersHome | Part rathershort.comHome | Registered usersHome | Start DistributionHome | UsersHome | VisitorsHome | Welcome to the test phase for Rathershort.com.Home | basic principleHome | quality comparisonHorror MovieHow to Burn a DVD ImageHow to promote your movie onlineI accept the license agreement.I accept the terms of use.I disliked this movieI liked this movieIcon|Content typeIcon|FilenameIcon|SizeIf you received a rathershort coupon you can enter the code here. It is also possible to use several coupon codes for one order.If your distributor is not in our list, please insert its name. After you saved, you can edit the distributor to add more details.If your do not like the rendered movieImprintIn-boxIncome from your moviesInfoInformation was saved successfully!Integrated subtitlesIntroductive VideoInvitation sent to %{email}Invitation to rathershortInviteInvite people to see your film! You can also invite team members, their account will be linked to the film then automatically.John DoeJoined %{ago}Jury EvaluationJury Page DescriptionJury of rathershortJury workLanguage & subtitlesLanguagesLanguages you understandLast reviewsLast searchLast updated by %{name}Latest reviewsLern moreLet people knowLicensing AgreementLighting AssistantLighting and GripLine ProducerLink address is not valid (too old).Link address is not valid.Locked by owner (%{name}), no editing allowed.Logged in successfullyLoginLogin data did not contain identifier, please try againLogin data too old, please try againMake your film easy to findMakeupMakeup ArtistMaleMessageMessage '%{subject}' sent to %{recipient}.Message sent!Message to rathershort.comMessagesMessage|BodyMessage|OwnerMessage|RecipientMessage|SenderMessage|SubjectMiscMobile DevicesMobile Devices ExplanationMoney MakingMore views may lead to more feedback and sales.MovieMovie StillMovie world mapMoviesMovies PromotionMovies may require you to be of a cetrain age.Movie|Add integrated subtitleMovie|Age RatingMovie|Allow users to create subtitlesMovie|Aspect ratioMovie|CategoryMovie|CountryMovie|Description enMovie|Description languageMovie|Description orgMovie|GenreMovie|ImageMovie|LanguageMovie|LocationMovie|One liner enMovie|One liner orgMovie|PresskitMovie|Presskit urlMovie|Problem descriptionMovie|Release yearMovie|Released onMovie|Sellable downloadMovie|Sellable dvdMovie|TagMovie|TagsMovie|TitleMovie|Title enMovie|Title orgMovie|ViewableMovie|WebsiteMusicMusic ProducerMusic VideoMy FilmsMy MoviesMy OrdersNatureNewNew shortfilmsNew subtitle for %{movie}NewestNextNoNo %{objects} found.No dialoguesNo more jury-work to do!Not allowedOffer a feature-rich DVDOffer your team or friends a free download. You can invite up to 50 people to download your film for free.Only filmmakerOnly professional users can view your film.Or login through:OrderOrder AboOrder Abo ExplanationOrder Abo Explanation WidgetOrder complete! You will receive an email with all details of your order, when we received your payment.Order detailsOrderItem|FreeOrderItem|OrderOrderItem|ShippingOrdersOrder|Paid atOrder|StatusOrder|avoidanceOrder|regulationsOrganisationOrganisation|AboutOrganisation|EmailOrganisation|NameOrganisation|WebsiteOther users can contact & find your through these accounts.Other users know what to use when they send you a message.Other users see only a preview-image or trailerPaidView|AboPaidView|AccountedPayment for order receivedPayment received at %{time} GMTPayments are processed fast and secure through Paypal.PeoplePerson|AboutPerson|Aim accountPerson|CityPerson|CountryPerson|Date of birthPerson|EmailPerson|Facebook accountPerson|GenderPerson|Icq accountPerson|ImagePerson|Myspace accountPerson|NamePerson|PasswordPerson|Password confirmationPerson|Pro untilPerson|Receive email notificationsPerson|Skype accountPerson|Twitter accountPerson|WebsitePlaylistPlaylistItem|PositionPlaylist|NamePlease %{login} or %{register} for free to view more movies.Please be sure to read and accept the licence agreement:Please be sure to read and accept the licence agreement: Please check your moviePlease choosePlease complete your settings.Please enter a password!Please enter billing here if then shipping address is not the billing address.Please enter your distributor here, if your do not distribute yourself.Please login to browse this page!Please provide a valid email!Please provide an shipping address for this order.PopularityPostPosted on %{name}PostsPost|CreatorPost|DiscussionPost|TextPrepare a press kitPressPress ContactPress Contact ExplanationPress KitPress Kit ExplanationPress ServicePrevPrivacy policyPrivacy policy explanationPro (%{num} days left)Pro AccountPro accountsPro users pay filmmakers once per accounting interval(31 days)ProducerProductionProduction DesignerProduction DriverProduction ManagerProduction Sound MixerProduction companiesProduction companyProfessionalsProgram URLProjectorProjector ExplanationProperty MasterProvide an address (optional)Public AccessPuppeteerPuppets MakerRSS feed for this searchRSS-FeedRandom usersRathershort Logo ExplanationRathershort is allowed toRathershort.com uses Pay Pal as safe payment system.Rating|GoodReach more peopleRead: How to show your film to much more people online!Recently boughtRecipient emailRecord deleted!RedeemRedeem a couponRedirecting to Paypal, please wait...RegisterRegister for the free basic accountRegister for the pro accountRegistration textRelatedReleased in %{year}RemindersRemove from DVDRemove from favoritesRender errors ?Render the following file:Report problemReport saved.Restriction|CountryRestriction|Restriction typeRestriction|allRestriction|downloadRestriction|dvdRestriction|viewResultResultsReviewReview about %{movie}Reviewed %{name}ReviewsReviews aboutReview|GoodReview|Negative ratings countReview|Positive ratings countReview|Ratings countReview|TextReview|TitleRightsRights availableRights not availableRoad MovieRomanceSaveSave and closeSave successful!Scenic ArtistScience FictionScreenplayScreenwriterScript TranslatorSearchSearch inside %{list} distance.Search peopleSelected tagsSendSend %{person} a messageSend a DVD to our mail addressSend a coupon to a friendSend free downloadsSend new passwordSentSet BuilderSet DecoratorSet ManagerSettingsShare the rathershort experienceShare the rathershort experience ExplanationShipping addressShopping CartShopping CartsShortfilmShortfilm festivalsShortfilmsShow all results >Show your filmSignup complete!Silent MovieSimilar to %{movie}Social accountsSong|ArtistSong|TitleSoon you will be able to order customized DVDsSort bySound DepartmentSound DesignerSound EditorSpeaksSpecial EffectsSponsorshipSportsStatusStatus updated!Status:Steadycam OperatorStill PhotographerStory Board ArtistStunt CoordinatorStylistSubmitSubmit orderSubmit shortfilmSubscribeSubtilesSubtitleSubtitlesSubtitle|CreatorSubtitle|LanguageSubtitle|StatusSubtitle|TextSubtotalSuccessfully added to DVD.Successfully added to cart.SynopsisTVTV ExplanationTagTagging|TagTagsTailorTaxTeam DescriptionTeam PhotoTeamMember|RoleTerms of useTerms of use explanationThank you for your Feedback!Thank you for your vote!Thank you very much!Thanks for signing up! Please click the activation link we sent you by e-mail(maybe spam folder).The rathershort administration has been informed already and will contact you.Theatre/OperaThere was a problem deleting!There was a problem saving!There was a problem!This Server does not supply all information to create your account (email, full name). Please use %{register}.This movie can only be viewed by %{icon} users -- %{what_to_do}.This movie is not allowed to be shown in %{country}This movie is not allowed to be shown in some countries. Please %{login} or %{register} for free to view it.This opens the java appletThrillerTo save press Titles > SaveTop CitiesTop CountriesTotalTrack the responseTrack|DvdTragedyTranslate from %{lang_a} into %{lang_b}Translate this movieTranslate your filmTrashUnsubscribeUpdatedUpgrade to Pro-AccountUploadUpload CoverUpload a movie file to our FTPUpload a movie file with our java appletUpload a profile image. Please enter the languages you understand. This helps us to present films informations in the proper language, if available.Upload successful, your movie will now start rendering. You can now close this window.Use templateUserView world mapViewsVisit rathershort.comWaiting for payment confirmationWallWas this review helpful to you?Watch other Pro-only filmsWatch, Discuss and Buy ShortfilmsWe count each time a Pro user views your movie.We do not have a description yet,
do you want to write one ?We prepared a detailed overview for filmmakers with tips how to promote your film online in the best way possible.We will try to show you movies in these languages.WelcomeWesternWhen a Pro user did not view any movie, his payments are split equally between all movies.When the movie owner (%{name}) has approved your subtitle it will be online.When you are asked for a password, enter your rathershort.com passwordWhen you think %{title} is ready to be judgedWho should watch your film?Write a Review!Write a new review!YearYesYou already have the maximum number of %{size} favorites. Upgrade to Pro for unlimited favorites!You already voted on this review!You are already activated!You are not a Jury member!You are not allowed to buy this.You can also contact us at boxoffice@rathershort.comYou can download this movie for %{time}You can edit the title of your DVD until you put it to the shopping cart.You can enter your shortfilm online, or by sending your film and infos by regular mail.You can select these languages in movie language-search.You cannot invite an existing user!You current invoiced amount:You have 3 possibilities:You have been logged out.You have been sent an email with instructions to change your password.You have not added any favorites yet.You need flash to use this page.You need to %{login} or %{register} to participate in this discussion.You need to login to access this content.You receive an email one month before the festival event. You can also add other reminders in you preferences.You will get an email notification as soon as the payment has been confirmed.Your DVDYour DVD is being built and will be finished soon.Your DVD is full, please remove a movie or start a new DVD by adding this DVD to your cart!Your FTP Data:Your access to %{title} has been activated, and will be valid until %{end}.Your account is not active, please click the activation link in your email from rathershort.com (maybe spam folder) %{link}Your are not allowed to access (%{uri}) send a mail to info@rathershort.com if you think this is an error.Your cartYour income estimationYour movie was submitted to the jury!Your orderYour playlist was empty, have a look here...Your rathershort.com password_movie_banned?_movie_problem?_movie_rejected?_movie_rendering?_movie_waiting_for_upload?_use_of_email_use_of_fullnamea messageaboaccessaccess more detailed profiles for films and festivalsadd another %{name}add cast memberadd couponadd crew memberadd festivaladd festival searchadd production companyadd songadd to DVDadd to calendar (iCal, Sunbird, ...)add to shopping cartaddressallall entriesall reviewsall shortfilmsandand upload a new file.approveasas downloadas grantor of the licenseattachmentbackbannedbasic tips for a good film websitebe part of an international and active shortfilm networkbestbetweenbrowse by countrybuy probycampaigncannot be used with this order.cast memberchoose a genreclosecomma dividedcouponcouponscreated by %{name}crew memberdaydaysdeletedelete rendered moviedoes not have a rathershort account.dvdeditedit DVD titeledit film profilesenter the tag you are looking forfavoritefeedbackfestivalfestival participationfestival subscriptionfestivalsfilm is being renderedfind detailed information on films, filmfans, filmmakers and festivalsfoundfrom %{country}full searchgenrehas already been takenhigh quality, medium size, for PC / Mac / IPod / IPhone ...hoursimageininviteinvite friendsinvite team membersis not supported. Types jpeg, jpg, png and gif are supported.is too large. Files up to 1.5 Megabytes are supported.itemlatestloginlogin to rate reviewslogoutmaximum quality, large size, for DVD productionmessagemessagesmonthmonthsmoremore about rssmoviemovies waiting for judgement!must not include > or <my moviesmy profilenegativenegative reviewnegative/positive reviews = %{ratio}newnew subtitlenono age ratingonlineororderorder itemorganisationotherpaid viewpeoplepersonplayplaylistplaylist itemplease chooseplease choose!please wait... (will take ca. %{x} minutes))positivepositive reviewpostpriceprintproblem reportedproductionproduction companyratingready to print film fact sheetrefreshregisterregister now!register | 5 €register | detailed profilesregister | full qualityregister | news servicesrejectedremember_meremoverepliedrequired fieldrestrictionreviewreview_suggestionssearch for festivalssend %{title} to the jury.send free download invitationssend free downloadsshortfilmshortfilm festivalsshortfilmssongstart_festival_findstart_film_watchstart_tutorial|right_placestart_users_contactsubmit shortfilmsubscribe to news services for festival and film datessubscriptionsubtitlesubtitle new explanationsubtitlessyf | Do It Yourself Days Presentationssyf | Peter Brodericks tips on how to build an audiencesyf | Raising Money with Indiegogosyf | Speeches and Workshops at Power To The Pixelsyf | The Workbook Projectsyf | Video Lectures of the Berlinale Talent Campussyf | dft 1syf | dft 2syf | dft 3syf | dft introsyf | dft ppksyf | dia introsyf | etf 1syf | etf 2syf | etf 3syf | etf 4syf | etf 5syf | etf 6syf | etf 7syf | etf introsyf | finalesyf | introsyf | lm introsyf | lpk 1syf | lpk 1-2syf | lpk 2syf | lpk 3syf | lpk 4syf | lpk introsyf | odvd 1syf | odvd introsyf | ppk 1syf | ppk 1-2syf | ttr 1syf | ttr 2syf | ttr introsyf | tyf 1syf | tyf 2syf | tyf introsyf | videos introtake offlineteam memberterms of usethe filmmakerto %{recipient}tracktype in a director nametype in a movie nametype in the name of a festivalupload press kit to rathershortuserusersview allview factsheetwaiting for %{min_votes} jury reviewswaiting for uploadwatch films in high resolution - update to pro accountwatch films in highest quality without adswatch great shortmovies in full lengthworldwideyearyes§ 1 Subject§ 1 Subject explanation§ 2 Transfer of rights§ 2 Transfer of rights explanation§ 2 Transfer of rights explanation2§ 3 Guarantee§ 3 Guarantee explanation§ 4 Information Service§ 4 Information Service explanation§ 5 Allowance§ 6 Right of inspection§ 6 Right of inspection explanation§ 7 Determining§ 7 Determining explanation§ 8 Final provisions§ 8 Final provisions explanation§ 9 Severability clause§ 9 Severability clause explanationProject-Id-Version: shorties 0.1 POT-Creation-Date: 2009-02-11 16:58+0100 PO-Revision-Date: 2008-07-08 19:34+0200 Last-Translator: FULL NAME Language-Team: LANGUAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=INTEGER; plural=EXPRESSION; %{days} Tage Pro-Account%{language} Untertitle für %{movie}%{months} Monate Pro%{name} ist jetzt bei rathershortvor %{relative_time}Bisher hat Dein Film (Pro-User zahlen für das Sehen Deines Films mit einem Teil ihres Monatsbeitrags.)Dann reiche Deinen Film zur Jury ein.Dann reiche Deinen Film zur Jury ein.(nachfolgend rathershort.com) als Lizenznehmer- %{days} Tage Zugriff auf den Download (beginnt mit erstem Zugriff)- Anleitung zum Brennen der DVD- das DVD-Image als iso Datei- die Video-DVD mit allen Filmen in der individuellen Verpackung- weltweiter Versand inklusive1 Jahr Pro-Account1,00€ geht an den Filmemacher %{name} %{explanation}5 € / Monat, davon gehen 2 € direkt an FilmemacherEine neue Aktivierungs-Email wurde an Deine Adresse gesendetInfoDauer in TagenEndGratisStartStatusZugangAccessableAccessable typeEndStartStatusE-Mail von rathershort bei neuen NachrichtenDer Aktivierungscode ist ungültig oder zu alt.Aktivierungs Email konnte nicht gesendet werden, bitte überprüf die Email-Adresse die Du eingetragen hastFestival eintragenEintrag hinzufügenZur DVD hinzufügenzu Favoriten wählenUntertitel: %{name}ZusatzinformationenAdresseZusätzliche AngabenRechnungsadresseStadtLandNameStraßePostleitzahlAdminAbenteuerAlleAlle LänderAlle Zahlen ohne Garantie.
  • Die vom Lizenzgeber zu erbringenden Leistungen, insbesondere die Einräumung der Auswertungsrechte an den Lizenznehmer, werden mit den folgenden Lizenzgebühren vergütet:

    Kauf des Films als Download bzw. als DVD
    Pro verkaufter Einheit des Films als Download oder DVD (als Einzel-DVD oder als Inhalt einer Zusammenstellung) erhält der Lizenzgeber 1,00 Euro.

    Abspiel in hoher Qualität für Pro-User von rathershort.com
    Der Filmemacher wird direkt prozentual an den Einnahmen aus Pro-Users beteiligt. 40% des Pro-Endpreises fließen pro Pro-User in den Pool für Filmemacher- Beteiligung. Dieser Pool wird je nach Zuschauerzahl der einzelnen Filme monatlich auf alle beteiligten Filmemacher prozentual aufgeteilt.

    Vergütung für Verwendung zu Werbezwecken
    Rathershort.com nutzt zu Promotionzwecken die Möglichkeit, Gutscheine für Gratisdownloads an Nutzer auszugeben. Für den Fall, das der Film des Lizenzgebers von entsprechenden Promotionaccounts genutzt wird, erhält der Lizenzgeber 10% der üblichen Vergütung.
  • Der Lizenzgeber ist berechtigt, seinen Film 50 Mal als Gratisdownload zu verschenken.
  • Die Auszahlung aller Lizenzgebühren erfolgt monatlich.
  • Für die Versteuerung der Lizenzgebühren ist der Lizenzgeber verantwortlich.
  • Der Lizenznehmer ist berechtigt, den Film in Zusammenhang mit der Webseite rathershort.com zu Werbezwecken im Rahmen kultureller Veranstaltungen, wie z.B. Festivals international und ohne Entgeld vorzuführen.
Erlaubte Zeichen:TrickfilmzeichnerEin anderer Nutzer ist unter dieser E-Mail Adresse bereits registriert.AntwortBist Du sicher, dass Du %{name} löschen möchtest?KunstAusstattungRegieassistentCutterassistentProduktionsassistentProduktionsassistentDateitypDateinameHöheGrößeBreiteZurückBasisdatenBasic AccountBasisdatenAnfangBesteBeleuchterBester TrefferBeste RezensionenBeste kurzfilmeRechnungsadresseTonassistentSchicke uns Deinen Film zu!Festivals durchsuchenFilme anschauenDVD wird zusammengestelltPro kaufenDVD kaufenDVD Zusammenstellung kaufen

Dein persönliches Lieblingsprogramm auf DVD!


Erstelle aus beliebigen Filmen Deine Auswahl von bis zu zehn Filmen - rathershort.com erstellt daraus eine DVD samt Menü und allen vorhandenen Untertiteln. Du kannst diese DVD als Datei zum selber brennen herunterladen oder Dir per Post zuschicken lassen.

Dabei gibt es im Vergleich zum Einzelkauf deutlich günstigere Konditionen. Bei fünf Filmen zum Preis von 10 € ist etwa bereits ein Film gratis enthalten. Stelle Dir so technisch unkompliziert und günstig Dein Lieblingsprogramm zusammen. Die DVD ist natürlich auch ideal als Geschenk geignet.

Die Kauf-Funktion für Downloads wird mit dem Start der öffentlichen Testphase freigeschaltet.
Download kaufenDownload kaufen

Klick, und der Film gehört Dir!


Für einen fairen Preis von 2,50 € kannst Du Filme als Datei-Download erwerben. Das bedeutet, Du kannst den Film als Mpeg4 Datei (ideal für's Abspielen via PC oder Spielkonsole sowie mobile Geräte) in hoher Auflösung herunterladen. Dabei gibt es KEIN Digital Rights Management, also keine künstlichen Kontrollen, wo und wie oft Du den Film schaust, der Film ist auch kopierbar.

Neben der Mpeg4 Datei bietet rathershort.com Käufern auch ein DVD-Image an, das unter geringem Aufwand einfach als DVD gebrannt werden kann. So können auch technisch wenig versierte Nutzer Filme auf DVD genießen.

Info für Filmemacher: Kein DRM - Fair für alle!


Aus mehreren Gründen sind Downloads bei rathershort.com DRM-frei

1. DRM schützt nicht vor Filmpiraterie.
Solange ein Film auf DVD erhältlich ist, kann er von jedem 12jährigen mit einfachster Software raubkopiert werden. Wenn jemand einen Film mit aller Absicht kopieren und in Tauschbörsen stellen will, wird er es auch tun. Downloads ohne Kopierschutz ermutigen normale, gesetzestreue Käufer in keinster Weise, Gesetze zu brechen.

2. Kurzfilme sind weit weniger attraktiv für Raubkopien
als massiv beworbene Hollywood Blockbuster.

3. DRM bestraft Konsumenten
dadurch, dass sie gekaufte Medien nur auf bestimmten Abspielgeräten oder für einen bestimmten Zeitraum schauen dürfen. Dies hält viele potentielle Nutzer vom Kauf ab und verhindert direkt eine Ausbreitung von legaler digitaler Distribution. Wir glauben daran, dass es für Filmemacher wie für Zuschauer sehr viel attraktiver ist, wenn Filme jederzeit auf verschiedensten Plattformen, also etwa per Fernseher, iPod, Beamer, Pc oder Laptop geschaut werden können.

4. Die Zukunft digitalen Vertriebs ist DRM-frei
Die Filmindustrie hängt in diesem Punkt der Musikindustrie um mehrere Jahre hinterher, die nach vielen negativen Erfahrungen umgeschwenkt hat - so gibt es bereits seit einiger Zeit sehr erfolgreich DRM-freie Musik nicht nur bei Independent-Vertrieben, sondern auch bei iTunes von Apple.

Die Kauf-Funktion für Downloads wird mit dem Start der öffentlichen Testphase freigeschaltet.

Fazit:


  • sehr gute Qualität
  • abspielbar auf vielen Plattformen
  • kein Kopierschutz

Was gibts noch:

Eine Anleitung zum Abspielen der Filme liegt bei.Du bekommst:Du kannst die Dateien innerhalb von %{days} Tagen herunterladen, beginnend mit dem ersten Download.Film kaufen (2,50 €)Mit der Registrierung für rathershort.com akzeptierst Du unsereBerechnungs DetailsKameraKamera OperatorAnzahl couponsEndet amTitelBewertung kann nicht ohne movie id erstellt werden!Rezension kann nicht hne movie id erstellt werden.SchauspielerCast and CrewCastingCastingassistentCasting DirectorKategorienIn %{name} Bereich ändern.Passwort ändernÜberprüfe Deinen FilmKaufenKinderfilmWähle, wer Deinen Film sehen kannWähle aus wer Zugriff auf Deinen Film hat.
Du kannst Dich für Öffentlichen Zugang oder eingeschränkten Zugriff nur für Pro Nutzer entscheiden.
Das kann jederzeit nachträglich geändert werden.Gib hier Infos über Dich selbst ein.Beschreibung eingebenKollegeBekannteNetzwerk von %{person}KomödieKommt bald...Sollte Dein Film Bildprobleme (wie etwa schwarz/grau Probleme zu Beginn) haben, wird rathershort dies schnell beheben, Du musst den Film nicht neu einstellen.FirmaAdressen vervollständigenKomponistKontaktKontaktiere rathershort.comInhaltweiter >UrheberrechtBenachrichtigungen über Urheberrechtsverletzungen musst du uns schriftlich zukommen lassen. Sie müssen folgende Angaben enthalten und in der nachfolgenden Form vorliegen:Wir benötigen zur Bearbeitung Deiner Anfrage Titel, Land und Filmemacher des entsprechenden Films, sowie die URL bzw. Adresse, unter der der Film von Dir aufgerufen wurde. Bitte gib außerdem an, aus welchem Land Du den Film aufgerufen hast. Wir benötigen darüber hinaus genaue Angaben, welche Urheberrechte verletzt werden.KostümKostümbildnerLandGutscheinCoupon gesendet an %{email}CouponsGutscheine die Du selber ausgestellt hast werden nicht gezähltAktionGutschein-codeCreatorVerfällt amOrder itemEmpfängerEingelöst amEingelöst durchErstellenneuen Nutzer anlegenLege einen neuen Film an, um einen FTP Zugang zu erhalten.Die Informationen wurden erfolgreich gespeichert!Melde Dich anErstelltErstellt amErstelleFilmteamKrimiMit rathershort.com kannst Du einzelne Filme oder ganze Compilations mit bis zu zehn Filmen auf DVD erstellen lassen. Ideal, um Filme per DVD-Player oder Spielkonsole auf den Fernseher oder Beamer zu bringen oder mit zu Freunden zu nehmen - so kannst Du Filme auch ohne Onlinezugang schauen. Eine DVD mit mehreren Kurzfilmen eignet sich natürlich auch hervorragend als Geschenk!DVD-Image DownloadVideo DVD, von uns produziert und verschicktE-Mail von rathershort bei neuen Nachrichten deaktivierenLöschenBeschreibung in EnglischBeschreibung in Originalsprache (optional)LizenzvertragAbweichende LieferadresseRegieRegisseurKameramannGutscheine / DiscountsDiskutiertDiscussable typeDiscussable typeTitelVetriebName des VetriebsMach's nochmal!Hast Du Grossschreibung aktiviert?DokumentationDenke an Dein TeamVerbieteDownloadDownload CouponsLade meinen Film umsonst herunterLade die .ics Datei herunter und füge sie als neuen Kalender hinzu, oder abboniere die Adresse des LinksDownload/DVD VerkäufeDramaGarderobierRendertStatusTitelE-Mail wurde nicht gefunden.BearbeitenFestival editierenOrganisation bearbeitenProfil editierenUntertitel bearbeitenSchnittCutterLehrfilmEinschränkungen für einzelne Länder oder Medien können während der Filmanmeldung eingegeben werden.Email oder Passwort ist falsch!Film einbindenNutze Filme externGute Filme verdienen ein großes Publikum! Du kannst Filme von rathershort leicht auf Deiner eigenen Seite oder Deinem Blog anzeigen lassen. So kannst Du Deine Favoriten leicht an Freunde oder Bekannte weiterleiten oder sie Personen zeigen, die nicht bei rathershort angemeldet sind.Bette den kompletten Film auf Deiner Webseite / Blog ein.EndeFilm einreichenNeuen Kurzfilm einreichenGib Deine Email-Adresse ein, um ein neues Passwort zu erhalten.ErotikFehler während der Bezahlungs AbwicklungJeder Besucher kann Deinen Film sehen und kaufen.Au§er bei Bezahlung durch GutscheinExistierendAbgelaufener Pro-Zugang (%{ago})Es gibt einige Tools, um DVD-Images zu brennen. Einerseits kann man das allseits beliebte aber kostenpflichtige Nero Burning Rom (1) benutzen, oder man installiert sich die Freeware CDBurnerXP (2) um DVDs in Windows zu brennen. Für den Mac gibt es den Festplattenmanager (3), für Ubuntu/Suse(Linux) den integriertenCD/DVD-Generator (4).

Anleitungen findet man hier:
  1. Nero Burning Rom (Windows)
  2. CDBurnerPro /Freeware (Windows)
  3. Festplattenmanager (MacOS)
  4. CD/DVD-Ersteller (Ubuntu)
  5. Falls Dein Film eine Alterbeschränkung haben sollte, dann gib bitte an, ab welchem Alter Dein Film gesehen werden darf.Untertitel gehen dann nicht sofort online, sonder müssen erst von Dir bestätigt werden.Alle an der Produktion beteiligten Personen können hier eingetragen werden und sind dann bei rathershort.com mit Deinem Film verbunden.Gib hier eine ausführliche Beschreibung Deines Films ein.Bitte gib hier die Beschreibung in der Originalsprache des Films an. Du ermöglichst uns dadurch, Zuschauern aus dem entsprechenden Land eine leicht verständliche Beschreibung anzubieten.Bitte lade eine Logo-Grafik oder ein Bild für das Festival hoch (ideal, 248x140, größere Grafiken werden angepasst).Gib an, bei welchen Festivals Dein Film gezeigt wurde und welche Preise er gewonnen hat.Nachdem Dein Film auf unseren Server geladen wurde, kann er nun gerendert werden. Bitte wähle die entsprechende Datei und das Seitenverhältnis aus!Rathershort.com stellt sich vor. Schau Dir das Einführungsvideo an.und ein Popup-Fenster erscheint.
    Wähle Deine Datei aus, betätige den 'Upload'-Button und gib dein Passwort ein. Der Upload wird dann umgehend gestartet.

    Gedulde Dich ein wenig, denn das Hochladen wird einige Minuten dauern.
    Bitte schließe dieses Fenster erst wenn der Upload beendet ist.

    Es ist möglich den Upload zu unterbrechen und später fortzuführen. Der Uploader erkennt automatisch, wenn schon Teile der Datei hochgeladen wurden.Sobald Du den Film eingereicht hast, entscheidet die Jury, ob Dein Film akzeptiert oder abgelehnt wird. Die Jury-Kritiken kannst Du stets online einsehen.Wo wurde Dein Film gedreht? Bewege die Markierung dazu zum ensprechenden Ort auf der Karte, oder gib den Ort direkt ein.
    • Je Verkauf als Download oder DVD 1,00 €.
    • Für jeden Pro-User der Deinen Film ansieht, einen entsprechenden Anteil aus dem Pro-User-Einnahmen-Pool.
    • Auszahlung monatlich ab 100 € Guthaben.

    Grundlage für die Veröffentlichung Deines Films is der folgende Vertrag,
    Du behältst alle Rechte an Deinem Film :Welche Musik wurde in Deinem Film benutzt?Bitte gib ein quadratisches Bild zu Deinem Nutzerprofil ein, idealerweise 80*80 Pixel oder mehr.Gib hier die Produktionsfirma Deines Kurzfilms an.Möchtest Du Deinen Film via rathershort.com als DVD oder Download verkaufen?Gebe hier die Vertriebsbeschränkungen für einzelne Länder an.Hier erkennst Du, ob Dein Film hochgeladen wurde, in der Video-Bearbeitung ist, von der Jury bewertet wird oder ob wir noch auf Deinen Upload warten.Explanation|Subtitle rename and folderRathershort.com unterstützt Untertitel in beliebig vielen Sprachen.Gib hier die Grundinformationen Deines Films an.Bitte lade ein Vorschaubild für den Videoplayer hoch, als JPG oder GIF oder PNG (am besten in 640x360 Pixel)Zeige Deinen Film öffentlich oder nur gegen Gebühren für Pro-User.Zusätzliche AngabenErweiterte SucheÜbertrage deinen Film per FTP an uns und nutze dafür eine FTP-Software Deiner Wahl. Momentan akzeptieren wir Dateien mit bis zu 2 GB. Mehr zu FTP unterDatenblattFantasyFavoritFestival-FavoritenFilm-FavoritenFavorit: %{name}FeaturesWeiblichFestivalDie Festivaldaten können von allen Nutzern von rathershort.com editiert werden. Dadurch bleiben die Daten aktueller und von der Recherche des Einzelnen profitieren viele.

    Wenn Du an der Organisation dieses Festival beteiligt bist, und die Daten für weitere Änderungen sperren möchtest, schicke uns bitte eine Nachricht.NameFestival ErinnerungenAuszeichnungJahrFestivalsFestivals im Umkreis von %{distance} km von %{name}FestivalsFestivals in der UmgebungDetailsStadtLandErstellerNicht fortgeführtDeadlineDeadline amDauerEmailEventEvent amRSS feedFuture shortLogo / BildLocationBreitengradLängengradgesperrtNamePermalinkProgramm URLProgramm URLBesucher / JahrNameWebsiteDateiverwaltungDie Datei wurde gelöscht.FilmdateienFilm NoirFilmdetailsFilmemacher, deren Film akzeptiert wurde, können alle anderen nur-Pro Filme kostenlos sehen.FilmemacherInformationen für FilmemacherRathershort macht Kurzfilme einem größeren Publikum zugänglich. Du wirst an generierten Einnahmen fair beteiligt. Der folgende Vertrag muss beim Einstellen eines Films vom Filmemacher akzeptiert werden und kommt mit der Annahme des Films durch Rathershort zustande. Filmemacher-AnteilFilmemacher-Anteil:Umfrage für FilmemacherFilmeFilmteamFinde KurzfilmeKameraassistentFinanzamtGeräuschemacherFür die DVD Herstellung (MPEG2)Für PC, Mac order IPod (h264)Passwort vergessen?FundstelleGefundene Festival LocationsGratiskostenlose FTP-Clients:OberbeleuchterGenreGenresNameDeutschlandNutze rathershort optimalHilf uns, rathershort.com zu verbessern - wir freuen uns über Kritik, Anregungen und Vorschläge von Dir!Hat %{count} Festival-Awards gewonnen.Hallo %{name}, Dein rathershort.com account wurde erstellt! Besuche diese Adresse um den Account zu aktivieren: %{url}Übersetze für andereHistorieStartRathershort-Pro:Für 5 € monatlich können Zuschauer alle Filme beliebig oft zu privaten Zwecken in bester Qualität direkt streamen.Pro Monat zahlt jeder Pro-User 2,00 € in den Pool für Filmemacherbeteiligungen. Dieser Pool wird dann je nachdem welche Filme ein Pro-User siehtprozentual unter den Filmemachern aufgeteilt. Kauf-DVD:Filme können einzeln oder als Zusammenstellung als DVD erworben werden. Dabei ist der Preis pro Film ebenso 2,50 €, 5 Filme kosten 10 € und 12 Filme kosten 20 €. Rathershort.com erstellt ein DVD Image, welches der Nutzer downloaden und brennen kann. Vorhandene Untertitel werden integriert, ein Menü wird ebenfalls erstellt. Zuschauer können sich die DVD auch direkt für einen geringen Aufpreis per Post zusenden lassen. Pro gekauftem Film erhält der Filmemacher 1,00 €. Kauf-Download:Jeder Film kann von registrierten und nicht registrierten Zuschauern als Download (Mpeg4 Datei kompatibel mit mobilen Geräten bzw. Mpeg2 Datei zum Brennen auf DVD) erworben werden. Dabei wird kein Digital Rights Management (Erklärung) eingesetzt. Vorhandene Untertiteldaten werden mitgeliefert. Der Preis für einen Download liegt bei 2,50 €. Davon werden 1,00 € an den Filmemacher abgeführt. Was unterscheidet uns von anderen Plattformen?Wir stellen Filme mit allen dazugehörigen Daten dar, verknüpfen Beteiligte und Publikum, führen Buch über Festivalscreenings und Termine und ermöglichen über eine mehrsprachige Oberfläche und Untertitelfunktionen einem größeren Publikum den Zugang zu Euren Werken. Im Gegensatz zu gängigen Video-Trash-Plattformen entscheidet bei uns eine Aufnahmejury über die eingereichten Filme und sorgt für einen ansprechenden Sendeplatz für Eure Kurzfilme. Hier sind Eure Schätze gut aufgehoben! Ihr behaltet alle Rechte und seid flexibel bei der Lizenvergabe für einzelne Länder. Extern eingebundene Filme:Werden Filme von rathershort.com extern eingebunden, gelten prinzipiell die selben Vorgaben wie auf der Plattform selbst – nicht registrierte Nutzer können Filme nur bis zur Hälfte sehen und werden dann zu rathershort.com weitergeleitet. Wir werden in den nächsten Wochen schrittweise neue Funktionen freigeben und per Text und Video vorstellen. Von Euch wünschen wir uns zwei Dinge: Feedback und Filme! Dabei freuen wir uns auch besonders über ältere Arbeiten. Kommentiert dieses Video, füllt die Umfrage aus, schickt uns E-Mails oder kommt ganz einfach bei uns vorbei. Unser Ziel ist, mit rathershort.com im Spätsommer / Herbst 2008 öffentlich zu starten und Filme privaten Zuschauern zugänglich zu machen. Später sollen Zugange für gewerbliche Nutzung folgen. Seid von Anfang an dabei und geht einen neuen Weg, Kurzfilme effektiv zu vertreiben.Zukünftig sind Dienste für gewerbliche Käufer geplant, diese werden allerdings erst ab einer Größe des Filmpools von mehr als 500 Filmen eingerichtet. Wie vertreibt rathershort.com Filme? 1) Nicht registrierte ZuschauerRathershort.com übernimmt die Zahlungsabwicklung, die Konvertierung und Auslieferung der Filme in den gewünschten Formaten und sorgt für eine umfassende Erreichbarkeit der Filme, Steuern und Gema-Abgaben übernimmt ebenfalls Rathershort.com. Filmemacher können bei Einreichen ihres Films angeben, ob ein Film nur gesehen, oder auch als Download oder als DVD gekauft werden kann. Bereits abgegebene Rechte für bestimmte Länder und Medien werden von rathershort.com beachtet – wir prüfen, aus welchen Ländern Zuschauer auf Filme zugreifen. 2) Registrierte ZuschauerDie Bezugsmöglichkeiten werden mit dem Start der öffentlichen Testphase im September 2008 frei geschalten – Filmemacher erhalten ihre Beteiligung vierteljährlich als Paypal- Überweisung ausgezahlt, bei Summen größer als 100 Euro ist auch Überweisung möglich. Nutzer von rathershort.com haben Zugriff auf einen Großteil aller Funktionen und können monatlich 50 Filme in einfacher Qualität aufrufen. Um Filme in bester Qualität sehen zu können, gibt es drei einfache Möglichkeiten: Besucher von rathershort.com können zwei Filme in einfacher Qualität voll anschauen, danach werden sie zur Registrierung aufgefordert, weiteres Anschauen von Filmen ist ohne Registrierung dann in diesem Monat nicht mehr möglich. Willkommen zur Rathershort.com Testphase. Wir starten mit einer abgespeckten Variante, die vorerst nicht öffentlich zugänglich ist und sich vorrangig an Filmemacher wendet. Wir möchten Euch die Seite und die Hauptfunktionen vorstellen und Euch zum Einstellen von Filmen und zum Austesten des Systems bewegen - noch können wir Feedback direkt umsetzen und die Seite an Eure Vorstellungen anpassen! Das Grundprinzip von rathershort.com ist einfach: Wir wollen die direkte Verbindung zwischen Filmemachern und ihrem Publikum schaffen und die erste Anlaufstelle für das Medium Kurzfilm werden. Ihr als Produzenten könnt Filme einstellen und sie kostenlos oder kostenpflichtig als Download, DVD oder Streaming in hoher Qualität anbieten, dabei übernehmen wir Umwandlung, Auslieferung und Abrechnung. Rathershort.com soll allerdings kein reiner Marktplatz werden, wir denken, dass damit enormes Potential für Euch Filmemacher und die Filme verschenkt wäre. Vielmehr wollen wir auch ein Netzwerk für Filmemacher, Filmfans und Festivals realisieren. Für den Filmvertrieb setzen wir auf einen gestaffelten Zugang zu Inhalten: QualitätsvergleichHorrorWie man DVD-Images brenntZeige Deinen FilmIch habe den Vertrag gelesen und stimme ihm zu.Ich habe den Vertrag gelesen und stimme ihm zu.Mir gefällt dieser Film nicht.Mir gefällt dieser Film.DateitypDateinameGrößeDu kannst hier einen oder mehrere rathershort.com Gutscheincodes angeben, die dann mit Deiner Bestellung verrechnet werden.Wenn dein Vetrieb nicht in unserer Liste ist, gib bitte seinen Namen ein. Nach dem Speichern kannst du den Vetrieb ändern, um mehr Details hinzuzufügen.Wenn die gerenderte Filmdatei nicht Deinen Erwartungen entspricht, ImpressumPosteingangEinahmen aus Deinen FilmenAbspielen:Die Informationen wurden erfolgreich gespeichert!Eingeschlossene UntertitelEinführungsvideoEinladung verschickt an %{email}Einladung zu rathershortEinladenLade Leute ein, Deinen Film anzuschauen! Du kannst auch eingetragene Team-Mitglieder einladen - ihre Accounts werden dann automatisch mit Deinem Film verbunden.Max Mustermannangemeldet %{ago}Jury-BewertungFilme werden vor der Veröffentlichung auf rathershort.com von einer Jury bewertet. Die Jury besteht aus dem Team von rathershort.com und einigen Filmemachern, die selbst Filme bei rathershort.com haben. Wenn Du als Filmemacher ebenfalls in der Jury mitwirken möchtest, schreibe uns eine Nachricht.JuryJury-ArbeitBeschreibungFilmspracheWelche Sprachen verstehst Du?Letzte RezensionenLetzte SucheZuletzt aktualisiert von %{name}Letzte RezensionenWeitere RessourcenLass es Leute wissenFilmlizenzvertragLichtassistentLicht und BühneHerstellungsleiterDie Linkadresse ist ungültig (zu alt)Die Linkadresse ist ungültig.Dieses Festival darf nur durch %{name} editiert werden.Anmeldung war erfolgreich!AnmeldenKeine Identifizierung gefunden, bite nochmal Login Daten sind zu alt, versuch es bitte nochmalMach es Leuten einfach, Deinen Film zu findenMaskeMaskenbildnerMännlichNachrichtNachricht '%{subject}' wurde gesendet an %{recipient}.Nachricht gesendet!Nachricht an rathershort.comNachrichtenTextAbsenderEmpfängerAbsenderBetreffSonstigesMobile GerätePortable Computer und Handys sind vermehrt in der Lage, Filmdateien in hoher Qualität wiederzugeben - so ist das Download-Format für gekaufte rathershort-Filme bereits kompatibel mit allen Video-iPods und kann mit freier Software (links coming) schnell und unkompliziert in viele weitere Formate umgewandelt werden. Nimm Deine Kurzfilme mit auf Reisen, schaue sie in der U-Bahn auf dem Weg zu Schule oder Arbeit und zeige sie Freunden und Kollegen. Kurzfilme unterwegs - ideale Unterhaltung für Alltagspausen.Verdiene an deinem Film!Mehr Zuschauer führen zu tendenziell mehr Verkäufen.FilmFotoKurzfilm WeltkarteFilmeFilme promotenBestimmte Filme sind erst ab einem bestimmten Alter zugänglich.Integrierten Untertitel hinzufügenAltersfreigabeAndere Nutzer dürfen Untertitel erstellen.SeitenverhältnisKategorieProduktionslandBeschreibung (englisch)Sprache der BeschreibungBeschreibung (original)GenreCoverFilmspracheDrehortKurzbeschreibung (englisch)Kurzbeschreibung (original)PresskitPresskit URLProblembeschreibungJahrVeröffentlichtals Download verkaufenals DVD verkaufenSchlagwörterSchlagwörterTitelTitel (englisch)Titel (original)Ja, mein Film darf auf rathershort.com online gezeigt werden. Die Musikrechte sind geklärt.WebsiteMusikMusikproduzentMusikvideoMeine FilmeMeine FilmeBestellungenNaturNeuNeue KurzfilmeNeuer Untertitel für %{movie}NeuesteNächsteNeinKeine %{objects} gefunden.Keine DialogeEs gibt momentan keine zu bewertenden Filme für die Jury!Diese Aktion ist nicht zugelassen.Biete eine umfangreiche DVD anSchenke Freunden oder Deinem Filmteam einen kostenfreien Download Deines Films. Du kannst bis zu 50 Personen einladen.Nur FilmemacherNur professionelle Nutzer können den Film sehen und kaufen.Oder melde Dich an durch:BestellungRathershort-Pro

    Das Rathershort-Abo für Kurzfilmfans


    Schaue alle Filme, jederzeit, beliebig oft in sehr guter Bildqualität - So macht das Anschauen der Filme im Vollbildmodus erst richtig Spaß. Du hast vollen Zugriff auf den gesamten Filmbestand und sparst Dir zusätzlich auch jegliche Werbeeinblendung.

    Rathershort-Pro ist das ideale Angebot für Filmfans, schaue Filme jederzeit auf Deinem Computer, Fernseher oder Beamer - allein oder zusammen mit Freunden! Du benötigst nur eine gängige Internetverbindung und einen Rechner mit aktuellem Browser.

    Das ist unser Komplett-Angebot an Kurzfilm-Fans. Die Beiträge von Pro-Usern werden ähnlich dem Kauf von Downloads oder DVDs und an die Filmemacher weitergeleitet.

    Pro-User zahlen 5 € pro Monat . Weder eine Einrichtungsgebühr noch Kleingedrucktes irgendeiner Art erwarten dich. Du kannst jederzeit kündigen. Den letzten Monat berechnen wir regulär, danach nie wieder einen Cent. Als Zahlungsmittel akzeptieren wir Überweisung, Kreditkarten und Paypal.


    Rathershort-Pro ist sinnvoll ab DSL mit 2000 kbit/s.

    Fazit:


    • alle Filme, so oft Du willst
    • deutlich höhere Auflösung
    • keine Werbung
    • nur 5 € monatlich

    Was gibts noch:

    Bestellung abgeschlossen! Du wirst eine E-Mail mit den Details zu Deiner Bestellung erhalten, sobald wir Deine Zahlung erhalten haben.Details der BestellungKostenlosBestellungVersandBestellungenBestellung bezahlt amStatusRathershort gewährt für versandte DVDs ein 14-tägiges Widerrufsrecht nach §312b, §355 BGB. Das Widerrufsrecht für Downloads und DVD-Image-Dateien entfällt nach §312d Abs.4 Nr.1 BGB, §312d Absatz 3 BGB.Vor dem Auslösen der Bestellung musst Du Nutzungsbedingungen von rathershort.com lesen und akzeptieren.OrganisationDetailsEmailNameWebsiteAndere Benutzer und Besucher Deines Profils können Dich so kontaktieren.Andere Nutzer wissen was sie benutzen sollen wenn sie Dir eine Nachricht schreiben.Andere Besucher von rathershort.com sehen nur ein Vorschaubild / Trailer.ProAbgerechnetBezahlung erhaltenZahlung erhalten um %{time} GMTZahlungen werden sicher über Paypal abgewickelt.PersonenÜber DichAIM AccountStadtLandGeburtsdatumEmailFacebook IDGeschlechtICQ #PorträtMySpace NameVollständiger NamePasswortPasswort wdh.Pro bisEmail Benachrichtigungen erhaltenSkypeTwitterWebseitePlaylistPositionName%{login} oder %{register} (schnell und kostenlos), um mehr Filme sehen zu könnenBitte lese und bestätige zuvor den Lizenzvertrag.Bitte lese und bestätige zuvor den Lizenzvertrag.Bitte prüfe Deinen Film - ist die Qualität der Umwandlung okay, sind Ton und Bild synchron? Wenn der Film noch nicht abgespielt werden kann, ist die Umwandlung des Films noch nicht abgeschlossen. Sende Deinen Film ein, wenn Du mit der Darstellung zufrieden bist.bitte wählenBitte vervollständige Deine AngabenBitte gib Dein Passwort ein!Bitte gib hier eine von der Lieferadresse abweichende Rechnungsadresse ein (optional).Bitte gib hier Deinen Vetrieb ein, falls Du nicht selbst vertreibst.Bitte melde Dich an, um diese Seite aufzurufen.Bitte gib eine gültige E-Mail Adresse an.Bitte gib eine Lieferadresse für diese Bestellung an.PopularitätBeitragErstellt: %{name}BeiträgeErstellerDiskussionTextStelle ein Press-Kit zusammenPressePressekontaktFür Rückfragen zu unseren Dienstleistungen und Aktionen, aber auch für Interviewtermine kontaktieren Sie bitte:Press KitDie aktuelle Pressemitteilung stellt Rathershort kurz vor.Presse-ServiceZurückDatenschutz

    1. Datenerhebung

    Bei der Registrierung auf rathershort.com und bei der Erstellung seines eigenen Nutzer-Profils gibt der Nutzer Daten von sich an. Diese personenbezogenen Daten des Nutzers werden von rathershort gemäß den gesetzlichen Regelungen vertraulich behandelt und während des Vertragsverhältnisses ohne weitere ausdrückliche Einwilligung nur zu Zwecken der Vertragsabwicklung erhoben, verarbeitet und genutzt. Die Datenerhebung, -nutzung, und -verarbeitung erfolgt elektronisch.

    2. Informationsweitergabe im Rathershort Netzwerk

    Nach der Registrierung auf rathershort kann der Nutzer sein eigenes Profil anlegen und erstellen. Die vom Nutzer angegebenen Daten für sein eigenes, öffentliches Nutzerprofil, wie zu Beispiel der verwendete Nutzer-Name oder das Profilbild, sind für alle Besucher der Plattform sichtbar.

    3. Datenverwendung

    Rathershort wird nur dann Informationen an Dritte weitergeben, wenn dies aufgrund gesetzlicher und rechtlicher Gründe vorgeschrieben ist und/oder wenn es erforderlich ist, um Dienstleistungen der Plattform dem Nutzer anzubieten und umzusetzen und/oder wenn rathershort die ausdrückliche Erlaubnis des Nutzers dazu hat.

    Rathershort ist berechtigt, Informationen an Dritte dann weiterzugeben, wenn diese im Auftrag und für rathershort Dienstleistungen und Handlungen übernehmen sollen, wie zum Beispiel die Software der Plattform auf ausgelagerten Servern laufen zu lassen oder um Zahlungsvorgänge für angebotene Produkte oder Dienste abzuwickeln und abzurechnen.

    4. Cookies

    Rathershort verwendet nach der Anmeldung des Nutzers Cookies, mit denen der Nutzer während der Dauer seines Besuches auf der Plattform erkannt und bei einer erneuten Anmeldung auf der Plattform wieder erkannt werden kann. Ein solcher Cookie wird auf dem Computer des Nutzers gespeichert. Der Nutzer kann durch Einstellungen seines Computers derartige Cookies entfernen oder eine Nutzung ohne Cookies gewährleisten.

    5. Geltung der Datenschutzbestimmung

    Rathershort ist berechtigt, diese Datenschutzbestimmung unter Beachtung der gelten Datenschutzbestimmungen zu ändern. Die Änderung dieser Erklärung wir rathershort auf seiner Plattform kennzeichnen. Der Nutzer hat die Möglichkeit, einer Änderung innerhalb von 14 Tagen schriftlich, wobei eine E-Mail ausreichend ist, zu widersprechen. In einem solchen Fall kann rathershort die Dienstleistung für den Nutzer einstellen.Pro-Account noch für (%{num} Tage)Pro AccountPro AccountsDie Zahlungen von Pro-Usern werden monatlich berechnet.ProduzentProduktionSzenenbildnerProduktionsfahrerProduktionsleiterTonmeisterProduktionsfirmenProduktionsfirmaProfisProgramm URLBeamerFilme werden für die Leinwand gemacht - und Beamer finden sich in mehr und mehr Haushalten. Neben der Bespielung per DVD-Player ist die komfortabelste Lösung eine Verbindung vom Projektor zu einem Rechner mit Internetzugang, dazu gibt es verschiedenste Lösungen (links coming). Pro-Userkönnen Filme in hoher Auflösung streamen und so auch direkt projizieren - der bequeme Zugang zum Kurzfilm im Heimkino.RequisiteurBitte gib eine Adresse an. Öffentlicher ZugangPuppenspielerPuppenbauerRSS Feed für diese SucheRSS-FeedZufällige PersonenDas Logo kann für Verweise auf rathershort.com genutzt werden.Rathershort darfRathershort.com nutzt Pay Pay als sicheres Zahlungssystem.Hat mir gefallenMehr PublikumTips: Wie Du Deinen Film online einem größeren Publikum zeigen kannst!Zuletzt gekauftEmpfänger EmailGelöschtEinlösenGutschein einlösenWeiterleitung zu Paypal, bitte warten ...registrierenRegistrierung für kostenlosen ZugangRegistrierung für Pro-AccountBitte melde Dich an, um rathershort.com voll zu nutzen.ÄhnlichesVeröffentlicht %{year}ErinnerungenFilm von DVD entfernenaus Favoriten entfernenRenderprobleme?Die folgende Datei rendern:Problem meldenReport wurde gespeichert.LandBeschränkungendas Zeigen und den Verkaufden Verkauf von Downloadsden Verkauf von DVDsdas Zeigen des FilmsErgebnisErgebnisseRezensionRezensionen zu %{movie}Rezension: %{name}RezensionenRezensionen zuHat mir gefallennegative Rezensionenpositive RezensionenAnzahl der BewertungenTextTitelRechteVerfügbare RechteEinschränkungenRoad MovieRomantikSpeichernspeichern und schließenGespeichert!BühnenmalerScience FictionDrehbuchDrehbuchautorDrehbuchübersetzerSucheSuche in %{list} Entfernung.Personen suchenAusgewählte SchlagwörterSendeSende %{person} eine NachrichtSchicke uns eine DVD per Post.Schicke einen Gutschein zu einem FreundVerschicke kostenfreie Download-EinladungenNeues Passwort sendenGesendetBaubühneAusstatterSetaufnahmeleiterEinstellungenNutze Rathershort mit FreundenRathershort.com ist perfekt geeignet, um Kurzfilme nicht nur allein, sondern mit Freunden oder der gesamten WG zu schauen... So wird der wöchentliche Filmabend mit Freunden oder in der WG mit Kurzfilmen noch unterhaltsamer. Die bereits beschriebenen Lösungen zum Schauen von Filmen auf Fernseher oder Beamer bieten sich hierfür natürlich an.LieferadresseWarenkorbWarenkörbeKurzfilmeKurzfilmfestivalsKurzfilmeAlle Ergebnisse >Zeig Deinen FilmRegistrierung erfolgreich!StummfilmÄhnlich %{movie}Soziale NetzwerkeInterpretTitelDas Erstellen von frei zusammenstellbaren DVDs wird in Kürze frei geschaltet.Sortieren nachTonSounddesignerSound EditorsprichtSpezialeffekteFörderungSportStatusStatus aktualisiertStatus:Steadicam OperatorStandfotografStoryboardzeichnerStunt KoordinatorStylistZur Jury sendenBestellung abschickenKurzfilm einreichenAbonnierenUntertitelUntertitelUntertitelErstellerSpracheStatusTextZwischensummeDer Film wurde zu Deiner DVD hinzugefügt.Deine Auswahl wurde zum Warenkorb hinzugefügt!SynopsisFernseherKurzfilme auf dem Fernseher? Auch hierfür gibt es vielfältige Lösungen (links coming), die rathershort.com direkt ins Wohnzimmer bringen.TagTagTagsSchneiderSteuerAndreas Follmann, Jens Rietdorf, Robert Wagner, Michael Hauptvogel, Michael Grosser und Marcus Forchner gründeten rathershort.com im April 2008, der Berliner Filmemacher Felix Stienz unterstützt den Aufbau der Plattform als Berater.TeamfotoRolleNutzungsbedingungen

    1. Geltungsbereich

    Die von der Follmann, Forchner, Grosser, Hauptvogel, Rietdorf & Wagner GbR (nachfolgend rathershort) erbrachten Dienstleistungen richten sich ausschließlich nach diesen Nutzungsbedingungen. Der Nutzer akzeptiert die Anwendung dieser Nutzungsbedingungen bei seiner Registrierung auf der Webseite www.rathershort.com.

    Rathershort wird Änderungen und/oder Ergänzungen der Nutzungsbedingungen den Nutzern per E-Mail mitteilen. Der Nutzer hat ab der Ankündigung das Recht, schriftlich, wobei eine E-Mail ausreichend ist, Widerspruch gegen die gemachten Änderungen und/oder Ergänzungen bei rathershort einzulegen.

    Sollte der Nutzer nicht innerhalb von 14 Tagen Widerspruch gegen die neuen Nutzungsbedingungen bei rathershort einlegen, so gelten die Nutzungsbedingungen als genehmigt. Bei Widerspruch des Nutzers ist rathershort berechtigt, das Vertragsverhältnis mit dem Nutzer zu dem Zeitpunkt zu kündigen oder den Zugang zur Webseite zu verweigern, an dem die geänderten oder ergänzenden Nutzungsbedingungen in Kraft treten sollen.

    2. Vertragsgegenstand und Leistungsbeschreibung

    Der Nutzer von rathershort kann bereits gestellte Kurzfilme per Streaming abrufen und sie als Download oder DVD-Datei käuflich erwerben. Der Nutzer kann Filme und Festivals rezensieren sowie Rezensionen von anderen Nutzern positiv oder negativ bewerten. Der Nutzer kann darüber hinaus Nachrichten an andere Nutzer versenden und auf seiner Profilseite Bilder und Texte veröffentlichen.

    Rathershort bietet diese Dienstleistungen ausschließlich für private, nicht gewerbliche Zwecke der Nutzer an. Rathershort behält sich vor, Inhalte die offensichtlich nur zu werblichen Zwecken von Nutzern veröffentlicht werden, zu entfernen.

    3. Registrierung, Nutzung

    Die Dienstleistungen von rathershort können vollständig genutzt werden, sobald sich der Nutzer mittels des Anmeldeformulars auf der rathershort Webseite registriert. Rathershort stellt seine Dienstleistungen volljährigen Nutzern oder solchen minderjährigen Nutzern zur Verfügung, die mit Zustimmung ihrer Erziehungsberechtigten handeln.

    Mit der Registrierung auf der rathershort-Plattform erkennt der Nutzer diese Nutzungsbedingungen zur Regelung des gemeinsamen Schuldverhältnisses zwischen dem Nutzer und rathershort ausdrücklich als verbindlich an.

    Sollten infolge Verschuldens des Nutzers Dritte durch Gebrauch der Passwörter Leistungen von rathershort nutzen, haftet der Nutzer für den rathershort entstandenen Schaden selbst.

    4. Rechtmäßigkeit der multimedialen Inhalte

    Rathershort speichert für den Nutzer von ihm hochgeladene Filme, Bilder und Texte. Der Nutzer ist allein für die von ihm auf die rathershort Plattform eingestellten multimedialen Inhalte verantwortlich. Der Nutzer verpflichtet sich dafür zu sorgen, dass diese Inhalte nicht gegen geltendes Gesetz, die guten Sitten und gegen die Rechte Dritter (Namens-, Persönlichkeits-, Urheber-, Datenschutzrechte, usw.) verstoßen.

    Der Nutzer verpflichtet sich dazu, keine pornografischen, gewaltverherrlichende oder volksverhetzende Inhalte darzustellen, nicht zu Straftaten aufzurufen und keine Leistungen anzubieten oder anbieten zu lassen, die pornografische und/oder erotische Inhalte zum Gegenstand haben. Gleiches gilt für die Versendung von Nachrichten an andere Nutzer von rathershort.com.

    Vom Nutzer dürfen keine Inhalte eingestellt werden, die andere Nutzer beleidigen, verleumden, belästigen oder in sonstiger Weise schädigen.

    Der Nutzer verpflichtet sich, keine Daten zu versenden oder auf einem Datenträger von rathershort zu speichern, die nach ihrer Art oder Beschaffenheit, Größe oder Vervielfältigung geeignet sind, den Bestand oder Betrieb der Services und Datennetzes von rathershort zu gefährden. Der Einsatz von Computerprogrammen zum automatischen Auslesen von Daten von rathershort.com ist ohne ausdrückliche Zustimmung von rathershort nicht gestattet. Die durch diese Versendung von unerlaubten Daten entstanden Schäden hat der Nutzer rathershort zu erstatten.

    Rathershort ist berechtigt, bei einem Verstoß des Nutzers gegen die genannten Richtlinien dieser Nutzungsbedingungen, die Aufnahme von Inhalten zu verweigern, Inhalte unverzüglich zu löschen und zu sperren, die Seiten und darauf gerichtete Verweise sofort zu löschen und/oder das Nutzungsverhältnis mit sofortiger Wirkung aufzuheben. Der Nutzer hat in solchem Fall keinen Anspruch auf Wiedereinstellung seiner multimedialen Inhalte auf der Internetplattform oder Freigabe seines gelöschten Nutzerprofils.

    5. Nutzungsrechte

    Der Betreiber räumt dem Nutzer ein nicht ausschließliches und nicht unterlizenzierbares beschränktes Nutzungsrecht an den Filmen zur Vorführung im privaten Bereich für nichtgewerbliche Zwecke ein, nämlich die Filme live anzusehen (Streaming).

    Ein dauerhaftes Speichern der Filme auf dem Endgerät des Nutzers (Download) ist nur im Rahmen des Angebotes der Kaufdownloads zulässig.

    Der Nutzer darf den Video-on-Demand-Dienst nicht missbräuchlich nutzen, etwa den abgerufenen Film nur für Vorführungen im privaten Bereich für nichtgewerbliche Zwecke nutzen und ihn nicht öffentlich vorführen, senden oder auf andere Weise in Umlauf bringen; den abgerufenen Film nur unter Beachtung der nationalen und internationalen Urheberrechte nutzen; die Filme nicht auf mehreren Rechnern gleichzeitig ansehen; Kindern oder Jugendlichen nur solche Filme vorführen, vorführen lassen oder in anderer Weise zugänglich machen, die für die jeweilige Altersgruppe freigegeben sind.

    6. Verfügbarkeit und Haftung

    Rathershort übernimmt keine Garantie für die Verfügbarkeit der rathershort-Webseite und Dienstleistungen und keine Haftung für solche Mängel, die nicht im Einflussbereich von rathershort liegen, wie höhere Gewalt, Verschulden Dritter, die durch äußere Einflüsse, Bedienungsfehler oder nicht von rathershort durchgeführte Änderungen, Ergänzungen, Ein- oder Ausbauten, Reparaturversuche oder sonstige Manipulationen entstehen. Rathershort kann den Zugang zu den Dienstleistungen beschränken, sofern die Sicherheit des Netzbetriebes, die Aufrechterhaltung der Netzintegrität, insbesondere die Vermeidung schwerwiegender Störungen des Netzes, der Software oder gespeicherter Daten dies erfordern.

    Rathershort übernimmt keine Gewährleistung für die Darstellung der multimedialen Inhalte, also der Bilder und Videos, auf der rathershort-Plattform.

    Rathershort haftet nur für Schäden, die auf vorsätzlichen oder grob fahrlässigen Vertragsverletzungen beruhen. Dies gilt entsprechend im Falle der Verletzung vor- oder nebenvertraglicher Pflichten sowie bei Mangel- und Mangelfolgeschäden. Für leichte Fahrlässigkeit haftet rathershort nur bei der Verletzung von wesentlichen Vertragspflichten. Weiterhin besteht eine Haftung von rathershort bei Schäden nach dem Produkthaftungsgesetz sowie bei Schäden wegen der Verletzung des Lebens, des Körpers oder der Gesundheit. Der Einwand des Mitverschuldens des Nutzers bleibt rathershort unbenommen. Die vorstehenden Haftungsbeschränkungen gelten auch bei Pflichtverletzungen der gesetzlichen Vertreter oder Erfüllungsgehilfen von rathershort.

    Rathershort distanziert sich ausdrücklich von den Inhalten sämtlicher Seiten, auf die direkte oder indirekte Verweise (sog. Links) aus dem Angebot und der rathershort-Plattform von rathershort bestehen. Rathershort übernimmt für diese Inhalte und Seiten keine Haftung.

    7. Datenschutz

    Zum Thema Datenschutz hat rathershort eine separate Datenschutzerklärung beigefügt. Der Nutzer nimmt diese Datenschutzerklärung (rathershort.com/privacy_policy) hiermit zur Kenntnis.

    8. Allgemeines

    Für diese Nutzungsbedingungen und die gesamten Rechtsbeziehungen zwischen dem Nutzer/Mitglied und rathershort gilt das Recht der Bundesrepublik Deutschland unter Ausschluss deutschen Kollisionsrechts. Sollten einzelne Bestimmungen dieser Nutzungsbedingungen ungültig oder unvollständig sein oder werden, bleibt die Gültigkeit der übrigen Nutzungsbedingungen unberührt. Die ungültige bzw. unvollständige Bestimmung wird durch eine Bestimmung ersetzt bzw. ergänzt, die dem wirtschaftlich gewollten Ergebnis am nächsten kommt. Gerichtsstand für alle im Zusammenhang mit rathershort entstehenden Streitigkeiten ist, soweit gesetzlich zulässig, Berlin.Danke für Deine Bewertung!Danke für Deine Bewertung!Vielen Dank!Danke für Deine Registrierung! Eine E-Mail mit einem Aktivierungslink zur dauerhaften Freischaltung Deines Profils wurde an Dich geschickt!Rathershort Adinistratoren sind informiert und werden dich ggf kontaktieren.Theater/OperEs gab ein Problem beim LöschenEs gab ein Problem beim SpeichernEs gab ein Problem!Dieser Server schickt nicht genügend Informationen, um Deinen Account zu erstellen. (E-Mail, Name). Bitte %{register}.Dieser Film kann nur von %{icon} Nutzer gesehen werden -- %{what_to_do}Dieser Film kann in %{country} leider nicht gezeigt werden.Dieser Film darf in einigen Ländern nicht gezeigt werden. Bitte gehe zum %{login} oder wähle %{register}, um einen neuen Account anzulegen. Rathershort stellt so sicher, dass die Vorgaben der Rechteinhaber eingehalten werden.Starte den UploadThrillerUm zu Speichern drücke Titles > SaveTop StädteTop LänderGesamtBeobachte die ReaktionenDVDTragödieÜbersetze von %{lang_a} zu %{lang_b}Film übersetzenÜbersetze Deinen FilmTrashAbonnement beendenUpdate:Pro Account bestellenUploadCover hochladenBenutze ein FTP Programm zur Dateiübertragung.Nutze unseren Dateiuploader (Momentan nur mit Windows).Lade ein Profilbild hoch und gib die Sprachen an, die Du verstehst. Das hilft uns, Filminformationen in der passenden Sprache anzuzeigen, wenn sie verfügbar sind.Der Upload war erfolgreich und Dein Film wird nun umgewandelt. Du kannst dieses Fenster jetzt schließen.Nutze vorhandenen Untertitel als VorlageNutzerWeltkarte ansehenAufrufeGehe zu rathershort.comWarte auf Zahlungs BestätigungPinnwandWar diese Rezension hilfreich für Dich?Sieh andere nur-Pro FilmeKurzfilme schauen, diskutieren und kaufen!Wir zählen jeden Pro Nutzer der deinen Film siehtWir haben bislang noch keine Beschreibung,
    möchtest Du eine einfügen?Wir haben eine Übersicht mit Tips zur Online-Promotion von Filmen entwickelt: Wir werden versuchen, Dir vorrangig Filme in den genannten Sprachen anzubieten.WillkommenWesternWenn ein Pro Nutzer keinen Film gesehen hat, wird sein Beitrag zwischen allen Filmen gleichmäßig geteiltWenn der Besitzer des Films (%{name}) Deinen Untertitel überprüft hat geht er online.Wenn Du nach einem Passwort gefragt wirst, gib dein rathershort.com Passwort einÜberprüfe hier noch einmal Deinen Film auf Bild- und Tonqualität. Ist er in Ordnung? Wer darf Deinen Film sehen?Rezension schreiben!Rezension schreiben!JahrjaDu hast bereits die maximale Anzahl an %{size} Favoriten. Upgrade auf Pro für unbeschränkt viele Favoriten!Du hast diese Rezension bereits bewertet!Dein Account ist bereits aktiviert worden!Du bist kein Mitglied der JuryDu kannst das nicht kaufen!Du kannst uns auch kontaktieren durch boxoffice@rathershort.comDu kannst diesen Film noch %{time} herunterladenDu kannst den Titel einer DVD solange editieren, bis Du sie in den Warenkorb legst.Du kannst Deinen Kurzfilm online, oder per Post (DVD + Infos) einreichen.Du kannst diese Sprachen in der Filmsuche auswählenDer Nutzer existert schon und kann daher nicht eingeladen werden.Deine aktuelle Rechnungssumme beträgt:Die Datei sollte als Quicktime, Mpeg1, Mpeg2, Mpeg4 oder AVI Datei vorliegen. Für das Einreichen gibt es folgende Möglichkeiten:Abmeldung erfolgreich.Dir wurde eine E-Mail mit Anleitung zur Passwortänderung geschickt.Du hast noch keine Favoriten eingegeben.Du benötigst einen aktuellen Flash-Player!Du musst dich %{login} order %{register} um an der Diskussion teilzunehmen.Diese Seite steht nur angemeldeten Nutzern zur Verfügung.Du erhältst eine Erinnerung einen Monat vor dem Event. Weitere Errinerungsoptionen kannst Du in Deinen Profil-Einstellung verwalten.Du erhältst eine Zahlungs Benachrichtigung sobald deine Bezahlung bestätigt wurde.Deine DVDDeine DVD wird gerade zusammengestellt.Deine DVD enthält bereits die maximale Filmanzahl.Deine FTP-Daten:Dein Zugang zu %{title} wurde aktiviert und ist nun gültig bis %{end}.Dein Account ist nicht aktiviert worden. Bitte klicke auf den Link in DeinerBenachrichtigungs-Email von rathershort.com (prüfe auch Deinen Spam-ordner!).Du bist nicht berechtigt, (%{uri}) aufzurufen, schicke eine Mail to info@rathershort.com wenn Du denkst, dass da ein Fehler ist.Dein WarenkorbDeine Einkommen-ÜbersichtDein Film wurde an die Jury gesendet.Deine BestellungDeine Playlist ist leer, vielleicht gefallen Dir die folgenden Filme:Dein rathershort.com Passwort Dein Film wird nicht mehr gezeigt, auf eigenen Wunsch oder weil sich andere Nutzer beschwert haben(siehe Bewertungen für Details).Dein Film wird nicht mehr gezeigt, auf eigenen Wunsch oder weil sich andere Nutzer beschwert haben(siehe Bewertungen für Details).Dein Film wurde abgelehnt, weil er der Jury nicht gefallen hat. Details kannst du den Bewertungen entnehmen.Der Film wird zur Zeit in die benötigen Formate umgerechnet.Es wurde noch keine Filmdatei für diesen Film ausgewählt. Wenn wir Deinen Film erhalten haben, aktualisiere den Status und wähle den Film aus.Wir geben Deine Adresse nicht weiter! Deine E-Mail Adresse wird nur genutzt um Dir Nachrichten von rathershort.com zu sendenDieser Name wird bei deinen Kommentaren und Teilnahmen verwendet.
    Er sollte also dein ECHTER Name oder Künstlername sein. eine NachrichtPro-AccountZuganggreife auf detailliertere Profile zu Filmen und Festivals zuWeitere %{name} hinzufügenSchauspieler hinzufügenGutschein hinzufügenFilmteam-Mitglied hinzufügenFestival hinzufügenFestivalsuche im BrowserProduktionsfirma hinzufügenSong hinzufügenzu DVD hinzufügenzum Kalender hinzufügen (iCal, Sunbird, ...)in den Warenkorb legenAdresseallealle Einträgealle Rezensionenall Kurzfilmeundund lade eine neue auf den Server.bestätigenalsals Downloadals LizenzgeberAnhangZurückDer Film ist momentan gesperrt.Tips für eine gute Film-Webseitesei Teil eines internationalen und aktiven Kurzfilm-Netzwerksbestezwischensortiere Filme nach Ländernkaufe ProvonAktionKann nicht für diese Bestellung genutzt werden.Schauspielerwähle ein Genre ausschließen Einträge mit Komma trennenGutscheinCouponserstellt von %{name}Filmteam-MitgliedTagTageLöschengerenderten Film löschenhat momentan noch keinen rathershort.com Account.DVDbearbeitenDVD Titel ändernFilmprofile bearbeitendurchsuche die SchlagwörterFavoritFeedbackFestivalFestival TeilnahmeFestival ErinnerungFestivalsDein Film wird gerendert.finde detaillierte Infos zu Filmen, Filmfans, Filmemachern und Festivalsgefundenaus %{country}FilmsucheGenrewird bereits verwendethohe Qualität, für PC / Mac / iPod / iPhone ...StundenBildinEinladenFreunde einladenTeam-Mitglieder einladenwird nicht unterstützt, benutze Datein vom Typ jpeg, jpg, png oder gif.ist zu groß. Dateien bis zu 1,5 MB werden unterstützt.Auswahlneueanmeldenmelde Dich an, um Rezensionen zu bewertenabmeldenmaximale Qualität, ideal zum Brennen auf DVDNachrichtNachrichtenmonatMonatemehrmehr zu rssFilmFilme warten auf Bewertungdarf weder > noch < enthaltenMeine FilmeMein Profilnegativnegative Rezensionnegative/positive Rezensionen = %{ratio}neuneuen Untertitel anlegennein keine Altersbeschränkung Dein Film ist onlineoderBestellungTeil der BestellungOrganisationanderebezahlter viewPersonenPersonabspielenPlaylistPlaylist Itembitte wählenbitte wählenbitte warten... (wird ca %{x} Minuten dauern)positivpositive RezensionBeitragPreisdruckenDas Problem wurde registriert.ProduktionProduktionsfirmaBewertungdruckfähiges Datenblatt zum FilmStatus aktualisierenregistrierenjetzt registrieren!Nach Abzug der Steuern wird die Hälfte Deines monatlichen Beitrags an die Filmemacher weitergeleitet, deren Filme Du in diesem Monat geschaut hast. Der restliche Betrag finanziert die Pro-Features, die Du zusätzlich zum normalen Angebot von rathershort.com nutzen kannst.Du erhältst mehr Angaben, wie etwa direkte Festivaladressen oder Kontaktoptionen. Erstelle Deine eigene Profilseite mit zusätzlichen Funktionen wie Playlisten Deiner Lieblingsfilme.Schaue Filme in einer Auflösung von bis zu 640x360 Pixel, ideal für Vollbild-Betrachtung auf Computer, Großbildfernseher oder einem Beamer.Abonniere Info-Dienste zu Festivals - verpasse keine Deadline und keine Veranstaltung mehr! Du kannst auch Informationen zu Filmen oder Filmemachern abonnieren, um über Neuheiten oder neue Filme informiert zu werden.abgelehntangemeldet bleibenentfernengeantwortetbenötigtes FeldBeschränkungReviewWie hat Dir der Film gefallen?Festivals suchenSchicke Deinen Film zur JuryVerschicke kostenfreie Download-EinladungenVerschicke Download-EinladungenKurzfilmKurzfilmfestivalsKurzfilmeSongfindenanschauenzeig Deinen Kurzfilm bei rathershortkontaktierenKurzfilm einreichennutze Benachrichtigungs-Services zu Festival- und FilmdatenPro-AccountUntertitelDer Filmemacher hat diesen Film für Übersetzungen frei gegeben. Wähle die Sprache, in der Du Übersetzungen hinzufügst! Wenn bereits Untertitel vorhanden sind, kannst Du diese also Vorlage nutzen (sie werden mit allen Zeitmarken in Deinen neuen Untertitel kopiert), das erleichtert die Arbeit, da Du nicht alle Zeiten neu angeben musst. Wenn Du die neuen Untertitel fertig eingegeben hast, sende dem Filmemacher eine Nachricht, so dass die Untertitel öffentlich frei geschalten werden!UntertitelVideo Lectures of the Berlinale Talent CampusPeter Brodericks tips on how to build an audienceRaising Money with IndiegogoSpeeches and Workshops at Power To The PixelThe Workbook ProjectVideo Lectures of the Berlinale Talent CampusGib Deinem Team freien Download-Zugang zum Film. Du kannst bis zu 50 Personen einladen, Deinen Film kostenlos herunterzuladen - ein guter Weg, noch mal Danke für die Zusammenarbeit zu sagen und allen die Adresse des Film-Profils mitzuteilen. Lade Dein Team ein, rathershort Accounts anzulegen. Ihre Profile werden automatisch zu Deinem Film verlinkt so dass das davon alle Beteiligten durch eine komplette Darstellung profitieren. So können andere Personen Mitglieder der Filmcrew besser finden - und natürlich auch Deinen Film.Teile Infos zur Nutzung des Films auf rathershort.com mit Deinem Team. Die monatliche Statistik sowie alle Kommentare und Bewertungen kannst Du auch für Teammitglieder freigeben, wenn diese einen rathershort Account haben.Filmemachen ist Teamwork, also vergiss nie Deine Crew, wenn Dein Film online verfügbar ist.Mach es einfach, über Deinen Film zu berichtenWenn Du alle genannten Schritte durchgeführt hast, haben sicher bereits viele Menschen Deinen Film gesehen. Das ist die perfekte Basis, auf der Du mit Deinem nächsten Film aufbauen kannst!Vervollständige Deine Angaben zum Film über Cast & Crew und sorge für vollständige Beschreibungstexte. Es ist eine einmalige Arbeit, erleichtert aber viele weitere Schritte. Dein Film wird so besser von Suchmaschinen indiziert und kann im Netz und auch auf rathershort.com besser gefunden werden.Bring die Liste der Festivateilnahmen Deines Films auf den neuesten Stand. Oftmals haben Zuschauer den Film auf einem Festival gesehen und werden nach dem Film und / oder dem Festival suchen. Du hast so außerdem immer eine aktuelle Liste online zur Verfügung.(Optional) Erstelle eine Webseite / einen Blog zu Deinem Film, wenn Du das nicht bereits gemacht hast. Nutze dazu die folgendenStelle zumindest einige Standardangaben zum Film aufDie bekannten Videoplattform wie Youtube sind nicht der beste Platz, um Deinen Film komplett dort zu veröffentlichen, besonders wenn Du den Film mit Zusatzinfos ausstatten willst. ABER sie sind der perfekte Platz um Deinen Film zu bewerben. Lade einen Trailer, Ausschnitte oder Bonusmaterial zum Film hoch und sorge für gute Schlagworte und eine aussagekräftige Beschreibung, so dass die Videos im Zusammenhang mit themenverwandten anderen Clips patziert werden. Gib den Link zu Deiner Webseite und zum rathershort.com Filmprofil an, so dass interessierte Besucher dorthin gelangen.Soziale Online-Netzwerke wie StudiVZ oder Facebook sind ideal geeignet, um andere Leute von Deinem Film wissen zu lassen. Erstelle eine Profilseite oder eine Gruppe für Deinen Film, stelle verschiedenes Material wie Screenshots oder Videoclips zur Verfügung und verbinde alles mit Deinem persönlichen Profil. Schau Dir dazu diese Beispiele an:Denke daran, alle genannten Seiten und Profile mit Deinem rathershort Filmprofil zu verlinken, und umgekehrt. Das erleichtert plattformübergreifende Empfehlungen und gibt Deinem Publikum viel mehr Möglichkeiten, sich mit dem Film zu beschäftigen.Ein guter Weg, Deinen Film zugänglich zu machen, ist die Veröffentlichung bei rathershort. Aber das ist nur die Basis:Wir sind gespannt auf Deine Erfahrungen! Diese Seite wird regelmäßig aktualisiert und wir werden auch in unserem Blog über aktuelle Entwicklungen berichten, also abonniere am Besten den Wir haben diese Übersicht zusammengestellt, um Filmemacher bei der digitalen Verbreitung ihrer Filme und dem Aufbau einer Fanbasis zu unterstützen. Diese Tips basierend überwiegend auf dem DIWO Prinzip - Do It With Others! Wir werden die Liste regelmäßig updaten und freuen uns über FilmemacherUnsere Vorschläge beschreiben natürlich nur einen Teil Deiner Möglichkeiten, auf den folgenden Seiten findest Du viele weitere Infos.Schreibe Freunden, Kollegen, Mitschülern und Verwandten. Du kannst dafür dasTool oder einfach E-Mails nutzen.Nutze Deine sozialen Netzwerke - nachdem Du Deinen Film bereits dort eingetragen hast, solltest Du dies an Dein Netzwerk weiterleiten.Erstelle eine E-Mail Signatur mit dem Link zum Filmprofil auf rathershort.comSuche nach Blogs und Webseiten, die sich thematisch mit ähnlichen Dingen beschäftigen wie Dein Film, und schreibe die Betreiber an. Hierfür kannst Du auch gut das vorbereitete Press-Kit und den Link zum Filmprofil verwenden.
    Mehr zur Nutzung von Blogs als KommunikationswegNachdem Du nun alle Informationen zum Film bereit stellst, solltest Du den Leuten davon erzählen!Lade alle Materialien und das Image-File bei lulu.com hoch und gib einen Preis für die fertige DVD an - dann verlinkst Du die Einkaufsadresse auf Deinem Filmprofil bei rathershort.Rathershort.com bietet Deinen Film als Stream, Download und automatisch erstellte DVD an. Wenn Du allerdings auch eine umfangreiche DVD mit Zusatzmaterial und Artwork produziert hast oder dies noch tun möchtest, kannst Du auch diese DVD unkompliziert verkaufen.Es ist unkompliziert - stelle 3 Standfotos, eine volle Beschreibung, sowie Infos zu Crew, Cast & Produktion zusammen. Diese Informationen hast Du ja fast alle bereits auf Deinem rathershort Filmprofil.Du findest mehr Informationen zum Thema Press-Kit beiNutze die rathershort.com Statistiken zu Deinem Film um herauszufinden, wie viele Personen Deinen Film gesehen haben, und woher die Zuschauer kamen.Du kannst diese Daten auch sehr einfach für Deine eigene Webseite oder Deinen Blog herausfinden, zum Beispiel mitFine heraus, was für Deinen Film am Besten funktioniert - und was nicht. Es ist unkompliziert und interessant!Rathershort bietet Dir ein Tool, um Filme direkt online zu untertiteln. Dabei kannst Du auch bereits vorhandene Untertitel leicht importieren und es gibt eine Exportfunktion in viele Formate, so dass Du die Texte auch anderweitig verwenden kannst. Fertige Untertitel werden von uns in Streamings, Downloads und DVDs Deines Films integriert. Versuche, Deinen Film zumindest in den verbreiteten Sprachen Englisch / Spanisch anzubieten.Du kannst auch andere Nutzer Deinen Film direkt auf rathershort.com übersetzen lassen. Dazu musst Du diese Funktion in den Filmeinstellungen aktivieren. Fertige Untertitel müssen immer von Dir freigeschaltet werden, bevor sie veröffentlicht werden, also gibt es dabei für Dich kein Risiko bei diesem Feature.Ermögliche mehr Menschen, Deinen Film zu verstehen, in dem Du ihn untertitelst.Es gibt zum Thema digitale Filmverbreitung auch interessante Beiträge als Video:offline stellenTeam MitgliedNutzungsbedingungender Filmemacherin / dem Filmemacheran %{recipient}Filmgib den Namen eines Regisseurs eingib einen Filmnamen eingib den Namen eines Festivals einverlinke Dein Press-Kit mit Deinem FilmNutzerNutzeralle schauenDatenblatt anzeigenDein Film wird zur Zeit von der Jury bewertet und braucht insgesamt %{min_votes} positive Bewertungen, um aufgenommen zu werden.Warten auf Uploadschaue Filme in hoher Auflösung - zu Pro-Account wechseln - Beispielfilmschaue alle Filme in hoher Auflösung ohne Werbung (Beispielfilm)schaue großartige Kurzfilme in voller LängeweltweitJahrja§ 1 Gegenstand
    • Der Lizenzgeber ist berechtigt die Lizenz für genannten Film weiterzugeben. Der Lizenznehmer verpflichtet sich, den Film nach Maßgabe der ihm durch diesen Vertrag eingeräumten Rechte bestmöglich über die Webseite rathershort.com auszuwerten. Weitergehende Auswertungen werden angestrebt, sind aber kein bindender Bestandteil dieses Vertrages.
    § 2 Rechteübertragung
    • Der Lizenzgeber überträgt and den Lizenznehmer die nicht exklusiven Nutzungsrechte am Film im Hinblick auf die Verwendung auf der Webseite rathershort.com und für Maßnahmen, die deren Bewerbung dienen.

      Einschränkungen
    • Der Lizenzgeber kann sein Werk weiterhin anderweitig nutzen.
    • Die Auswertung über die Webseite liegt ausschließlich beim Lizenznehmer. Er kann Teile des Auswertungsrechtes an Dritte übertragen.
    • Die Rechteübertragung gilt unbefristet. Sie beginnt mit der Veröffentlichung des Films auf rathershort.com und kann von Lizenznehmer oder Lizenzgeber monatlich gekündigt werden.Der Lizenznehmer ist berechtigt, den Film ab Zeitpunkt der Kündigung noch 30 Tage lang auszuwerten.
    • Das vom Lizenzgeber übertragene Recht wird für im Lizenzzeitraum hergestellte Medien eingeräumt. Dem entsprechend sind bereits hergestellte Medien vom Ablauf des Lizenzeitraums ausgeschlossen.
    • Die Rechteübertragung erstreckt sich auch darauf, die im Film enthaltenen Aufnahmen und das vom Lizenzgeber zur Verfügung gestellte Begleitmaterial zur Werbung für den vertragsgegenständlichen Film in branchenüblicher Weise für Presse, TV (Ausschnitte) und neue Medien (Ausschnitt bis zwei Minuten) zu verwenden. Ist der Film kürzer als zwei Minuten, wird entsprechend eine kürzere Sequenz verwendet.
    § 3 Garantie
    • Der Lizenzgeber steht dafür ein, dass die zur Herstellung und Auswertung des Films erforderlichen Nutzungsrechte aller betroffenen Urheber- und Leistungsschutzberechtigten und aller sonstigen Mitwirkenden an der Herstellung des Films, vorbehaltlich der von den Verwertungsgesellschaften wahrgenommenen Rechte, ordnungsgemäß erworben worden sind und Persönlichkeits- oder sonstige Rechte Dritter der Filmauswertung nicht entgegenstehen.
    § 4 Informationspflicht
    • Der Lizenzgeber wird regelmäßig über die Aktivitäten bezüglich seines Films auf rathershort.com informiert und kann die Zuschauerzahlen dort abrufen.
    ? 5 Vergütung§ 6 Einsichtsrechte
    • Der Lizenzgeber ist berechtigt, auf seine Kosten alle Unterlagen, welche die Auswertung des Vertragsfilms und die dafür getätigten Aufwendungen betreffen, beim Lizenznehmer während der Geschäftszeit einzusehen oder durch eine zur Berufsverschwiegenheit verpflichtete Person einsehen zu lassen.
    § 7 Beendigung
    • Der Lizenzgeber ist berechtigt, das Vertragsverhältnis fristlos zu kündigen, sofern der Lizennehmer seinen Zahlungs- oder Abrechnungsverpflichtungen nicht nachkommt und diese Verpflichtungen auch nicht innerhalb einer ihm schriftlich gesetzten Nachfrist von vier Wochen erfüllt. Mit dem Zugang dieser fristlosen Kündigung fallen die Auswertungsrechte automatisch an den Lizenzgeber zurück.
    § 8 Schlussbestimmungen
    • Ergänzend gilt das Recht der Bundesrepublik Deutschland, Gerichtsstand ist Berlin.
    • Maßgebend ist allein dieser Vertrag. Mündliche Nebenabreden sind nicht getroffen.
    § 9 Salvatorische Klausel
    • Sofern eine der Vertragsparteien keinen Gerichtsstand im Geltungsbereich der Bundesrepublik Deutschland hat, gilt der Sitz des inländischen Vertragspartners als Gerichtsstand für alle etwaige Streitigkeiten aus diesem Vertrag. Die Parteien sind auch berechtigt, das nach dem allgemeinen Gerichtsstand des Beklagten zuständige Gericht anzurufen.
    • Die etwaige Unwirksamkeit einer Bestimmung dieses Vertrages lässt die Wirksamkeit des Vertrages im übrigen unberührt. Die unwirksame Bestimmung ist durch eine sinnentsprechende wirksame Bestimmung zu ersetzen, die der angestrebten wirtschaftlichen Regelung am nächsten kommt.
    fast_gettext-1.3.0/benchmark/misc/000077500000000000000000000000001300172175400171015ustar00rootroot00000000000000fast_gettext-1.3.0/benchmark/misc/threadsave.rb000066400000000000000000000012351300172175400215550ustar00rootroot00000000000000require 'benchmark' BASELINE = 0 def test result = Benchmark.measure {1_000_000.times{ yield }} result.to_s.strip.split(' ').first.to_f - BASELINE end BASELINE = (test{}) Thread.current[:library_name]={} other = "x" puts "Ruby #{VERSION}" puts "generic:" puts " Symbol: #{test{Thread.current[:library_name][:just_a_symbol]}}s" puts " String concat: #{test{Thread.current["xxxxxx"< normalize test results for users that have Iconv/those who do not have it begin;require 'iconv';rescue;LoadError;end initial = methods.count + Module.constants.count #FastGettext $LOAD_PATH.unshift File.join(File.dirname(__FILE__),'..','..','lib') require 'fast_gettext' FastGettext.locale = 'de' FastGettext.add_text_domain 'test', :path=>'spec/locale' FastGettext.text_domain = 'test' include FastGettext::Translation raise unless _('car')=='Auto' puts "FastGettext" puts methods.count + Module.constants.count - initialfast_gettext-1.3.0/benchmark/namespace/original.rb000066400000000000000000000004711300172175400222350ustar00rootroot00000000000000require 'rubygems' initial = methods.count + Module.constants.count #GetText gem 'gettext', '>=2.0.0' require 'gettext' GetText.locale = 'de' GetText.bindtextdomain('test',:path=>'spec/locale') include GetText raise unless _('car') == 'Auto' puts "GetText" puts methods.count + Module.constants.count - initialfast_gettext-1.3.0/benchmark/original.rb000066400000000000000000000010241300172175400202740ustar00rootroot00000000000000require_relative 'base' raise "Do not use bundler" if defined?(Bundler) begin gem 'gettext', '>=2.0.0' rescue LoadError => e puts "To run this benchmark, please install the gettext gem -- #{e}" exit 1 end require 'gettext' include GetText self.locale = 'de' puts "GetText #{GetText::VERSION}:" bindtextdomain('test',:path=>locale_folder('test')) results_test{_('car') == 'Auto'} #i cannot add the large file, since its an internal applications mo file bindtextdomain('large',:path=>locale_folder('large')) results_large fast_gettext-1.3.0/examples/000077500000000000000000000000001300172175400160325ustar00rootroot00000000000000fast_gettext-1.3.0/examples/db/000077500000000000000000000000001300172175400164175ustar00rootroot00000000000000fast_gettext-1.3.0/examples/db/migration.rb000066400000000000000000000011141300172175400207320ustar00rootroot00000000000000class CreateTranslationTables < ActiveRecord::Migration def self.up create_table :translation_keys do |t| t.string :key, :unique=>true, :null=>false t.timestamps end add_index :translation_keys, :key #I am not sure if this helps.... create_table :translation_texts do |t| t.text :text t.string :locale t.integer :translation_key_id, :null=>false t.timestamps null: false end add_index :translation_texts, :translation_key_id end def self.down drop_table :translation_keys drop_table :translation_texts end end fast_gettext-1.3.0/examples/missing_translation_logger.rb000066400000000000000000000004741300172175400240120ustar00rootroot00000000000000class MissingTranslationLogger def call(unfound) logger.warn "#{FastGettext.locale}: #{unfound}" unless FastGettext.locale == 'en' end private def logger return @logger if @logger require 'logger' @logger = Logger.new("log/unfound_translations", 2, 5*(1024**2))#max 2x 5mb logfile end endfast_gettext-1.3.0/fast_gettext.gemspec000066400000000000000000000013411300172175400202610ustar00rootroot00000000000000name = "fast_gettext" require "./lib/#{name}/version" Gem::Specification.new name, FastGettext::VERSION do |s| s.summary = "A simple, fast, memory-efficient and threadsafe implementation of GetText" s.authors = ["Michael Grosser"] s.email = "michael@grosser.it" s.homepage = "https://github.com/grosser/#{name}" s.files = Dir["{lib/**/*.{rb,mo,rdoc},Readme.md,CHANGELOG}"] s.licenses = ["MIT", "Ruby"] s.required_ruby_version = '>= 2.1.0' s.add_development_dependency 'rake' s.add_development_dependency 'sqlite3' s.add_development_dependency 'rspec' s.add_development_dependency 'activerecord' s.add_development_dependency 'i18n' s.add_development_dependency 'bump' s.add_development_dependency 'wwtd' end fast_gettext-1.3.0/gemfiles/000077500000000000000000000000001300172175400160075ustar00rootroot00000000000000fast_gettext-1.3.0/gemfiles/rails42.gemfile000066400000000000000000000001471300172175400206230ustar00rootroot00000000000000source "https://rubygems.org" gemspec path: "../" gem "rails", "~> 4.2.7" gem "protected_attributes" fast_gettext-1.3.0/gemfiles/rails42.gemfile.lock000066400000000000000000000064171300172175400215600ustar00rootroot00000000000000PATH remote: ../ specs: fast_gettext (1.1.0) GEM remote: https://rubygems.org/ specs: actionmailer (4.2.7) actionpack (= 4.2.7) actionview (= 4.2.7) activejob (= 4.2.7) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) actionpack (4.2.7) actionview (= 4.2.7) activesupport (= 4.2.7) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) actionview (4.2.7) activesupport (= 4.2.7) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) activejob (4.2.7) activesupport (= 4.2.7) globalid (>= 0.3.0) activemodel (4.2.7) activesupport (= 4.2.7) builder (~> 3.1) activerecord (4.2.7) activemodel (= 4.2.7) activesupport (= 4.2.7) arel (~> 6.0) activesupport (4.2.7) i18n (~> 0.7) json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) arel (6.0.3) builder (3.2.2) bump (0.5.3) concurrent-ruby (1.0.2) diff-lcs (1.2.5) erubis (2.7.0) globalid (0.3.7) activesupport (>= 4.1.0) i18n (0.7.0) json (1.8.3) loofah (2.0.3) nokogiri (>= 1.5.9) mail (2.6.4) mime-types (>= 1.16, < 4) mime-types (3.1) mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mini_portile2 (2.1.0) minitest (5.9.0) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) pkg-config (1.1.7) protected_attributes (1.1.3) activemodel (>= 4.0.1, < 5.0) rack (1.6.4) rack-test (0.6.3) rack (>= 1.0) rails (4.2.7) actionmailer (= 4.2.7) actionpack (= 4.2.7) actionview (= 4.2.7) activejob (= 4.2.7) activemodel (= 4.2.7) activerecord (= 4.2.7) activesupport (= 4.2.7) bundler (>= 1.3.0, < 2.0) railties (= 4.2.7) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) rails-dom-testing (1.0.7) activesupport (>= 4.2.0.beta, < 5.0) nokogiri (~> 1.6.0) rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) railties (4.2.7) actionpack (= 4.2.7) activesupport (= 4.2.7) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (11.2.2) rspec (3.5.0) rspec-core (~> 3.5.0) rspec-expectations (~> 3.5.0) rspec-mocks (~> 3.5.0) rspec-core (3.5.2) rspec-support (~> 3.5.0) rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.5.0) rspec-mocks (3.5.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.5.0) rspec-support (3.5.0) sprockets (3.7.0) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.1.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.3.11) thor (0.19.1) thread_safe (0.3.5) tzinfo (1.2.2) thread_safe (~> 0.1) wwtd (1.3.0) PLATFORMS ruby DEPENDENCIES activerecord bump fast_gettext! i18n protected_attributes rails (~> 4.2.7) rake rspec sqlite3 wwtd BUNDLED WITH 1.12.5 fast_gettext-1.3.0/gemfiles/rails50.gemfile000066400000000000000000000001141300172175400206140ustar00rootroot00000000000000source "https://rubygems.org" gemspec path: "../" gem "rails", "~> 5.0.0" fast_gettext-1.3.0/gemfiles/rails50.gemfile.lock000066400000000000000000000064131300172175400215530ustar00rootroot00000000000000PATH remote: ../ specs: fast_gettext (1.1.0) GEM remote: https://rubygems.org/ specs: actioncable (5.0.0) actionpack (= 5.0.0) nio4r (~> 1.2) websocket-driver (~> 0.6.1) actionmailer (5.0.0) actionpack (= 5.0.0) actionview (= 5.0.0) activejob (= 5.0.0) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) actionpack (5.0.0) actionview (= 5.0.0) activesupport (= 5.0.0) rack (~> 2.0) rack-test (~> 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) actionview (5.0.0) activesupport (= 5.0.0) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) activejob (5.0.0) activesupport (= 5.0.0) globalid (>= 0.3.6) activemodel (5.0.0) activesupport (= 5.0.0) activerecord (5.0.0) activemodel (= 5.0.0) activesupport (= 5.0.0) arel (~> 7.0) activesupport (5.0.0) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) arel (7.1.1) builder (3.2.2) bump (0.5.3) concurrent-ruby (1.0.2) diff-lcs (1.2.5) erubis (2.7.0) globalid (0.3.7) activesupport (>= 4.1.0) i18n (0.7.0) loofah (2.0.3) nokogiri (>= 1.5.9) mail (2.6.4) mime-types (>= 1.16, < 4) method_source (0.8.2) mime-types (3.1) mime-types-data (~> 3.2015) mime-types-data (3.2016.0521) mini_portile2 (2.1.0) minitest (5.9.0) nio4r (1.2.1) nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) pkg-config (1.1.7) rack (2.0.1) rack-test (0.6.3) rack (>= 1.0) rails (5.0.0) actioncable (= 5.0.0) actionmailer (= 5.0.0) actionpack (= 5.0.0) actionview (= 5.0.0) activejob (= 5.0.0) activemodel (= 5.0.0) activerecord (= 5.0.0) activesupport (= 5.0.0) bundler (>= 1.3.0, < 2.0) railties (= 5.0.0) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.1) activesupport (>= 4.2.0, < 6.0) nokogiri (~> 1.6.0) rails-html-sanitizer (1.0.3) loofah (~> 2.0) railties (5.0.0) actionpack (= 5.0.0) activesupport (= 5.0.0) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (11.2.2) rspec (3.5.0) rspec-core (~> 3.5.0) rspec-expectations (~> 3.5.0) rspec-mocks (~> 3.5.0) rspec-core (3.5.2) rspec-support (~> 3.5.0) rspec-expectations (3.5.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.5.0) rspec-mocks (3.5.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.5.0) rspec-support (3.5.0) sprockets (3.7.0) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.1.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.3.11) thor (0.19.1) thread_safe (0.3.5) tzinfo (1.2.2) thread_safe (~> 0.1) websocket-driver (0.6.4) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.2) wwtd (1.3.0) PLATFORMS ruby DEPENDENCIES activerecord bump fast_gettext! i18n rails (~> 5.0.0) rake rspec sqlite3 wwtd BUNDLED WITH 1.12.5 fast_gettext-1.3.0/lib/000077500000000000000000000000001300172175400147625ustar00rootroot00000000000000fast_gettext-1.3.0/lib/fast_gettext.rb000066400000000000000000000017651300172175400200210ustar00rootroot00000000000000require 'fast_gettext/mo_file' require 'fast_gettext/storage' require 'fast_gettext/translation' require 'fast_gettext/translation_repository' require 'fast_gettext/vendor/string' require 'fast_gettext/version' module FastGettext include FastGettext::Storage extend self LOCALE_REX = /^[a-z]{2,3}$|^[a-z]{2,3}_[A-Z]{2,3}$/ NAMESPACE_SEPARATOR = '|' # users should not include FastGettext, since this would contaminate their namespace # rather use # FastGettext.locale = .. # FastGettext.text_domain = .. # and # include FastGettext::Translation FastGettext::Translation.public_instance_methods.each do |method| define_method method do |*args| Translation.send(method,*args) end end def add_text_domain(name,options) translation_repositories[name] = TranslationRepository.build(name,options) end # some repositories know where to store their locales def locale_path translation_repositories[text_domain].instance_variable_get(:@options)[:path] end end fast_gettext-1.3.0/lib/fast_gettext/000077500000000000000000000000001300172175400174635ustar00rootroot00000000000000fast_gettext-1.3.0/lib/fast_gettext/cache.rb000066400000000000000000000017631300172175400210620ustar00rootroot00000000000000module FastGettext class Cache def initialize @store = {} reload! end def fetch(key) translation = @current[key] if translation.nil? # uncached @current[key] = yield || false # TODO get rid of this false hack and cache :missing else translation end end # TODO only used for tests, maybe if-else around it ... def []=(key, value) @current[key] = value end # key performance gain: # - no need to lookup locale on each translation # - no need to lookup text_domain on each translation # - super-simple hash lookup def switch_to(text_domain, locale) @store[text_domain] ||= {} @store[text_domain][locale] ||= {} @store[text_domain][locale][""] = false # ignore gettext meta key when translating @current = @store[text_domain][locale] end def delete(key) @current.delete(key) end def reload! @current = {} @current[""] = false end end end fast_gettext-1.3.0/lib/fast_gettext/mo_file.rb000066400000000000000000000036171300172175400214310ustar00rootroot00000000000000require 'fast_gettext/vendor/mofile' module FastGettext # Responsibility: # - abstract mo files for Mo Repository class MoFile PLURAL_SEPERATOR = "\000" # file => path or FastGettext::GetText::MOFile def initialize(file, options={}) @filename = file load_data if options[:eager_load] end def [](key) data[key] end #returns the plural forms or all singular translations that where found # Car, Cars => [Auto,Autos] or [] def plural(*msgids) split_plurals(self[msgids*PLURAL_SEPERATOR].to_s) end def pluralisation_rule #gettext uses 0 as default rule, which would turn off all pluralisation, very clever... #additionally parsing fails when directly accessing po files, so this line was taken from gettext/mofile (data['']||'').split("\n").each do |line| return lambda{|n|eval($2)} if /^Plural-Forms:\s*nplurals\s*\=\s*(\d*);\s*plural\s*\=\s*([^;]*)\n?/ =~ line end nil end def data load_data if @data.nil? @data end def self.empty MoFile.new(File.join(File.dirname(__FILE__),'vendor','empty.mo')) end private def load_data @data = if @filename.is_a? FastGettext::GetText::MOFile @filename else FastGettext::GetText::MOFile.open(@filename, "UTF-8") end make_singular_and_plural_available end #(if plural==singular, prefer singular) def make_singular_and_plural_available data = {} @data.each do |key,translation| next unless key.include? PLURAL_SEPERATOR singular, plural = split_plurals(key) translation = split_plurals(translation) data[singular] ||= translation[0] data[plural] ||= translation[1] end @data.merge!(data){|key,old,new| old} end def split_plurals(singular_plural) singular_plural.split(PLURAL_SEPERATOR) end end end fast_gettext-1.3.0/lib/fast_gettext/po_file.rb000066400000000000000000000020421300172175400214230ustar00rootroot00000000000000require 'fast_gettext/mo_file' module FastGettext # Responsibility: # - abstract po files for Po Repository class PoFile < MoFile def initialize(file, options={}) @options = options super end def self.to_mo_file(file, options={}) MoFile.new(parse_po_file(file, options)) end protected def load_data @data = if @filename.is_a? FastGettext::GetText::MOFile @filename else FastGettext::PoFile.parse_po_file(@filename, @options) end make_singular_and_plural_available end def self.parse_po_file(file, options={}) require 'fast_gettext/vendor/poparser' parser = FastGettext::GetText::PoParser.new warn ":ignore_obsolete is no longer supported, use :report_warning" if options.key? :ignore_obsolete parser.ignore_fuzzy = options[:ignore_fuzzy] parser.report_warning = options.fetch(:report_warning, true) mo_file = FastGettext::GetText::MOFile.new parser.parse(File.read(file), mo_file) mo_file end end end fast_gettext-1.3.0/lib/fast_gettext/storage.rb000066400000000000000000000123431300172175400214570ustar00rootroot00000000000000require 'fast_gettext/cache' module FastGettext # Responsibility: # - store data threadsave # - provide error messages when repositories are unconfigured # - accept/reject locales that are set by the user module Storage class NoTextDomainConfigured < RuntimeError def to_s "Current textdomain (#{FastGettext.text_domain.inspect}) was not added, use FastGettext.add_text_domain !" end end [:available_locales, :_locale, :text_domain, :pluralisation_rule].each do |method_name| key = "fast_gettext_#{method_name}".to_sym define_method "#{method_name}=" do |value| switch_cache if Thread.current[key] != Thread.current[key]=value end end def _locale Thread.current[:fast_gettext__locale] end private :_locale, :_locale= def available_locales locales = Thread.current[:fast_gettext_available_locales] || default_available_locales return unless locales locales.map{|s|s.to_s} end # cattr_accessor with defaults [ [:default_available_locales, "nil"], [:default_text_domain, "nil"], [:cache_class, "FastGettext::Cache"] ].each do |name, default| eval <<-Ruby @@#{name} = #{default} def #{name}=(value) @@#{name} = value switch_cache end def #{name} @@#{name} end Ruby end def text_domain Thread.current[:fast_gettext_text_domain] || default_text_domain end # if overwritten by user( FastGettext.pluralisation_rule = xxx) use it, # otherwise fall back to repo or to default lambda def pluralisation_rule Thread.current[:fast_gettext_pluralisation_rule] || current_repository.pluralisation_rule || lambda{|i| i!=1} end def cache Thread.current[:fast_gettext_cache] ||= cache_class.new end def reload! cache.reload! translation_repositories.values.each(&:reload) end #global, since re-parsing whole folders takes too much time... @@translation_repositories={} def translation_repositories @@translation_repositories end def current_repository translation_repositories[text_domain] || raise(NoTextDomainConfigured) end def key_exist?(key) !!(cached_find key) end def cached_find(key) cache.fetch(key) { current_repository[key] } end def cached_plural_find(*keys) key = '||||' + keys * '||||' cache.fetch(key) { current_repository.plural(*keys) } end def expire_cache_for(key) cache.delete(key) end def locale _locale || ( default_locale || (available_locales||[]).first || 'en' ) end def locale=(new_locale) set_locale(new_locale) end # for chaining: puts set_locale('xx') == 'xx' ? 'applied' : 'rejected' # returns the current locale, not the one that was supplied # like locale=(), whoes behavior cannot be changed def set_locale(new_locale) new_locale = best_locale_in(new_locale) self._locale = new_locale locale end @@default_locale = nil def default_locale=(new_locale) @@default_locale = best_locale_in(new_locale) switch_cache end def default_locale @@default_locale end #Opera: de-DE,de;q=0.9,en;q=0.8 #Firefox de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 #IE6/7 de #nil if nothing matches def best_locale_in(locales) formatted_sorted_locales(locales).each do |candidate| return candidate if not available_locales return candidate if available_locales.include?(candidate) return candidate[0..1] if available_locales.include?(candidate[0..1])#available locales include a langauge end return nil#nothing found im sorry :P end # temporarily switch locale for a block # FastGettext.with_locale 'xx' { _('cars') } def with_locale(temp_locale) current_locale = locale set_locale temp_locale yield ensure set_locale current_locale end #turn off translation if none was defined to disable all resulting errors def silence_errors require 'fast_gettext/translation_repository/base' translation_repositories[text_domain] ||= TranslationRepository::Base.new('x', :path => 'locale') end private # de-de,DE-CH;q=0.9 -> ['de_DE','de_CH'] def formatted_sorted_locales(locales) found = weighted_locales(locales).reject{|x|x.empty?}.sort_by{|l|l.last}.reverse #sort them by weight which is the last entry found.flatten.map{|l| format_locale(l)} end #split the locale and seperate it into different languages #de-de,de;q=0.9,en;q=0.8 => [['de-de','de','0.5'], ['en','0.8']] def weighted_locales(locales) locales = locales.to_s.gsub(/\s/,'') found = [[]] locales.split(',').each do |part| if part =~ /;q=/ #contains language and weight ? found.last << part.split(/;q=/) found.last.flatten! found << [] else found.last << part end end found end #de-de -> de_DE def format_locale(locale) locale.sub(/^([a-zA-Z]{2,3})[-_]([a-zA-Z]{2,3})$/){$1.downcase+'_'+$2.upcase} end def switch_cache cache.switch_to(text_domain, locale) end end end fast_gettext-1.3.0/lib/fast_gettext/translation.rb000066400000000000000000000104521300172175400223500ustar00rootroot00000000000000module FastGettext # this module should be included # Responsibility: # - direct translation queries to the current repository # - handle untranslated values # - understand / enforce namespaces # - decide which plural form is used module Translation extend self #make it usable in class definition, e.g. # class Y # include FastGettext::Translation # @@x = _('y') # end def self.included(klas) #:nodoc: klas.extend self end def _(key, &block) FastGettext.cached_find(key) or (block ? block.call : key) end #translate pluralized # some languages have up to 4 plural forms... # n_(singular, plural, plural form 2, ..., count) # n_('apple','apples',3) def n_(*keys, &block) count = keys.pop translations = FastGettext.cached_plural_find(*keys) selected = FastGettext.pluralisation_rule.call(count) selected = (selected ? 1 : 0) unless selected.is_a? Numeric #convert booleans to numbers result = translations[selected] if result result elsif keys[selected] _(keys[selected]) else block ? block.call : keys.last end end #translate, but discard namespace if nothing was found # Car|Tire -> Tire if no translation could be found def s_(key, separator=nil, &block) translation = FastGettext.cached_find(key) and return translation block ? block.call : key.split(separator||NAMESPACE_SEPARATOR).last end #tell gettext: this string need translation (will be found during parsing) def N_(translate) translate end #tell gettext: this string need translation (will be found during parsing) def Nn_(*keys) keys end def ns_(*args, &block) translation = n_(*args, &block) # block is called once again to compare result block && translation == block.call ? translation : translation.split(NAMESPACE_SEPARATOR).last end end # this module should be included for multi-domain support module TranslationMultidomain extend self #make it usable in class definition, e.g. # class Y # include FastGettext::TranslationMultidomain # @@x = d_('domain', 'y') # end def self.included(klas) #:nodoc: klas.extend self end # helper block for changing domains def _in_domain domain old_domain = FastGettext.text_domain FastGettext.text_domain = domain yield if block_given? ensure FastGettext.text_domain = old_domain end # gettext functions to translate in the context of given domain def d_(domain, key, &block) _in_domain domain do FastGettext::Translation._(key, &block) end end def dn_(domain, *keys, &block) _in_domain domain do FastGettext::Translation.n_(*keys, &block) end end def ds_(domain, key, separator=nil, &block) _in_domain domain do FastGettext::Translation.s_(key, separator, &block) end end def dns_(domain, *keys, &block) _in_domain domain do FastGettext::Translation.ns_(*keys, &block) end end # gettext functions to translate in the context of any domain # (note: if mutiple domains contains key, random translation is returned) def D_(key) FastGettext.translation_repositories.each_key do |domain| result = FastGettext::TranslationMultidomain.d_(domain, key) {nil} return result unless result.nil? end key end def Dn_(*keys) FastGettext.translation_repositories.each_key do |domain| result = FastGettext::TranslationMultidomain.dn_(domain, *keys) {nil} return result unless result.nil? end keys[-3].split(keys[-2]||NAMESPACE_SEPARATOR).last end def Ds_(key, separator=nil) FastGettext.translation_repositories.each_key do |domain| result = FastGettext::TranslationMultidomain.ds_(domain, key, separator) {nil} return result unless result.nil? end key.split(separator||NAMESPACE_SEPARATOR).last end def Dns_(*keys) FastGettext.translation_repositories.each_key do |domain| result = FastGettext::TranslationMultidomain.dns_(domain, *keys) {nil} return result unless result.nil? end keys[-2].split(NAMESPACE_SEPARATOR).last end end end fast_gettext-1.3.0/lib/fast_gettext/translation_repository.rb000066400000000000000000000007611300172175400246510ustar00rootroot00000000000000module FastGettext # Responsibility: # - decide which repository to choose from given input module TranslationRepository extend self def build(name, options) type = options[:type] || :mo class_name = type.to_s.split('_').map(&:capitalize).join unless FastGettext::TranslationRepository.constants.map{|c|c.to_s}.include?(class_name) require "fast_gettext/translation_repository/#{type}" end eval(class_name).new(name,options) end end end fast_gettext-1.3.0/lib/fast_gettext/translation_repository/000077500000000000000000000000001300172175400243205ustar00rootroot00000000000000fast_gettext-1.3.0/lib/fast_gettext/translation_repository/base.rb000066400000000000000000000023051300172175400255570ustar00rootroot00000000000000module FastGettext module TranslationRepository # Responsibility: # - base for all repositories # - fallback as empty repository, that cannot translate anything but does not crash class Base def initialize(name,options={}) @name = name @options = options end def pluralisation_rule nil end def available_locales [] end def [](key) current_translations[key] end def plural(*keys) current_translations.plural(*keys) end def reload true end protected def current_translations MoFile.empty end def find_files_in_locale_folders(relative_file_path,path) path ||= "locale" raise "path #{path} could not be found!" unless File.exist?(path) @files = {} Dir[File.join(path,'*')].each do |locale_folder| next unless File.basename(locale_folder) =~ LOCALE_REX file = File.join(locale_folder,relative_file_path).untaint next unless File.exist? file locale = File.basename(locale_folder) @files[locale] = yield(locale,file) end end end end end fast_gettext-1.3.0/lib/fast_gettext/translation_repository/chain.rb000066400000000000000000000017651300172175400257400ustar00rootroot00000000000000require 'fast_gettext/translation_repository/base' module FastGettext module TranslationRepository # Responsibility: # - delegate calls to members of the chain in turn #TODO cache should be expired after a repo was added class Chain < Base attr_accessor :chain def initialize(name,options={}) super self.chain = options[:chain] end def available_locales chain.map{|c|c.available_locales}.flatten.uniq end def pluralisation_rule chain.each do |c| result = c.pluralisation_rule and return result end nil end def [](key) chain.each do |c| result = c[key] and return result end nil end def plural(*keys) chain.each do |c| result = c.plural(*keys) return result unless result.compact.empty? end [] end def reload chain.each(&:reload) super end end end end fast_gettext-1.3.0/lib/fast_gettext/translation_repository/db.rb000066400000000000000000000032451300172175400252360ustar00rootroot00000000000000require 'active_record' module FastGettext module TranslationRepository # Responsibility: # - provide access to translations in database through a database abstraction # # Options: # :model => Model that represents your keys # you can either use the models supplied under db/, extend them or build your own # only constraints: # key: find_by_key, translations # translation: text, locale class Db def initialize(name,options={}) @model = options[:model] end @@seperator = '||||' # string that seperates multiple plurals def self.seperator=(sep);@@seperator = sep;end def self.seperator;@@seperator;end def available_locales if @model.respond_to? :available_locales @model.available_locales || [] else [] end end def pluralisation_rule if @model.respond_to? :pluralsation_rule @model.pluralsation_rule else nil end end def [](key) @model.translation(key, FastGettext.locale) end def plural(*args) if translation = @model.translation(args*self.class.seperator, FastGettext.locale) translation.to_s.split(self.class.seperator) else [] end end def self.require_models folder = "fast_gettext/translation_repository/db_models" require "#{folder}/translation_key" require "#{folder}/translation_text" Module.new do def self.included(base) puts "you no longer need to include the result of require_models" end end end end end endfast_gettext-1.3.0/lib/fast_gettext/translation_repository/db_models/000077500000000000000000000000001300172175400262505ustar00rootroot00000000000000fast_gettext-1.3.0/lib/fast_gettext/translation_repository/db_models/translation_key.rb000066400000000000000000000020541300172175400320040ustar00rootroot00000000000000class TranslationKey < ActiveRecord::Base has_many :translations, :class_name => 'TranslationText', :dependent => :destroy accepts_nested_attributes_for :translations, :allow_destroy => true validates_uniqueness_of :key validates_presence_of :key attr_accessible :key, :translations, :translations_attributes if ActiveRecord::VERSION::MAJOR == 3 || defined?(ProtectedAttributes) before_save :normalize_newlines def self.translation(key, locale) return unless translation_key = find_by_key(newline_normalize(key)) return unless translation_text = translation_key.translations.find_by_locale(locale) translation_text.text end def self.available_locales @@available_locales ||= begin if ActiveRecord::VERSION::MAJOR >= 3 TranslationText.group(:locale).count else TranslationText.count(:group=>:locale) end.keys.sort end end protected def self.newline_normalize(s) s.to_s.gsub("\r\n", "\n") end def normalize_newlines self.key = self.class.newline_normalize(key) end end fast_gettext-1.3.0/lib/fast_gettext/translation_repository/db_models/translation_text.rb000066400000000000000000000007251300172175400322030ustar00rootroot00000000000000class TranslationText < ActiveRecord::Base belongs_to :translation_key, :class_name => 'TranslationKey' validates_presence_of :locale validates_uniqueness_of :locale, :scope=>:translation_key_id attr_accessible :text, :locale, :translation_key, :translation_key_id if ActiveRecord::VERSION::MAJOR == 3 || defined?(ProtectedAttributes) after_update :expire_cache protected def expire_cache FastGettext.expire_cache_for(translation_key.key) end end fast_gettext-1.3.0/lib/fast_gettext/translation_repository/logger.rb000066400000000000000000000011021300172175400261160ustar00rootroot00000000000000require 'fast_gettext/translation_repository/base' module FastGettext module TranslationRepository # This should be used in a TranslationRepository::Chain, so tat untranslated keys can be found # Responsibility: # - log every translation call class Logger < Base attr_accessor :callback def initialize(name,options={}) super self.callback = options[:callback] end def [](key) callback.call(key) nil end def plural(*keys) callback.call(keys) [] end end end endfast_gettext-1.3.0/lib/fast_gettext/translation_repository/merge.rb000066400000000000000000000031061300172175400257440ustar00rootroot00000000000000require 'fast_gettext/translation_repository/po' module FastGettext module TranslationRepository # Responsibility: # - merge data from multiple repositories into one hash structure # - can be used instead of searching for translations in multiple domains # - requires reload when current locale is changed class Merge < Base def initialize(name, options={}) clear super(name, options) options.fetch(:chain, []).each do |repo| add_repo(repo) end end def available_locales @repositories.flat_map(&:available_locales).uniq end def pluralisation_rule @repositories.each do |r| result = r.pluralisation_rule and return result end nil end def plural(*keys) @repositories.each do |r| result = r.plural(*keys) return result unless result.compact.empty? end [] end def reload @data = {} @repositories.each do |r| r.reload load_repo(r) end super end def add_repo(repo) raise "Unsupported repository" unless repo_supported?(repo) @repositories << repo load_repo(repo) true end def [](key) @data[key] end def clear @repositories = [] @data = {} end protected def repo_supported?(repo) repo.respond_to?(:all_translations) end def load_repo(r) @data = r.all_translations.merge(@data) end end end end fast_gettext-1.3.0/lib/fast_gettext/translation_repository/mo.rb000066400000000000000000000021341300172175400252600ustar00rootroot00000000000000require 'fast_gettext/translation_repository/base' module FastGettext module TranslationRepository # Responsibility: # - find and store mo files # - provide access to translations in mo files class Mo < Base def initialize(name,options={}) super @eager_load = options.fetch(:eager_load, false) reload end def available_locales @files.keys end def pluralisation_rule current_translations.pluralisation_rule end def reload find_and_store_files(@name, @options) super end def all_translations current_translations.data end protected def find_and_store_files(name,options) # parse all .mo files with the right name, that sit in locale/LC_MESSAGES folders find_files_in_locale_folders(File.join('LC_MESSAGES',"#{name}.mo"), options[:path]) do |locale,file| MoFile.new(file, eager_load: @eager_load) end end def current_translations @files[FastGettext.locale] || MoFile.empty end end end end fast_gettext-1.3.0/lib/fast_gettext/translation_repository/po.rb000066400000000000000000000010311300172175400252560ustar00rootroot00000000000000require 'fast_gettext/translation_repository/base' require 'fast_gettext/translation_repository/mo' module FastGettext module TranslationRepository # Responsibility: # - find and store po files # - provide access to translations in po files class Po < Mo protected def find_and_store_files(name, options) require 'fast_gettext/po_file' find_files_in_locale_folders("#{name}.po", options[:path]) do |locale,file| PoFile.new(file, options) end end end end end fast_gettext-1.3.0/lib/fast_gettext/translation_repository/yaml.rb000066400000000000000000000035271300172175400256160ustar00rootroot00000000000000require 'fast_gettext/translation_repository/base' require 'yaml' module FastGettext module TranslationRepository # Responsibility: # - find and store yaml files # - provide access to translations in yaml files class Yaml < Base def initialize(name,options={}) super reload end def available_locales @files.keys end def plural(*keys) ['one', 'other', 'plural2', 'plural3'].map do |name| self[yaml_dot_notation(keys.first, name)] end end def pluralisation_rule self['pluralisation_rule'] ? lambda{|n| eval(self['pluralisation_rule']) } : nil end def reload find_and_store_files(@options) super end protected MAX_FIND_DEPTH = 10 def find_and_store_files(options) @files = {} path = options[:path] || 'config/locales' Dir["#{path}/??.yml"].each do |yaml_file| locale = yaml_file.match(/([a-z]{2})\.yml$/)[1] @files[locale] = load_yaml(yaml_file, locale) end end def current_translations @files[FastGettext.locale] || super end # Given a yaml file return a hash of key -> translation def load_yaml(file, locale) yaml = YAML.load_file(file) yaml_hash_to_dot_notation(yaml[locale]) end def yaml_hash_to_dot_notation(yaml_hash) add_yaml_key({}, nil, yaml_hash) end def add_yaml_key(result, prefix, hash) hash.each_pair do |key, value| if value.kind_of?(Hash) add_yaml_key(result, yaml_dot_notation(prefix, key), value) else result[yaml_dot_notation(prefix, key)] = value end end result end def yaml_dot_notation(a,b) a ? "#{a}.#{b}" : b end end end end fast_gettext-1.3.0/lib/fast_gettext/vendor/000077500000000000000000000000001300172175400207605ustar00rootroot00000000000000fast_gettext-1.3.0/lib/fast_gettext/vendor/README.rdoc000066400000000000000000000212201300172175400225630ustar00rootroot00000000000000= Ruby-GetText-Package Ruby-GetText-Package is a Localization(L10n) library and tool which is modeled after the GNU gettext package. This library translates original messages to localized messages using client-side locale information(environment variable or CGI variable). The tools for developers support creating, useing, and modifying localized message files(message catalogs). ((*Rails*)) Rails support has been removed. Rails / ActiveRecord specific code now lives in gettext_rails and gettext_activerecord. == Website * homepage[http://www.yotabanana.com/hiki/ruby-gettext.html] * on rubyforge[http://gettext/rubyforge.org/] * on github[http://github.com/gettext/] == Features * Simple APIs(similar to GNU gettext) * rgettext creates po-files from * ruby scripts * glade-2 XML file(.glade) * ERB file(.rhtml, .erb) * Anything (with your own parsers) * The po-files are compatible to GNU gettext. * rmsgfmt creates a mo-file from a po-file. The mo-file is compatible to GNU gettext(msgfmt). * textdomain's scope is adapt to ruby class/module mechanism. * A class/module can have plural textdomains. * a message is looked up in its class/module and ancestors. * CGI support (gettext/cgi) * Locale is retrieved from client informations (HTTP_ACCEPT_LANGUAGE, HTTP_ACCEPT_CHARSET, QUERY_STRING(lang), Cookies(lang)). * String%() is extended to use named argument such as %{foo}" %{:foo => 1}. Notes that Ruby-1.9.x supports this format by itself. == Requirements * {Ruby 1.8.3 or later}[http://www.ruby-lang.org] * {Rubygems}[http://www.rubygems.org/] * {locale gem}[http://rubyforge.org/projects/locale/] * $ gem install locale * (for development only) * {GNU gettext 0.10.35 or later}[http://www.gnu.org/software/gettext/gettext.html] * {Racc-1.4.3 or later}[http://www.ruby-lang.org/raa/list.rhtml?name=racc] * (for compiling src/rmsgfmt.ry only) == Install * Uninstall old gettext if exists. (sudo/su on POSIX system) gem uninstall gettext * gem #from github (edge/unstable) (sudo/su on POSIX system) gem install locale gem install mutoh-gettext -s http://gems.github.com/ #from rubyforge (stable) (sudo/su on POSIX system) gem install locale gem install gettext * download tar-ball # De-Compress archive and enter its top directory. (sudo/su on POSIX system) ruby setup.rb You can also install files in your favorite directory by supplying setup.rb some options. Try ruby setup.rb --help. == Usage ===Translation - _: Basic translation method Translates the message. _("Hello") The gettext methods comes in 3 combinable flavors - n: Pluralized Returns singular or plural form, depending on how many you have. n_("Apple", "%{num} Apples", 3) n_(["Apple", "%{num} Apples"], 3) - p: context aware A context is a prefix to your translation, usefull when one word has different meanings, depending on its context. p_("Printer","Open") <=> p_("File","Open") is the same as s_("Printer|Open") <=> s_("File|Open") - s: without context If a translation could not be found, return the msgid without context. s_("Printer|Open") => "Öffnen" #translation found s_("Printer|Open") => "Open" #translation not found - combinations np_("Fruit", "Apple", "%{num} Apples", 3) ns_("Fruit|Apple","%{num} Apples", 3) np_(["Fruit","Apple","%{num} Apples"], 3) ns_(["Fruit|Apple","%{num} Apples"], 3) - N_, Nn_: Makes dynamic translation messages readable for the gettext parser. _(fruit) cannot be understood by the gettext parser. To help the parser find all your translations, you can add fruit = N_("Apple") which does not translate, but tells the parser: "Apple" needs translation. fruit = N_("Apple") # same as fruit = "Apple" _(fruit) # does a normal translation fruits = Nn_("Apple", "%{num} Apples") n_(fruits, 3) === Locale / Domain GetText stores the locale your are using GetText.locale = "en_US" # translate into english from now on GetText.locale # => en_US Or include GetText set_locale "en_US" Each locale can have different sets of translations (text domains) (e.g. Financial terms + Human-resource terms) GetText.bindtextdomain('financial') Or include GetText bindtextdomain('financial') For more details and options, have a look at the samples folder or consult the tutorial[http://www.yotabanana.com/hiki/ruby-gettext-howto.html]. == License This program is licenced under the same licence as Ruby. (See the file 'COPYING'.) * mofile.rb * Copyright (C) 2001-2009 Masao Mutoh * Copyright (C) 2001,2002 Masahiro Sakai * gettext.rb * Copyright (C) 2001-2009 Masao Mutoh * Copyright (C) 2001,2002 Masahiro Sakai * rgettext * Copyright (C) 2001-2009 Masao Mutoh * Copyright (C) 2001,2002 Yasushi Shoji * setup.rb * Copyright (C) 2000-2005 Minero Aoki * This file is released under LGPL. See the top of the install.rb. * Others * Copyright (C) 2001-2009 Masao Mutoh == Translators * Bosnian(bs) - Sanjin Sehic * Bulgarian(bg) - Sava Chankov * Catalan(ca) - Ramon Salvadó * Chinese(Simplified)(zh_CN) * Yang Bob (current) * Yingfeng * Chinese(Traditional)(zh_TW) * Yang Bob (current) * LIN CHUNG-YI * Croatian(hr) - Sanjin Sehic * Czech(cs) - Karel Miarka * Dutch(nl) - Menno Jonkers * Esperanto(eo) - Malte Milatz * Estonian(et) - Erkki Eilonen * French(fr) * Vincent Isambart (current) * David Sulc * Laurent Sansonetti * German(de) * Patrick Lenz (current) * Detlef Reichl * Sven Herzberg * Sascha Ebach * Greek(el) - Vassilis Rizopoulos * Hungarian(hu) - Tamás Tompa * Italian(it) * Marco Lazzeri * Gabriele Renzi * Japanese(ja) - Masao Mutoh * Korean(ko) - Gyoung-Yoon Noh * Latvian(lv) - Aivars Akots * Norwegian(nb) - Runar Ingebrigtsen * Portuguese(Brazil)(pt_BR) * Antonio S. de A. Terceiro (current) * Joao Pedrosa * Russian(ru) - Yuri Kozlov * Serbian(sr) - Slobodan Paunović" * Spanish(es) * David Espada (current) * David Moreno Garza * Swedish(sv) - Nikolai Weibull * Ukrainian(ua) - Alex Rootoff * Vietnamese(vi) - Ngoc Dao Thanh == Status of translations * Bosnian(bs) - 1.90.0 (old) * Bulgarian(bg) - 2.0.0pre1 (new) * Catalan(ca) - 2.0.0pre1 * Croatian(hr) - 1.90.0 (old) * Chinese(zh_CN) - 2.0.0pre1 * Chinese(zh_TW) - 2.0.0pre1 * Czech(cs) - 1.9.0 (old) * Dutch(nl) - 1.90.0 (old) * English(default) - 1.90.0 (old) * Esperanto(eo) - 2.0.0pre1 * Estonian(et) - 2.0.0pre1 * French(fr) - 2.0.0pre1 * German(de) - 2.0.0pre1 * Greek(el) - 2.0.0pre1 * Hungarian(hu) - 2.0.0pre1 * Italian(it) - 1.6.0 (old) * Japanese(ja) - 2.0.0pre1 * Korean(ko) - 1.9.0 (old) * Latvian(lv) - 2.0.0pre1 (new) * Norwegian(nb) - 2.0.0pre1 * Portuguese(Brazil)(pt_BR) - 2.0.0pre1 * Russian(ru) - 2.0.0pre1 * Serbian(sr) - 1.91.0 (old) * Spanish(es) - 2.0.0pre1 * Swedish(sv) - 0.8.0 (too much old) * Ukrainian(ua) - 2.0.0pre1 * Vietnamese(vi) - 2.0.0pre1 == Maintainer Masao Mutoh fast_gettext-1.3.0/lib/fast_gettext/vendor/empty.mo000066400000000000000000000000501300172175400224460ustar00rootroot00000000000000fast_gettext-1.3.0/lib/fast_gettext/vendor/iconv.rb000066400000000000000000000074341300172175400224330ustar00rootroot00000000000000=begin iconv.rb - Pseudo Iconv class. Supports Iconv.iconv, Iconv.conv. For Matz Ruby: If you don't have iconv but glib2, this library uses glib2 iconv functions. For JRuby: Use Java String class to convert strings. Copyright (C) 2004-2007 Masao Mutoh You may redistribute it and/or modify it under the same license terms as Ruby. $Id: iconv.rb,v 1.6 2007/11/08 14:21:22 mutoh Exp $ =end #Modifications #wrapped inside FastGettext namespace to reduce conflic module FastGettext; end begin old_verbose, $VERBOSE = $VERBOSE, nil # hide deprecation on 1.9.3 require 'iconv' FastGettext::Iconv = Iconv rescue LoadError # Provides Iconv.iconv which normally is provided through Ruby/GLib(1) functions. # This library is required for 'gettext'. # If you require 'gettext/iconv', it tries to call Ruby/GLib function # when it doesn't find original Iconv class(iconv.so) it adds a pseudo class. # # One-click Ruby Installer for Win32 hadn’t had iconv and there hadn’t been a way to install iconv.so itself for Win32. # And JRuby hadn’t had Iconv. # I’ve not checked them currently, but if they’ve supported iconv now, we don’t need this anymore... # # (1) Ruby/GLib is a module which is provided from Ruby-GNOME2 Project. # You can get binaries for Win32(One-Click Ruby Installer). # module FastGettext class Iconv module Failure; end class InvalidEncoding < ArgumentError; include Failure; end class IllegalSequence < ArgumentError; include Failure; end class InvalidCharacter < ArgumentError; include Failure; end if RUBY_PLATFORM =~ /java/ def self.conv(to, from, str) raise InvalidCharacter, "the 3rd argument is nil" unless str begin str = java.lang.String.new(str.unpack("C*").to_java(:byte), from) str.getBytes(to).to_ary.pack("C*") rescue java.io.UnsupportedEncodingException raise InvalidEncoding end end else begin require 'glib2' def self.check_glib_version?(major, minor, micro) # :nodoc: (GLib::BINDING_VERSION[0] > major || (GLib::BINDING_VERSION[0] == major && GLib::BINDING_VERSION[1] > minor) || (GLib::BINDING_VERSION[0] == major && GLib::BINDING_VERSION[1] == minor && GLib::BINDING_VERSION[2] >= micro)) end if check_glib_version?(0, 11, 0) # This is a function equivalent of Iconv.iconv. # * to: encoding name for destination # * from: encoding name for source # * str: strings to be converted # * Returns: Returns an Array of converted strings. def self.conv(to, from, str) begin GLib.convert(str, to, from) rescue GLib::ConvertError => e case e.code when GLib::ConvertError::NO_CONVERSION raise InvalidEncoding.new(str) when GLib::ConvertError::ILLEGAL_SEQUENCE raise IllegalSequence.new(str) else raise InvalidCharacter.new(str) end end end else def self.conv(to, from, str) # :nodoc: begin GLib.convert(str, to, from) rescue raise IllegalSequence.new(str) end end end rescue LoadError def self.conv(to, from, str) # :nodoc: warn "Iconv was not found." if $DEBUG str end end end def self.iconv(to, from, str) conv(to, from, str).split(//) end end end ensure $VERBOSE = old_verbose end fast_gettext-1.3.0/lib/fast_gettext/vendor/mofile.rb000066400000000000000000000256241300172175400225710ustar00rootroot00000000000000# encoding: utf-8 =begin mofile.rb - A simple class for operating GNU MO file. Copyright (C) 2012 Kouhei Sutou Copyright (C) 2003-2009 Masao Mutoh Copyright (C) 2002 Masahiro Sakai, Masao Mutoh Copyright (C) 2001 Masahiro Sakai Masahiro Sakai Masao Mutoh You can redistribute this file and/or modify it under the same term of Ruby. License of Ruby is included with Ruby distribution in the file "README". =end # Changes: Namespaced + uses FastGettext::Icvon require 'stringio' module FastGettext module GetText class MOFile < Hash class InvalidFormat < RuntimeError; end; attr_reader :filename Header = Struct.new(:magic, :revision, :nstrings, :orig_table_offset, :translated_table_offset, :hash_table_size, :hash_table_offset) # The following are only used in .mo files # with minor revision >= 1. class HeaderRev1 < Header attr_accessor :n_sysdep_segments, :sysdep_segments_offset, :n_sysdep_strings, :orig_sysdep_tab_offset, :trans_sysdep_tab_offset end MAGIC_BIG_ENDIAN = "\x95\x04\x12\xde" MAGIC_LITTLE_ENDIAN = "\xde\x12\x04\x95" if "".respond_to?(:force_encoding) MAGIC_BIG_ENDIAN.force_encoding("ASCII-8BIT") MAGIC_LITTLE_ENDIAN.force_encoding("ASCII-8BIT") end def self.open(arg = nil, output_charset = nil) result = self.new(output_charset) result.load(arg) end def initialize(output_charset = nil) @filename = nil @last_modified = nil @little_endian = true @output_charset = output_charset @plural_proc = nil super() end def update! if FileTest.exist?(@filename) st = File.stat(@filename) load(@filename) unless (@last_modified == [st.ctime, st.mtime]) else warn "#{@filename} was lost." if $DEBUG clear end self end def load(arg) if arg.kind_of? String begin st = File.stat(arg) @last_modified = [st.ctime, st.mtime] rescue Exception end load_from_file(arg) else load_from_stream(arg) end @filename = arg self end def load_from_stream(io) magic = io.read(4) case magic when MAGIC_BIG_ENDIAN @little_endian = false when MAGIC_LITTLE_ENDIAN @little_endian = true else raise InvalidFormat.new(sprintf("Unknown signature %s", magic.dump)) end endian_type6 = @little_endian ? 'V6' : 'N6' endian_type_astr = @little_endian ? 'V*' : 'N*' header = HeaderRev1.new(magic, *(io.read(4 * 6).unpack(endian_type6))) if header.revision == 1 # FIXME: It doesn't support sysdep correctly. header.n_sysdep_segments = io.read(4).unpack(endian_type6) header.sysdep_segments_offset = io.read(4).unpack(endian_type6) header.n_sysdep_strings = io.read(4).unpack(endian_type6) header.orig_sysdep_tab_offset = io.read(4).unpack(endian_type6) header.trans_sysdep_tab_offset = io.read(4).unpack(endian_type6) elsif header.revision > 1 raise InvalidFormat.new(sprintf("file format revision %d isn't supported", header.revision)) end io.pos = header.orig_table_offset orig_table_data = io.read((4 * 2) * header.nstrings).unpack(endian_type_astr) io.pos = header.translated_table_offset trans_table_data = io.read((4 * 2) * header.nstrings).unpack(endian_type_astr) original_strings = Array.new(header.nstrings) for i in 0...header.nstrings io.pos = orig_table_data[i * 2 + 1] original_strings[i] = io.read(orig_table_data[i * 2 + 0]) end clear for i in 0...header.nstrings io.pos = trans_table_data[i * 2 + 1] str = io.read(trans_table_data[i * 2 + 0]) if (! original_strings[i]) || original_strings[i] == "" if str @charset = nil @nplurals = nil @plural = nil str.each_line{|line| if /^Content-Type:/i =~ line and /charset=((?:\w|-)+)/i =~ line @charset = $1 elsif /^Plural-Forms:\s*nplurals\s*\=\s*(\d*);\s*plural\s*\=\s*([^;]*)\n?/ =~ line @nplurals = $1 @plural = $2 end break if @charset and @nplurals } @nplurals = "1" unless @nplurals @plural = "0" unless @plural end else if @charset and @output_charset str = convert_encoding(str, original_strings[i]) end end self[convert_encoding(original_strings[i], original_strings[i])] = str.freeze end self end def prime?(number) ('1' * number) !~ /^1?$|^(11+?)\1+$/ end begin require 'prime' def next_prime(seed) Prime.instance.find{|x| x > seed } end rescue LoadError def next_prime(seed) require 'mathn' prime = Prime.new while current = prime.succ return current if current > seed end end end HASHWORDBITS = 32 # From gettext-0.12.1/gettext-runtime/intl/hash-string.h # Defines the so called `hashpjw' function by P.J. Weinberger # [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, # 1986, 1987 Bell Telephone Laboratories, Inc.] def hash_string(str) hval = 0 i = 0 str.each_byte do |b| break if b == '\0' hval <<= 4 hval += b.to_i g = hval & (0xf << (HASHWORDBITS - 4)) if (g != 0) hval ^= g >> (HASHWORDBITS - 8) hval ^= g end end hval end #Save data as little endian format. def save_to_stream(io) header_size = 4 * 7 table_size = 4 * 2 * size hash_table_size = next_prime((size * 4) / 3) hash_table_size = 3 if hash_table_size <= 2 header = Header.new( MAGIC_LITTLE_ENDIAN, # magic 0, # revision size, # nstrings header_size, # orig_table_offset header_size + table_size, # translated_table_offset hash_table_size, # hash_table_size header_size + table_size * 2 # hash_table_offset ) io.write(header.to_a.pack('a4V*')) ary = to_a ary.sort!{|a, b| a[0] <=> b[0]} # sort by original string pos = header.hash_table_size * 4 + header.hash_table_offset orig_table_data = Array.new() ary.each{|item, _| orig_table_data.push(item.bytesize) orig_table_data.push(pos) pos += item.bytesize + 1 # +1 is } io.write(orig_table_data.pack('V*')) trans_table_data = Array.new() ary.each{|_, item| trans_table_data.push(item.bytesize) trans_table_data.push(pos) pos += item.bytesize + 1 # +1 is } io.write(trans_table_data.pack('V*')) hash_tab = Array.new(hash_table_size) j = 0 ary[0...size].each {|key, _| hash_val = hash_string(key) idx = hash_val % hash_table_size if hash_tab[idx] != nil incr = 1 + (hash_val % (hash_table_size - 2)) begin if (idx >= hash_table_size - incr) idx -= hash_table_size - incr else idx += incr end end until (hash_tab[idx] == nil) end hash_tab[idx] = j + 1 j += 1 } hash_tab.collect!{|i| i ? i : 0} io.write(hash_tab.pack('V*')) ary.each{|item, _| io.write(item); io.write("\0") } ary.each{|_, item| io.write(item); io.write("\0") } self end def load_from_file(filename) @filename = filename begin File.open(filename, 'rb'){|f| load_from_stream(f)} rescue => e e.set_backtrace("File: #{@filename}") raise e end end def save_to_file(filename) File.open(filename, 'wb'){|f| save_to_stream(f)} end def set_comment(msgid_or_sym, comment) #Do nothing end def plural_as_proc unless @plural_proc @plural_proc = Proc.new{|n| eval(@plural)} begin @plural_proc.call(1) rescue @plural_proc = Proc.new{|n| 0} end end @plural_proc end attr_accessor :little_endian, :path, :last_modified attr_reader :charset, :nplurals, :plural private if "".respond_to?(:encode) def convert_encoding(string, original_string) begin string.encode(@output_charset, @charset) rescue EncodingError if $DEBUG warn "@charset = ", @charset warn "@output_charset = ", @output_charset warn "msgid = ", original_string warn "msgstr = ", string end string end end else require 'fast_gettext/vendor/iconv' def convert_encoding(string, original_string) begin str = FastGettext::Iconv.conv(@output_charset, @charset, string) rescue FastGettext::Iconv::Failure if $DEBUG warn "@charset = ", @charset warn "@output_charset = ", @output_charset warn "msgid = ", original_string warn "msgstr = ", str end end end end end end end # Test if $0 == __FILE__ if (ARGV.include? "-h") or (ARGV.include? "--help") STDERR.puts("mo.rb [filename.mo ...]") exit end ARGV.each{ |item| mo = FastGettext::GetText::MOFile.open(item) puts "------------------------------------------------------------------" puts "charset = \"#{mo.charset}\"" puts "nplurals = \"#{mo.nplurals}\"" puts "plural = \"#{mo.plural}\"" puts "------------------------------------------------------------------" mo.each do |key, value| puts "original message = #{key.inspect}" puts "translated message = #{value.inspect}" puts "--------------------------------------------------------------------" end } end fast_gettext-1.3.0/lib/fast_gettext/vendor/poparser.rb000066400000000000000000000207261300172175400231470ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # poparser.rb - Generate a .mo # # Copyright (C) 2003-2009 Masao Mutoh # Copyright (C) 2012 Kouhei Sutou # # You may redistribute it and/or modify it under the same # license terms as Ruby or LGPL. #MODIFIED # removed include GetText # added stub translation method _(message_id) require 'racc/parser.rb' module FastGettext module GetText class PoParser < Racc::Parser module_eval(<<'...end poparser.ry/module_eval...', 'poparser.ry', 118) def _(message_id) message_id end private :_ attr_writer :ignore_fuzzy, :report_warning def initialize @ignore_fuzzy = true @report_warning = true end def ignore_fuzzy? @ignore_fuzzy end def report_warning? @report_warning end def unescape(orig) ret = orig.gsub(/\\n/, "\n") ret.gsub!(/\\t/, "\t") ret.gsub!(/\\r/, "\r") ret.gsub!(/\\"/, "\"") ret end private :unescape def unescape_string(string) string.gsub(/\\\\/, "\\") end private :unescape_string def parse(str, data) @comments = [] @data = data @fuzzy = false @msgctxt = "" str.strip! @q = [] until str.empty? do case str when /\A\s+/ str = $' when /\Amsgctxt/ @q.push [:MSGCTXT, $&] str = $' when /\Amsgid_plural/ @q.push [:MSGID_PLURAL, $&] str = $' when /\Amsgid/ @q.push [:MSGID, $&] str = $' when /\Amsgstr/ @q.push [:MSGSTR, $&] str = $' when /\A\[(\d+)\]/ @q.push [:PLURAL_NUM, $1] str = $' when /\A\#~(.*)/ if report_warning? $stderr.print _("Warning: obsolete msgid exists.\n") $stderr.print " #{$&}\n" end @q.push [:COMMENT, $&] str = $' when /\A\#(.*)/ @q.push [:COMMENT, $&] str = $' when /\A\"(.*)\"/ @q.push [:STRING, unescape_string($1)] str = $' else #c = str[0,1] #@q.push [:STRING, c] str = str[1..-1] end end @q.push [false, '$end'] if $DEBUG @q.each do |a,b| puts "[#{a}, #{b}]" end end @yydebug = true if $DEBUG do_parse if @comments.size > 0 @data.set_comment(:last, @comments.join("\n")) end @data end def next_token @q.shift end def on_message(msgid, msgstr) if msgstr.size > 0 @data[msgid] = msgstr @data.set_comment(msgid, @comments.join("\n")) end @comments.clear @msgctxt = "" end def on_comment(comment) @fuzzy = true if (/fuzzy/ =~ comment) @comments << comment end def parse_file(po_file, data) args = [ po_file ] # In Ruby 1.9, we must detect proper encoding of a PO file. if String.instance_methods.include?(:encode) encoding = detect_file_encoding(po_file) args << "r:#{encoding}" end @po_file = po_file parse(File.open(*args) {|io| io.read }, data) end def detect_file_encoding(po_file) open(po_file, :encoding => 'ASCII-8BIT') do |input| input.lines.each do |line| return Encoding.find($1) if %r["Content-Type:.*\scharset=(.*)\\n"] =~ line end end Encoding.default_external end private :detect_file_encoding ...end poparser.ry/module_eval... ##### State transition tables begin ### racc_action_table = [ 2, 13, 10, 9, 6, 17, 16, 15, 22, 15, 15, 13, 13, 13, 15, 11, 22, 24, 13, 15 ] racc_action_check = [ 1, 17, 1, 1, 1, 14, 14, 14, 19, 19, 12, 6, 16, 9, 18, 2, 20, 22, 24, 25 ] racc_action_pointer = [ nil, 0, 15, nil, nil, nil, 4, nil, nil, 6, nil, nil, 3, nil, 0, nil, 5, -6, 7, 2, 10, nil, 9, nil, 11, 12 ] racc_action_default = [ -1, -16, -16, -2, -3, -4, -16, -6, -7, -16, -13, 26, -5, -15, -16, -14, -16, -16, -8, -16, -9, -11, -16, -10, -16, -12 ] racc_goto_table = [ 12, 21, 23, 14, 4, 5, 3, 7, 8, 20, 18, 19, 1, nil, nil, nil, nil, nil, 25 ] racc_goto_check = [ 5, 9, 9, 5, 3, 4, 2, 6, 7, 8, 5, 5, 1, nil, nil, nil, nil, nil, 5 ] racc_goto_pointer = [ nil, 12, 5, 3, 4, -6, 6, 7, -10, -18 ] racc_goto_default = [ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil ] racc_reduce_table = [ 0, 0, :racc_error, 0, 10, :_reduce_none, 2, 10, :_reduce_none, 2, 10, :_reduce_none, 2, 10, :_reduce_none, 2, 12, :_reduce_5, 1, 13, :_reduce_none, 1, 13, :_reduce_none, 4, 15, :_reduce_8, 5, 16, :_reduce_9, 2, 17, :_reduce_10, 1, 17, :_reduce_none, 3, 18, :_reduce_12, 1, 11, :_reduce_13, 2, 14, :_reduce_14, 1, 14, :_reduce_15 ] racc_reduce_n = 16 racc_shift_n = 26 racc_token_table = { false => 0, :error => 1, :COMMENT => 2, :MSGID => 3, :MSGCTXT => 4, :MSGID_PLURAL => 5, :MSGSTR => 6, :STRING => 7, :PLURAL_NUM => 8 } racc_nt_base = 9 racc_use_result_var = true Racc_arg = [ racc_action_table, racc_action_check, racc_action_default, racc_action_pointer, racc_goto_table, racc_goto_check, racc_goto_default, racc_goto_pointer, racc_nt_base, racc_reduce_table, racc_token_table, racc_shift_n, racc_reduce_n, racc_use_result_var ] Racc_token_to_s_table = [ "$end", "error", "COMMENT", "MSGID", "MSGCTXT", "MSGID_PLURAL", "MSGSTR", "STRING", "PLURAL_NUM", "$start", "msgfmt", "comment", "msgctxt", "message", "string_list", "single_message", "plural_message", "msgstr_plural", "msgstr_plural_line" ] Racc_debug_parser = true ##### State transition tables end ##### # reduce 0 omitted # reduce 1 omitted # reduce 2 omitted # reduce 3 omitted # reduce 4 omitted module_eval(<<'.,.,', 'poparser.ry', 25) def _reduce_5(val, _values, result) @msgctxt = unescape(val[1]) + "\004" result end .,., # reduce 6 omitted # reduce 7 omitted module_eval(<<'.,.,', 'poparser.ry', 37) def _reduce_8(val, _values, result) msgid_raw = val[1] msgid = unescape(msgid_raw) msgstr = unescape(val[3]) use_message_p = true if @fuzzy and not msgid.empty? use_message_p = (not ignore_fuzzy?) if report_warning? if ignore_fuzzy? $stderr.print _("Warning: fuzzy message was ignored.\n") else $stderr.print _("Warning: fuzzy message was used.\n") end $stderr.print " #{@po_file}: msgid '#{msgid_raw}'\n" end end @fuzzy = false on_message(@msgctxt + msgid, msgstr) if use_message_p result = "" result end .,., module_eval(<<'.,.,', 'poparser.ry', 60) def _reduce_9(val, _values, result) if @fuzzy and ignore_fuzzy? if val[1] != "" if report_warning? $stderr.print _("Warning: fuzzy message was ignored.\n") $stderr.print "msgid = '#{val[1]}\n" end else on_message('', unescape(val[3])) end @fuzzy = false else on_message(@msgctxt + unescape(val[1]) + "\000" + unescape(val[3]), unescape(val[4])) end result = "" result end .,., module_eval(<<'.,.,', 'poparser.ry', 80) def _reduce_10(val, _values, result) if val[0].size > 0 result = val[0] + "\000" + val[1] else result = "" end result end .,., # reduce 11 omitted module_eval(<<'.,.,', 'poparser.ry', 92) def _reduce_12(val, _values, result) result = val[2] result end .,., module_eval(<<'.,.,', 'poparser.ry', 99) def _reduce_13(val, _values, result) on_comment(val[0]) result end .,., module_eval(<<'.,.,', 'poparser.ry', 107) def _reduce_14(val, _values, result) result = val.delete_if{|item| item == ""}.join result end .,., module_eval(<<'.,.,', 'poparser.ry', 111) def _reduce_15(val, _values, result) result = val[0] result end .,., def _reduce_none(val, _values, result) val[0] end end # class PoParser end # module GetText end fast_gettext-1.3.0/lib/fast_gettext/vendor/string.rb000066400000000000000000000040031300172175400226100ustar00rootroot00000000000000#! /usr/bin/ruby =begin string.rb - Extension for String. Copyright (C) 2005,2006 Masao Mutoh You may redistribute it and/or modify it under the same license terms as Ruby. =end # Extension for String class. This feature is included in Ruby 1.9 or later. begin raise ArgumentError if ("a %{x}" % {:x=>'b'}) != 'a b' rescue ArgumentError # either we are on vanilla 1.8(call with hash raises ArgumentError) # or someone else already patched % but did it wrong class String alias :_fast_gettext_old_format_m :% # :nodoc: PERCENT_MATCH_RE = Regexp.union( /%%/, /%\{([-\.\w]+)\}/, /%<([-\.\w]+)>(.*?\d*\.?\d*[bBdiouxXeEfgGcps])/ ) # call-seq: # %(hash) # # Default: "%s, %s" % ["Masao", "Mutoh"] # Extended: # "%{firstname}, %{lastname}" % {:firstname=>"Masao",:lastname=>"Mutoh"} == "Masao Mutoh" # with field type such as d(decimal), f(float), ... # "%d, %.1f" % {:age => 10, :weight => 43.4} == "10 43.4" # This is the recommanded way for Ruby-GetText # because the translators can understand the meanings of the keys easily. def %(args) if args.kind_of? Hash #stringify keys replace = {} args.each{|k,v|replace[k.to_s]=v} #replace occurances ret = dup ret.gsub!(PERCENT_MATCH_RE) do |match| if match == '%%' '%' elsif $1 replace.has_key?($1) ? replace[$1] : match elsif $2 replace.has_key?($2) ? sprintf("%#{$3}", replace[$2]) : match end end ret else ret = gsub(/%([{<])/, '%%\1') ret._fast_gettext_old_format_m(args) end end end end # 1.9.1 if you misspell a %{key} your whole page would blow up, no thanks... begin ("%{b}" % {:a=>'b'}) rescue KeyError class String alias :_fast_gettext_old_format_m :% def %(*args) begin _fast_gettext_old_format_m(*args) rescue KeyError self end end end end fast_gettext-1.3.0/lib/fast_gettext/version.rb000066400000000000000000000000651300172175400214760ustar00rootroot00000000000000module FastGettext VERSION = Version = '1.3.0' end fast_gettext-1.3.0/spec/000077500000000000000000000000001300172175400151465ustar00rootroot00000000000000fast_gettext-1.3.0/spec/aa_unconfigued_spec.rb000066400000000000000000000010141300172175400214500ustar00rootroot00000000000000require "spec_helper" describe 'unconfigured' do it "gives a useful error message when trying to just translate" do FastGettext.text_domain = nil begin FastGettext._('x') "".should == "success!?" rescue FastGettext::Storage::NoTextDomainConfigured end end it "gives a useful error message when only locale was set" do FastGettext.locale = 'de' begin FastGettext._('x') "".should == "success!?" rescue FastGettext::Storage::NoTextDomainConfigured end end end fast_gettext-1.3.0/spec/cases/000077500000000000000000000000001300172175400162445ustar00rootroot00000000000000fast_gettext-1.3.0/spec/cases/fake_load_path/000077500000000000000000000000001300172175400211655ustar00rootroot00000000000000fast_gettext-1.3.0/spec/cases/fake_load_path/iconv.rb000066400000000000000000000000501300172175400226230ustar00rootroot00000000000000#simulate file not found raise LoadErrorfast_gettext-1.3.0/spec/cases/iconv_fallback.rb000066400000000000000000000010021300172175400215170ustar00rootroot00000000000000$LOAD_PATH.unshift 'lib' $LOAD_PATH.unshift File.join('spec','cases','fake_load_path') # test that iconv cannot be found test = 1 begin require 'iconv' rescue LoadError test = 2 end raise unless test == 2 # use FastGettext like normal and see if it fails require 'fast_gettext' FastGettext.add_text_domain('test',:path=>File.join('spec','locale')) FastGettext.text_domain = 'test' FastGettext.available_locales = ['en','de'] FastGettext.locale = 'de' #translate raise unless FastGettext._('car') == 'Auto' fast_gettext-1.3.0/spec/cases/interpolate_i18n_after_fast_gettext.rb000066400000000000000000000004211300172175400257150ustar00rootroot00000000000000$LOAD_PATH.unshift 'lib' require 'fast_gettext' raise unless "%{a}" % {:a => 1} == '1' require 'i18n/core_ext/string/interpolate' require 'active_support/core_ext/string/output_safety' raise unless "%{a}" % {:a => 1} == '1' raise unless "%{a}".html_safe % {:a => 1} == '1' fast_gettext-1.3.0/spec/cases/interpolate_i18n_before_fast_gettext.rb000066400000000000000000000005011300172175400260550ustar00rootroot00000000000000$LOAD_PATH.unshift 'lib' require 'i18n/core_ext/string/interpolate' require 'active_support/core_ext/string/output_safety' raise unless "%{a}" %{:a => 1} == '1' raise unless "%{a}".html_safe % {:a => 1} == '1' require 'fast_gettext' raise unless "%{a}" %{:a => 1} == '1' raise unless "%{a}".html_safe % {:a => 1} == '1' fast_gettext-1.3.0/spec/cases/safe_mode_can_handle_locales.rb000066400000000000000000000003201300172175400243440ustar00rootroot00000000000000$LOAD_PATH.unshift 'lib' require 'fast_gettext' $SAFE = 1 rep = FastGettext::TranslationRepository.build('safe_test',:path=>File.join('spec','locale')) print rep.is_a?(FastGettext::TranslationRepository::Mo) fast_gettext-1.3.0/spec/fast_gettext/000077500000000000000000000000001300172175400176475ustar00rootroot00000000000000fast_gettext-1.3.0/spec/fast_gettext/mo_file_spec.rb000066400000000000000000000032521300172175400226220ustar00rootroot00000000000000# encoding: utf-8 require "spec_helper" de_file = File.join('spec','locale','de','LC_MESSAGES','test.mo') describe FastGettext::MoFile do let(:de) { FastGettext::MoFile.new(de_file) } before :all do File.exist?(de_file).should == true end it "parses a file" do de['car'].should == 'Auto' end it "stores untranslated values as nil" do de['Untranslated'].should == nil end it "finds pluralized values" do de.plural('Axis','Axis').should == ['Achse','Achsen'] end it "returns empty array when pluralisation could not be found" do de.plural('Axis','Axis','Axis').should == [] end it "can access plurals through []" do de['Axis'].should == 'Achse' #singular end it "can successfully translate non-ASCII keys" do de["Umläüte"].should == "Umlaute" end it "doesn't load the file when new instance is created" do FastGettext::GetText::MOFile.should_not_receive(:open) FastGettext::MoFile.new(de_file) end it "loads the file when a translation is touched for the first time" do FastGettext::GetText::MOFile.should_receive(:open).once.with(de_file, "UTF-8").and_call_original de['car'] de['car'] end describe "eager loading" do let(:de) { FastGettext::MoFile.new(de_file, :eager_load => true) } it "loads the file when new instance is created" do FastGettext::GetText::MOFile.should_receive(:open).once.with(de_file, "UTF-8").and_call_original FastGettext::MoFile.new(de_file, :eager_load => true) end it "doesn't load the file when a translation is touched" do de FastGettext::GetText::MOFile.should_not_receive(:open) de['car'] de['car'] end end end fast_gettext-1.3.0/spec/fast_gettext/po_file_spec.rb000066400000000000000000000031551300172175400226270ustar00rootroot00000000000000require "spec_helper" require 'fast_gettext/po_file' de_file = File.join('spec','locale','de','test.po') describe FastGettext::PoFile do let(:de) { FastGettext::PoFile.new(de_file) } before :all do File.exist?(de_file).should == true end it "parses a file" do de['car'].should == 'Auto' end it "stores untranslated values as nil" do de['Untranslated'].should == nil end it "finds pluralized values" do de.plural('Axis','Axis').should == ['Achse','Achsen'] end it "returns empty array when pluralisation could not be found" do de.plural('Axis','Axis','Axis').should == [] end it "can access plurals through []" do de['Axis'].should == 'Achse' #singular end it "unescapes '\\'" do de["You should escape '\\' as '\\\\'."].should == "Du solltest '\\' als '\\\\' escapen." end it "doesn't load the file when new instance is created" do File.should_not_receive(:read).with(de_file) FastGettext::PoFile.new(de_file) end it "loads the file when a translation is touched for the first time" do File.should_receive(:read).once.with(de_file).and_call_original de['car'] de['car'] end describe "eager loading" do let(:de) { FastGettext::PoFile.new(de_file, :eager_load => true) } it "loads the file when new instance is created" do File.should_receive(:read).once.with(de_file).and_call_original FastGettext::PoFile.new(de_file, :eager_load => true) end it "doesn't load the file when a translation is touched" do de File.should_not_receive(:read).with(de_file) de['car'] de['car'] end end end fast_gettext-1.3.0/spec/fast_gettext/storage_spec.rb000066400000000000000000000256621300172175400226650ustar00rootroot00000000000000require "spec_helper" require 'fast_gettext/translation_repository/base' describe 'Storage' do include FastGettext::Storage before do #reset everything to nil self.default_available_locales = nil self.default_text_domain = nil self.default_locale = nil self.available_locales = nil self.text_domain = 'xxx' send(:_locale=, nil)#nil is not allowed to be set... # fake a simple text-domain translation_repositories[text_domain] = FastGettext::TranslationRepository::Base.new('x') default_locale.should == nil default_available_locales.should == nil available_locales.should == nil locale.should == 'en' text_domain.should == 'xxx' end def thread_safe(method, value_a, value_b) send("#{method}=",value_a) # mess around with other threads 100.times do Thread.new {FastGettext.send("#{method}=",value_b)} end sleep 0.1 # Ruby 1.9 cannot switch threads fast enough <-> spec fails without this WTF! !!(send(method) == value_a) end { :locale=>['de','en'], :available_locales=>[['de'],['en']], :text_domain=>['xx','yy'], :pluralisation_rule=>[lambda{|x|x==4},lambda{|x|x==1}] }.each do |method, (value_a, value_b)| it "stores #{method} thread safe" do thread_safe(method, value_a, value_b).should == true end end context "non-thread safe" do after do self.translation_repositories.clear end it "stores translation_repositories" do self.translation_repositories[:x]=1 t = Thread.new{self.translation_repositories[:x]=2} t.join self.translation_repositories[:x].should == 2 end end describe :pluralisation_rule do it "defaults to singular-if-1 when it is not set" do should_receive(:current_repository).at_least(1).and_return double(:pluralisation_rule => nil) self.pluralisation_rule = nil pluralisation_rule.call(1).should == false pluralisation_rule.call(0).should == true pluralisation_rule.call(2).should == true end end describe :default_locale do it "stores default_locale non-thread-safe" do thread_safe(:default_locale, 'de', 'en').should == false end it "does not overwrite locale" do self.locale = 'de' self.default_locale = 'yy' self.locale.should == 'de' end it "falls back to default if locale is missing" do self.default_locale = 'yy' self.locale.should == 'yy' end it "does not set non-available-locales as default" do self.available_locales = ['xx'] self.default_locale = 'yy' self.default_locale.should == nil end it "can set default_locale to nil" do self.default_locale = 'xx' self.default_locale = nil default_locale.should be_nil end end describe :default_text_domain do it "stores default_text_domain non-thread safe" do thread_safe(:default_text_domain, 'xx', 'en').should == false end it "uses default_text_domain when text_domain is not set" do self.text_domain = nil self.default_text_domain = 'x' text_domain.should == 'x' end it "does not use default when domain is set" do self.text_domain = 'x' self.default_text_domain = 'y' text_domain.should == 'x' end end describe :default_available_locales do it "stores default_available_locales non-thread-safe" do thread_safe(:default_available_locales, ['xx'], ['yy']).should == false end it "converts locales to s" do self.available_locales = [:x] available_locales.should == ['x'] end it "uses default_available_locales when available_locales is not set" do self.available_locales = nil self.default_available_locales = ['x'] available_locales.should == ['x'] end it "does not use default when available_locales is set" do self.available_locales = ['x'] self.default_available_locales = ['y'] available_locales.should == ['x'] end end describe :locale do it "stores everything as long as available_locales is not set" do self.available_locales = nil self.locale = 'XXX' locale.should == 'XXX' end it "is en if no locale and no available_locale were set" do FastGettext.send(:_locale=,nil) self.available_locales = nil locale.should == 'en' end it "does not change the locale if locales was called with nil" do self.locale = nil locale.should == 'en' end it "is the first available_locale if one was set" do self.available_locales = ['de'] locale.should == 'de' end it "does not store a locale if it is not available" do self.available_locales = ['de'] self.locale = 'en' locale.should == 'de' end it "set_locale returns the old locale if the new could not be set" do self.locale = 'de' self.available_locales = ['de'] self.set_locale('en').should == 'de' end it "set_locale resets to default with :reset_on_unknown" do self.locale = 'de' self.available_locales = ['fr'] self.set_locale('en').should == 'fr' end { 'Opera' => "de-DE,de;q=0.9,en;q=0.8", 'Firefox' => "de-de,de;q=0.8,en-us;q=0.5,en;q=0.3", }.each do |browser,accept_language| it "sets the locale from #{browser} headers" do FastGettext.available_locales = ['de_DE','de','xx'] FastGettext.locale = 'xx' FastGettext.locale = accept_language FastGettext.locale.should == 'de_DE' end end it "sets a unimportant locale if it is the only available" do FastGettext.available_locales = ['en','xx'] FastGettext.locale = "de-de,de;q=0.8,en-us;q=0.5,en;q=0.3" FastGettext.locale.should == 'en' end it "sets the locale with the highest wheight" do FastGettext.available_locales = ['en','de'] FastGettext.locale = "xx-us;q=0.5,de-de,de;q=0.8,en;q=0.9" FastGettext.locale.should == 'en' end it "sets the locale from languages" do FastGettext.available_locales = ['de'] FastGettext.locale = "xx-us;q=0.5,de-de;q=0.8,en-uk;q=0.9" FastGettext.locale.should == 'de' end it "sets locale from comma seperated" do FastGettext.available_locales = ['de_DE','en','xx'] FastGettext.locale = "de,de-de,en" FastGettext.locale.should == 'de_DE' end end describe :silence_errors do before do self.text_domain = rand(99999).to_s end after do self.translation_repositories.clear end it "raises when a textdomain was empty" do begin FastGettext._('x') raise 'NOPE!' rescue FastGettext::Storage::NoTextDomainConfigured end end it "can silence errors" do FastGettext.silence_errors FastGettext._('x').should == 'x' end it "does not overwrite existing textdomain" do self.translation_repositories[FastGettext.text_domain] = 1 FastGettext.silence_errors self.translation_repositories[FastGettext.text_domain].should == 1 end it "has ./locale as locale path when silenced" do FastGettext.silence_errors FastGettext.locale_path.should == 'locale' end end describe :cache do before do FastGettext.text_domain = 'xxx' FastGettext.available_locales = ['de','en'] FastGettext.locale = 'de' FastGettext.current_repository.stub(:"[]").with('abc').and_return 'old' FastGettext.current_repository.stub(:"[]").with('unfound').and_return nil FastGettext._('abc') FastGettext._('unfound') FastGettext.locale = 'en' end it "stores a translation seperate by locale" do FastGettext.cache.fetch('abc') { :missing }.should == :missing end it "stores a translation seperate by domain" do FastGettext.locale = 'de' FastGettext.text_domain = nil FastGettext.cache.fetch('abc') { :missing }.should == :missing end it "cache is restored through setting of default_text_domain" do FastGettext.locale = 'de' FastGettext.text_domain = nil FastGettext.default_text_domain = 'xxx' FastGettext.cache.fetch('abc') { :missing }.should == 'old' end it "cache is restored through setting of default_locale" do FastGettext.send(:_locale=,nil)#reset locale to nil FastGettext.default_locale = 'de' FastGettext.locale.should == 'de' FastGettext.cache.fetch('abc') { :missing }.should == 'old' end it "stores a translation permanently" do FastGettext.locale = 'de' FastGettext.cache.fetch('abc') { :missing }.should == 'old' end it "stores a unfound translation permanently" do FastGettext.locale = 'de' FastGettext.cache.fetch('unfound') { :missing }.should == false end end describe :reload! do it "reloads all repositories" do FastGettext.translation_repositories.each do |name, repository| repository.should_receive(:reload) end FastGettext.reload! end it "clears the cache" do FastGettext.cache.should_receive(:reload!) FastGettext.reload! end end describe :key_exist? do it "does not find default keys" do FastGettext._('abcde') key_exist?('abcde').should == false end it "finds using the current repository" do should_receive(:current_repository).and_return '1234'=>'1' key_exist?('1234').should == true end it "sets the current cache with a found result" do should_receive(:current_repository).and_return 'xxx'=>'1' key_exist?('xxx') cache.fetch('xxx').should == '1' end it "does not overwrite an existing cache value" do cache['xxx']='xxx' key_exist?('xxx') cache.fetch('xxx').should == 'xxx' end it "is false for gettext meta key" do key_exist?("").should == false end end describe :cached_find do it "is nil for gettext meta key" do cached_find("").should == false end end describe :format_locale do it "allows 2-letter locales to be formatted" do format_locale("de-ch").should == "de_CH" end it "allows 3-letter locales to be formatted" do format_locale("gsw-ch").should == "gsw_CH" end end describe :expire_cache_for do it "expires the cached key" do should_receive(:current_repository).and_return 'xxx' => 'new string' cache['xxx'] = 'old string' cached_find('xxx').should == 'old string' expire_cache_for('xxx') cached_find('xxx').should == 'new string' end end describe FastGettext::Storage::NoTextDomainConfigured do it "shows what to do" do FastGettext::Storage::NoTextDomainConfigured.new.to_s.should =~ /FastGettext\.add_text_domain/ end it "warns when text_domain is nil" do FastGettext.text_domain = nil FastGettext::Storage::NoTextDomainConfigured.new.to_s.should =~ /\(nil\)/ end it "shows current text_domain" do FastGettext.text_domain = 'xxx' FastGettext::Storage::NoTextDomainConfigured.new('xxx').to_s.should =~ /xxx/ end end end fast_gettext-1.3.0/spec/fast_gettext/translation_repository/000077500000000000000000000000001300172175400245045ustar00rootroot00000000000000fast_gettext-1.3.0/spec/fast_gettext/translation_repository/base_spec.rb000066400000000000000000000007501300172175400267570ustar00rootroot00000000000000require "spec_helper" require 'fast_gettext/translation_repository/base' describe 'FastGettext::TranslationRepository::Base' do before do @rep = FastGettext::TranslationRepository::Base.new('x') end it "can be built" do @rep.available_locales.should == [] end it "cannot translate" do @rep['car'].should == nil end it "cannot pluralize" do @rep.plural('Axis','Axis').should == [] end it "can be reloaded" do @rep.reload.should == true end end fast_gettext-1.3.0/spec/fast_gettext/translation_repository/chain_spec.rb000066400000000000000000000052671300172175400271370ustar00rootroot00000000000000require "spec_helper" class MockRepo def [](key)#should_receive :[] does not work so well... singular key end end describe 'FastGettext::TranslationRepository::Chain' do describe "empty chain" do before do @rep = FastGettext::TranslationRepository.build('chain', :chain=>[], :type=>:chain) end it "has no locales" do @rep.available_locales.should == [] end it "cannot translate" do @rep['car'].should == nil end it "cannot pluralize" do @rep.plural('Axis','Axis').should == [] end it "has no pluralisation rule" do @rep.pluralisation_rule.should == nil end it "returns true on reload" do @rep.reload.should == true end end describe "filled chain" do before do @one = MockRepo.new @one.stub(:singular).with('xx').and_return 'one' @two = MockRepo.new @two.stub(:singular).with('xx').and_return 'two' @rep = FastGettext::TranslationRepository.build('chain', :chain=>[@one, @two], :type=>:chain) end describe :singular do it "uses the first repo in the chain if it responds" do @rep['xx'].should == 'one' end it "uses the second repo in the chain if the first does not respond" do @one.should_receive(:singular).and_return nil @rep['xx'].should == 'two' end end describe :plural do it "uses the first repo in the chain if it responds" do @one.should_receive(:plural).with('a','b').and_return ['A','B'] @rep.plural('a','b').should == ['A','B'] end it "uses the second repo in the chain if the first does not respond" do @one.should_receive(:plural).with('a','b').and_return [] @two.should_receive(:plural).with('a','b').and_return ['A','B'] @rep.plural('a','b').should == ['A','B'] end end describe :available_locales do it "should be the sum of all added repositories" do @one.should_receive(:available_locales).and_return ['de'] @two.should_receive(:available_locales).and_return ['de','en'] @rep.available_locales.should == ['de','en'] end end describe :pluralisation_rule do it "chooses the first that exists" do @one.should_receive(:pluralisation_rule).and_return nil @two.should_receive(:pluralisation_rule).and_return 'x' @rep.pluralisation_rule.should == 'x' end end describe :reload do it "reloads all repositories" do @one.should_receive(:reload) @two.should_receive(:reload) @rep.reload end it "returns true" do @rep.chain.each { |c| c.stub(:reload) } @rep.reload.should == true end end end end fast_gettext-1.3.0/spec/fast_gettext/translation_repository/db_spec.rb000066400000000000000000000050471300172175400264360ustar00rootroot00000000000000require 'spec_helper' require 'active_record' require 'fast_gettext/translation_repository/db' FastGettext::TranslationRepository::Db.require_models describe FastGettext::TranslationRepository::Db do before :all do ActiveRecord::Base.establish_connection( :adapter => "sqlite3", :database => ":memory:" ) #create model table ActiveRecord::Migration.verbose = false ActiveRecord::Schema.define(:version => 1) do create_table :translation_keys do |t| t.string :key, :unique=>true, :null=>false t.timestamps null: false end create_table :translation_texts do |t| t.string :text, :locale t.integer :translation_key_id, :null=>false t.timestamps null: false end end end before do TranslationKey.delete_all TranslationText.delete_all FastGettext.locale = 'de' @rep = FastGettext::TranslationRepository::Db.new('x', :model=>TranslationKey) end def create_translation(key, text) translation_key = TranslationKey.create!(:key => key) TranslationText.create!(:translation_key_id => translation_key.id, :text => text, :locale => "de") end it "reads locales from the db" do locales = ['de','en','es'] locales.reverse.each do |locale| TranslationText.create!(:translation_key_id=>1, :text=>'asdasd', :locale=>locale) end @rep.available_locales.should == locales end it "has no pluralisation_rule by default" do @rep.pluralisation_rule.should == nil end it "cannot translate when no models are present" do @rep['car'].should == nil end it "can translate" do create_translation 'car', 'Auto' @rep['car'].should == 'Auto' end it "cannot pluralize when no model is present" do @rep.plural('Axis','Axis').should == [] end it "can pluralize" do create_translation 'Axis||||Axis', 'Achse||||Achsen' @rep.plural('Axis','Axis').should == ['Achse','Achsen'] end it "can ignore newline format" do create_translation "good\r\nmorning", "guten\r\nMorgen" @rep["good\nmorning"].should == "guten\r\nMorgen" end it "removes texts when key is removed" do t = create_translation("a", "b") lambda{ lambda{ t.translation_key.destroy }.should change{ TranslationText.count }.by(-1) }.should change{ TranslationKey.count }.by(-1) end it "expires the cache when updated" do FastGettext.should_receive(:expire_cache_for).with('car') translation_text = create_translation 'car', 'Auto' translation_text.update_attributes :text => 'Autobot' end end fast_gettext-1.3.0/spec/fast_gettext/translation_repository/logger_spec.rb000066400000000000000000000020741300172175400273250ustar00rootroot00000000000000require "spec_helper" describe 'FastGettext::TranslationRepository::Logger' do before do @callback = lambda{} @rep = FastGettext::TranslationRepository.build('test', :type=>:logger, :callback=>@callback) @rep.is_a?(FastGettext::TranslationRepository::Logger).should == true end subject { @rep } it "has available_locales" do subject.available_locales.size.should == 0 end it "has no pluralisation_rule" do @rep.pluralisation_rule.should == nil end describe :single do it "logs every call" do @callback.should_receive(:call).with('the_key') @rep['the_key'] end it "returns nil" do @callback.should_receive(:call).with('the_key').and_return 'something' @rep['the_key'].should == nil end end describe :plural do it "logs every call" do @callback.should_receive(:call).with(['a','b']) @rep.plural('a','b') end it "returns an empty array" do @callback.should_receive(:call).with(['a','b']).and_return 'something' @rep.plural('a','b').should == [] end end end fast_gettext-1.3.0/spec/fast_gettext/translation_repository/merge_spec.rb000066400000000000000000000116251300172175400271470ustar00rootroot00000000000000require "spec_helper" require 'fast_gettext/translation_repository/merge' describe 'FastGettext::TranslationRepository::Merge' do describe "empty repo" do before do @repo = FastGettext::TranslationRepository.build('test', type: :merge) end it "has no locales" do @repo.available_locales.should == [] end it "cannot translate" do @repo['car'].should == nil end it "cannot pluralize" do @repo.plural('Axis','Axis').should == [] end it "has no pluralisation rule" do @repo.pluralisation_rule.should == nil end it "returns true on reload" do @repo.reload.should == true end end describe "filled repo" do before do FastGettext.locale = 'de' @one = FastGettext::TranslationRepository.build('test', path: File.join('spec', 'locale'), type: :mo) @two = FastGettext::TranslationRepository.build('test2', path: File.join('spec', 'locale'), type: :mo) @repo = FastGettext::TranslationRepository.build('test', type: :merge) @repo.add_repo(@one) @repo.add_repo(@two) end it "builds correct repo" do @repo.is_a?(FastGettext::TranslationRepository::Merge).should == true end describe "#initialize" do it "can init the repo chain" do FastGettext::TranslationRepository::Merge.any_instance.should_receive(:add_repo).with(@one).and_return(true) FastGettext::TranslationRepository::Merge.any_instance.should_receive(:add_repo).with(@two).and_return(true) FastGettext::TranslationRepository.build('test', type: :merge, chain: [@one, @two]) end end describe "#available_locales" do it "should be the sum of all added repositories" do @one.should_receive(:available_locales).and_return ['de'] @two.should_receive(:available_locales).and_return ['de','en'] @repo.available_locales.should == ['de','en'] end end describe "#[]" do it "uses the first repo for transaltion" do @repo['car'].should == 'Auto' end it "returns transaltion from the second repo when it doesn't exist in the first one" do @repo['Untranslated and translated in test2'].should == 'Translated' end end describe "#add_repo" do it "accepts mo repository" do mo_rep = FastGettext::TranslationRepository.build('test', path: File.join('spec', 'locale'), type: :mo) @repo.add_repo(mo_rep).should == true end it "accepts po repository" do po_rep = FastGettext::TranslationRepository.build('test', path: File.join('spec', 'locale'), type: :po) @repo.add_repo(po_rep).should == true end it "raises exeption for other repositories" do unsupported_rep = FastGettext::TranslationRepository.build('test', path: File.join('spec', 'locale'), type: :base) lambda { @repo.add_repo(unsupported_rep) }.should raise_error(RuntimeError) end end describe "#plural" do it "uses the first repo in the chain if it responds" do @one.should_receive(:plural).with('a','b').and_return ['A','B'] @repo.plural('a','b').should == ['A','B'] end it "uses the second repo in the chain if the first does not respond" do @one.should_receive(:plural).with('a','b').and_return [] @two.should_receive(:plural).with('a','b').and_return ['A','B'] @repo.plural('a','b').should == ['A','B'] end it "returns empty array if no plural is faound" do @one.should_receive(:plural).with('a','b').and_return [] @two.should_receive(:plural).with('a','b').and_return [] @repo.plural('a','b').should == [] end end describe "#pluralisation_rule" do it "chooses the first that exists" do @one.should_receive(:pluralisation_rule).and_return nil @two.should_receive(:pluralisation_rule).and_return 'x' @repo.pluralisation_rule.should == 'x' end end describe "#reload" do before do @repo = FastGettext::TranslationRepository.build('test', type: :merge) @repo.add_repo(FastGettext::TranslationRepository.build('test', path: File.join('spec', 'locale'), type: :mo)) @repo['Untranslated and translated in test2'].should be_nil mo_file = FastGettext::MoFile.new('spec/locale/de/LC_MESSAGES/test2.mo') empty_mo_file = FastGettext::MoFile.empty FastGettext::MoFile.stub(:new).and_return(empty_mo_file) FastGettext::MoFile.stub(:new).with('spec/locale/de/LC_MESSAGES/test.mo', eager_load: false).and_return(mo_file) end it "can reload" do @repo.reload @repo['Untranslated and translated in test2'].should == 'Translated' end it "returns true" do @repo.reload.should == true end end end it "can work in SAFE mode" do pending_if RUBY_VERSION > "2.0" do `ruby spec/cases/safe_mode_can_handle_locales.rb 2>&1`.should == 'true' end end end fast_gettext-1.3.0/spec/fast_gettext/translation_repository/mo_spec.rb000066400000000000000000000032471300172175400264640ustar00rootroot00000000000000require "spec_helper" describe 'FastGettext::TranslationRepository::Mo' do before do @rep = FastGettext::TranslationRepository.build('test',:path=>File.join('spec', 'locale')) @rep.is_a?(FastGettext::TranslationRepository::Mo).should == true end it "can be built" do @rep.available_locales.sort.should == ['de','en','gsw_CH'] end it "can translate" do FastGettext.locale = 'de' @rep['car'].should == 'Auto' end it "can pluralize" do FastGettext.locale = 'de' @rep.plural('Axis','Axis').should == ['Achse','Achsen'] end describe :reload do before do mo_file = FastGettext::MoFile.new('spec/locale/de/LC_MESSAGES/test2.mo') empty_mo_file = FastGettext::MoFile.empty FastGettext::MoFile.stub(:new).and_return(empty_mo_file) FastGettext::MoFile.stub(:new).with('spec/locale/de/LC_MESSAGES/test.mo', :eager_load => false).and_return(mo_file) end it "can reload" do FastGettext.locale = 'de' @rep['Untranslated and translated in test2'].should be_nil @rep.reload @rep['Untranslated and translated in test2'].should == 'Translated' end it "returns true" do @rep.reload.should == true end end it "has access to the mo repositories pluralisation rule" do FastGettext.locale = 'en' rep = FastGettext::TranslationRepository.build('plural_test',:path=>File.join('spec','locale')) rep['car'].should == 'Test'#just check it is loaded correctly rep.pluralisation_rule.call(2).should == 3 end it "can work in SAFE mode" do pending_if RUBY_VERSION > "2.0" do `ruby spec/cases/safe_mode_can_handle_locales.rb 2>&1`.should == 'true' end end end fast_gettext-1.3.0/spec/fast_gettext/translation_repository/po_spec.rb000066400000000000000000000045001300172175400264600ustar00rootroot00000000000000require "spec_helper" describe 'FastGettext::TranslationRepository::Po' do before do @rep = FastGettext::TranslationRepository.build('test',:path=>File.join('spec','locale'),:type=>:po) @rep.is_a?(FastGettext::TranslationRepository::Po).should == true end it "can be built" do @rep.available_locales.sort.should == ['de','en','gsw_CH'] end it "can translate" do FastGettext.locale = 'de' @rep['car'].should == 'Auto' end it "can pluralize" do FastGettext.locale = 'de' @rep.plural('Axis','Axis').should == ['Achse','Achsen'] end it "has access to the mo repositories pluralisation rule" do FastGettext.locale = 'en' rep = FastGettext::TranslationRepository.build('plural_test',:path=>File.join('spec','locale'),:type=>:po) rep['car'].should == 'Test'#just check it is loaded correctly rep.pluralisation_rule.call(2).should == 3 end describe 'fuzzy' do before do @fuzzy = File.join('spec','fuzzy_locale') end it "should use fuzzy by default" do $stderr.should_receive(:print).at_least(:once) repo = FastGettext::TranslationRepository.build('test',:path=>@fuzzy,:type=>:po) repo["%{relative_time} ago"].should == "vor %{relative_time}" end it "should warn on fuzzy when ignoring" do $stderr.should_receive(:print).at_least(:once) repo = FastGettext::TranslationRepository.build('test',:path=>@fuzzy,:type=>:po, :ignore_fuzzy => true) repo["%{relative_time} ago"].should == nil end it "should ignore fuzzy and not report when told to do so" do $stderr.should_not_receive(:print) repo = FastGettext::TranslationRepository.build('test',:path=>@fuzzy,:type=>:po, :ignore_fuzzy => true, :report_warning => false) repo["%{relative_time} ago"].should == nil end end describe 'obsolete' do it "should warn on obsolete by default" do $stderr.should_receive(:print).at_least(:once) repo = FastGettext::TranslationRepository.build('test',:path=>File.join('spec','obsolete_locale'),:type=>:po) repo['car'] end it "should ignore obsolete when told to do so" do $stderr.should_not_receive(:print) repo = FastGettext::TranslationRepository.build('test',:path=>File.join('spec','obsolete_locale'),:type=>:po, :report_warning => false) repo['car'] end end end fast_gettext-1.3.0/spec/fast_gettext/translation_repository/yaml_spec.rb000066400000000000000000000044051300172175400270100ustar00rootroot00000000000000require "spec_helper" describe 'FastGettext::TranslationRepository::Yaml' do before do FastGettext.pluralisation_rule = nil @rep = FastGettext::TranslationRepository.build('test', :path => File.join('spec', 'locale', 'yaml'), :type => :yaml) @rep.is_a?(FastGettext::TranslationRepository::Yaml).should == true FastGettext.locale = 'de' end it "can be built" do @rep.available_locales.sort.should == ['de', 'en'] end it "translates nothing when locale is unsupported" do FastGettext.locale = 'xx' @rep['simple'].should == nil end it "does not translated categories" do @rep['cars'].should == nil end it "can translate simple" do @rep['simple'].should == 'einfach' end it "can translate nested" do @rep['cars.car'].should == 'Auto' end it "can pluralize" do @rep.plural('cars.axis').should == ['Achse', 'Achsen', nil, nil] end describe :reload do before do yaml = YAML.load_file('spec/locale/yaml/de2.yml') YAML.stub(:load_file).and_return('en' => {}, 'de' => {}) YAML.stub(:load_file).with('spec/locale/yaml/de.yml').and_return(yaml) end it "can reload" do FastGettext.locale = 'de' @rep['cars.car'].should == 'Auto' @rep.reload @rep['cars.car'].should == 'Aufzugskabine' end it "returns true" do @rep.reload.should == true end end it "handles unfound plurals with nil" do @rep.plural('cars.xxx').should == [nil, nil, nil, nil] end it "can be used to translate plural forms" do FastGettext.stub(:current_repository).and_return @rep FastGettext.n_('cars.axis','cars.axis',2).should == 'Achsen' FastGettext.n_('cars.axis',2).should == 'Achsen' FastGettext.n_('cars.axis',1).should == 'Achse' end 4.times do |i| it "can be used to do wanky pluralisation rules #{i}" do FastGettext.stub(:current_repository).and_return @rep @rep.stub(:pluralisation_rule).and_return lambda{|x| i} FastGettext.n_('cars.silly',1).should == i.to_s # cars.silly translations are 0,1,2,3 end end it "can use custom pluraliztion rules" do FastGettext.locale = 'en' {0 => 0, 1 => 1, 2 => 2, 3 => 0}.each do |input, expected| @rep.pluralisation_rule.call(input).should == expected end end end fast_gettext-1.3.0/spec/fast_gettext/translation_repository_spec.rb000066400000000000000000000016261300172175400260500ustar00rootroot00000000000000require "spec_helper" module FastGettext module TranslationRepository class Dummy attr_accessor :name, :options def initialize(name, options) @name = name @options = options end end end end describe FastGettext::TranslationRepository do describe "build" do it "auto requires class by default" do lambda { FastGettext::TranslationRepository.build('xx', { :type => 'invalid'}) }.should raise_error(LoadError) end it "can have auto-require disabled" do FastGettext::TranslationRepository.build('xx', { :type => 'dummy' }) end it "makes a new repository" do options = { :type => 'dummy', :external => true } repo = FastGettext::TranslationRepository.build('xx', options) repo.class.should == FastGettext::TranslationRepository::Dummy repo.name.should == 'xx' repo.options.should == options end end end fast_gettext-1.3.0/spec/fast_gettext/translation_spec.rb000066400000000000000000000232411300172175400235460ustar00rootroot00000000000000require "spec_helper" describe FastGettext::Translation do include FastGettext::Translation include FastGettext::TranslationMultidomain before do default_setup end describe "unknown locale" do before do FastGettext.available_locales = nil FastGettext.locale = 'xx' end it "does not translate" do _('car').should == 'car' end it "does not translate plurals" do n_('car','cars',2).should == 'cars' end end describe :_ do it "translates simple text" do _('car').should == 'Auto' end it "returns the original string if its translation is blank" do _('Untranslated').should == 'Untranslated' end it "does not return the blank translation if a string's translation is blank" do _('Untranslated').should_not == '' end it "returns key if not translation was found" do _('NOT|FOUND').should == 'NOT|FOUND' end it "does not return the gettext meta information" do _('').should == '' end it "returns nil when specified" do _('not found'){nil}.should be_nil end it "returns block when specified" do _('not found'){:block}.should == :block end end describe :n_ do before do FastGettext.pluralisation_rule = nil end it "translates pluralized" do n_('Axis','Axis',1).should == 'Achse' n_('Axis','Axis',2).should == 'Achsen' n_('Axis','Axis',0).should == 'Achsen' end describe "pluralisations rules" do it "supports abstract pluralisation rules" do FastGettext.pluralisation_rule = lambda{|n|2} n_('a','b','c','d',4).should == 'c' end it "supports false as singular" do FastGettext.pluralisation_rule = lambda{|n|n!=2} n_('singular','plural','c','d',2).should == 'singular' end it "supports true as plural" do FastGettext.pluralisation_rule = lambda{|n|n==2} n_('singular','plural','c','d',2).should == 'plural' end end it "returns a simple translation when no combined was found" do n_('Axis','NOTFOUNDs',1).should == 'Achse' end it "returns the appropriate key if no translation was found" do n_('NOTFOUND','NOTFOUNDs',1).should == 'NOTFOUND' n_('NOTFOUND','NOTFOUNDs',2).should == 'NOTFOUNDs' end it "returns the last key when no translation was found and keys where to short" do FastGettext.pluralisation_rule = lambda{|x|4} n_('Apple','Apples',2).should == 'Apples' end it "returns block when specified" do n_('not found'){:block}.should == :block end end describe :s_ do it "translates simple text" do s_('car').should == 'Auto' end it "returns cleaned key if a translation was not found" do s_("XXX|not found").should == "not found" end it "can use a custom seperator" do s_("XXX/not found",'/').should == "not found" end it "returns block when specified" do s_('not found'){:block}.should == :block end end describe :N_ do it "returns the key" do N_('XXXXX').should == 'XXXXX' end end describe :Nn_ do it "returns the keys as array" do Nn_('X','Y').should == ['X','Y'] end end describe :ns_ do it "translates whith namespace" do ns_('Fruit|Apple','Fruit|Apples',2).should == 'Apples' end it "returns block when specified" do ns_('not found'){:block}.should == :block ns_('not found'){nil}.should be_nil end end describe :multi_domain do before do setup_extra_domain end describe :_in_domain do it "changes domain via in_domain" do Thread.current[:fast_gettext_text_domain].should == "test" _in_domain "fake" do Thread.current[:fast_gettext_text_domain].should == "fake" end Thread.current[:fast_gettext_text_domain].should == "test" end end describe :d_ do it "translates simple text" do d_('test', 'car').should == 'Auto' end it "translates simple text in different domain" do d_('test2', 'car').should == 'Auto 2' end it "translates simple text in different domain one transaction" do d_('test', 'car').should == 'Auto' d_('test2', 'car').should == 'Auto 2' end it "returns the original string if its translation is blank" do d_('test', 'Untranslated').should == 'Untranslated' end it "sets text domain back to previous one" do old_domain = FastGettext.text_domain d_('test2', 'car').should == 'Auto 2' FastGettext.text_domain.should == old_domain end it "returns appropriate key if translation is not found in a domain" do FastGettext.translation_repositories['fake'] = {} d_('fake', 'car').should == 'car' end end describe :dn_ do before do FastGettext.pluralisation_rule = nil end it "translates pluralized" do dn_('test', 'Axis','Axis',1).should == 'Achse' dn_('test2', 'Axis','Axis',1).should == 'Achse 2' end it "returns a simple translation when no combined was found" do dn_('test', 'Axis','NOTFOUNDs',1).should == 'Achse' dn_('test2', 'Axis','NOTFOUNDs',1).should == 'Achse 2' end it "returns the appropriate key if no translation was found" do dn_('test', 'NOTFOUND','NOTFOUNDs',1).should == 'NOTFOUND' dn_('test', 'NOTFOUND','NOTFOUNDs',2).should == 'NOTFOUNDs' end it "returns the last key when no translation was found and keys where to short" do FastGettext.pluralisation_rule = lambda{|x|4} dn_('test', 'Apple','Apples',2).should == 'Apples' end end describe :ds_ do it "translates simple text" do ds_('test2', 'car').should == 'Auto 2' ds_('test', 'car').should == 'Auto' end it "returns cleaned key if a translation was not found" do ds_('test2', "XXX|not found").should == "not found" end it "can use a custom seperator" do ds_('test2', "XXX/not found",'/').should == "not found" end end describe :dns_ do it "translates whith namespace" do dns_('test', 'Fruit|Apple','Fruit|Apples',2).should == 'Apples' dns_('test2', 'Fruit|Apple','Fruit|Apples',2).should == 'Apples' end end end describe :multidomain_all do before do setup_extra_domain end describe :D_ do it "translates simple text" do D_('not found').should == 'not found' D_('only in test2 domain').should == 'nur in test2 Domain' end it "returns translation from random domain" do D_('car').should match('(Auto|Auto 2)') end it "sets text domain back to previous one" do old_domain = FastGettext.text_domain D_('car').should match('(Auto|Auto 2)') FastGettext.text_domain.should == old_domain end end describe :Dn_ do before do FastGettext.pluralisation_rule = nil end it "translates pluralized" do Dn_('Axis','Axis',1).should match('(Achse|Achse 2)') end it "returns a simple translation when no combined was found" do Dn_('Axis','NOTFOUNDs',1).should match('(Achse|Achse 2)') end it "returns the appropriate key if no translation was found" do Dn_('NOTFOUND','NOTFOUNDs',1).should == 'NOTFOUND' end it "returns the last key when no translation was found and keys where to short" do Dn_('Apple','Apples',2).should == 'Apples' end end describe :Ds_ do it "translates simple text" do Ds_('car').should match('(Auto|Auto 2)') end it "returns cleaned key if a translation was not found" do Ds_("XXX|not found").should == "not found" end it "can use a custom seperator" do Ds_("XXX/not found",'/').should == "not found" end end describe :Dns_ do it "translates whith namespace" do Dns_('Fruit|Apple','Fruit|Apples',1).should == 'Apple' Dns_('Fruit|Apple','Fruit|Apples',2).should == 'Apples' end it "returns cleaned key if a translation was not found" do Dns_("XXX|not found", "YYY|not found", 1).should == "not found" Dns_("XXX|not found", "YYY|not found", 2).should == "not found" end end end describe :caching do describe :cache_hit do before do #singular cache keys FastGettext.cache['xxx'] = '1' #plural cache keys FastGettext.cache['||||xxx'] = ['1','2'] FastGettext.cache['||||xxx||||yyy'] = ['1','2'] end it "uses the cache when translating with _" do _('xxx').should == '1' end it "uses the cache when translating with s_" do s_('xxx').should == '1' end it "uses the cache when translating with n_" do n_('xxx','yyy',1).should == '1' end it "uses the cache when translating with n_ and single argument" do n_('xxx',1).should == '1' end end it "caches different locales seperatly" do FastGettext.locale = 'en' _('car').should == 'car' FastGettext.locale = 'de' _('car').should == 'Auto' end it "caches different textdomains seperatly" do _('car').should == 'Auto' FastGettext.translation_repositories['fake'] = {} FastGettext.text_domain = 'fake' _('car').should == 'car' FastGettext.text_domain = 'test' _('car').should == 'Auto' end it "caches different textdomains seperatly for d_" do _('car').should == 'Auto' FastGettext.translation_repositories['fake'] = {} d_('fake', 'car').should == 'car' d_('test','car').should == 'Auto' end end end fast_gettext-1.3.0/spec/fast_gettext/vendor/000077500000000000000000000000001300172175400211445ustar00rootroot00000000000000fast_gettext-1.3.0/spec/fast_gettext/vendor/iconv_spec.rb000066400000000000000000000002661300172175400236250ustar00rootroot00000000000000require "spec_helper" describe 'Iconv' do it "also works when Iconv was not found locally" do system("bundle exec ruby spec/cases/iconv_fallback.rb").should == true end end fast_gettext-1.3.0/spec/fast_gettext/vendor/string_spec.rb000066400000000000000000000056411300172175400240170ustar00rootroot00000000000000require "spec_helper" describe String do before :all do if "i18n gem overwrites % method".respond_to?(:interpolate_without_ruby_19_syntax) class String def %(*args) interpolate_without_ruby_19_syntax(*args) end end end end it "does not translate twice" do ("%{a} %{b}" % {:a=>'%{b}',:b=>'c'}).should == '%{b} c' end describe "old % style replacement" do it "substitudes using % + Hash" do ("x%{name}y" % {:name=>'a'}).should == 'xay' end it "does not substitute after %%" do ("%%{num} oops" % {:num => 1}).should == '%{num} oops' end it "does not substitute when nothing could be found" do ("abc" % {:x=>1}).should == 'abc' end if RUBY_VERSION < '1.9' # this does not longer work in 1.9, use :"my weird string" it "sustitutes strings" do ("a%{b}c" % {'b'=>1}).should == 'a1c' end it "sustitutes strings with -" do ("a%{b-a}c" % {'b-a'=>1}).should == 'a1c' end it "sustitutes string with ." do ("a%{b.a}c" % {'b.a'=>1}).should == 'a1c' end it "sustitutes string with number" do ("a%{1}c" % {'1'=>1}).should == 'a1c' end end end describe 'old sprintf style' do it "substitudes using % + Array" do ("x%sy%s" % ['a','b']).should == 'xayb' end if RUBY_VERSION < '1.9' # this does not longer work in 1.9, ArgumentError is raised it "does not remove %{} style replacements" do ("%{name} x%sy%s" % ['a','b']).should == '%{name} xayb' end it "does not remove %<> style replacement" do ("%{name} %f %s" % ['x']).should == "%{name} %f x" end end end describe 'ruby 1.9 style %< replacement' do it "does not substitute after %%" do ("%% oops" % {:num => 1}).should == '% oops' end it "subsitutes %d" do ("x%dy" % {:hello=>1}).should == 'x1y' end it "substitutes #b" do ("%#b" % {:num => 1}).should == "0b1" end end if RUBY_VERSION >= '1.9' it "does not raise when key was not found" do ("%{typo} xxx" % {:something=>1}).should == "%{typo} xxx" end end describe 'with i18n loaded' do let(:pending_condition) { (RUBY_VERSION < "1.9" and ActiveRecord::VERSION::MAJOR == 3) or (ActiveRecord::VERSION::MAJOR == 4 and ActiveRecord::VERSION::MINOR == 0)} it "interpolates if i18n is loaded before" do pending_if pending_condition, "does not work on ree + rails 3 or rails 4" do system("bundle exec ruby spec/cases/interpolate_i18n_before_fast_gettext.rb > /dev/null 2>&1").should == true end end it "interpolates if i18n is loaded before" do pending_if pending_condition, "does not work on ree + rails 3 or rails 4" do system("bundle exec ruby spec/cases/interpolate_i18n_after_fast_gettext.rb > /dev/null 2>&1").should == true end end end end fast_gettext-1.3.0/spec/fast_gettext_spec.rb000066400000000000000000000030471300172175400212120ustar00rootroot00000000000000require "spec_helper" default_setup class IncludeTest include FastGettext::Translation @@xx = _('car') def self.ext _('car') end def inc _('car') end def self.xx @@xx end end describe FastGettext do include FastGettext before :all do default_setup end it "provides access to FastGettext::Translations methods" do FastGettext._('car').should == 'Auto' _('car').should == 'Auto' _("%{relative_time} ago").should == "vor %{relative_time}" (_("%{relative_time} ago") % {:relative_time => 1}).should == "vor 1" (N_("%{relative_time} ago") % {:relative_time => 1}).should == "1 ago" s_("XXX|not found").should == "not found" n_('Axis','Axis',1).should == 'Achse' N_('XXXXX').should == 'XXXXX' Nn_('X','Y').should == ['X','Y'] end it "is extended to a class and included into a class" do IncludeTest.ext.should == 'Auto' IncludeTest.ext.should == 'Auto' IncludeTest.new.inc.should == 'Auto' IncludeTest.xx.should == 'Auto' end it "loads 3-letter locales as well" do FastGettext.locale = 'gsw_CH' FastGettext._('Car was successfully created.').should == "Z auto isch erfolgriich gspeicharat worda." end it 'switches locale temporarily' do FastGettext.locale.should == "de" FastGettext.with_locale 'gsw_CH' do FastGettext._('Car was successfully created.').should == "Z auto isch erfolgriich gspeicharat worda." end FastGettext.locale.should == "de" end it "has a VERSION" do FastGettext::VERSION.should =~ /^\d+\.\d+\.\d+$/ end end fast_gettext-1.3.0/spec/fuzzy_locale/000077500000000000000000000000001300172175400176545ustar00rootroot00000000000000fast_gettext-1.3.0/spec/fuzzy_locale/de/000077500000000000000000000000001300172175400202445ustar00rootroot00000000000000fast_gettext-1.3.0/spec/fuzzy_locale/de/test.po000066400000000000000000000012711300172175400215640ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: version 0.0.1\n" "POT-Creation-Date: 2009-02-26 19:50+0100\n" "PO-Revision-Date: 2009-02-18 14:53+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: app/helpers/translation_helper.rb:3 # fuzzy msgid "%{relative_time} ago" msgstr "vor %{relative_time}"fast_gettext-1.3.0/spec/locale/000077500000000000000000000000001300172175400164055ustar00rootroot00000000000000fast_gettext-1.3.0/spec/locale/de/000077500000000000000000000000001300172175400167755ustar00rootroot00000000000000fast_gettext-1.3.0/spec/locale/de/LC_MESSAGES/000077500000000000000000000000001300172175400205625ustar00rootroot00000000000000fast_gettext-1.3.0/spec/locale/de/LC_MESSAGES/test.mo000066400000000000000000000022051300172175400220750ustar00rootroot00000000000000 01 FPn  GO*z "# ! .Q3   %{relative_time} agoAxisAxisCar was successfully created.Car was successfully updated.Car|ModelCar|Wheels countCreatedMonthUmläüteYou should escape '\' as '\\'.carthis is a dynamic translation which was found thorugh gettext_test_log!Project-Id-Version: version 0.0.1 POT-Creation-Date: 2009-02-26 19:50+0100 PO-Revision-Date: 2011-12-04 18:54+0900 Last-Translator: FULL NAME Language-Team: LANGUAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=INTEGER; plural=EXPRESSION; vor %{relative_time}AchseAchsenAuto wurde erfolgreich gespeichertAuto wurde erfolgreich aktualisiertModellRäderzahlErstelltMonatUmlauteDu solltest '\' als '\\' escapen.AutoDies ist eine dynamische Übersetzung, die durch gettext_test_log gefunden wurde!fast_gettext-1.3.0/spec/locale/de/LC_MESSAGES/test2.mo000066400000000000000000000024621300172175400221640ustar00rootroot00000000000000 hi ~  $=AGVO$%;a j w  #S    %{relative_time} agoAxisAxis 2Car was successfully created.Car was successfully updated.Car|ModelCar|Wheels countCreatedMonthUmläüteUntranslated and translated in test2You should escape '\' as '\\'.caronly in test2 domainthis is a dynamic translation which was found thorugh gettext_test_log!Project-Id-Version: version 0.0.1 POT-Creation-Date: 2009-02-26 19:50+0100 PO-Revision-Date: 2011-12-04 18:54+0900 Last-Translator: FULL NAME Language-Team: LANGUAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=INTEGER; plural=EXPRESSION; vor %{relative_time} 2Achse 2Achsen 2Auto wurde erfolgreich gespeichert 2Auto wurde erfolgreich aktualisiert 2Modell 2Räderzahl 2Erstellt 2Monat 2Umlaute 2TranslatedDu solltest '\' als '\\' escapen. 2Auto 2nur in test2 DomainDies ist eine dynamische Übersetzung, die durch gettext_test_log gefunden wurde! 2fast_gettext-1.3.0/spec/locale/de/test.po000066400000000000000000000035441300172175400203220ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: version 0.0.1\n" "POT-Creation-Date: 2009-02-26 19:50+0100\n" "PO-Revision-Date: 2011-12-04 18:54+0900\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: app/helpers/translation_helper.rb:3 msgid "%{relative_time} ago" msgstr "vor %{relative_time}" #: app/views/cars/show.html.erb:5 msgid "Axis" msgid_plural "Axis" msgstr[0] "Achse" msgstr[1] "Achsen" #: app/controllers/cars_controller.rb:47 msgid "Car was successfully created." msgstr "Auto wurde erfolgreich gespeichert" #: app/controllers/cars_controller.rb:64 msgid "Car was successfully updated." msgstr "Auto wurde erfolgreich aktualisiert" #: app/views/cars/show.html.erb:1 locale/model_attributes.rb:3 msgid "Car|Model" msgstr "Modell" msgid "Untranslated" msgstr "" msgid "Untranslated and translated in test2" msgstr "" #: app/views/cars/show.html.erb:3 locale/model_attributes.rb:4 msgid "Car|Wheels count" msgstr "Räderzahl" #: app/views/cars/show.html.erb:7 msgid "Created" msgstr "Erstellt" #: app/views/cars/show.html.erb:9 msgid "Month" msgstr "Monat" #: locale/model_attributes.rb:2 msgid "car" msgstr "Auto" #: locale/testlog_phrases.rb:2 msgid "this is a dynamic translation which was found thorugh gettext_test_log!" msgstr "" "Dies ist eine dynamische Übersetzung, die durch gettext_test_log " "gefunden wurde!" #: locale/test_escape.rb:2 msgid "You should escape '\\' as '\\\\'." msgstr "Du solltest '\\' als '\\\\' escapen." msgid "Umläüte" msgstr "Umlaute" fast_gettext-1.3.0/spec/locale/de/test2.po000066400000000000000000000026731300172175400204060ustar00rootroot00000000000000# this is the same file as test.po but with "2" added to each translation # and one extra translation added #, fuzzy msgid "" msgstr "" "Project-Id-Version: version 0.0.1\n" "POT-Creation-Date: 2009-02-26 19:50+0100\n" "PO-Revision-Date: 2011-12-04 18:54+0900\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" msgid "%{relative_time} ago" msgstr "vor %{relative_time} 2" msgid "Axis" msgid_plural "Axis 2" msgstr[0] "Achse 2" msgstr[1] "Achsen 2" msgid "Car was successfully created." msgstr "Auto wurde erfolgreich gespeichert 2" msgid "Car was successfully updated." msgstr "Auto wurde erfolgreich aktualisiert 2" msgid "Car|Model" msgstr "Modell 2" msgid "Untranslated" msgstr "" msgid "Untranslated and translated in test2" msgstr "Translated" msgid "Car|Wheels count" msgstr "Räderzahl 2" msgid "Created" msgstr "Erstellt 2" msgid "Month" msgstr "Monat 2" msgid "car" msgstr "Auto 2" msgid "this is a dynamic translation which was found thorugh gettext_test_log!" msgstr "" "Dies ist eine dynamische Übersetzung, die durch gettext_test_log " "gefunden wurde! 2" msgid "You should escape '\\' as '\\\\'." msgstr "Du solltest '\\' als '\\\\' escapen. 2" msgid "Umläüte" msgstr "Umlaute 2" msgid "only in test2 domain" msgstr "nur in test2 Domain" fast_gettext-1.3.0/spec/locale/en/000077500000000000000000000000001300172175400170075ustar00rootroot00000000000000fast_gettext-1.3.0/spec/locale/en/LC_MESSAGES/000077500000000000000000000000001300172175400205745ustar00rootroot00000000000000fast_gettext-1.3.0/spec/locale/en/LC_MESSAGES/plural_test.mo000066400000000000000000000006321300172175400234700ustar00rootroot00000000000000,<HIGMcarProject-Id-Version: version 0.0.1 POT-Creation-Date: 2009-02-26 19:50+0100 PO-Revision-Date: 2009-02-18 15:42+0100 Last-Translator: FULL NAME Language-Team: LANGUAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=n==2?3:4; Testfast_gettext-1.3.0/spec/locale/en/LC_MESSAGES/test.mo000066400000000000000000000006111300172175400221060ustar00rootroot00000000000000$,8O9Project-Id-Version: version 0.0.1 POT-Creation-Date: 2009-02-18 20:57+0100 PO-Revision-Date: 2009-02-18 15:42+0100 Last-Translator: FULL NAME Language-Team: LANGUAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=INTEGER; plural=EXPRESSION; fast_gettext-1.3.0/spec/locale/en/plural_test.po000066400000000000000000000011411300172175400217020ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: version 0.0.1\n" "POT-Creation-Date: 2009-02-26 19:50+0100\n" "PO-Revision-Date: 2009-02-18 15:42+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n==2?3:4;\n" msgid "car" msgstr "Test"fast_gettext-1.3.0/spec/locale/en/test.po000066400000000000000000000026301300172175400203270ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: version 0.0.1\n" "POT-Creation-Date: 2009-02-26 19:50+0100\n" "PO-Revision-Date: 2009-02-18 15:42+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: app/helpers/translation_helper.rb:3 msgid "%{relative_time} ago" msgstr "" #: app/views/cars/show.html.erb:5 msgid "Axis" msgid_plural "Axis" msgstr[0] "" msgstr[1] "" #: app/controllers/cars_controller.rb:47 msgid "Car was successfully created." msgstr "" #: app/controllers/cars_controller.rb:64 msgid "Car was successfully updated." msgstr "" #: app/views/cars/show.html.erb:1 locale/model_attributes.rb:3 msgid "Car|Model" msgstr "" #: app/views/cars/show.html.erb:3 locale/model_attributes.rb:4 msgid "Car|Wheels count" msgstr "" #: app/views/cars/show.html.erb:7 msgid "Created" msgstr "" #: app/views/cars/show.html.erb:9 msgid "Month" msgstr "" #: locale/model_attributes.rb:2 msgid "car" msgstr "" #: locale/testlog_phrases.rb:2 msgid "this is a dynamic translation which was found thorugh gettext_test_log!" msgstr "" fast_gettext-1.3.0/spec/locale/gsw_CH/000077500000000000000000000000001300172175400175575ustar00rootroot00000000000000fast_gettext-1.3.0/spec/locale/gsw_CH/LC_MESSAGES/000077500000000000000000000000001300172175400213445ustar00rootroot00000000000000fast_gettext-1.3.0/spec/locale/gsw_CH/LC_MESSAGES/test.mo000066400000000000000000000020441300172175400226600ustar00rootroot00000000000000 t &0N lvGT6 K*Y+ M  %{relative_time} agoAxisAxisCar was successfully created.Car was successfully updated.Car|ModelCar|Wheels countCreatedMonthcarthis is a dynamic translation which was found thorugh gettext_test_log!Project-Id-Version: version 0.0.1 POT-Creation-Date: 2009-02-26 19:50+0100 PO-Revision-Date: 2011-06-17 14:09+0100 Last-Translator: Ramón Cahenzli Language-Team: LANGUAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=INTEGER; plural=EXPRESSION; vor %{relative_time}AchsaAchsanaZ auto isch erfolgriich gspeicharat worda.Z auto isch erfolgriich aktualisiart worda.ModellRäderzahlErstelltMonatAutoDas isch a dynamischi übersetzig, wo dur gettext_test_log gfunda worda isch!fast_gettext-1.3.0/spec/locale/gsw_CH/test.po000066400000000000000000000031761300172175400211050ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: version 0.0.1\n" "POT-Creation-Date: 2009-02-26 19:50+0100\n" "PO-Revision-Date: 2011-06-17 14:09+0100\n" "Last-Translator: Ramón Cahenzli \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: app/helpers/translation_helper.rb:3 msgid "%{relative_time} ago" msgstr "vor %{relative_time}" #: app/views/cars/show.html.erb:5 msgid "Axis" msgid_plural "Axis" msgstr[0] "Achsa" msgstr[1] "Achsana" #: app/controllers/cars_controller.rb:47 msgid "Car was successfully created." msgstr "Z auto isch erfolgriich gspeicharat worda." #: app/controllers/cars_controller.rb:64 msgid "Car was successfully updated." msgstr "Z auto isch erfolgriich aktualisiart worda." #: app/views/cars/show.html.erb:1 #: locale/model_attributes.rb:3 msgid "Car|Model" msgstr "Modell" #: app/views/cars/show.html.erb:3 #: locale/model_attributes.rb:4 msgid "Car|Wheels count" msgstr "Räderzahl" #: app/views/cars/show.html.erb:7 msgid "Created" msgstr "Erstellt" #: app/views/cars/show.html.erb:9 msgid "Month" msgstr "Monat" #: locale/model_attributes.rb:2 msgid "car" msgstr "Auto" #: locale/testlog_phrases.rb:2 msgid "this is a dynamic translation which was found thorugh gettext_test_log!" msgstr "Das isch a dynamischi übersetzig, wo dur gettext_test_log gfunda worda isch!" fast_gettext-1.3.0/spec/locale/yaml/000077500000000000000000000000001300172175400173475ustar00rootroot00000000000000fast_gettext-1.3.0/spec/locale/yaml/de.yml000066400000000000000000000010421300172175400204570ustar00rootroot00000000000000de: simple: einfach date: relative: "vor %{relative_time}" cars: axis: one: "Achse" other: "Achsen" silly: one: '0' other: '1' plural2: '2' plural3: '3' model: "Modell" wheel_count: "Räderzahl" created: "Erstellt" month: "Monat" car: "Auto" messages: created: "Auto wurde erfolgreich gespeichert" updated: "Auto wurde erfolgreich aktualisiert" test_log: phrases: "Dies ist eine dynamische Übersetzung, die durch gettext_test_log gefunden wurde!" fast_gettext-1.3.0/spec/locale/yaml/de2.yml000066400000000000000000000010531300172175400205430ustar00rootroot00000000000000de: simple: einfach date: relative: "vor %{relative_time}" cars: axis: one: "Achse" other: "Achsen" silly: one: '0' other: '1' plural2: '2' plural3: '3' model: "Modell" wheel_count: "Räderzahl" created: "Erstellt" month: "Monat" car: "Aufzugskabine" messages: created: "Auto wurde erfolgreich gespeichert" updated: "Auto wurde erfolgreich aktualisiert" test_log: phrases: "Dies ist eine dynamische Übersetzung, die durch gettext_test_log gefunden wurde!" fast_gettext-1.3.0/spec/locale/yaml/en.yml000066400000000000000000000007231300172175400204760ustar00rootroot00000000000000en: pluralisation_rule: n<3?n:0 simple: easy date: relative: "%{relative_time} ago" cars: axis: one: "Axis" other: "Axis" model: "Model" wheel_count: "Wheels count" created: "Created" month: "Month" car: "Car" messages: created: "Car was successfully created." updated: "Car was successfully updated." test_log: phrases: "this is a dynamic translation which was found thorugh gettext_test_log!" fast_gettext-1.3.0/spec/locale/yaml/notfound.yml000066400000000000000000000000231300172175400217210ustar00rootroot00000000000000xx: simple: FUUUUfast_gettext-1.3.0/spec/obsolete_locale/000077500000000000000000000000001300172175400203015ustar00rootroot00000000000000fast_gettext-1.3.0/spec/obsolete_locale/de/000077500000000000000000000000001300172175400206715ustar00rootroot00000000000000fast_gettext-1.3.0/spec/obsolete_locale/de/test.po000066400000000000000000000012671300172175400222160ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: version 0.0.1\n" "POT-Creation-Date: 2009-02-26 19:50+0100\n" "PO-Revision-Date: 2009-02-18 14:53+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: app/helpers/translation_helper.rb:3 #~ msgid "%{relative_time} ago" #~ msgstr "vor %{relative_time}"fast_gettext-1.3.0/spec/spec_helper.rb000066400000000000000000000023741300172175400177720ustar00rootroot00000000000000# $VERBOSE = true # ignore complaints in spec files # ---- requirements require 'fast_gettext' require 'active_record' # ---- revert to defaults RSpec.configure do |config| config.before do FastGettext.default_available_locales = nil FastGettext.available_locales = nil FastGettext.locale = 'de' end config.expect_with(:rspec) { |c| c.syntax = :should } config.mock_with(:rspec) { |c| c.syntax = :should } end def default_setup # make sure all tests are really independent Thread.current[:fast_gettext_text_domain] = nil Thread.current[:fast_gettext__locale] = nil Thread.current[:fast_gettext_available_locales] = nil Thread.current[:fast_gettext_pluralisation_rule] = nil Thread.current[:fast_gettext_cache] = nil FastGettext.send(:class_variable_set, :@@translation_repositories, {}) FastGettext.add_text_domain('test',:path=>File.join(File.dirname(__FILE__),'locale')) FastGettext.text_domain = 'test' FastGettext.available_locales = ['en','de','gsw_CH'] FastGettext.locale = 'de' FastGettext.send(:switch_cache) end # TODO remove def pending_if(condition, *args) pending(*args) if condition yield end def setup_extra_domain FastGettext.add_text_domain('test2',:path=>File.join(File.dirname(__FILE__),'locale')) end