Improved translation feature.

This commit is contained in:
Martin Edenhofer 2015-04-27 08:20:52 +02:00
parent 703a64d8ae
commit ed891818ed
14 changed files with 201 additions and 277 deletions

View file

@ -8,11 +8,13 @@ class Index extends App.Controller
@render()
render: =>
html = $( App.view('profile/language')() )
options = {}
locales = App.Locale.all()
for locale in locales
options[locale.locale] = locale.name
configure_attributes = [
{ name: 'locale', display: '', tag: 'select', null: false, class: 'input', options: { de: 'Deutsch', en: 'English (United States)', 'en-CA': 'English (Canada)', 'en-GB': 'English (United Kingdom)' }, default: App.i18n.get() },
{ name: 'locale', display: '', tag: 'select', null: false, class: 'input', options: options, default: App.i18n.get() },
]
@form = new App.ControllerForm(

View file

@ -734,6 +734,10 @@ class Navbar extends App.Controller
@bind 'ticket_overview_fetch_force', =>
@fetch()
# rerender view, e. g. on langauge change
@bind 'ui:rerender', =>
@render()
# init fetch via ajax
ajaxInit = =>

View file

@ -11,8 +11,12 @@ class Index extends App.ControllerContent
render: =>
@html App.view('translation/index')()
options = {}
locales = App.Locale.all()
for locale in locales
options[locale.locale] = locale.name
configure_attributes = [
{ name: 'locale', display: '', tag: 'select', null: false, class: 'input', options: { de: 'Deutsch', en: 'English (United States)', 'en-CA': 'English (Canada)', 'en-GB': 'English (United Kingdom)' }, default: App.i18n.get() },
{ name: 'locale', display: '', tag: 'select', null: false, class: 'input', options: options, default: App.i18n.get() },
]
load = (params) =>
new TranslationToDo(
@ -32,7 +36,9 @@ class Index extends App.ControllerContent
)
release: =>
rerender = ->
App.Event.trigger('ui:rerender')
App.Delay.set(rerender, 400)
class TranslationToDo extends App.Controller
events:
@ -49,6 +55,11 @@ class TranslationToDo extends App.Controller
)
render: =>
if !App.i18n.notTranslatedFeatureEnabled(@locale)
@html App.view('translation/english')()
return
listNotTranslated = []
for key, value of App.i18n.getNotTranslated(@locale)
item = [ '', key, '', '']
@ -142,6 +153,10 @@ class TranslationList extends App.Controller
)
render: (data = {}) =>
#if !App.i18n.notTranslatedFeatureEnabled(@locale)
# return
@html App.view('translation/list')(
list: data.list
timestampFormat: data.timestampFormat

View file

@ -44,6 +44,11 @@ class App.i18n
_instance ?= new _i18nSingleton()
_instance.setMap( source, target )
@notTranslatedFeatureEnabled: (locale) ->
if _instance == undefined
_instance ?= new _i18nSingleton()
_instance.notTranslatedFeatureEnabled( locale )
@getNotTranslated: (locale) ->
if _instance == undefined
_instance ?= new _i18nSingleton()
@ -64,6 +69,7 @@ class _i18nSingleton extends Spine.Module
constructor: ( locale ) ->
@map = {}
@_notTranslatedLog = false
@_notTranslated = {}
@dateFormat = 'yyyy-mm-dd'
@timestampFormat = 'yyyy-mm-dd HH:MM'
@ -117,10 +123,13 @@ class _i18nSingleton extends Spine.Module
@locale
set: ( locale ) ->
if locale is 'en-US'
locale = 'en'
if locale is 'en'
locale = 'en-us'
@locale = locale
# set if not translated should be logged
@_notTranslatedLog = @notTranslatedFeatureEnabled(locale)
# set lang attribute of html tag
$('html').prop( 'lang', locale.substr(0, 2) )
@ -185,7 +194,7 @@ class _i18nSingleton extends Spine.Module
else
@_translated = false
translated = string
if App.Config.get('developer_mode') is true
if @_notTranslatedLog && App.Config.get('developer_mode') is true
if !@_notTranslated[@locale]
@_notTranslated[@locale] = {}
@_notTranslated[@locale][string] = true
@ -203,6 +212,11 @@ class _i18nSingleton extends Spine.Module
setMap: ( source, target ) =>
@map[source] = target
notTranslatedFeatureEnabled: (locale) =>
if locale.substr(0,2) is 'en'
return false
true
getNotTranslated: ( locale ) =>
@_notTranslated[locale || @locale]

View file

@ -0,0 +1,4 @@
class App.Locale extends App.Model
@configure 'Locale', 'name', 'alias', 'locale'
@extend Spine.Model.Ajax
@url: @apiPath + '/locales'

View file

@ -2,7 +2,7 @@
<div class="article-attachment u-unclickable">
<div class="attachmentPlaceholder">
<span class="attachmentPlaceholder-inputHolder u-highlight u-clickable fileUpload">
Dateien wählen..
<%- @T('select attachment..') %>
<input multiple="multiple" type="file" name="file" style="">
</span>
</div>

View file

@ -56,9 +56,9 @@
<div class="attachments"></div>
<div class="article-attachment u-unclickable u-textTruncate">
<div class="attachmentPlaceholder">
<span class="attachmentPlaceholder-hint"><%- @T('Antwort eingeben oder') %></span>
<span class="attachmentPlaceholder-hint"><%- @T('Enter Answer or') %></span>
<span class="attachmentPlaceholder-inputHolder u-highlight u-clickable">
<%- @T('Dateien wählen..') %>
<%- @T('select attachment..') %>
<input multiple="multiple" type="file" name="file" style="position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0;">
</span>
</div>

View file

@ -2105,7 +2105,9 @@ footer {
}
.translation:hover {
}
.translation[contenteditable="true"] {
display: inline;
}
.translation .icon-edit {
display: none;
}

View file

@ -4,6 +4,8 @@ module ExtraCollection
def session( collections, assets, user )
# all base stuff
collections[ Locale.to_app_model ] = Locale.where( :active => true )
collections[ Taskbar.to_app_model ] = Taskbar.where( :user_id => user.id )
collections[ Taskbar.to_app_model ].each {|item|
assets = item.assets(assets)

27
app/models/locale.rb Normal file
View file

@ -0,0 +1,27 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class Locale < ApplicationModel
def self.load
url = 'http://localhost:3001/api/v1/locales'
result = UserAgent.get(
url,
{},
{
:json => true,
}
)
result.data.each {|locale|
puts locale.inspect
exists = Locale.where(:locale => locale['locale']).first
if exists
exists.update(locale.symbolize_keys!)
else
Locale.create(locale.symbolize_keys!)
end
}
true
end
end

View file

@ -6,6 +6,87 @@ class Translation < ApplicationModel
after_update :cache_clear
after_destroy :cache_clear
=begin
load translations from online
Translation.load
=end
def self.load
url = 'http://localhost:3001/api/v1/translations'
if !UserInfo.current_user_id
UserInfo.current_user_id = 1
end
result = UserAgent.get(
url,
{},
{
:json => true,
}
)
result.data.each {|translation|
#puts translation.inspect
exists = Translation.where(:locale => translation['locale'], :source => translation['source']).first
if exists
# verify if update is needed
exists.update_attributes(translation.symbolize_keys!)
exists.save
else
Translation.create(translation.symbolize_keys!)
end
}
true
end
=begin
push translations to online
Translation.push(locale)
=end
def self.push(locale)
translations = Translation.where(:locale => locale)
translations_to_push = []
translations.each {|translation|
if translation.target != translation.target_initial
translations_to_push.push translation
end
}
return true if translations_to_push.empty?
#return translations_to_push
url = 'http://localhost:3001/api/v1/thanks_for_your_support'
result = UserAgent.post(
url,
{
:locale => locale,
:translations => translations_to_push,
:fqdn => Setting.get('fqdn'),
:translator_key => '',
},
{
:json => true,
}
)
raise result.error if !result.success?
true
end
=begin
get list of translations
list = Translation.list('de')
=end
def self.list(locale, admin = false)
# check cache
@ -59,6 +140,14 @@ class Translation < ApplicationModel
}
end
=begin
translate strings in ruby context, e. g. for notifications
translated = Translation.translate('de', 'New')
=end
def self.translate(locale, string)
# translate string
@ -78,8 +167,10 @@ class Translation < ApplicationModel
private
def set_initial
if !target_initial
self.target_initial = self.target
end
end
def cache_clear
Cache.delete( 'Translation::' + self.locale.downcase )
end

View file

@ -0,0 +1,8 @@
class UpdateTranslation < ActiveRecord::Migration
def up
add_column :translations, :format, :string, :limit => 20, :null => false, :default => 'string'
end
def down
end
end

View file

@ -1693,264 +1693,9 @@ Network::Item::Comment.create(
:body => 'Some comment....',
)
Translation.create_if_not_exists( :locale => 'de', :source => "New", :target => "Neu" )
Translation.create_if_not_exists( :locale => 'de', :source => "Create", :target => "Erstellen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Cancel", :target => "Abbrechen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Submit", :target => "Übermitteln" )
Translation.create_if_not_exists( :locale => 'de', :source => "Sign out", :target => "Abmelden" )
Translation.create_if_not_exists( :locale => 'de', :source => "Profile", :target => "Profil" )
Translation.create_if_not_exists( :locale => 'de', :source => "Settings", :target => "Einstellungen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Overviews", :target => "Übersichten" )
Translation.create_if_not_exists( :locale => 'de', :source => "Manage", :target => "Verwalten" )
Translation.create_if_not_exists( :locale => 'de', :source => "Users", :target => "Benutzer" )
Translation.create_if_not_exists( :locale => 'de', :source => "User", :target => "Benutzer" )
Translation.create_if_not_exists( :locale => 'de', :source => "Groups", :target => "Gruppen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Group", :target => "Gruppe" )
Translation.create_if_not_exists( :locale => 'de', :source => "Organizations", :target => "Organisationen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Organization", :target => "Organisation" )
Translation.create_if_not_exists( :locale => 'de', :source => "Recently Viewed", :target => "Zuletzt angesehen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Security", :target => "Sicherheit" )
Translation.create_if_not_exists( :locale => 'de', :source => "From", :target => "Von" )
Translation.create_if_not_exists( :locale => 'de', :source => "Title", :target => "Titel" )
Translation.create_if_not_exists( :locale => 'de', :source => "Customer", :target => "Kunde" )
Translation.create_if_not_exists( :locale => 'de', :source => "State", :target => "Status" )
Translation.create_if_not_exists( :locale => 'de', :source => "Created", :target => "Erstellt" )
Translation.create_if_not_exists( :locale => 'de', :source => "Attributes", :target => "Attribute" )
Translation.create_if_not_exists( :locale => 'de', :source => "Direction", :target => "Richtung" )
Translation.create_if_not_exists( :locale => 'de', :source => "Owner", :target => "Besitzer" )
Translation.create_if_not_exists( :locale => 'de', :source => "Subject", :target => "Betreff" )
Translation.create_if_not_exists( :locale => 'de', :source => "Priority", :target => "Priorität" )
Translation.create_if_not_exists( :locale => 'de', :source => "Select the customer of the ticket or create one.", :target => "Wähle den Kunden für das Ticket oder erstelle einen Neuen." )
Translation.create_if_not_exists( :locale => 'de', :source => "New Ticket", :target => "Neues Ticket" )
Translation.create_if_not_exists( :locale => 'de', :source => "Firstname", :target => "Vorname" )
Translation.create_if_not_exists( :locale => 'de', :source => "Lastname", :target => "Nachname" )
Translation.create_if_not_exists( :locale => 'de', :source => "Phone", :target => "Telefon" )
Translation.create_if_not_exists( :locale => 'de', :source => "Street", :target => "Straße" )
Translation.create_if_not_exists( :locale => 'de', :source => "Zip", :target => "PLZ" )
Translation.create_if_not_exists( :locale => 'de', :source => "City", :target => "Stadt" )
Translation.create_if_not_exists( :locale => 'de', :source => "Note", :target => "Notiz" )
Translation.create_if_not_exists( :locale => 'de', :source => "note", :target => "Notiz" )
Translation.create_if_not_exists( :locale => 'de', :source => "New User", :target => "Neuer Benutzer" )
Translation.create_if_not_exists( :locale => 'de', :source => "Merge", :target => "Zusammenfügen" )
Translation.create_if_not_exists( :locale => 'de', :source => "History", :target => "Historie" )
Translation.create_if_not_exists( :locale => 'de', :source => "new", :target => "neu" )
Translation.create_if_not_exists( :locale => 'de', :source => "closed", :target => "geschlossen" )
Translation.create_if_not_exists( :locale => 'de', :source => "close", :target => "schließen" )
Translation.create_if_not_exists( :locale => 'de', :source => "open", :target => "offen" )
Translation.create_if_not_exists( :locale => 'de', :source => "pending", :target => "warten" )
Translation.create_if_not_exists( :locale => 'de', :source => "merged", :target => "zusammengefügt" )
Translation.create_if_not_exists( :locale => 'de', :source => "removed", :target => "zurück gezogen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Activity Stream", :target => "Aktivitäts-Stream" )
Translation.create_if_not_exists( :locale => 'de', :source => "Update", :target => "Aktualisieren" )
Translation.create_if_not_exists( :locale => 'de', :source => "updated", :target => "aktualisierte" )
Translation.create_if_not_exists( :locale => 'de', :source => "created", :target => "erstellte" )
Translation.create_if_not_exists( :locale => 'de', :source => "My assigned Tickets", :target => "Meine zugewiesenen Tickets" )
Translation.create_if_not_exists( :locale => 'de', :source => "Unassigned Tickets", :target => "Nicht zugewiesene/freie Tickets" )
Translation.create_if_not_exists( :locale => 'de', :source => "Unassigned & Open Tickets", :target => "Nicht zugewiesene & offene Tickets" )
Translation.create_if_not_exists( :locale => 'de', :source => "All Tickets", :target => "Alle Tickets" )
Translation.create_if_not_exists( :locale => 'de', :source => "Escalated Tickets", :target => "Eskalierte Tickets" )
Translation.create_if_not_exists( :locale => 'de', :source => "My pending reached Tickets", :target => "Meine warten erreicht Tickets" )
Translation.create_if_not_exists( :locale => 'de', :source => "Password", :target => "Passwort" )
Translation.create_if_not_exists( :locale => 'de', :source => "Password (confirm)", :target => "Passwort (bestätigen)" )
Translation.create_if_not_exists( :locale => 'de', :source => "Role", :target => "Rolle" )
Translation.create_if_not_exists( :locale => 'de', :source => "Roles", :target => "Rollen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Active", :target => "Aktiv" )
Translation.create_if_not_exists( :locale => 'de', :source => "Edit", :target => "Bearbeiten" )
Translation.create_if_not_exists( :locale => 'de', :source => "Base", :target => "Basis" )
Translation.create_if_not_exists( :locale => 'de', :source => "Number", :target => "Nummer" )
Translation.create_if_not_exists( :locale => 'de', :source => "Sender Format", :target => "Absender Format" )
Translation.create_if_not_exists( :locale => 'de', :source => "Authentication", :target => "Authorisierung" )
Translation.create_if_not_exists( :locale => 'de', :source => "Product Name", :target => "Produkt Name" )
Translation.create_if_not_exists( :locale => 'de', :source => "To", :target => "An" )
Translation.create_if_not_exists( :locale => 'de', :source => "Customer", :target => "Kunde" )
Translation.create_if_not_exists( :locale => 'de', :source => "Linked Accounts", :target => "Verknüpfte Accounts" )
Translation.create_if_not_exists( :locale => 'de', :source => "Sign in with", :target => "Anmelden mit" )
Translation.create_if_not_exists( :locale => 'de', :source => "Username or email", :target => "Benutzer oder E-Mail" )
Translation.create_if_not_exists( :locale => 'de', :source => "Remember me", :target => "An mich erinnern" )
Translation.create_if_not_exists( :locale => 'de', :source => "Forgot password?", :target => "Passwort vergessen?" )
Translation.create_if_not_exists( :locale => 'de', :source => "Sign in using", :target => "Anmelden über" )
Translation.create_if_not_exists( :locale => 'de', :source => "New to", :target => "Neu bei" )
Translation.create_if_not_exists( :locale => 'de', :source => "join today!", :target => "werde Teil!" )
Translation.create_if_not_exists( :locale => 'de', :source => "Sign up", :target => "Registrieren" )
Translation.create_if_not_exists( :locale => 'de', :source => "Sign in", :target => "Anmelden" )
Translation.create_if_not_exists( :locale => 'de', :source => "Create my account", :target => "Meinen Account erstellen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Login successfully! Have a nice day!", :target => "Anmeldung erfolgreich!" )
Translation.create_if_not_exists( :locale => 'de', :source => "Last contact", :target => "Letzter Kontakt" )
Translation.create_if_not_exists( :locale => 'de', :source => "Last contact (Agent)", :target => "Letzter Kontakt (Agent)" )
Translation.create_if_not_exists( :locale => 'de', :source => "Last contact (Customer)", :target => "Letzter Kontakt (Kunde)" )
Translation.create_if_not_exists( :locale => 'de', :source => "Close time", :target => "Schließzeit" )
Translation.create_if_not_exists( :locale => 'de', :source => "First response", :target => "Erste Reaktion" )
Translation.create_if_not_exists( :locale => 'de', :source => "Ticket %s created!", :target => "Ticket %s erstellt!" )
Translation.create_if_not_exists( :locale => 'de', :source => "day", :target => "Tag" )
Translation.create_if_not_exists( :locale => 'de', :source => "days", :target => "Tagen" )
Translation.create_if_not_exists( :locale => 'de', :source => "hour", :target => "Stunde" )
Translation.create_if_not_exists( :locale => 'de', :source => "hours", :target => "Stunden" )
Translation.create_if_not_exists( :locale => 'de', :source => "minute", :target => "Minute" )
Translation.create_if_not_exists( :locale => 'de', :source => "minutes", :target => "Minuten" )
Translation.create_if_not_exists( :locale => 'de', :source => "See more", :target => "mehr anzeigen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Search", :target => "Suche" )
Translation.create_if_not_exists( :locale => 'de', :source => "Forgot your password?", :target => "Passwort vergessen?" )
Translation.create_if_not_exists( :locale => 'de', :source => "Templates", :target => "Vorlagen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Delete", :target => "Löschen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Apply", :target => "Übernehmen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Save as Template", :target => "Als Vorlage speichern" )
Translation.create_if_not_exists( :locale => 'de', :source => "Save", :target => "Speichern" )
Translation.create_if_not_exists( :locale => 'de', :source => "Open Tickets", :target => "Offene Ticket" )
Translation.create_if_not_exists( :locale => 'de', :source => "Closed Tickets", :target => "Geschlossene Ticket" )
Translation.create_if_not_exists( :locale => 'de', :source => "set to internal", :target => "auf intern setzen" )
Translation.create_if_not_exists( :locale => 'de', :source => "set to public", :target => "auf öffentlich setzen" )
Translation.create_if_not_exists( :locale => 'de', :source => "split", :target => "teilen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Type", :target => "Typ" )
Translation.create_if_not_exists( :locale => 'de', :source => "raw", :target => "unverarbeitet" )
Translation.create_if_not_exists( :locale => 'de', :source => "1 low", :target => "1 niedrig" )
Translation.create_if_not_exists( :locale => 'de', :source => "2 normal", :target => "2 normal" )
Translation.create_if_not_exists( :locale => 'de', :source => "3 high", :target => "3 hoch" )
Translation.create_if_not_exists( :locale => 'de', :source => "public", :target => "öffentlich" )
Translation.create_if_not_exists( :locale => 'de', :source => "internal", :target => "intern" )
Translation.create_if_not_exists( :locale => 'de', :source => "Attach files", :target => "Dateien anhängen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Visibility", :target => "Sichtbarkeit" )
Translation.create_if_not_exists( :locale => 'de', :source => "Actions", :target => "Aktionen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Email", :target => "E-Mail" )
Translation.create_if_not_exists( :locale => 'de', :source => "email", :target => "E-Mail" )
Translation.create_if_not_exists( :locale => 'de', :source => "phone", :target => "Telefon" )
Translation.create_if_not_exists( :locale => 'de', :source => "fax", :target => "Fax" )
Translation.create_if_not_exists( :locale => 'de', :source => "chat", :target => "Chat" )
Translation.create_if_not_exists( :locale => 'de', :source => "sms", :target => "SMS" )
Translation.create_if_not_exists( :locale => 'de', :source => "twitter status", :target => "Twitter Status Meldung" )
Translation.create_if_not_exists( :locale => 'de', :source => "twitter direct-message", :target => "Twitter Direkt-Nachricht" )
Translation.create_if_not_exists( :locale => 'de', :source => "All Open Tickets", :target => "Alle offenen Tickets" )
Translation.create_if_not_exists( :locale => 'de', :source => "child", :target => "Kind" )
Translation.create_if_not_exists( :locale => 'de', :source => "parent", :target => "Eltern" )
Translation.create_if_not_exists( :locale => 'de', :source => "normal", :target => "Normal" )
Translation.create_if_not_exists( :locale => 'de', :source => "Linked Objects", :target => "Verknüpfte Objekte" )
Translation.create_if_not_exists( :locale => 'de', :source => "Links", :target => "Verknüpftungen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Change Customer", :target => "Kunden ändern" )
Translation.create_if_not_exists( :locale => 'de', :source => "My Tickets", :target => "Meine Tickets" )
Translation.create_if_not_exists( :locale => 'de', :source => "My Organization Tickets", :target => "Meine Organisations Tickets" )
Translation.create_if_not_exists( :locale => 'de', :source => "My Organization", :target => "Meine Organisation" )
Translation.create_if_not_exists( :locale => 'de', :source => "Assignment Timeout", :target => "Zeitliche Zuweisungsüberschritung" )
Translation.create_if_not_exists( :locale => 'de', :source => "We've sent password reset instructions to your email address.", :target => "Wir haben Ihnen die Anleitung zum Zurücksetzen Ihres Passworts an Ihre E-Mail-Adresse gesendet." )
Translation.create_if_not_exists( :locale => 'de', :source => "Enter your username or email address", :target => "Bitte geben Sie Ihren Benutzernamen oder E-Mail-Adresse ein" )
Translation.create_if_not_exists( :locale => 'de', :source => "Choose your new password.", :target => "Wählen Sie Ihr neues Passwort." )
Translation.create_if_not_exists( :locale => 'de', :source => "Woo hoo! Your password has been changed!", :target => "Vielen Dank, Ihr Passwort wurde geändert!" )
Translation.create_if_not_exists( :locale => 'de', :source => "Please try to login!", :target => "Bitte melden Sie sich nun an!" )
Translation.create_if_not_exists( :locale => 'de', :source => "Username or email address invalid, please try again.", :target => "Benutzername oder E-Mail-Addresse ungültig, bitte erneut versuchen." )
Translation.create_if_not_exists( :locale => 'de', :source => "If you don\'t receive instructions within a minute or two, check your email\'s spam and junk filters, or try resending your request.", :target => "Wir haben die Anforderung per E-Mail an Sie versendet, bitte überprüfen Sie Ihr E-Mail-Postfach (auch die Junk E-Mails) ggf. starten Sie eine Anforderung erneut." )
Translation.create_if_not_exists( :locale => 'de', :source => "again", :target => "erneut" )
Translation.create_if_not_exists( :locale => 'de', :source => "none", :target => "keine" )
Translation.create_if_not_exists( :locale => 'de', :source => "Welcome!", :target => "Willkommen!" )
Translation.create_if_not_exists( :locale => 'de', :source => "Please click the button below to create your first one.", :target => "Klicken Sie die Schaltfläche unten um das erste zu erstellen." )
Translation.create_if_not_exists( :locale => 'de', :source => "Create your first Ticket", :target => "Erstellen Sie Ihr erstes Ticket" )
Translation.create_if_not_exists( :locale => 'de', :source => "You have not created a Ticket yet.", :target => "Sie haben noch kein Ticket erstellt." )
Translation.create_if_not_exists( :locale => 'de', :source => "The way to communicate with us is this thing called \"Ticket\".", :target => "Der Weg um mit uns zu kommunizieren ist das sogenannte \"Ticket\"." )
Translation.create_if_not_exists( :locale => 'de', :source => "or", :target => "oder" )
Translation.create_if_not_exists( :locale => 'de', :source => "yes", :target => "ja" )
Translation.create_if_not_exists( :locale => 'de', :source => "no", :target => "nein" )
Translation.create_if_not_exists( :locale => 'de', :source => "Attachment", :target => "Anhang" )
Translation.create_if_not_exists( :locale => 'de', :source => "Year", :target => "Jahr" )
Translation.create_if_not_exists( :locale => 'de', :source => "Month", :target => "Monat" )
Translation.create_if_not_exists( :locale => 'de', :source => "Day", :target => "Tag" )
Translation.create_if_not_exists( :locale => 'de', :source => "Closed", :target => "Geschlossen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Re-Open", :target => "Wiedereröffnet" )
Translation.create_if_not_exists( :locale => 'de', :source => "Day", :target => "Tag" )
Translation.create_if_not_exists( :locale => 'de', :source => "First Solution", :target => "Erstlösung" )
Translation.create_if_not_exists( :locale => 'de', :source => "Vendor", :target => "Hersteller" )
Translation.create_if_not_exists( :locale => 'de', :source => "Action", :target => "Aktion" )
Translation.create_if_not_exists( :locale => 'de', :source => "uninstall", :target => "deinstallieren" )
Translation.create_if_not_exists( :locale => 'de', :source => "install", :target => "installieren" )
Translation.create_if_not_exists( :locale => 'de', :source => "reinstall", :target => "erneut installieren" )
Translation.create_if_not_exists( :locale => 'de', :source => "deactivate", :target => "deaktivieren" )
Translation.create_if_not_exists( :locale => 'de', :source => "activate", :target => "aktivieren" )
Translation.create_if_not_exists( :locale => 'de', :source => "uninstalled", :target => "deinstalliert" )
Translation.create_if_not_exists( :locale => 'de', :source => "installed", :target => "installiert" )
Translation.create_if_not_exists( :locale => 'de', :source => "deactivated", :target => "deaktiviert" )
Translation.create_if_not_exists( :locale => 'de', :source => "activated", :target => "aktiviert" )
Translation.create_if_not_exists( :locale => 'de', :source => "new", :target => "neu" )
Translation.create_if_not_exists( :locale => 'de', :source => "note", :target => "Notiz" )
Translation.create_if_not_exists( :locale => 'de', :source => "phone", :target => "Telefon" )
Translation.create_if_not_exists( :locale => 'de', :source => "web", :target => "Web" )
Translation.create_if_not_exists( :locale => 'de', :source => "Change order", :target => "Reihenfolge ändern" )
Translation.create_if_not_exists( :locale => 'de', :source => "Group by", :target => "Gruppieren mit" )
Translation.create_if_not_exists( :locale => 'de', :source => "Items per page", :target => "Einträge je Seite" )
Translation.create_if_not_exists( :locale => 'de', :source => "Last Contact", :target => "Letzter Kontakt" )
Translation.create_if_not_exists( :locale => 'de', :source => "Last Contact Agent", :target => "Letzter Kontakt Agent" )
Translation.create_if_not_exists( :locale => 'de', :source => "Last Contact Customer", :target => "Letzter Kontakt Kunde" )
Translation.create_if_not_exists( :locale => 'de', :source => "Create an inbound Ticket", :target => "Erstelle ein eingehendes Ticket" )
Translation.create_if_not_exists( :locale => 'de', :source => "Create an outbound Ticket (will send this as email to customer)", :target => "Erstelle ein ausgehendes Ticket (wird per E-Mail an den Kunden gesendet)" )
Translation.create_if_not_exists( :locale => 'de', :source => "Age", :target => "Alter" )
Translation.create_if_not_exists( :locale => 'de', :source => "Article Count", :target => "Artikel Anzahl" )
Translation.create_if_not_exists( :locale => 'de', :source => "Article", :target => "Artikel" )
Translation.create_if_not_exists( :locale => 'de', :source => "Close Time", :target => "Schließzeit" )
Translation.create_if_not_exists( :locale => 'de', :source => "First Response", :target => "Erste Reaktion" )
Translation.create_if_not_exists( :locale => 'de', :source => "up", :target => "auf" )
Translation.create_if_not_exists( :locale => 'de', :source => "down", :target => "ab" )
Translation.create_if_not_exists( :locale => 'de', :source => "Inbound", :target => "Eingehend" )
Translation.create_if_not_exists( :locale => 'de', :source => "Outbound", :target => "Ausgehend" )
Translation.create_if_not_exists( :locale => 'de', :source => "Adresses", :target => "Adressen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Signatures", :target => "Signatur" )
Translation.create_if_not_exists( :locale => 'de', :source => "Filter", :target => "Filter" )
Translation.create_if_not_exists( :locale => 'de', :source => "Bulk-Action executed!", :target => "Sammelaktion ausgeführt!" )
Translation.create_if_not_exists( :locale => 'de', :source => "Moved in", :target => "Hinein Verschoben" )
Translation.create_if_not_exists( :locale => 'de', :source => "Moved out", :target => "Heraus Verschoben" )
Translation.create_if_not_exists( :locale => 'de', :source => "Country", :target => "Land" )
Translation.create_if_not_exists( :locale => 'de', :source => "Invitation sent!", :target => "Einladung versendet" )
Translation.create_if_not_exists( :locale => 'de', :source => "Can't create user", :target => "Benutzer konnte nicht angelegt werden!" )
Translation.create_if_not_exists( :locale => 'de', :source => "Update successful!", :target => "Aktualisierung erfolgreich!" )
Translation.create_if_not_exists( :locale => 'de', :source => "Invite Agents", :target => "Agenten einladen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Getting started!", :target => "Ersten Schritte!" )
Translation.create_if_not_exists( :locale => 'de', :source => "Create Admin", :target => "Admin erstellen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Configure Channels", :target => "Kanäle konfigurieren" )
Translation.create_if_not_exists( :locale => 'de', :source => "Send invitation", :target => "Einladung senden" )
Translation.create_if_not_exists( :locale => 'de', :source => "Next...", :target => "Weiter..." )
Translation.create_if_not_exists( :locale => 'de', :source => "Week", :target => "Woche" )
Translation.create_if_not_exists( :locale => 'de', :source => "Follow up possible", :target => "Nachfrage möglich" )
Translation.create_if_not_exists( :locale => 'de', :source => "Assign Follow Ups", :target => "Zuweisung bei Nachfrage" )
Translation.create_if_not_exists( :locale => 'de', :source => "Signature", :target => "Signatur" )
Translation.create_if_not_exists( :locale => 'de', :source => "Change your password", :target => "Ändern Sie Ihr Passwort" )
Translation.create_if_not_exists( :locale => 'de', :source => "Current Password", :target => "Aktuelles Passwort" )
Translation.create_if_not_exists( :locale => 'de', :source => "New Password", :target => "Neues Passwort" )
Translation.create_if_not_exists( :locale => 'de', :source => "New Password (confirm)", :target => "Neues Passwort (bestätigen)" )
Translation.create_if_not_exists( :locale => 'de', :source => "Language", :target => "Sprache" )
Translation.create_if_not_exists( :locale => 'de', :source => "Link Accounts", :target => "Verknüpfte Accounts" )
Translation.create_if_not_exists( :locale => 'de', :source => "Change your language.", :target => "Ändern Sie Ihr Sprache." )
Translation.create_if_not_exists( :locale => 'de', :source => "Successfully!", :target => "Erfolgreich!" )
Translation.create_if_not_exists( :locale => 'de', :source => "Remove", :target => "Entfernen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Add", :target => "Hinzufügen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Call Outbound", :target => "Anruf ausgehend" )
Translation.create_if_not_exists( :locale => 'de', :source => "Call Inbound", :target => "Anruf eingehend" )
Translation.create_if_not_exists( :locale => 'de', :source => "Loading...", :target => "Laden..." )
Translation.create_if_not_exists( :locale => 'de', :source => "Work Disposition", :target => "Arbeitsverteilung" )
Translation.create_if_not_exists( :locale => 'de', :source => "Timezone", :target => "Zeitzone" )
Translation.create_if_not_exists( :locale => 'de', :source => "Business Times", :target => "Arbeitszeiten" )
Translation.create_if_not_exists( :locale => 'de', :source => "Day", :target => "Day" )
Translation.create_if_not_exists( :locale => 'de', :source => "Days", :target => "Days" )
Translation.create_if_not_exists( :locale => 'de', :source => "Hour", :target => "Stunde" )
Translation.create_if_not_exists( :locale => 'de', :source => "Hours", :target => "Stunden" )
Translation.create_if_not_exists( :locale => 'de', :source => "New SLA", :target => "Neuer SLA" )
Translation.create_if_not_exists( :locale => 'de', :source => "Conditions where SLA is used", :target => "Bedingungen bei denen der SLA verwendet wird" )
Translation.create_if_not_exists( :locale => 'de', :source => "First Response Time", :target => "Reaktionszeit" )
Translation.create_if_not_exists( :locale => 'de', :source => "Update Time", :target => "Aktuallisierungszeit" )
Translation.create_if_not_exists( :locale => 'de', :source => "Solution Time", :target => "Lösungszeit" )
Translation.create_if_not_exists( :locale => 'de', :source => "Add Attribute", :target => "Attribut hinzufügen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Back to top", :target => "Nach oben" )
Translation.create_if_not_exists( :locale => 'de', :source => "Discard your unsaved changes.", :target => "Verwerfen der ungespeicherten Änderungen." )
Translation.create_if_not_exists( :locale => 'de', :source => "Copy to clipboard: Ctrl+C, Enter", :target => "In die Zwischenablage kopieren: Strg+C, Return" )
Translation.create_if_not_exists( :locale => 'de', :source => "Copy to clipboard", :target => "In die Zwischenablage kopieren" )
Translation.create_if_not_exists( :locale => 'de', :source => "Send to clients", :target => "An Clients senden" )
Translation.create_if_not_exists( :locale => 'de', :source => "Feedback about our new Interface", :target => "Feedback übers neue Design!" )
Translation.create_if_not_exists( :locale => 'de', :source => "What ideas do you have?", :target => "Welche Ideen haben Sie?" )
Translation.create_if_not_exists( :locale => 'de', :source => "Attach Screenshot of page", :target => "Screenshot dieser Seite anhängen" )
Translation.create_if_not_exists( :locale => 'de', :source => "Thanks for your Feedback!", :target => "Vielen Dank für Ihre Feedback!" )
Translation.create_if_not_exists( :locale => 'de', :source => "What can you do here?", :target => "Was können Sie hier machen?" )
Translation.create_if_not_exists( :locale => 'de', :source => "Here you can create one.", :target => "Hier können Sie eins erstellen." )
Translation.create_if_not_exists( :locale => 'de', :source => "Fold in", :target => "Einklappen" )
Translation.create_if_not_exists( :locale => 'de', :source => "from", :target => "von" )
Translation.create_if_not_exists( :locale => 'de', :source => "to", :target => "nach" )
Translation.create_if_not_exists( :locale => 'de', :source => "%s ago", :target => "vor %s" )
Translation.create_if_not_exists( :locale => 'de', :source => "in %s", :target => "in %s" )
Translation.create_if_not_exists( :locale => 'de', :source => "Mark all as seen.", :target => "Alle als gelesen markieren." )
Translation.create_if_not_exists( :locale => 'de', :source => "Pending till", :target => "Warten bis" )
#Translation.create_if_not_exists( :locale => 'de', :source => "", :target => "" )
# install locales and translations
Locale.load
Translation.load
# install all packages in auto_install
Package.auto_install()

View file

@ -24,9 +24,19 @@ get http/https calls
},
)
get json object
result = UserAgent.get(
'http://host/some_dir/some_file?param1=123',
{},
{
:json => true,
}
)
returns
result # result object
result.data # as json object
=end