Browse Source

Improved translations.

Martin Edenhofer 9 years ago
parent
commit
eb2c447e41

+ 9 - 0
app/assets/javascripts/app/controllers/_application_controller_generic.coffee

@@ -678,6 +678,15 @@ class App.Sidebar extends App.Controller
     @showSidebar()
 
 class App.Wizard extends App.Controller
+  constructor: ->
+    super
+
+    # rerender view, e. g. on langauge change
+    @bind('ui:rerender', =>
+      @render()
+      'wizard'
+    )
+
   goToSlide: (e) =>
     e.preventDefault()
     slide = $(e.target).data('slide')

+ 2 - 2
app/assets/javascripts/app/controllers/_profile/password.coffee

@@ -14,8 +14,8 @@ class Index extends App.Controller
     html = $( App.view('profile/password')() )
 
     configure_attributes = [
-      { name: 'password_old', display: 'Current Password', tag: 'input', type: 'password', limit: 100, null: false, class: 'input', single: true  },
-      { name: 'password_new', display: 'New Password',     tag: 'input', type: 'password', limit: 100, null: false, class: 'input',  },
+      { name: 'password_old', display: 'Current password', tag: 'input', type: 'password', limit: 100, null: false, class: 'input', single: true  },
+      { name: 'password_new', display: 'New password',     tag: 'input', type: 'password', limit: 100, null: false, class: 'input',  },
     ]
 
     @form = new App.ControllerForm(

+ 2 - 2
app/assets/javascripts/app/controllers/_ui_element/postmaster_set.coffee

@@ -34,7 +34,7 @@ class App.UiElement.postmaster_set
           {
             value:    'x-zammad-ignore'
             name:     'Ignore Message'
-            options:  { true: 'Yes', false: 'No'}
+            options:  { true: 'yes', false: 'no'}
           },
         ]
       expert:
@@ -43,7 +43,7 @@ class App.UiElement.postmaster_set
           {
             value:    'x-zammad-article-internal'
             name:     'Internal'
-            options:  { true: 'Yes', false: 'No'}
+            options:  { true: 'yes', false: 'no'}
           },
           {
             value:    'x-zammad-article-type_id'

+ 6 - 6
app/assets/javascripts/app/controllers/getting_started.coffee

@@ -1,4 +1,4 @@
-class Index extends App.ControllerContent
+class Index extends App.Wizard
   className: 'getstarted fit'
 
   constructor: ->
@@ -130,7 +130,7 @@ App.Config.set( 'getting_started/auto_wizard', AutoWizard, 'Routes' )
 App.Config.set( 'getting_started/auto_wizard/:token', AutoWizard, 'Routes' )
 
 
-class Admin extends App.ControllerContent
+class Admin extends App.Wizard
   className: 'getstarted fit'
   events:
     'submit form': 'submit'
@@ -505,7 +505,7 @@ class EmailNotification extends App.Wizard
 App.Config.set( 'getting_started/email_notification', EmailNotification, 'Routes' )
 
 
-class Channel extends App.ControllerContent
+class Channel extends App.Wizard
   className: 'getstarted fit'
 
   constructor: ->
@@ -558,7 +558,7 @@ class Channel extends App.ControllerContent
 
 App.Config.set( 'getting_started/channel', Channel, 'Routes' )
 
-class ChannelEmailPreConfigured extends App.ControllerContent
+class ChannelEmailPreConfigured extends App.Wizard
   className: 'getstarted fit'
 
   constructor: ->
@@ -895,7 +895,7 @@ class ChannelEmail extends App.Wizard
 
 App.Config.set( 'getting_started/channel/email', ChannelEmail, 'Routes' )
 
-class Agent extends App.ControllerContent
+class Agent extends App.Wizard
   className: 'getstarted fit'
   events:
     'submit form': 'submit'
@@ -995,7 +995,7 @@ class Agent extends App.ControllerContent
 
 App.Config.set( 'getting_started/agents', Agent, 'Routes' )
 
-class Channel extends App.ControllerContent
+class Channel extends App.Wizard
   className: 'getstarted fit'
 
   constructor: ->

+ 10 - 10
app/assets/javascripts/app/controllers/object_manager.coffee

@@ -174,7 +174,7 @@ class Edit extends App.ControllerModal
       textarea: 'Text (normal - multiline)'
       richtext: 'Text (richtext)'
       checkbox: 'Checkbox'
-      boolean:  'Yes/No'
+      boolean:  'yes/no'
 
     configureAttributesTop = [
       { name: 'name',       display: 'Name',    tag: 'input',     type: 'text', limit: 100, 'null': false },
@@ -193,11 +193,11 @@ class Edit extends App.ControllerModal
     configureAttributesInput = [
       { name: 'data_option::type',            display: 'Type',            tag: 'select', multiple: false, nulloption: true, null: false, options: { text: 'text', email: 'email', url: 'url', email: 'email', password: 'password', phone: 'phone'}, translate: true },
       { name: 'data_option::maxlength',       display: 'Max. Length',     tag: 'input',  type: 'text', limit: 100, 'null': false },
-      { name: 'data_option::null',            display: 'Required',        tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'No', false: 'Yes' }, translate: true },
-      { name: 'data_option::autocapitalize',  display: 'autocapitalize',  tag: 'select', multiple: false, nulloption: true, null: false, options: { true: 'No', false: 'Yes' }, translate: true },
-      { name: 'data_option::autocomplete',    display: 'autocomplete',    tag: 'select', multiple: false, nulloption: true, null: false, options: { true: 'No', false: 'Yes' }, translate: true },
+      { name: 'data_option::null',            display: 'Required',        tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'no', false: 'yes' }, translate: true },
+      { name: 'data_option::autocapitalize',  display: 'autocapitalize',  tag: 'select', multiple: false, nulloption: true, null: false, options: { true: 'no', false: 'yes' }, translate: true },
+      { name: 'data_option::autocomplete',    display: 'autocomplete',    tag: 'select', multiple: false, nulloption: true, null: false, options: { true: 'no', false: 'yes' }, translate: true },
       { name: 'data_option::default',         display: 'Default',         tag: 'input', type: 'text', limit: 100, null: true },
-      { name: 'data_option::note',            display: 'Note',            tag: 'input', type: 'text', limit: 100, null: true },
+      { name: 'data_option::note',            display: 'note',            tag: 'input', type: 'text', limit: 100, null: true },
     ]
     controller = new App.ControllerForm(
       model:     { configure_attributes: configureAttributesInput, className: '' },
@@ -209,8 +209,8 @@ class Edit extends App.ControllerModal
     # textarea
     configureAttributesTextarea = [
       { name: 'data_option::maxlength',       display: 'Max. Length',     tag: 'input',  type: 'text', limit: 100, null: false },
-      { name: 'data_option::null',            display: 'Required',        tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'No', false: 'Yes' }, translate: true },
-      { name: 'data_option::autocapitalize',  display: 'autocapitalize',  tag: 'select', multiple: false, nulloption: true, null: false, options: { true: 'No', false: 'Yes' }, translate: true },
+      { name: 'data_option::null',            display: 'Required',        tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'no', false: 'yes' }, translate: true },
+      { name: 'data_option::autocapitalize',  display: 'autocapitalize',  tag: 'select', multiple: false, nulloption: true, null: false, options: { true: 'no', false: 'yes' }, translate: true },
       { name: 'data_option::note',            display: 'autocomplete',    tag: 'input',  type: 'text', limit: 100, null: true },
     ]
     controller = new App.ControllerForm(
@@ -222,11 +222,11 @@ class Edit extends App.ControllerModal
 
     # select
     configureAttributesSelect = [
-      { name: 'data_option::nulloption',      display: 'Empty Selection', tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'No', false: 'Yes' }, translate: true },
-      { name: 'data_option::null',            display: 'Required',        tag: 'boolean', multiple: false, nulloption: false, null: false, options: { true: 'No', false: 'Yes' }, translate: true },
+      { name: 'data_option::nulloption',      display: 'Empty Selection', tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'no', false: 'yes' }, translate: true },
+      { name: 'data_option::null',            display: 'Required',        tag: 'boolean', multiple: false, nulloption: false, null: false, options: { true: 'no', false: 'yes' }, translate: true },
       { name: 'data_option::relation',        display: 'Relation',        tag: 'input',  type: 'text', limit: 100, null: true },
       { name: 'data_option::options',         display: 'Options',         tag: 'hash',   multiple: true, null: false },
-      { name: 'data_option::translate',       display: 'Übersetzen',      tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'No', false: 'Yes' }, translate: true },
+      { name: 'data_option::translate',       display: 'Übersetzen',      tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'no', false: 'yes' }, translate: true },
       { name: 'data_option::note',            display: 'Note',            tag: 'input',  type: 'text', limit: 100, null: true },
     ]
     controller = new App.ControllerForm(

+ 8 - 3
app/assets/javascripts/app/controllers/widget/invite_user.coffee

@@ -25,15 +25,20 @@ class App.InviteUser extends App.Wizard
         @el.remove()
 
   render: =>
-    @html App.view('widget/invite_user')(
+    modal = $(App.view('widget/invite_user')(
       head: @head
-    )
+    ))
     new App.ControllerForm(
-      el:        @$('.js-form')
+      el:        modal.find('.js-form')
       model:     App.User
       screen:    @screen
       autofocus: true
     )
+    if !@initRenderingDone
+      @initRenderingDone = true
+      @html modal
+    else
+      @$('.modal-dialog').replaceWith(modal)
 
   submit: (e) =>
     e.preventDefault()

+ 8 - 1
app/assets/javascripts/app/lib/app_post/i18n.coffee

@@ -267,7 +267,14 @@ class _i18nSingleton extends Spine.Module
     true
 
   getNotTranslated: (locale) =>
-    @_notTranslated[locale || @locale]
+    notTranslated = @_notTranslated[locale || @locale]
+    return notTranslated if locale && locale isnt @locale
+
+    # remove already translated entries
+    for local_locale, translation_list of notTranslated
+      if @mapString[local_locale] && @mapString[local_locale] isnt ''
+        delete notTranslated[local_locale]
+    notTranslated
 
   removeNotTranslated: (locale, key) =>
     delete @_notTranslated[locale][key]

+ 8 - 8
app/assets/javascripts/app/models/overview.coffee

@@ -52,15 +52,15 @@ class App.Overview extends App.Model
         },
         {
           value:  'last_contact'
-          name:   'Last Contact'
+          name:   'Last contact'
         },
         {
           value:  'last_contact_agent'
-          name:   'Last Contact Agent'
+          name:   'Last contact (agent)'
         },
         {
           value:  'last_contact_customer'
-          name:   'Last Contact Customer'
+          name:   'Last contact (customer)'
         },
         {
           value:  'first_response'
@@ -68,7 +68,7 @@ class App.Overview extends App.Model
         },
         {
           value:  'close_time'
-          name:   'Close Time'
+          name:   'Close time'
         },
         {
           value:  'article_count'
@@ -94,11 +94,11 @@ class App.Overview extends App.Model
         group:                  'Group'
         owner:                  'Owner'
         created_at:             'Age'
-        last_contact:           'Last Contact'
-        last_contact_agent:     'Last Contact Agent'
-        last_contact_customer:  'Last Contact Customer'
+        last_contact:           'Last contact'
+        last_contact_agent:     'Last contact (agent)'
+        last_contact_customer:  'Last contact (customer)'
         first_response:         'First Response'
-        close_time:             'Close Time'
+        close_time:             'Close time'
         article_count:          'Article Count'
       class:   'span4'
     },

+ 8 - 8
app/assets/javascripts/app/views/channel/chat.jst.eco

@@ -21,7 +21,7 @@
     <div class="control">
       <div class="select-tabs js-selectBrowserWidth">
         <div class="tab" data-value="375">iPhone 6</div>
-        <div class="tab" data-value="fit"><%- @T('1:1') %></div>
+        <div class="tab" data-value="fit">1:1</div>
         <div class="tab is-selected" data-value="1280">MacBook</div>
       </div>
     </div>
@@ -34,7 +34,7 @@
         <input type="url" class="js-testurl-input" id="preview-iframe" value="<%= @previewUrl %>" placeholder="www.zammad.org">
         <div class="loading icon small muted"></div>
       </div>
-      <input type="submit" class="btn" value="<%- @T('Load') %>">
+      <input type="submit" class="btn" value="<%- @Ti('Load') %>">
     </form>
     <div class="browser-body js-browserBody">
       <div class="browser-website js-website">
@@ -131,13 +131,13 @@
 
   <h2><%- @T('Usage') %></h2>
 
-  <p><%- marked(@T('Insert the widget-code into the source code of every page the chat should be visible on. It should be placed at the end of the page source code before the `</body>` closing tag.')) %></p>
+  <p><%- marked(@T('Insert the widget-code into the source code of every page the chat should be visible on. It should be placed at the end of the page source code before the §</body>§ closing tag.')) %></p>
 
-  <h3>Requirements</h3>
+  <h3><%- @T('Requirements') %></h3>
   <p><%- @T("Zammad Chat requires jQuery. If you don't already use it on your website include it like this:") %></p>
   <pre><code class="language-html js-code">&lt;script src="https://code.jquery.com/jquery-2.1.4.min.js"&gt;&lt;/script&gt;</code></pre>
 
-  <h3><%- @T('Auto-show chat') %></h3>
+  <h3><%- @T('Auto-show chat') %> (<%- @T('default') %>)</h3>
   <p><%- @T('The chat will show up once the connection to the server got established and if there is someone online to chat with.') %></p>
 
   <pre><code class="language-html js-paramsBlock">&lt;script src="<%= @baseurl %>/assets/chat/chat.min.js"&gt;&lt;/script&gt;
@@ -150,7 +150,7 @@ $(function() {
 &lt;/script&gt;</code></pre>
 
   <h3><%- @T('Manually open chat') %></h3>
-  <p><%- marked(@T('If you want to open the chat by the press of a button set the option `show` to `false` and add the class `open-zammad-chat` to the button.')) %></p>
+  <p><%- @T('If you want to open the chat by the press of a button set the option §show§ to §false§ and add the class §open-zammad-chat§ to the button.') %></p>
   <pre><code class="language-html js-paramsBlock">&lt;button class="open-zammad-chat"&gt;Chat with us&lt;/button&gt;
 
 &lt;script src="<%= @baseurl %>/assets/chat/chat.min.js"&gt;&lt;/script&gt;
@@ -172,7 +172,7 @@ $(function() {
       <li><%- @T('The chat is turned off.') %>
       <li><%- @T('There are too many people in queue for the chat.') %>
     </ol>
-    <%- marked(@T('When you turn on debugging by setting the option `debug` to `true` the reason gets printed to the javascript console.')) %>
+    <%- @T('When you turn on debugging by setting the option §debug§ to §true§ the reason gets printed to the javascript console.') %>
   </p>
 
   <h3><%- @T('Options') %></h3>
@@ -188,7 +188,7 @@ $(function() {
     <tbody>
     <% for option in @apiOptions: %>
       <tr>
-        <td><%- @T(option.name) %>
+        <td><%= option.name %>
         <td style="white-space: nowrap;"><code class="language-javascript js-code"><%= option.default %></code>
         <td style="white-space: nowrap;"><code class="language-javascript js-code"><%= option.type %></code>
         <td><%- @T(option.description, option.descriptionSubstitute) %>

+ 1 - 1
app/assets/javascripts/app/views/channel/email_account_overview.jst.eco

@@ -104,7 +104,7 @@
           <% for email_address in channel.email_addresses: %>
             <li class="list-item" data-id="<%= email_address.id %>">
               <div class="list-item-name"><%= email_address.email %></div>
-              <div class="btn btn--text js-emailAddressEdit space-left"><%- @T('Edit') %></div>
+              <div class="btn btn--text js-emailAddressEdit space-left space-right"><%- @T('Edit') %></div>
               <% if channel.email_addresses.length > 1: %>
               <div class="list-item-delete js-emailAddressDelete">
                 <%- @Icon('diagonal-cross') %>

Some files were not shown because too many files changed in this diff