############################################################################# # Tr8n Configuration # # Default settings for all environments # # You can overload any feature for any environment by changing the # environment settings at the bottom of the file. # # Alternatively, you can overload any of the methods of Tr8n::Config # # If you would like to manage the configurations on the live site, # try out the Registry gem, located here: # # http://www.github.com/berk/registry # ############################################################################# defaults: enable_tr8n: true # enables the engine enable_key_source_tracking: false # builds the site map sources - must be enabled for the API enable_key_caller_tracking: false # tracks all calls to labels with their traces - for debugging only enable_key_verification: false # marks cached keys as verified, for cleanup enable_glossary_hints: true # shows glossary in the translator enable_software_keyboard: true # shows the soft keyboard icon enable_keyboard_shortcuts: true # adds some keyboard shortcuts like ctrl+shift+s enable_dictionary_lookup: true # shows dictionary words definitions enable_fallback_languages: true # for example: Catalan can fallback onto Spanish enable_translator_language: true # translator can translate from non-default language enable_language_flags: true # shows flag icons next to the languages enable_language_stats: true # shows percent completion of a language enable_admin_translations: true # registers tr8n admin keys in the system enable_admin_inline_mode: true # allows tr8n engine sections to be inline translated enable_language_cases: true # enables support for language cases enable_client_sdk: true # allows javascript to use tr8nProxy object enable_browser_cache: true # caches translations in the browser enable_country_tracking: true # tracks and reports translator countries enable_translator_tabs: true # enables translation tools tabs ############################################################################# # Google translation suggestions is now a paid feature by Google. # # In order to enable this useful feauture, visit: # http://code.google.com/apis/language/translate/overview.html # # Provide your billing information and register for an API key. # # Put your API key in the box below. ############################################################################# enable_google_suggestions: false # uses google for suggestions google_api_key: "YOUR GOOGLE API KEY" # get this API key from Google. ############################################################################# # Featured languages can be added as a bottom strip bar on all pages using # # <%= tr8n_language_strip_tag %> # # The featured languages can be configured in the admin tool. # Alternatively, you can provide the list of languages here, and run: # # rake tr8n:featured_languages # ############################################################################# featured_languages: ["en-US", "es", "pt", "fr", "de", "it", "ru", "et", "iw", "zh-TW"] ############################################################################# # Set the following flag to true if you would like to allow any registered # user to become a translator. The users become translators as soon as they # enable inline translation mode, submit a translation, or vote on a # translation. If the flag is set to false, then a user must be promoted to # be a translator in order to submit or vote on translations. ############################################################################# open_registration_mode: true enable_registration_disclaimer: false registration_disclaimer_path: "/tr8n/common/terms_of_service" ############################################################################# # Tr8n best run with caching enabled # You can configure cache adapter and store parameters by providing the # the name of your class implementation and the store settings. # # For example: # # adapter: ActiveSupport::Cache # store: memory_store # only for dev or test - single instance # store: file_store # only for dev or test - single instance # store: drb_store # store: ['mem_cache_store', 'localhost:11211'] # recommended # # If you choose to use memcached, don't forget to add the gem to your Gemfile: # # gem 'memcache-client' # # You can also provide your own implementation of the adapter: # # cache_adapter: YOUR_CACHE_ADAPTER_CLASS # # Note: Make sure you enable config.class_caching in your environment file # ############################################################################# caching: enabled: false adapter: ActiveSupport::Cache store: 'memory_store' version: 1 # you can change the version to invalidate the cache ############################################################################# # By default, Tr8n will use its own logger. If you set it to false, # it will use default Rails logger. ############################################################################# logger: enabled: true log_path: "log/tr8n.log" # location of the log file enable_paranoia_mode: true # logs every translator action ############################################################################# # Site Integration Settings ############################################################################# site_info: title: "Tr8n" # site title - provide your site title here contact_email: "support@tr8n.net" # contact email for questions about translations current_locale_method: "current_locale" # application controller method that sets and returns current locale default_url: "/" # default site url where to redirect the user if Tr8n is disabled default_locale: "en-US" # locale of the site default language sitemap_path: "/config/tr8n/site/sitemap.json" # location of the sitemap definition file splash_screen: "/tr8n/common/splash_screen" # location of the Tr8n splash screen tr8n_layout: "application" # layout for the tr8n pages tr8n_helpers: [] # if you need to add extra helpers admin_layout: "admin" # layout to be used for the admin user interface admin_helpers: [] # if you need to add extra helpers before_filters: [] # filters from application controller skip_before_filters: [] # filters from application controller after_filters: [] # filters from application controller user_info: enabled: true # if disabled, will fallback onto translators class_name: User # class name for the User object type current_user_method: current_user # returns current user object methods: # User object methods mapping id: id name: name gender: gender admin: admin? guest: guest? mugshot: mugshot link: link locale: locale ############################################################################# # Rules Engine Settings ############################################################################# rules_engine: language_rule_classes: ["Tr8n::NumericRule", "Tr8n::GenderRule", "Tr8n::GenderListRule", "Tr8n::DateRule", "Tr8n::ValueRule"] data_token_classes: ["Tr8n::Tokens::DataToken", "Tr8n::Tokens::HiddenToken", "Tr8n::Tokens::MethodToken", "Tr8n::Tokens::TransformToken"] decoration_token_classes: ["Tr8n::Tokens::DecorationToken"] allow_nil_token_values: true numeric_rule: token_suffixes: ["count", "num", "age", "hours", "minutes", "years", "seconds"] object_method: "to_i" gender_rule: token_suffixes: ["user", "profile", "actor", "target", "partner"] object_method: "gender" method_values: female: "female" male: "male" neutral: "neutral" unknown: "unknown" list_rule: # use list_rule if your site does not support user genders object_method: "size" token_suffixes: ["list"] gender_list_rule: # similiar to list rule, but works together with gender rule object_method: "size" token_suffixes: ["list"] date_rule: token_suffixes: ["date"] object_method: "to_date" value_rule: token_suffixes: "*" object_method: "to_s" # minimal rank makes the translation acceptable for subsitution and counts towards the translator rank translation_threshold: 1 viewing_user_token: "viewing_user" translation_rank_styles: -1000..-5: "color:red;font-weight:bold;" -4..-1: "color:red;" 1..10: "color:green;" 11..1000: "color:green;font-weight:bold;" ############################################################################# # API Settings ############################################################################# api: enabled: true response_encoding: "json" # options: xml, json allow_key_registration: true skip_before_filters: [] # filters from application controller before_filters: [] # filters from application controller after_filters: [] # filters from application controller ############################################################################# # Translator Roles - manager level is set at 1000 and anything above # # You can restrict translations by surroudning translation keys with the # following block: # # Tr8n::Config.with_options(:level => 150) do # tr("Some Key") # end # # or you can use a role: # # Tr8n::Config.with_options(:role => :professional) do # tr("Some Key") # end # # Alternatively, you could provide this information in the key options: # # tr("Label", "Description", {}, {:role => :professional}) # # This means that only translators with the level 100 and above can # translate this key. ############################################################################# translator_roles: # translation key level regular: 0 trusted: 50 professional: 100 manager: 1000 # reserved for translation tools admin: 10000 # reserved for admin tools application: 100000 # reserved for applications system: 1000000 # reserved for system default_translation_key_level: 0 ############################################################################# # Localization Settings ############################################################################# localization: default_day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday] default_abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat] default_month_names: [January, February, March, April, May, June, July, August, September, October, November, December] default_abbr_month_names: [Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec] custom_date_formats: default: '%m/%d/%Y' # 07/4/2008 short_numeric: '%m/%d' # 07/4 short_numeric_year: '%m/%d/%y' # 07/4/08 long_numeric: '%m/%d/%Y' # 07/4/2008 verbose: '%A, %B %d, %Y' # Friday, July 4, 2008 monthname: '%B %d' # July 4 monthname_year: '%B %d, %Y' # July 4, 2008 monthname_abbr: '%b %d' # Jul 4 monthname_abbr_year: '%b %d, %Y' # Jul 4, 2008 date_time: '%m/%d/%Y at %H:%M' # 01/03/1010 at 5:30 ############################################################################# # You can synchronize your translation keys and translations with the # tr8n.net service. This way you can get your site translated by # millions of users from around the internet. Visit the following url and # register as a developer, register your application and copy your app key # and secret in the lines below: # # http://tr8n.net # # To sychronize your translations run the following command: # # rake tr8n:sync # # You can run this command as often as your account on tr8n.net permits you. ############################################################################# synchronization: server: "http://tr8n.net" # visit this url to register your application key: "YOUR APP KEY" # replace with your application key secret: "YOUR APP SECRET" # replace with your application secret batch_size: 50 # how many keys to send to the server at a time - if your site supports many language, decrease the batch size all_languages: false # use only enabled languages, or all languages enable_push: false # allows translations to be pushed from the main server using the sync API push_servers: ["tr8n.net"] # only allows those servers to push translations ############################################################################# # Environment Settings # You can overload any feature defined in the defaults for any environment ############################################################################# development: test: qa: stage: production: